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

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

Info

Publication number
CN112445850A
CN112445850A CN201910759664.9A CN201910759664A CN112445850A CN 112445850 A CN112445850 A CN 112445850A CN 201910759664 A CN201910759664 A CN 201910759664A CN 112445850 A CN112445850 A CN 112445850A
Authority
CN
China
Prior art keywords
service
converted
class
task
component container
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.)
Pending
Application number
CN201910759664.9A
Other languages
Chinese (zh)
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/CN112445850A/en
Publication of CN112445850A publication Critical patent/CN112445850A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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 present disclosure provides a data conversion method, an apparatus, an electronic device and a readable medium, the method comprising: registering, by the at least one class loader, the 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; and sequentially executing the at least one target service through a uniform interface so as to convert the data to be converted. The data conversion method, the data conversion device, the electronic equipment and the readable medium provided by the embodiment of the disclosure can register the service in a self-defined manner according to the user requirement through the class loader, thereby enhancing the expandability of the service and realizing the data conversion in a more flexible manner.

Description

Data conversion method and 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 and apparatus, an electronic device, and a computer readable medium.
Background
At present, data files are exchanged frequently among enterprises, and the exchange requirement of electronic data exchange is high. In practical application, the data format and the mode of exchange are diversified, the communication protocol is multiple, and the communication message and the file are more complex.
To implement electronic data interchange transmission, internal business documents of enterprise systems are usually in a fixed format, such as object notation (JSON). At this time, there is generally a document content conversion system, which is used to configure a customized conversion template, convert the data in the object numbered musical notation format into a demand message of each docking provider according to the docking provider template, and then send the demand message according to a protocol.
However, the expansion and flexibility of the template conversion method cannot meet the requirement. For example, a user cannot perform conversion according to the user-defined requirements of the system, and a document content conversion system of a data sender usually only focuses on the business operation process of the user, and does not completely combine the business characteristics of a docking system (data receiver), in this case, the template conversion mode cannot achieve the requirements.
Therefore, a new data conversion method, apparatus, electronic device and computer readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute 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, an apparatus, an electronic device, and a computer readable medium, which can register a service in a self-defined manner according to a user requirement through a class loader, thereby enhancing the expandability of the service and implementing data conversion in a more flexible manner.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of an embodiment of the present disclosure, a data conversion method is provided, which includes: registering, by the at least one class loader, the 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; and sequentially executing the at least one target service through a uniform interface so as to convert the data to be converted.
In an exemplary embodiment of the present disclosure, registering at least one service in the component container by the at least one class loader comprises: acquiring at least one class compression package to be loaded of each class loader; filtering the at least one class compression packet to be loaded according to the existing class compression packet in the component container to obtain at least one filtered class compression packet to be loaded; and loading the filtered at least one class compression package to be loaded into at least one service through each class loader.
In an exemplary embodiment of the present disclosure, determining at least one target service among at least one service of the component container according to the at least one split task to be converted includes: 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 so as to determine at least one target service.
In an exemplary embodiment of the present disclosure, registering at least one service in the component container by the at least one class loader comprises: acquiring at least one class compression package to be loaded of each class loader; and 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 agent respectively.
In an exemplary embodiment of the present disclosure, determining at least one target service among at least one service of the component container according to the at least one split task to be converted includes: determining and calling 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 an exemplary embodiment of the present disclosure, the method further comprises: offloading, by at least one class loader, services of at least one class loader in the component container.
In an exemplary embodiment of the present disclosure, the method further comprises: injecting at least one service in the component container into a software component model for a data recipient to apply the service in the software component model.
According to a second aspect of the embodiments of the present disclosure, a data conversion apparatus is provided, the apparatus including: a service registration module for registering at least one service in the component container by the at least one class loader; the task obtaining module is used for 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; the service searching module is used for 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; and the data conversion module is used for sequentially executing the at least one target service through a uniform interface so as to convert the data to be converted.
According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, which includes: one or more processors; storage means for storing one or more programs; when executed by the one or more processors, cause the one or more processors to implement the data conversion method of any one of the 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, wherein the program, when executed by a processor, implements the data conversion method according to any one of the above.
According to the data conversion method, the data conversion device, the electronic equipment and the computer readable medium, at least one service is registered in the component container through the class loader, service registration of user-defined requirements can be achieved, expandability of the service is enhanced, and data conversion is achieved in a more flexible mode; meanwhile, after the task to be converted is obtained, at least one target service is executed through the unified interface, the cross-class loader among different services can be called, the function of dynamically running various services is achieved, the serialization and deserialization processes during parameter transmission among various classes of loaders can be avoided, and the 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 present disclosure and together with the description, serve to explain the principles of the disclosure. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
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 method of data conversion in accordance with an exemplary embodiment.
Fig. 3 is a flow chart illustrating a method of data conversion 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 flow chart illustrating a method of data conversion according to yet another exemplary embodiment.
Fig. 7 is a block diagram illustrating a data conversion device according to an example embodiment.
FIG. 8 is an architecture diagram illustrating a data conversion system in accordance with an exemplary embodiment.
FIG. 9 is a block diagram illustrating an electronic device in accordance with 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. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, 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 provide 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, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The drawings are merely schematic illustrations of the present invention, in which the same 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 the form of 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 charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and steps, nor do they necessarily have to be performed in the order described. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The following detailed description of exemplary embodiments of the invention refers 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 (for 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 perform other processing on the received data such as the task request to be converted, and feed back a processing result (for example, the converted data — only an example) to the terminal device.
The server 105 may register at least one service in the component container, for example, through at least one class loader; the server 105 may, for example, obtain 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 server 105 may determine at least one target service among the at least one service of the component container, for example, according to the at least one split task to be converted. The server 105 may execute the at least one target service in turn, for example, through a unified interface, to convert the data to be converted.
The server 105 may be a server of one entity, and may also be composed of a plurality of servers, for example, a part of the server 105 may be, for example, used as a data conversion task submitting system in the present disclosure, for obtaining a task to execute a data conversion command; and a portion of the server 105 may also be, for example, as a data transformation system in the present disclosure, for 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 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 uniform interface so as 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 requirement, 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 method of data conversion in accordance with an exemplary embodiment. The data conversion method provided by the embodiments of the present disclosure may be executed by any electronic device with computing processing capability, such as the terminal devices 101, 102, and 103 and/or the server 105, and in the following embodiments, the server executes the method as an example for illustration, 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 the component container by at least one class loader in step S202.
In an exemplary embodiment, a user can upload at least one service which is custom-created according to the user requirement to a service end through a client. The server registers at least one service in the component container through the class loader after receiving.
In the embodiment of the present disclosure, the component container may be a base container provided by a data sender (data provider) and is used for managing installation, uninstallation, registration, search, and the like of a data receiver custom component. The data sender may include a process engine, and the method according to the embodiment of the present disclosure may be performed by the process engine. For example, the process flow processing engine can retrieve a plurality of components from the component container and perform process flow orchestration.
In an exemplary embodiment, the component container may employ a hot loading mechanism, so that in an actual operation process, a flow engine at the container end performs operations according to a predefined processing flow, and specifically, when each processing node is, services 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 at least one class loader, services of at least one class loader in the component container. When the component container adopts a hot loading mechanism, a user can unload services registered in the component container before according to the user-defined requirement at any time, so that data conversion and function extension and definition are 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 for a data recipient to apply the service in the software component model.
In the embodiment of the disclosure, the software assembly model is a reusable component written in Java language, and the software assembly model exposes member attributes of the internal domain by providing a common method conforming to a consistent design mode, that is, the common method is shared by each component, so that a data receiver can make external calls.
In step S204, a task to be converted is obtained, 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 a specific at least one split task to be converted based on analysis of the data conversion request, so as to generate a task to be converted. The conversion request may include a plurality of conversion processes, the analysis of the conversion request may be split to obtain a plurality of to-be-converted split tasks, and the to-be-converted split tasks may be, for example: the object notation (Json) in Java is converted to extensible markup language (xml), extensible markup language (xml) is converted to comma separated value file (csv), and the like, but this disclosure does not specifically limit this.
In step S206, at least one target service is determined among 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 performed by the flow processing engine dynamically 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 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 reference entry for each service component in the container. The unified interface of the embodiment of the disclosure does not need the class loader of each component plug-in to load, and the unified interface is loaded by the external application class, so that the purpose of directly copying parameters and calling the method among the component services can be realized, and the serialization and deserialization processes of different services when being called mutually can be 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, so that service registration of user-defined requirements can be realized, the expandability of the service is enhanced, and data conversion is realized in a more flexible manner; meanwhile, after the task to be converted is obtained, at least one target service is executed through the unified interface, the cross-class loader among different services can be called, the function of dynamically running various services is achieved, the serialization and deserialization processes during parameter transmission among various classes of loaders can be avoided, and the running efficiency is improved.
FIG. 3 is a flow chart illustrating a method of data conversion in accordance with 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, in step S302, at least one class compression package to be loaded for each class loader is obtained.
In step S304, the at least one class compression package to be loaded is filtered according to the existing class compression package in the component container, so as to obtain the filtered at least one class compression package to be loaded.
In the embodiment of the disclosure, when a user uploads at least one service created according to user requirements to a server by a client, the at least one service can be compressed to generate a class to be loaded compression package, and the class to be loaded compression package 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 packets existing in the component container exist 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 to be loaded may further include at least one compressed package, a third party package, and the like, and the class to be loaded may have a compressed package directory to record each compressed package. As shown in fig. 4, in step S402, a plurality of class compression packages to be loaded in the directory of the class compression packages to be loaded may be analyzed, and then compared with the class compression package set in the platform class loader, if included, step S404 is executed, otherwise, step S406 is executed to implement the filtering operation. The platform loader is connected with the component container, and operations such as searching and traversing can be performed in the component container.
In step S306, the filtered at least one class compression package to be loaded is loaded as at least one service by each class loader.
In step S308, a task to be converted is obtained, where the task to be converted includes data to be converted and at least one split task to be converted.
In step S310, using the at least one to-be-converted splitting task as an index, each class loader loads in the at least one service of the component container according to the order of the class loader, the platform class loader, and the system class loader, so as 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, the plug-in class loaders are isolated from each other and cannot pass parameters to each other (in the case of deserialization and deserialization), in which case the same class cannot be shared. In this embodiment, each class loader first searches for a class compression packet included in itself to obtain a partial service; searching for services in the component container through the platform type loader; and finally, searching the 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 method of data conversion in accordance with 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, in step S602, at least one class compression package to be loaded for each class loader is obtained.
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.
Each file in the class compression package to be loaded contains a label, the label can comprise a service label class and a service consumer, and the service consumer is used for generating a dynamic proxy to search for services.
In step S606, a task to be converted is obtained, 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 agent.
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, a common class compression packet is registered in the component container through filtering operation during service registration, so that the service can be loaded through a uniform interface, and the functions of directly performing parameter assignment among all services and calling the method can be achieved; meanwhile, the operation of repeated class compression packets 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 package name of the class compression package in the plug-in class loader is the same as that of the class compression package in the component container, but the version of the class compression package is the same, the class compression package in the plug-in class loader can be loaded through the plug-in class loader first, so as to facilitate 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 embodiments are implemented as computer programs executed by a Central Processing Unit (CPU). When executed by a central processing unit CPU, performs the above-described functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, 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 example embodiment. Referring to fig. 7, a data conversion apparatus 70 provided by an embodiment 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, a service registration module 702 may be used to register at least one service in the component container through 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; the filtering module is used for filtering the at least one class compression packet to be loaded according to the existing class compression packet in the component container so as to obtain the filtered at least one class compression packet to be loaded; and the filtering loading module is used for loading the filtered at least one class compression packet to be loaded into at least one service through each 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; and the registration module is used for 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 agent respectively.
The task obtaining module 704 may be configured to obtain a to-be-converted task, where the to-be-converted task includes data to be converted and at least one to-be-converted split task.
The service lookup module 706 may be configured to determine at least one target service among at least one service of the component container according to the at least one split task to be converted.
In an exemplary embodiment, the service lookup module 706 may be configured to use the at least one split task to be converted as an index, and each class loader is loaded in the at least one service of the component container according to the order of the class loader, the platform class loader, and the system class loader to determine at least one target service.
In an exemplary embodiment, the service lookup module 706 may include a proxy invocation module, configured to determine and invoke 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; a service lookup module for looking up the at least one target service through the at least one target service agent.
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 apparatus 70 may further include a service uninstalling module for uninstalling a service of at least one class loader in the component container through the at least one class loader.
In an exemplary embodiment, the data conversion apparatus 70 may further include a software component model module for injecting at least one service in the component container into a software component model so that a data recipient applies 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, so that service registration of user-defined requirements can be realized, the expandability of the service is enhanced, and data conversion is realized in a more flexible manner; meanwhile, after the task to be converted is obtained, at least one target service is executed through the unified interface, the cross-class loader among different services can be called, the function of dynamically running various services is achieved, the serialization and deserialization processes during parameter transmission among various classes of loaders can be avoided, and the running efficiency is improved.
FIG. 8 is an architecture diagram illustrating a data conversion system in accordance with another exemplary embodiment.
As shown in fig. 8, the data provider may provide a platform as a component container for managing installation, uninstallation, registration, search, etc. of the data receiver custom component, and the process processing engine may obtain a plurality of components from the container to perform process flow arrangement to execute tasks.
The component container provides a uniform interface which is realized by each component, the purpose of the standard interface is to ensure that the container has a uniform calling inlet and a transmission access for each component, and can avoid serialization and deserialization processes between different service calls, and specific realization content and expansion business can be defined by a user.
The component container loads the components by adopting a hot loading mechanism, in the actual operation process, the flow processing engine at the container end carries out operation according to a predefined processing flow, and specifically, when each processing node is processed, the service provided by each component can be dynamically searched according to the conversion flow, and then corresponding processing is carried out.
The component container of the data provider supports multi-version management of the components, only one component is activated at the same time, and the other versions are to be activated, so that free switching of different versions is supported.
The component Service (Service) can inject a software component model of the application APP, that is, a data receiving party (docking provider) can use the software component model in a conversion Service developed by the data receiving party, that is, functions of the data receiving party (docking provider) are shared by each component through an application program.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 200 according to this embodiment of the present disclosure is described below with reference to fig. 9. The electronic device 200 shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device 200 is embodied 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 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 to cause the processing unit 210 to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 210 may perform the steps as shown in fig. 2, 3, 6.
The memory unit 220 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)2201 and/or a cache memory unit 2202, and may further include a read only memory unit (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 of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 230 may be 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.), with one or more devices that enable a user to interact with the electronic device 200, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, 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 (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiments of the present disclosure.
FIG. 10 schematically illustrates a computer-readable storage medium in an exemplary embodiment of the disclosure.
Referring to fig. 10, a program product 400 for implementing the above 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. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the 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 propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and 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 for 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: registering, by the at least one class loader, the 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; and sequentially executing the at least one target service through a uniform interface so as to convert the data to be converted.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, 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 (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute 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 present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method of data conversion, comprising:
registering, by the at least one class loader, the 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;
and sequentially executing the at least one target service through a uniform interface so as to convert the data to be converted.
2. 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 package to be loaded of each class loader;
filtering the at least one class compression packet to be loaded according to the existing class compression packet in the component container to obtain at least one filtered class compression packet to be loaded;
and loading the filtered at least one class compression package to be loaded into at least one service through each class loader.
3. The method of claim 2, wherein determining at least one target service among the at least one service of the component container from 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 so as to determine at least one target service.
4. 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 package to be loaded of each class loader;
and 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 agent respectively.
5. The method of claim 4, wherein determining at least one target service among the at least one service of the component container from the at least one split task to be converted comprises:
determining and calling 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.
6. The method of claim 1, further comprising:
offloading, by at least one class loader, services of at least one class loader in the component container.
7. The method of claim 1, further comprising:
injecting at least one service in the component container into a software component model for a data recipient to apply the service in the software component model.
8. A data conversion apparatus, comprising:
a service registration module for registering at least one service in the component container by the at least one class loader;
the task obtaining module is used for 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;
the service searching module is used for 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;
and the data conversion module is used for sequentially executing the at least one target service through a uniform interface so as to convert the data to be converted.
9. An electronic device, comprising:
one or more processors; and
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201910759664.9A 2019-08-16 2019-08-16 Data conversion method and device, electronic equipment and readable medium Pending CN112445850A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

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

Family

ID=74741410

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112445850A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411506A (en) * 2011-07-07 2012-04-11 杭州典能科技有限公司 Java-system business-unit plug-in type managing system and dynamic business-function changing method
CN103294455A (en) * 2012-02-27 2013-09-11 杭州勒卡斯广告策划有限公司 Software service implementation method and system, as well as Java platform
US20170052803A1 (en) * 2015-08-18 2017-02-23 Pantheon, Inc. Dynamically provisioning, managing, and executing tasks
CN106649831A (en) * 2016-12-29 2017-05-10 北京奇艺世纪科技有限公司 Data filtering method and device
CN109933356A (en) * 2019-03-26 2019-06-25 杭州云英网络科技有限公司 The hot replacement method of remote agent class and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411506A (en) * 2011-07-07 2012-04-11 杭州典能科技有限公司 Java-system business-unit plug-in type managing system and dynamic business-function changing method
CN103294455A (en) * 2012-02-27 2013-09-11 杭州勒卡斯广告策划有限公司 Software service implementation method and system, as well as Java platform
US20170052803A1 (en) * 2015-08-18 2017-02-23 Pantheon, Inc. Dynamically provisioning, managing, and executing tasks
CN106649831A (en) * 2016-12-29 2017-05-10 北京奇艺世纪科技有限公司 Data filtering method and device
CN109933356A (en) * 2019-03-26 2019-06-25 杭州云英网络科技有限公司 The hot replacement method of remote agent class and device

Similar Documents

Publication Publication Date Title
US20120047506A1 (en) Resource abstraction via enabler and metadata
CN109643252B (en) Middleware interface and middleware interface generator
CN110838071B (en) Policy data processing method, device and server
CN111400061A (en) Data processing method and system
CN111045833B (en) Interface calling method and device
CN113515271B (en) Service code generation method and device, electronic equipment and readable storage medium
CN113971110A (en) Interface testing method, device, equipment and computer readable storage medium
CN107368407B (en) Information processing method and device
CN111796865A (en) Byte code file modification method and device, terminal equipment and medium
CN1853167B (en) System and method for dynamic content processing with extendable provisioning
CN113076153A (en) Interface calling method and device
CN113434315B (en) Interface management method and device, storage medium and electronic equipment
WO2019043462A1 (en) Systems and methods for creating automated interface transmission between heterogeneous systems in an enterprise ecosystem
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN114443905A (en) Interface document updating method and device, electronic equipment and readable storage medium
CN112035270A (en) Interface adaptation method, system, device, computer readable medium and electronic equipment
CN114564280A (en) Method and system for realizing software package by dynamically loading interface during running
CN112905273A (en) Service calling method and device
US7844978B2 (en) Artifact management for an extensible runtime environment
CN113535439B (en) Service request processing method, device, equipment and storage medium
CN115291928A (en) Task automatic integration method and device of multiple technology stacks and electronic equipment
CN113779122B (en) Method and device for exporting data
CN112445850A (en) Data conversion method and device, electronic equipment and readable medium
CN115834559A (en) Service calling method, device, electronic equipment, storage medium and program product
CN114301970A (en) Service calling method and device, electronic 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