[go: up one dir, main page]

CN112445850B - Data conversion method, device, electronic device and readable medium - Google Patents

Data conversion method, device, electronic device and readable medium Download PDF

Info

Publication number
CN112445850B
CN112445850B CN201910759664.9A CN201910759664A CN112445850B CN 112445850 B CN112445850 B CN 112445850B CN 201910759664 A CN201910759664 A CN 201910759664A CN 112445850 B CN112445850 B CN 112445850B
Authority
CN
China
Prior art keywords
service
class
converted
component container
compression packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910759664.9A
Other languages
Chinese (zh)
Other versions
CN112445850A (en
Inventor
蒲智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910759664.9A priority Critical patent/CN112445850B/en
Publication of CN112445850A publication Critical patent/CN112445850A/en
Application granted granted Critical
Publication of CN112445850B publication Critical patent/CN112445850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a data conversion method, a device, electronic equipment and a readable medium, wherein the method comprises the steps of registering at least one service in a component container through at least one class loader, obtaining a task to be converted, wherein the task to be converted comprises data to be converted and at least one split task to be converted, determining at least one target service in the at least one service of the component container according to the split task to be converted, and sequentially executing the at least one target service through a unified interface so as to convert the data to be converted. According to the data conversion method, the device, the electronic equipment and the readable medium, the class loader can register the service in a self-defined mode according to the user requirements, the expandability of the service is enhanced, and the data conversion is realized in a more flexible mode.

Description

Data conversion method, device, electronic equipment and readable medium
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a data conversion method, apparatus, electronic device, and computer readable medium.
Background
At present, data files are frequently exchanged between enterprises, and the exchange requirement of electronic data exchange is quite large. In practical application, the exchange data formats and modes are diversified, the communication protocols are more, and the communication messages and files are more complicated.
To implement electronic data exchange transmission, internal business documents of the enterprise system are usually in a fixed format, such as an object profile (JSON). In this time, a bill content conversion system is generally provided, which is used for configuring a customized conversion template, converting the data of the object numbered musical notation format into the requirement messages of each docking provider according to the docking provider template, and then transmitting according to the protocol.
However, the expansion and flexibility of the template conversion method do not meet the demand. For example, the user cannot perform conversion according to the user-defined requirement of the own system, and the document content conversion system of the data sender usually only focuses on the operation process of the own service and does not completely combine the service characteristics of the docking system (data receiver), in which case, the template conversion mode cannot realize the requirement.
Accordingly, there is a need for a new data conversion method, apparatus, electronic device, and computer readable medium.
The above information disclosed in the background section is only for enhancement of understanding of the background of the disclosure and therefore it may include information that does not form the prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a data conversion method, apparatus, electronic device, and computer readable medium, where a class loader can register a service in a customized manner according to a user's requirement, so as to enhance the expandability of the service and implement data conversion in a more flexible manner.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of an embodiment of the present disclosure, a data conversion method is provided, and the method includes registering at least one service in a component container through at least one class loader, obtaining a task to be converted, wherein the task to be converted includes data to be converted and at least one split task to be converted, determining at least one target service in the at least one service of the component container according to the at least one split task to be converted, and sequentially executing the at least one target service through a unified interface to convert the data to be converted.
In one exemplary embodiment of the present disclosure, registering at least one service in a component container by at least one class loader includes obtaining at least one class compression packet to be loaded for each class loader, filtering the at least one class compression packet to be loaded according to existing class compression packets in the component container to obtain filtered at least one class compression packet to be loaded, and loading the filtered at least one class compression packet to be loaded as at least one service by each class loader.
In one exemplary embodiment of the present disclosure, determining at least one target service in at least one service of the component container from the at least one split task to be converted includes indexing the at least one split task to be converted, each class loader loading in at least one service of the component container in order of class loader, platform class loader, and system class loader to determine at least one target service.
In one exemplary embodiment of the present disclosure, registering at least one service in a component container by at least one class loader includes obtaining at least one class compression package to be loaded for each class loader, registering at least one service tag class file and at least one service consumer in each class compression package to be loaded as at least one service and at least one service proxy, respectively.
In one exemplary embodiment of the present disclosure, determining at least one target service in at least one service of the component container according to the at least one split task to be converted includes determining and invoking the at least one target service agent in at least one service agent of the component container according to the at least one split task to be converted, and searching the at least one target service through the at least one target service agent.
In one exemplary embodiment of the present disclosure, the method further comprises offloading, by the at least one class loader, services of the at least one class loader in the component container.
In one exemplary embodiment of the present disclosure, the method further comprises injecting at least one service in the component container into a software component model so that the data recipient applies the service in the software component model.
According to a second aspect of the embodiment of the present disclosure, a data conversion device is provided, where the device includes a service registration module configured to register at least one service in a component container through at least one class loader, a task acquisition module configured to acquire a task to be converted, where the task to be converted includes data to be converted and at least one split task to be converted, a service search module configured to determine at least one target service in at least one service of the component container according to the at least one split task to be converted, and a data conversion module configured to sequentially execute the at least one target service through a unified interface to convert the data to be converted.
According to a third aspect of embodiments of the present disclosure, an electronic device is provided, the electronic device including one or more processors, a storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement any one of the data conversion methods described above.
According to a fourth aspect of the embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, characterized in that the program, when executed by a processor, implements a data conversion method as described in any one of the above.
According to the data conversion method, the device, the electronic equipment and the computer readable medium, which are provided by some embodiments of the present disclosure, at least one service is registered in the component container through the class loader, so that service registration of user-defined requirements can be realized, service expandability is enhanced, data conversion is realized in a more flexible manner, and simultaneously, after a task to be converted is acquired, at least one target service is executed through a unified interface, call of a cross-class loader between different services can be realized, so that functions of dynamically running various services can be realized, serialization and deserialization processes during parameter transfer between various class loaders can be avoided, and running efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. The drawings described below are merely examples of the present disclosure and other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a system block diagram illustrating a data conversion method and apparatus according to an example embodiment.
Fig. 2 is a flow chart illustrating a data conversion method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a data conversion method according to another exemplary embodiment.
Fig. 4 shows a schematic diagram of the filtering process according to step S304 in fig. 3.
Fig. 5 shows a schematic diagram of the loading process according to step S310 in fig. 3.
Fig. 6 is a flowchart illustrating a data conversion method according to still another exemplary embodiment.
Fig. 7 is a block diagram illustrating a data conversion device according to an exemplary embodiment.
Fig. 8 is an architecture diagram of a data conversion system, according to an example embodiment.
Fig. 9 is a block diagram of an electronic device, according to an example embodiment.
Fig. 10 is a schematic diagram illustrating a computer-readable storage medium according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
The drawings are merely schematic illustrations of the present invention, in which like reference numerals denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and not necessarily all of the elements or steps are included or performed in the order described. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The following describes example embodiments of the invention in detail with reference to the accompanying drawings.
FIG. 1 is a system block diagram illustrating a data conversion method and apparatus according to an example embodiment.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for a data conversion system operated by a user with the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the task request to be converted, and feed back the processing result (e.g., converted data—only an example) to the terminal device.
The server 105 may register at least one service in the component container, e.g., through at least one class loader, the server 105 may obtain a task to be converted, e.g., comprising data to be converted and at least one split task to be converted, and the server 105 may determine at least one target service in the at least one service of the component container, e.g., based on the at least one split task to be converted. The server 105 may sequentially execute the at least one target service, for example, through a unified interface, to convert the data to be converted.
The server 105 may be an entity server, may be formed of a plurality of servers, for example, a part of the server 105 may be used as a data conversion task submitting system in the disclosure for acquiring tasks to be performed with data conversion commands, and a part of the server 105 may be used as a data conversion system in the disclosure for registering at least one service in a component container through at least one class loader, acquiring tasks to be converted, wherein the tasks to be converted comprise data to be converted and at least one split task to be converted, determining at least one target service in the at least one service of the component container according to the at least one split task to be converted, and sequentially executing the at least one target service through a unified interface to convert the data to be converted.
According to the data conversion method and device provided by the embodiment of the disclosure, the class loader can register the service in a self-defined manner according to the user requirements, so that the expandability of the service is enhanced, and the data conversion is realized in a more flexible manner.
Fig. 2 is a flow chart illustrating a data conversion method according to an exemplary embodiment. The data conversion method provided in the embodiments of the present disclosure may be performed by any electronic device having computing processing capability, such as the terminal devices 101, 102, 103 and/or the server 105, and in the following embodiments, the method performed by the server is exemplified, but the present disclosure is not limited thereto. The data conversion method 20 provided by the embodiment of the present disclosure may include steps S202 to S208.
As shown in fig. 2, at least one service is registered in a component container through at least one class loader in step S202.
In an exemplary embodiment, a user may upload at least one service, which is custom created according to user requirements, to a server through a client. The server registers at least one service in the component container through the class loader after receiving.
In embodiments of the present disclosure, the component container may be a base container provided by a data sender (data provider) for managing the installation, uninstallation, registration, lookup, etc. of a data receiver custom component. Wherein the data sender may include a flow processing engine by which the methods of the disclosed embodiments may be performed. For example, a process processing engine may obtain multiple components from a component container and process flow orchestration.
In an exemplary embodiment, the component container may employ a hot loading mechanism, so that in an actual running process, a flow engine at the container end performs a job according to a predefined processing flow, and specifically, when each processing node, service provided by each component can be dynamically searched according to a conversion flow, and then corresponding processing is performed.
In an exemplary embodiment, the method may further include offloading, by the at least one class loader, services of the at least one class loader in the component container. When the component container adopts a hot loading mechanism, a user can unload the service registered in the component container before the user according to the user-defined requirement, so that data conversion and function expansion and definition can be realized in a more flexible mode.
In an exemplary embodiment, the method may further include injecting at least one service in the component container into a software component model such that the data recipient applies the service in the software component model.
In the embodiment of the disclosure, the software building model is a reusable component written in Java language, and the software building model exposes member attributes of the inner domain by providing a common method conforming to a consistency design mode, namely the common method is shared to each component so that a data receiver can make external calls.
In step S204, a task to be converted is acquired, where the task to be converted includes data to be converted and at least one split task to be converted.
In the embodiment of the disclosure, the server may initiate a data conversion request, and after receiving the data conversion request, the server extracts data to be converted according to data conversion, and obtains at least one specific split task to be converted based on analysis of the data conversion request, so as to generate the task to be converted. The conversion request may include various conversion processes, and the parsing of the conversion request may be split to obtain a plurality of split tasks to be converted, where the split tasks to be converted may include, for example, an object profile (Json) to extensible markup language (xml), an extensible markup language (xml) to comma separated value file (csv), etc., which is not limited in this disclosure.
In step S206, at least one target service is determined among the at least one service of the component container according to the at least one split task to be converted.
In an exemplary embodiment, a lookup may be dynamically performed by the flow processing engine on at least one service in the component container to determine at least one target service.
In step S208, the at least one target service is sequentially executed through a unified interface, so as to convert the data to be converted.
In the embodiment of the disclosure, the component container may provide a standard interface as a unified interface, and the unified interface may ensure that the component container has a unified call entry and a unified call entry for each service component in the container. The unified interface of the embodiment of the disclosure does not need class loaders of component plug-ins to load, and loads from the loading of outer application classes, so that the purposes that parameter copying and calling methods can be directly carried out among component services can be realized, and the processes of serialization and deserialization of different services in the process of mutual calling time sequence are avoided.
According to the data conversion method provided by the embodiment of the disclosure, at least one service is registered in the component container through the class loader, service registration required by user definition can be realized, service expandability is enhanced, data conversion is realized in a more flexible mode, meanwhile, after a task to be converted is acquired, at least one target service is executed through a unified interface, calling of different service cross-class loaders can be realized, the function of dynamically operating various services is realized, the process of serialization and deserialization during parameter transmission among the class loaders can be avoided, and the operation efficiency is improved.
Fig. 3 is a flow chart illustrating a data conversion method according to an exemplary embodiment. The data conversion method 30 provided by the embodiment of the present disclosure may include steps S302 to S312.
As shown in fig. 3, at least one class compression packet to be loaded for each class loader is acquired in step S302.
In step S304, the at least one class compression packet to be loaded is filtered according to the class compression packet existing in the component container, so as to obtain the filtered at least one class compression packet to be loaded.
In the embodiment of the disclosure, when a user uploads at least one service, which is created by user definition according to user requirements, to a server through a client, the at least one service can be compressed to generate a class compression packet to be loaded, and the class compression packet is uploaded to the server. After receiving at least one class compression packet to be loaded, the server side can compare the at least one class compression packet to be loaded with a plurality of class compression packets existing in the component container, and if the class compression packet existing in the component container exists in the at least one class compression packet to be loaded, the class compression packet to be loaded is filtered. Fig. 4 shows a schematic diagram of the filtering process according to step S304 in fig. 3. The class compression package to be loaded may further include at least one compression package, a third party package, etc., and the class compression package to be loaded may have a compression package directory to record each compression package. As shown in fig. 4, in step S402, a plurality of class compression packages to be loaded under the directory of class compression packages to be loaded may be parsed, and then compared with a class compression package set in a platform class loader, if so, step S404 is executed, otherwise, step S406 is executed to implement a filtering operation. The platform class loader is connected with the component container and can perform operations such as searching, traversing and the like in the component container.
In step S306, the filtered at least one class compression packet to be loaded is loaded as at least one service by each class loader.
In step S308, a task to be converted is acquired, where the task to be converted includes data to be converted and at least one split task to be converted.
In step S310, with the at least one split task to be converted as an index, each class loader loads in the at least one service of the component container in the order of the class loader, the platform class loader, and the system class loader, to determine at least one target service.
In the embodiment of the present disclosure, fig. 5 shows a schematic diagram of a loading process according to step S310 in fig. 3. As shown in fig. 5, plug-in class loaders are isolated from each other and cannot pass parameters between each other (in the case of non-serialization and anti-serialization), in which case the same classes cannot be shared. In this embodiment, each class loader searches for its own class compression packet to obtain a part of service, searches for a service in the component container through the platform class loader, and finally searches for a service by the system class loader to load and obtain at least one target service.
In step S312, the at least one target service is sequentially executed through a unified interface to convert the data to be converted.
Fig. 6 is a flow chart illustrating a data conversion method according to an exemplary embodiment. The data conversion method 60 provided by the embodiment of the present disclosure may include steps S602 to S306.
As shown in fig. 6, at least one class compression packet to be loaded for each class loader is acquired in step S602.
In step S604, at least one service tag class file and at least one service consumer in each class compression package to be loaded are registered as at least one service and at least one service agent, respectively.
Wherein each file in the class compression package to be loaded contains a tag, which may include a service tag class and a service consumer, who is used to generate a dynamic proxy to find the service.
In step S606, a task to be converted is acquired, where the task to be converted includes data to be converted and at least one split task to be converted.
In step S608, the at least one target service agent is determined and invoked in the at least one service agent of the component container according to the at least one split task to be converted.
In step S610, the at least one target service is looked up by the at least one target service proxy.
In step S612, the at least one target service is sequentially executed through a unified interface to convert the data to be converted.
According to the data conversion method provided by the embodiment of the disclosure, the common class compression package is registered in the component container through the filtering operation when registering the service, so that the service can be loaded by the unified interface, the functions of directly carrying out parameter assignment and calling the method among the services can be achieved, meanwhile, the operation of repeated class compression packages can be reduced, and the system resource occupation rate is reduced.
According to the data conversion method provided by the embodiment of the disclosure, when the class compression packet in the plug-in class loader and the class compression packet in the component container have the same packet name but the same version, the class compression packet in the plug-in class loader can be loaded through the plug-in class loader so as to facilitate the version upgrade of the service.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Those skilled in the art will appreciate that all or part of the steps implementing the above described embodiments are implemented as a computer program executed by a Central Processing Unit (CPU). The above-described functions defined by the above-described method provided by the present disclosure are performed when the computer program is executed by a central processing unit CPU. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic disk or an optical disk, etc.
Furthermore, it should be noted that the above-described figures are merely illustrative of the processes involved in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
The following are device embodiments of the present disclosure that may be used to perform method embodiments of the present disclosure. For details not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the method of the present disclosure.
Fig. 7 is a block diagram illustrating a data conversion device according to an exemplary embodiment. Referring to fig. 7, the data conversion apparatus 70 provided by the embodiments of the present disclosure may include a service registration module 702, a task acquisition module 704, a service lookup module 706, and a data conversion module 708.
In the data conversion device 70, the service registration module 702 is operable to register at least one service in the component container via at least one class loader.
In an exemplary embodiment, the service registration module 702 may include a compressed package obtaining module configured to obtain at least one class compressed package to be loaded for each class loader, a filtering module configured to filter the at least one class compressed package to be loaded according to class compressed packages existing in the component container to obtain filtered at least one class compressed package to be loaded, and a filtering loading module configured to load the filtered at least one class compressed package to be loaded into at least one service by each class loader.
In an exemplary embodiment, the service registration module 702 may include a compressed package acquisition module for acquiring at least one class compressed package to be loaded for each class loader, and a registration module for registering at least one service tag class file and at least one service consumer in each class compressed package to be loaded as at least one service and at least one service agent, respectively.
The task acquisition module 704 may be configured to acquire a task to be converted, where the task to be converted includes data to be converted and at least one split task to be converted.
The service lookup module 706 is operable to determine at least one target service among the at least one service of the component container based on the at least one split task to be converted.
In an exemplary embodiment, the service lookup module 706 is configured to load each class loader in the order of the class loader, the platform class loader, and the system class loader in the at least one service of the component container with the at least one split task to be converted as an index to determine at least one target service.
In an exemplary embodiment, the service lookup module 706 may include a proxy invocation module for determining and invoking the at least one target service proxy in the at least one service proxy of the component container according to the at least one split task to be converted, and a service lookup module for looking up the at least one target service through the at least one target service proxy.
The data conversion module 708 may be configured to sequentially execute the at least one target service through a unified interface to convert the data to be converted.
In an exemplary embodiment, the data conversion device 70 may further include a service offloading module for offloading, by the at least one class loader, services of the at least one class loader in the component container.
In an exemplary embodiment, the data conversion device 70 may further include a software component model module for injecting at least one service in the component container into a software component model for the data recipient to apply the service in the software component model.
According to the data conversion device provided by the embodiment of the disclosure, at least one service is registered in the component container through the class loader, service registration required by user definition can be realized, service expandability is enhanced, data conversion is realized in a more flexible mode, meanwhile, after a task to be converted is acquired, at least one target service is executed through a unified interface, calling of different service cross-class loaders can be realized, the function of dynamically operating various services is realized, the process of serialization and deserialization during parameter transmission among the class loaders can be avoided, and the operation efficiency is improved.
Fig. 8 is an architecture diagram of a data conversion system according to another exemplary embodiment.
As shown in FIG. 8, the data provider may provide a platform as a component container for managing the installation, uninstallation, registration, lookup, etc. of data receiver custom components from which a process processing engine may obtain multiple components for processing flow orchestration to perform tasks.
The component container provides a unified interface, which is realized by each component, and the purpose of the standard interface is to ensure that the container has a unified call entrance and a unified transfer entrance for each component, avoid the serialization and inverse serialization processes between different service calls, and ensure that the specific realization content and expansion service can be defined by users.
The component container adopts a hot loading mechanism to load components, and in the actual operation process, a flow processing engine at the container end operates according to a predefined processing flow, and particularly when each processing node is processed, services provided by each component can be dynamically searched according to the conversion flow, and then corresponding processing is performed.
The component container of the data provider supports component multi-version management, only one component is activated at the same time, and other versions are activated to support free switching of different versions.
A software building model of an APP can be injected into a component Service (Service), which means that a data receiver (docking provider) can use the software component model in a conversion Service developed by itself, that is, the function of itself is shared to each component by an application program.
Fig. 9 is a block diagram of an electronic device, according to an example embodiment.
An electronic device 200 according to such an embodiment of the present disclosure is described below with reference to fig. 9. The electronic device 200 shown in fig. 9 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 9, the electronic device 200 is in the form of a general purpose computing device. The components of the electronic device 200 may include, but are not limited to, at least one processing unit 210, at least one memory unit 220, a bus 230 connecting the different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
Wherein the storage unit stores program code executable by the processing unit 210 such that the processing unit 210 performs steps according to various exemplary embodiments of the present disclosure described in the above-described electronic prescription flow processing methods section of the present specification. For example, the processing unit 210 may perform the steps as shown in fig. 2, 3, and 6.
The memory unit 220 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 2201 and/or cache memory 2202, and may further include Read Only Memory (ROM) 2203.
The storage unit 220 may also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 230 may be a bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 200, and/or any device (e.g., router, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter 260. Network adapter 260 may communicate with other modules of electronic device 200 via bus 230. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 200, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-described method according to the embodiments of the present disclosure.
Fig. 10 schematically illustrates a computer-readable storage medium in an exemplary embodiment of the present disclosure.
Referring to fig. 10, a program product 400 for implementing the above-described method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of a readable storage medium include an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The computer readable medium carries one or more programs which, when executed by the device, cause the computer readable medium to perform the functions of registering at least one service in a component container through at least one class loader, acquiring a task to be converted, wherein the task to be converted comprises data to be converted and at least one split task to be converted, determining at least one target service in the at least one service of the component container according to the at least one split task to be converted, and sequentially executing the at least one target service through a unified interface to convert the data to be converted.
Those skilled in the art will appreciate that the modules may be distributed throughout several devices as described in the embodiments, and that corresponding variations may be implemented in one or more devices that are unique to the embodiments. The modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solutions according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and include several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the disclosure is not to be limited to the details of construction, arrangement or method of implementation described herein, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (9)

1. A method of data conversion, comprising:
Registering, by at least one class loader, at least one service in the component container;
acquiring a task to be converted, wherein the task to be converted comprises data to be converted and at least one split task to be converted;
determining at least one target service in at least one service of the component container according to the at least one split task to be converted;
Sequentially executing the at least one target service through a unified interface provided by the component container, and calling different target services in the component container by a cross-class loader so as to convert the data to be converted;
Wherein registering, by the at least one class loader, the at least one service in the component container comprises:
Acquiring at least one class compression packet to be loaded of each class loader, wherein the class compression packet to be loaded comprises at least one compression packet and a compression packet catalog, and the compression packet catalog records the at least one compression packet;
Filtering the at least one class compression packet to be loaded according to the existing class compression packets in the component container based on the compression packet catalog to obtain a compression packet in the filtered at least one class compression packet to be loaded;
and loading the compressed package in the filtered at least one class compressed package to be loaded into at least one service through each class loader.
2. The method of claim 1, wherein determining at least one target service among at least one service of the component container based on the at least one split task to be converted comprises:
And taking the at least one split task to be converted as an index, and loading each class loader in at least one service of the component container according to the sequence of the class loader, the platform class loader and the system class loader to determine at least one target service.
3. The method of claim 1, wherein registering at least one service in a component container by at least one class loader comprises:
Acquiring at least one class compression packet to be loaded of each class loader;
At least one service tag class file and at least one service consumer in each class compression package to be loaded are registered as at least one service and at least one service agent, respectively.
4. The method of claim 3, wherein determining at least one target service among at least one service of the component container based on the at least one split task to be converted comprises:
Determining and calling the at least one target service agent in the at least one service agent of the component container according to the at least one split task to be converted;
Searching for the at least one target service by the at least one target service agent.
5. The method as recited in claim 1, further comprising:
the services of the at least one class loader are offloaded in the component container by the at least one class loader.
6. The method as recited in claim 1, further comprising:
At least one service in the component container is injected into the software component model so that the data recipient applies the service in the software component model.
7. A data conversion apparatus, comprising:
A service registration module for registering at least one service in the component container through the at least one class loader;
The task acquisition module is used for acquiring a task to be converted, wherein the task to be converted comprises data to be converted and at least one split task to be converted;
A service searching module, configured to determine at least one target service from at least one service of the component container according to the at least one split task to be converted;
The data conversion module is used for sequentially executing the at least one target service through a unified interface provided by the component container, and different target services are called in the component container by a cross-class loader so as to convert the data to be converted;
The service registration module is used for acquiring at least one class compression packet to be loaded of each class loader, wherein the class compression packet to be loaded comprises at least one compression packet and a compression packet catalog, the compression packet catalog records the at least one compression packet, filtering the at least one class compression packet to be loaded according to the existing class compression packet in the component container based on the compression packet catalog to acquire the compression packet in the filtered at least one class compression packet to be loaded, and loading the compression packet in the filtered at least one class compression packet to be loaded into at least one service through each class loader.
8. An electronic device, comprising:
one or more processors, and
A storage means for storing one or more programs;
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN201910759664.9A 2019-08-16 2019-08-16 Data conversion method, device, electronic device and readable medium Active CN112445850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910759664.9A CN112445850B (en) 2019-08-16 2019-08-16 Data conversion method, device, electronic device and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910759664.9A CN112445850B (en) 2019-08-16 2019-08-16 Data conversion method, device, electronic device and readable medium

Publications (2)

Publication Number Publication Date
CN112445850A CN112445850A (en) 2021-03-05
CN112445850B true CN112445850B (en) 2025-03-18

Family

ID=74741410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910759664.9A Active CN112445850B (en) 2019-08-16 2019-08-16 Data conversion method, device, electronic device and readable medium

Country Status (1)

Country Link
CN (1) CN112445850B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294455A (en) * 2012-02-27 2013-09-11 杭州勒卡斯广告策划有限公司 Software service implementation method and system, as well as Java platform
CN106649831A (en) * 2016-12-29 2017-05-10 北京奇艺世纪科技有限公司 Data filtering method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411506B (en) * 2011-07-07 2014-03-12 杭州典能科技有限公司 Java-system business-unit plug-in type managing system and dynamic business-function changing method
US9720710B2 (en) * 2015-08-18 2017-08-01 Raytheon, Inc. Dynamically provisioning, managing, and executing tasks
CN109933356B (en) * 2019-03-26 2022-06-03 杭州云毅网络科技有限公司 Remote proxy hot replacement method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294455A (en) * 2012-02-27 2013-09-11 杭州勒卡斯广告策划有限公司 Software service implementation method and system, as well as Java platform
CN106649831A (en) * 2016-12-29 2017-05-10 北京奇艺世纪科技有限公司 Data filtering method and device

Also Published As

Publication number Publication date
CN112445850A (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN111045833B (en) Interface calling method and device
JP2006512694A (en) System and method for building and running a platform neutral generic service client application
CN113821352B (en) A remote service calling method and device
KR20080101913A (en) Scalable transformation and configuration of edi interchanges
CN113761588A (en) Data verification method and device, terminal equipment and storage medium
CN110609755A (en) Cross-blockchain node message processing method, device, device, and medium
CN110704200A (en) Methods and devices for converting invocation interfaces
CN114285793A (en) Distribution method, distribution device, distribution equipment and storage medium
CN113973139A (en) Message processing method and device
CN1853167B (en) System and method for dynamic content processing with extensible provisioning
CN112905273A (en) Service calling method and device
US20070143447A1 (en) Methods and systems for providing a structured application
CN114385382B (en) Light application access method, device, computer equipment and storage medium
CN113434315B (en) Interface management method and device, storage medium and electronic equipment
CN115291928A (en) Task automatic integration method and device of multiple technology stacks and electronic equipment
CN113535439B (en) Service request processing method, device, device and storage medium
CN113760262B (en) Task processing method, device, computer system and computer readable storage medium
CN112445850B (en) Data conversion method, device, electronic device and readable medium
CN109005163B (en) HTTP dynamic request service calling method
CN111045928A (en) Interface data testing method, device, terminal and storage medium
CN113760693B (en) Method and device for local debugging of microservice system
CN116561013A (en) Test method, device, electronic equipment and medium based on target service framework
CN116048517A (en) API (application program interface) generating method, system and device based on B/S (browser/Server) architecture application system
CN113760487B (en) Service processing method and device
CN118093218A (en) Device driver management method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant