A method and device for exporting and importing data
Patent Information
- Application Number
- CN202110346673.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-03-31
Smart Images

Figure CN113034111B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for exporting and importing data. Background Art
[0002] Business platforms based on technologies such as big data can provide users with various services. When providing services to users, these business platforms will generate a large amount of business data. Before providing the above business data to users, based on user needs or business platform needs, it may be necessary to process the business data in a certain data processing method. Among them, processing business data based on a data processing method can be called a job.
[0003] Due to the above requirements, it is necessary to develop operations for various businesses provided by the business platform and configure corresponding operations for each business of the business platform.
[0004] In this way, when there are a large number of business platforms and each business platform provides a large number of services, a large number of operations need to be developed and a long development cycle, which leads to low efficiency of business configuration operations provided for the business platforms. Summary of the invention
[0005] The purpose of the embodiment of the present invention is to provide a data export and import method and device to improve the efficiency of the service configuration operation provided for the service platform. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a data export method, the method comprising:
[0007] Determine the jobs to be exported for the target business;
[0008] Obtaining a job flow representing the execution process of each job to be exported;
[0009] For each job to be exported, obtaining implementation data for implementing the job to be exported and configuration data of the job to be exported;
[0010] Export data including the job flow, the obtained implementation data, and the configuration data is generated, and the export data is exported.
[0011] In one embodiment of the present invention, the above-mentioned determination of the target business to be exported includes:
[0012] Obtaining a job export request sent by a job export service to an export interface of a target component, wherein the target component is: a component for providing a target service to a user;
[0013] According to the job export request, the job to be exported of the target business is determined.
[0014] In one embodiment of the present invention, the exporting of the export data comprises:
[0015] The export data is stored in an export database through the export interface.
[0016] In one embodiment of the present invention, when there are multiple target services, generating the export data including the job flow, the obtained implementation data and the configuration data includes:
[0017] For each target business, a product package including a target operation flow, target realization data and target configuration data corresponding to the target business, and a corresponding relationship between the generated product package and the target business is generated, wherein the target operation flow is a operation flow representing the execution process of the job to be exported belonging to the target business, the target realization data is realization data for realizing the job to be exported belonging to the target business, and the target configuration data is configuration data for the job to be exported belonging to the target business;
[0018] The generated correspondence and product packages are packaged to obtain export data.
[0019] In a second aspect, an embodiment of the present invention provides a data import method, the method comprising:
[0020] Obtaining data to be imported of a target business, wherein the data to be imported includes: a job flow representing an execution process of each job to be imported of the target business, implementation data for implementing each job to be imported of the target business, and configuration data of each job to be imported of the target business;
[0021] The job flow and the implementation data of each job to be imported are imported into the target business, and each job to be imported is configured according to the configuration data of each job to be imported, so that each job to be imported performs data processing according to the job flow.
[0022] In one embodiment of the present invention, the step of obtaining the target business data to be imported includes:
[0023] The data to be imported of the target business is obtained from an import database, wherein the import database is used to store: the data to be imported uploaded by the job import service after receiving a data import request.
[0024] In one embodiment of the present invention, the above-mentioned job import service uploads the data to be imported in the following manner:
[0025] Based on the received data import request, obtain import data;
[0026] The imported data is unpacked to obtain product packages and the corresponding relationship between each product package and the business, wherein the product package includes the target operation flow, target realization data and target configuration data of the corresponding business, the target operation flow is: the operation flow that represents the execution process of the job to be exported belonging to the business corresponding to the product package, the target realization data is: the realization data of the job to be exported belonging to the business corresponding to the product package, and the target configuration data is: the configuration data of the job to be exported belonging to the business corresponding to the product package;
[0027] The obtained product packages and corresponding relationships are uploaded and imported into the database.
[0028] In a third aspect, an embodiment of the present invention provides a data export device, the device comprising:
[0029] A job determination module, used to determine the jobs to be exported of the target business;
[0030] A job flow acquisition module, used to acquire a job flow representing the execution process of each job to be exported;
[0031] A data acquisition module, for acquiring, for each job to be exported, implementation data for implementing the job to be exported and configuration data of the job to be exported;
[0032] The data export module is used to generate export data including the job flow, the obtained implementation data and the configuration data, and export the export data.
[0033] In one embodiment of the present invention, the above-mentioned job determination module includes:
[0034] The request obtaining submodule is used to obtain the job export request sent by the job export service to the export interface of the target component, wherein the target component is: a component used to provide a target service to the user;
[0035] The job determination submodule is used to determine the job to be exported of the target business according to the job export request.
[0036] In one embodiment of the present invention, the above-mentioned data export module is specifically used to store the exported data into the export database through the export interface.
[0037] In one embodiment of the present invention, when there are multiple target services, the data export module includes:
[0038] The data generation submodule is used to generate, for each target business, a product package including a target operation flow, target realization data and target configuration data corresponding to the target business, and a corresponding relationship between the generated product package and the target business, wherein the target operation flow is a operation flow that represents the execution process of the job to be exported belonging to the target business, the target realization data is realization data for realizing the job to be exported belonging to the target business, and the target configuration data is configuration data for the job to be exported belonging to the target business;
[0039] The data acquisition submodule is used to package the generated corresponding relationships and product packages to obtain export data.
[0040] In a fourth aspect, an embodiment of the present invention provides a data import device, the device comprising:
[0041] A data acquisition module, used to obtain the data to be imported of the target business, wherein the data to be imported includes: a job flow representing the execution process of each job to be imported of the target business, implementation data for implementing each job to be imported of the target business, and configuration data of each job to be imported of the target business;
[0042] The data import module is used to import the operation flow and the implementation data of each operation to be imported into the target business, and configure each operation to be imported according to the configuration data of each operation to be imported, so that each operation to be imported performs data processing according to the operation flow.
[0043] In one embodiment of the present invention, the data acquisition module is specifically used to obtain the data to be imported of the target business from an import database, wherein the import database is used to store: the data to be imported uploaded by the job import service after receiving a data import request.
[0044] In one embodiment of the present invention, the above-mentioned job import service specifically uploads the data to be imported in the following manner: based on the received data import request, the import data is obtained; the import data is unpacked to obtain the product package and the correspondence between each product package and the business, wherein the product package contains the target job flow, target implementation data and target configuration data of the corresponding business, the target job flow is: the job flow that represents the execution process of the job to be exported of the business corresponding to the product package, the target implementation data is: the implementation data of the job to be exported belonging to the business corresponding to the product package, and the target configuration data is: the configuration data of the job to be exported belonging to the business corresponding to the product package; the obtained product package and the corresponding relationship are uploaded to the import database.
[0045] In a fifth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0046] Memory, used to store computer programs;
[0047] The processor is used to implement the method steps described in any one of the first aspect or the second aspect when executing the program stored in the memory.
[0048] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in the first aspect or the second aspect are implemented.
[0049] It can be seen from the above that when the solution provided by the embodiment of the present invention is applied to export data, since the exported data contains the job flow representing the execution process of each job to be exported, the implementation data used to implement each job to be exported, and the configuration data of each job to be exported, after exporting the above-mentioned exported data, the above-mentioned exported data can be imported into the target business that has not performed job development, and the target business can directly process the business data based on the imported data. Compared with the prior art, there is no need to develop corresponding jobs for each business, but only needs to export the jobs to be exported of the target business, and import the exported jobs to be exported into the target business that has not performed job development, thereby improving the efficiency of the business configuration jobs provided to the business platform.
[0050] In addition, since the exported data includes job flow, implementation data and configuration data, the exported data contains more comprehensive data and a larger amount of data, batch data export and migration are realized, further improving the efficiency of business configuration operations provided for the business platform.
[0051] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A flowchart of a data export method provided by an embodiment of the present invention;
[0054] Figure 2A flowchart of a data import method provided by an embodiment of the present invention;
[0055] Figure 3 A signaling interaction diagram of a data export and import method provided by an embodiment of the present invention;
[0056] Figure 4 A schematic diagram of the structure of a data export device provided by an embodiment of the present invention;
[0057] Figure 5 A schematic diagram of the structure of a data import device provided by an embodiment of the present invention;
[0058] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] First, the execution subject of the data export method provided by the embodiment of the present invention is described.
[0061] In one case, the execution subject for realizing data export may be an electronic device in a business platform. The business platform is: a platform for providing services to users, such as a business platform based on big data technology.
[0062] In this case, the electronic device may be an electronic device having a management function in the service platform.
[0063] The electronic device may also be an electronic device in a business platform where the job to be exported is deployed. Specifically, the target component in the electronic device may be the execution subject, and the target component is a component for implementing the target business corresponding to the job to be exported.
[0064] In another case, the execution entity for implementing data export may also be an electronic device in a test platform, and the above-mentioned test platform is a platform for implementing test functions.
[0065] Specifically, the above-mentioned electronic device may be an electronic device with management function in the test platform.
[0066] In another case, the execution entity for realizing data export may also be: an electronic device outside the platform used to realize data export.
[0067] See also Figure 1 , Figure 1 A flowchart of a data export method provided in an embodiment of the present invention is provided. The method includes the following steps S101-S104.
[0068] Step S101: Determine the jobs to be exported of the target business.
[0069] The target service may be one or more services provided by the service platform to the user. For example, the target service may be an audio and video provision service, an information query service, an identity authentication service, etc. The service platform may be a service platform based on big data technology.
[0070] A job can be understood as a data processing method or data processing business logic for processing business data of a business. For example, the above job can be a job for deleting, inserting, merging, etc. business data of a business.
[0071] On this basis, the above-mentioned job to be exported refers to: a data processing method to be exported and used to process the business data of the target business.
[0072] The above-mentioned job to be exported can be that after the electronic device receives the export request sent by the client used by the developer, it parses the job export request, obtains the job identifier carried in the job export request, and determines the job to be exported of the target business based on the obtained job identifier.
[0073] The jobs to be exported mentioned above may also be the jobs to be exported of the target business selected by the developer on the user operation interface, and the electronic device determines the jobs to be exported selected by the developer as the jobs to be exported of the target business.
[0074] The above-mentioned jobs to be exported may also be that the developer selects a target business on the user operation interface, the electronic device determines each job corresponding to the target business selected by the developer, and uses the determined each job as the jobs to be exported of the target business.
[0075] Step S102: Obtaining a job flow representing the execution process of each job to be exported.
[0076] The above-mentioned job flow is used to characterize the execution process of each job to be exported. When processing the business data of a business, it is necessary to execute each job in sequence according to the execution process of each job of the business to process the business data of the business, so it is necessary to obtain the job flow that characterizes the execution process of each job to be exported.
[0077] For example, assuming that the jobs to be exported of the target business include W1, W2, and W3, the job flow may be: a job flow that represents executing W1 first, then executing W2, and finally executing W3.
[0078] Specifically, the execution process of each business job can be preset. In this case, after the job to be exported is determined, the job flow representing the execution process of each job to be exported of the target business can be obtained from the above preset execution process.
[0079] The above-mentioned operation flow may also determine the operation flow representing the execution process of each job to be exported according to the input information and output information of each job to be exported.
[0080] Specifically, the input physical meaning represented by the input information of each job to be exported and the output physical meaning represented by the output information can be determined; for each job to be exported, the input physical meaning corresponding to the job to be exported is matched with the output physical meanings corresponding to other jobs to be exported, and the output physical meaning corresponding to the job to be exported is matched with the input physical meanings corresponding to other jobs to be exported, and the execution process between the job to be exported and the other jobs to be exported is determined according to the matching results; according to the determined execution process between the jobs to be exported, the job flow that characterizes the execution process of each job to be exported is determined.
[0081] For example, assuming that the jobs to be exported of the target business include W1, W2, and W3, the input physical meaning and output physical meaning corresponding to each job to be exported are shown in Table 1 below.
[0082] Table 1
[0083]
[0084] For the job to be exported W1, its corresponding output physical meaning matches the corresponding input physical meaning of the job to be exported W3, that is, the output information of the job to be exported W1 is the input information of the job to be exported W3. It can be determined that the job to be exported W3 is started after the job to be exported W1 is executed.
[0085] For the job to be exported W2, its corresponding input physical meaning matches the output physical meaning of the job to be exported W3, that is, the input information of the job to be exported W2 is the output information of the job to be exported W3. It can be determined that the job to be exported W2 starts to be executed after the job to be exported W3 is executed.
[0086] For the job to be exported W3, its corresponding input physical meaning matches the output physical meaning of the job to be exported W1, and its corresponding output physical meaning matches the input physical meaning of the job to be exported W2, that is, the input information of the job to be exported W3 is the output information of the job to be exported W1, and the output information of the job to be exported W3 is the input information of the job to be exported W2. It can be determined that the job to be exported W3 starts to be executed after the job to be exported W1 is executed, and the job to be exported W2 starts to be executed after the job to be exported W3 is executed.
[0087] In this way, according to the determined execution processes of the jobs to be exported, the job flow can be determined as: a job flow representing the execution process of first executing W1, then executing W3, and finally executing W2.
[0088] The above-mentioned operation flow may also be that after the developer determines the execution flow of each job to be exported of the target business in the user operation interface, the electronic device determines the operation flow representing the execution flow of each job to be exported based on the execution flow of each job to be exported determined by the developer.
[0089] Step S103: For each job to be exported, obtaining implementation data for implementing the job to be exported and configuration data of the job to be exported.
[0090] The above-mentioned implementation data refers to data used to implement the job to be exported. For example, the above-mentioned implementation data may be data such as code and SQL used to implement the job to be exported.
[0091] The configuration data of the job to be exported refers to data used to configure the job to be exported. The configuration data of the job to be exported may include: operation rules, resource configuration, alarm rules, and scheduling configuration of the job to be exported.
[0092] Specifically, the operation rules of the job to be exported are: rules used to implement the dependence of the job to be exported when it is executed. For example, the operation rules may be: start the execution of the job when the preset job execution trigger condition is met, and end the execution of the job when the preset job end trigger condition is met.
[0093] The resource configuration of the job to be exported is: the dependent resources used to implement the execution of the job to be exported. For example, the resource configuration may be computing resources and storage resources of a preset size.
[0094] The alarm rule of the job to be exported is a rule for generating an alarm when a fault occurs during the execution of the job to be exported. For example, the alarm rule may include sending an alarm text message to the staff, flashing an alarm light, etc.
[0095] The scheduling configuration of the job to be exported is: a rule for implementing resource scheduling configuration when the job to be exported is executed. For example, the scheduling configuration may be: a scheduling path when configuring resources, a scheduling implementation method, etc.
[0096] Specifically, the implementation data for implementing each job to be exported and the configuration data for each job to be exported can be obtained from a preset database, in which the implementation data and configuration data developed in advance by developers for each job of the target business are stored.
[0097] Developers can develop jobs in advance on the data development platform. The data development platform is used to provide users with various services such as job development, job operation, and job submission. When developing jobs, users can select job plug-ins in the user operation interface, and configure job dependency rules, resource configuration, alarm rules, and scheduling configuration based on the framework of the selected job plug-in. The implementation data for implementing the job can be configured by writing code or SQL, thereby realizing the development of the job. The electronic equipment in the data development platform can store the implementation data and configuration data of the job configured by the user in the above database.
[0098] Step S104: Generate export data including the job flow, the obtained implementation data and the configuration data, and export the export data.
[0099] Specifically, the obtained job flow, implementation data, and configuration data may be packaged to obtain a data package, which may be called a product package and used as the exported data.
[0100] It can be seen from the above that when the solution provided by this embodiment is applied to export data, since the exported data contains the job flow representing the execution process of each job to be exported, the implementation data used to implement each job to be exported, and the configuration data of each job to be exported, after exporting the above-mentioned exported data, the above-mentioned exported data can be imported into the target business that has not performed job development, and the target business can directly process the business data based on the imported data. Compared with the prior art, there is no need to develop corresponding jobs for each business, but only needs to export the jobs to be exported of the target business, and import the exported jobs to be exported into the target business that has not performed job development, thereby improving the efficiency of the business configuration jobs provided to the business platform.
[0101] In addition, since the exported data includes job flow, implementation data and configuration data, the exported data contains more comprehensive data and a larger amount of data. When importing data, batch data export and migration are realized, further improving the efficiency of business configuration operations provided to the business platform.
[0102] In one embodiment of the present invention, a job export service for exporting jobs may also be deployed in the electronic device. In this case, the jobs to be exported of the target business determined in the above step S101 may be implemented according to the following steps A1-A2.
[0103] Step A1: Obtain the job export request sent by the job export service to the export interface of the target component.
[0104] The target component is a component used to provide the target service to the user. The export interface is an interface used to implement the export operation of the target service.
[0105] The above-mentioned job export service can exchange data with target components deployed in various business platforms. Therefore, the above-mentioned job export service can also be called a public job export service.
[0106] Since the target component is used to implement the target business, the business data generated by the target business is also generated by the target component, so the export data processed by the above business data can also be generated and exported by the target component, so the job export service can send a job export request to the export interface of the target component. When the target component receives the above job export request, the target component can generate the export data according to steps S101-S104 and export the generated export data.
[0107] The above-mentioned job export request can be that after the job export service receives the job export request sent by the client used by the developer, it parses the job export request, obtains the identifier of the target component carried in the job export request, and sends the job export request to the target component corresponding to the obtained identifier.
[0108] The above-mentioned job export request can also be that after the developer selects the target business's job to be exported on the user operation interface, the job export service generates a job export request based on the target business's job to be exported selected by the developer, and sends the generated job export request to the target component.
[0109] Step A2: Determine the target business's jobs to be exported based on the job export request
[0110] The above-mentioned job to be exported may be that the target component parses the job export request, obtains the identifier of the job to be exported carried in the job export request, and determines the job to be exported of the target business based on the identifier of the job to be exported.
[0111] The above-mentioned jobs to be exported may also be that when the job export request does not carry the identifier of the job to be exported, the target component uses each job corresponding to the target business as the job to be exported of the target business.
[0112] In this way, since the job export service is a service for providing job export, when the job export service provides services, the job to be exported of the target business can be obtained according to the job export request sent by the job export service to the export interface of the target component.
[0113] In one embodiment of the present invention, when exporting the export data, the export data can be stored in the export database through the export interface of the target component.
[0114] The above-mentioned export database may be a database on an electronic device, or may be a database on an electronic device for storing export data. The above-mentioned electronic device may be referred to as a three-state public service machine.
[0115] Specifically, a download button / interface may be provided in the service page of the job export service, and the developer may download the export data in the export database through the download button / interface.
[0116] Storing the exported data in the export database in this way can save the generated export data, and when the export data is needed in the future, it can be obtained directly from the export database without regenerating the export data, which improves the efficiency of obtaining the export data and can also realize centralized management of each export data based on the export database.
[0117] In one embodiment of the present invention, when there are multiple target businesses, when generating the above-mentioned export data, a product package including the target job flow, target implementation data and target configuration data corresponding to the target business, as well as the correspondence between the generated product package and the target business can be generated for each target business, and the generated correspondence and product package are packaged to obtain the export data.
[0118] The target operation flow is: the operation flow that represents the execution process of the operation to be exported belonging to the target business. The target realization data is: the realization data of the operation to be exported belonging to the target business. The target configuration data is: the configuration data of the operation to be exported belonging to the target business.
[0119] The above correspondence is: the correspondence between each generated product package and each target business.
[0120] Specifically, the generated corresponding relationship and each product package may be data encapsulated to implement packaging processing and obtain exported data.
[0121] After obtaining the product packages and the corresponding relationships, the product packages and the corresponding relationships may be imported into an export database. Since the product packages are stored in the export database, the export database may also be called a product library.
[0122] In this way, when there are multiple target businesses, since the export data includes the correspondence between the target business and the product packages, the target business corresponding to each product package can be determined more accurately based on the correspondence.
[0123] Corresponding to the above data export method, an embodiment of the present invention also provides a data import method.
[0124] First, the execution subject of the data import method provided by the embodiment of the present invention is described.
[0125] The execution subject for realizing data import is the electronic device in the business platform. The above business platform is the business platform to be used for data import.
[0126] Specifically, the electronic device may be an electronic device with a management function in a business platform.
[0127] The electronic device may also be an electronic device that deploys the target service corresponding to the data to be imported in the service platform. Specifically, the target component in the electronic device may be the execution subject. The target component is a component used to provide the target service to the user.
[0128] See also Figure 2 , Figure 2 A flowchart of a data import method provided in an embodiment of the present invention includes the following steps S201-S202.
[0129] Step S201: Obtain the data to be imported of the target business.
[0130] The data to be imported include: a job flow representing the execution process of each job to be imported of the target business, implementation data for implementing each job to be imported of the target business, and configuration data of each job to be imported of the target business.
[0131] The data to be imported can be obtained by the electronic device receiving a data import request sent by a client used by the developer and parsing the data import request to obtain the data to be imported of the target business carried in the data import request.
[0132] Specifically, since services can be deployed on various service platforms, different service platforms can provide the same services. For the same service, the data processing method for processing the service data of the service is the same. Therefore, after obtaining the exported data of the target service of a certain service platform, the user can use the obtained exported data as the target service to be imported data of another service platform, and send a data import request carrying the obtained target service to be imported data to the other service platform. In this way, there is no need to develop operations for the target service of another service platform, which improves the efficiency of the service configuration operations provided for the service platform.
[0133] For example: developers can download the export data of the target business to a USB flash drive or a network disk on the service page of the job export service of a certain business platform. The developer will use the export data of the target business downloaded to the USB flash drive or the network disk as the import data of the same target business in another business platform, and upload the import data of the target business to the other business platform. The client used by the developer sends a data import request carrying the import data of the target business to the business platform.
[0134] Of course, for different businesses, the data processing methods for processing the business data of the business may also be the same. Therefore, after obtaining the exported data of a target business, the user can use the obtained exported data as the to-be-imported data of the target business with the same operation as the target business, and send a data import request carrying the obtained to-be-imported data of the target business to the business platform.
[0135] The data to be imported may also be data to be imported of a target business obtained from an import database. The import database is used to store the data to be imported uploaded by the job import service after receiving a data import request.
[0136] The above-mentioned job import service is used to implement the job import function. The above-mentioned job import service can interact with various components used to implement business data. The above-mentioned job import service can also be called a public job import service.
[0137] For a business platform, it can export the export data of the target business and import the import data of the target business. Therefore, on a business platform, public job export service and public job import service can be set up at the same time, and the public job export service can be integrated with the public job import service. The integrated service can be called public job import and export service.
[0138] Specifically, after receiving a data import request, the job import service can parse the data import request, obtain the identifier of the data to be imported carried in the data import request, obtain the data to be imported of the target business from the export database based on the obtained identifier of the data to be imported, and import the obtained data to be imported into the above-mentioned import database, which is used to store: the export data of the target business.
[0139] Step S202: importing the job flow and the implementation data of each job to be imported into the target business, and configuring each job to be imported according to the configuration data of each job to be imported, so that each job to be imported performs data processing according to the job flow.
[0140] Specifically, the job flow and the implementation data of each job to be imported can be imported through the import interface of the target business, and each job to be imported can be configured according to the configuration data of each job to be imported through the import interface of the target business.
[0141] For the same target business, you can export the target business's export data and import the target business's import data. Therefore, for the same target business, you can set an import and export interface, which can realize both data import and data export.
[0142] Since the above-mentioned job flow represents the execution process of the jobs to be imported of the target business, the implementation data of the above-mentioned jobs to be imported are data used to implement each job to be imported. After importing the job flow and the implementation data of each job to be imported into the target business, and configuring each imported job according to the configuration data of each imported job, the target business can execute the implementation data of each job to be imported in sequence according to the execution process of each job to be imported represented by the job flow.
[0143] As can be seen from the above, when the scheme provided by this embodiment is applied to import data, after obtaining the data to be imported of the target business, the job flow and implementation data contained in the data to be imported are imported into the target business, and each job to be imported is configured according to the configuration data of each job to be imported. Since the above configuration data is data used to implement the configuration of the job to be imported, the above job flow is the execution process of each job to be imported, and the above implementation data is the implementation data of each job to be imported, the data to be imported can be configured based on the configuration data, and the implementation data of each job to be imported can be executed in sequence according to the execution process of each job to be imported represented by the job flow, so that the business data of the target business can be processed. Compared with the prior art, the staff does not need to develop jobs for each business separately, but only needs to import the data to be imported of the target business, which improves the efficiency of the business configuration job provided for the business platform.
[0144] In addition, since the imported data includes job flow, implementation data and configuration data, the data contained in the imported data is relatively comprehensive and the data volume is large. When importing data, batch data migration and import are realized, further improving the efficiency of business configuration operations provided to the business platform.
[0145] In one embodiment of the present invention, the above-mentioned job import service can also upload the data to be imported through the following steps B1 to B3.
[0146] Step B1: Based on the received data import request, obtain import data.
[0147] Specifically, the data import request may be parsed to obtain the import data carried in the data import request.
[0148] Step B2: Unpack the imported data to obtain product packages and the corresponding relationship between each product package and the business.
[0149] The above-mentioned product package includes the target operation flow, target realization data and target configuration data of the corresponding business.
[0150] The above-mentioned target job flow is: the job flow that represents the execution process of the jobs to be exported that belong to the business corresponding to the product package, the above-mentioned target implementation data is: the implementation data of the jobs to be exported that belong to the business corresponding to the product package, and the above-mentioned target configuration data is: the configuration data of the jobs to be exported that belong to the business corresponding to the product package.
[0151] The above correspondence is the correspondence between each product package and the business. When a product package has a correspondence with a business, it means that the business data of the business can be processed based on the data in the product package.
[0152] Since the data processing method for processing the business data of the same business on different business platforms is the same, a product package can have a corresponding relationship with the same target business on different business platforms.
[0153] Of course, when the data processing methods for processing the business data of different businesses are the same, the same product package may also have a corresponding relationship with different target businesses.
[0154] When unpacking the imported data, the imported data can be split to obtain various product packages and the correspondence between each product package and the business. According to the above correspondence, the business corresponding to each product package can be determined.
[0155] Step B3: Upload the obtained product package and the corresponding relationship into the database.
[0156] Since the obtained product packages and corresponding relationships are uploaded and imported into the database, and the corresponding relationships are the corresponding relationships between each product package and the business, the business corresponding to each product package can be determined more accurately based on the above corresponding relationships.
[0157] The following is a specific embodiment, and combined with Figure 3 , the data export and import method provided in the embodiment of the present invention is specifically described.
[0158] Since different business platforms can provide the same business, for example, business platform A and business platform B can both provide identity information query services, the data processing method for processing business data of the same business is the same. Therefore, when exporting data, developers can export the export data of the target business of business platform A, and use the exported data as the import data of the target business of business platform B, and import the above import data into the target business of business platform B. In this way, there is no need to develop businesses in different business platforms, which improves the efficiency of business development.
[0159] Figure 3 An information interaction diagram of a data export and import method provided in an embodiment of the present invention. Figure 3 It includes developers, public import and export services S1, target components T1, and artifact library D1 in business platform A, and public import and export services S2, target components T2, and artifact library D2 in business platform B.
[0160] The developer logs in to the public import and export service S1 and sends a job export request to the public import and export service S1. The job export request is used to request to export the jobs of each target business in the business platform A.
[0161] The public import and export service S1 sends a job export request to the export interface of the target component T1 corresponding to each target business.
[0162] Based on the job export request, each target component T1 generates each product package including the job flow, implementation data and configuration data, determines the correspondence between each product package and the target business, merges the generated product packages with the correspondence, and obtains the exported data.
[0163] The target component imports the above export data into the product library D1 through the export interface.
[0164] Developers download the export data corresponding to each target business in the product library D1 through the download interface of the public import and export service S1.
[0165] The developer uploads the downloaded export data as import data to the public import and export service S2.
[0166] The public import and export service S2 splits the imported data to obtain the corresponding relationship between each product package and the business and each product package.
[0167] The public import and export service S2 records the information of each product package, and uploads the split product packages and the corresponding relationships to the product library D2.
[0168] The public import and export service imports each product package into the target component of the business corresponding to each product package.
[0169] Corresponding to the above-mentioned data export method, an embodiment of the present invention further provides a data export device.
[0170] See also Figure 4 , Figure 4 A schematic diagram of the structure of a data export device provided in an embodiment of the present invention, the device includes the following modules 401-404.
[0171] The job determination module 401 is used to determine the jobs to be exported of the target business;
[0172] The job flow obtaining module 402 is used to obtain the job flow representing the execution process of each job to be exported;
[0173] The data acquisition module 403 is used to obtain, for each job to be exported, implementation data for implementing the job to be exported and configuration data of the job to be exported;
[0174] The data export module 404 is used to generate export data including the job flow, the obtained implementation data and the configuration data, and export the export data.
[0175] It can be seen from the above that when the solution provided by this embodiment is applied to export data, since the exported data contains the job flow representing the execution process of each job to be exported, the implementation data used to implement each job to be exported, and the configuration data of each job to be exported, after exporting the above-mentioned exported data, the above-mentioned exported data can be imported into the target business that has not performed job development, and the target business can directly process the business data based on the imported data. Compared with the prior art, there is no need to develop corresponding jobs for each business, but only needs to export the jobs to be exported of the target business, and import the exported jobs to be exported into the target business that has not performed job development, thereby improving the efficiency of the business configuration jobs provided to the business platform.
[0176] In addition, since the exported data includes job flow, implementation data and configuration data, the exported data contains more comprehensive data and a larger amount of data, batch data export and migration are realized, further improving the efficiency of business configuration operations provided for the business platform.
[0177] In one embodiment of the present invention, the above-mentioned job determination module 401 includes:
[0178] The request obtaining submodule is used to obtain the job export request sent by the job export service to the export interface of the target component, wherein the target component is: a component used to provide a target service to the user;
[0179] The job determination submodule is used to determine the job to be exported of the target business according to the job export request.
[0180] In this way, since the job export service is used to provide a job export service, when the job export service provides services, the job to be exported of the target business can be obtained according to the job export request sent by the job export service to the export interface of the target component.
[0181] In one embodiment of the present invention, the above-mentioned data export module is specifically used to store the exported data into the export database through the export interface.
[0182] Storing the exported data in the export database in this way can save the generated export data, and when the export data is needed in the future, it can be obtained directly from the export database without regenerating the export data, which improves the efficiency of obtaining the export data and can also realize centralized management of each export data based on the export database.
[0183] In one embodiment of the present invention, when there are multiple target services, the data export module includes:
[0184] The data generation submodule is used to generate, for each target business, a product package including a target operation flow, target realization data and target configuration data corresponding to the target business, and a corresponding relationship between the generated product package and the target business, wherein the target operation flow is a operation flow that represents the execution process of the job to be exported belonging to the target business, the target realization data is realization data for realizing the job to be exported belonging to the target business, and the target configuration data is configuration data for the job to be exported belonging to the target business;
[0185] The data acquisition submodule is used to package the generated corresponding relationships and product packages to obtain export data.
[0186] In this way, when there are multiple target services, since the export data includes the correspondence between the target services and the product packages, the target services corresponding to each product package can be determined more accurately based on the correspondence.
[0187] Corresponding to the above-mentioned data importing method, an embodiment of the present invention further provides a data importing device.
[0188] See also Figure 5 , Figure 5 A structural diagram of a data import device provided in an embodiment of the present invention, the device includes the following modules 501-502.
[0189] The data acquisition module 501 is used to obtain the data to be imported of the target business, wherein the data to be imported includes: a job flow representing the execution process of each job to be imported of the target business, implementation data for implementing each job to be imported of the target business, and configuration data of each job to be imported of the target business;
[0190] The data import module 502 is used to import the job flow and the implementation data of each job to be imported into the target business, and configure each job to be imported according to the configuration data of each job to be imported, so that each job to be imported performs data processing according to the job flow.
[0191] As can be seen from the above, when the scheme provided by this embodiment is applied to import data, after obtaining the data to be imported of the target business, the job flow and implementation data contained in the data to be imported are imported into the target business, and each job to be imported is configured according to the configuration data of each job to be imported. Since the above configuration data is data used to implement the configuration of the job to be imported, the above job flow is the execution process of each job to be imported, and the above implementation data is the implementation data of each job to be imported, the data to be imported can be configured based on the configuration data, and the implementation data of each job to be imported can be executed in sequence according to the execution process of each job to be imported represented by the job flow, so that the business data of the target business can be processed. Compared with the prior art, the staff does not need to develop jobs for each business separately, but only needs to import the data to be imported of the target business, which improves the efficiency of the business configuration job provided for the business platform.
[0192] In addition, since the imported data includes job flow, implementation data and configuration data, the data contained in the imported data is relatively comprehensive and the data volume is large. When importing data, batch data migration and import are realized, further improving the efficiency of business configuration operations provided to the business platform.
[0193] In one embodiment of the present invention, the data acquisition module 501 is specifically used to obtain the data to be imported of the target business from an import database, wherein the import database is used to store: the data to be imported uploaded by the job import service after receiving a data import request.
[0194] In one embodiment of the present invention, the above-mentioned job import service specifically uploads the data to be imported in the following manner:
[0195] Based on the received data import request, import data is obtained; the imported data is unpacked to obtain product packages and the correspondence between each product package and the business, wherein the product package contains the target job flow, target realization data and target configuration data of the corresponding business, the target job flow is: a job flow that represents the execution process of the job to be exported of the business corresponding to the product package, the target realization data is: realization data of the job to be exported of the business corresponding to the product package, and the target configuration data is: configuration data of the job to be exported of the business corresponding to the product package; the obtained product packages and the correspondence are uploaded to the import database.
[0196] Since the obtained product packages and corresponding relationships are uploaded and imported into the database, and the corresponding relationships are the corresponding relationships between each product package and the business, the business corresponding to each product package can be determined more accurately based on the above corresponding relationships.
[0197] Corresponding to the above-mentioned data exporting and importing methods, an embodiment of the present invention further provides an electronic device.
[0198] See also Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0199] Memory 603, used for storing computer programs;
[0200] The processor 601 is used to implement the data export or data import method provided by the embodiment of the present invention when executing the program stored in the memory 603.
[0201] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0202] The communication interface is used for communication between the above electronic device and other devices.
[0203] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0204] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0205] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the data export or data import method provided by the embodiment of the present invention is implemented.
[0206] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to implement the data export or data import method provided by the embodiment of the present invention.
[0207] It can be seen from the above that when the solution provided by this embodiment is applied to export data, since the exported data contains the job flow representing the execution process of each job to be exported, the implementation data used to implement each job to be exported, and the configuration data of each job to be exported, after exporting the above-mentioned exported data, the above-mentioned exported data can be imported into the target business that has not performed job development, and the target business can directly process the business data based on the imported data. Compared with the prior art, there is no need to develop corresponding jobs for each business, but only needs to export the jobs to be exported of the target business, and import the exported jobs to be exported into the target business that has not performed job development, thereby improving the efficiency of the business configuration jobs provided to the business platform.
[0208] In addition, since the exported data includes job flow, implementation data and configuration data, the exported data contains more comprehensive data and a larger amount of data, batch data export and migration are realized, further improving the efficiency of business configuration operations provided for the business platform.
[0209] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0210] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0211] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0212] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A data export method, characterized in that: The method comprises: Obtaining a job export request sent by a job export service to an export interface of a target component, and determining a job to be exported of a target business according to the job export request; wherein the target component is: a component for providing the target business to a user; and the job to be exported is a data processing business logic to be exported and used for processing business data of the target business; Obtaining a job flow representing the execution process of each job to be exported; For each job to be exported, obtaining implementation data for implementing the job to be exported and configuration data of the job to be exported; Export data including the job flow, the obtained implementation data, and the configuration data is generated, and the export data is exported.
2. The method according to claim 1, characterized in that The exported data includes: The export data is stored in an export database through the export interface.
3. The method according to any one of claims 1 to 2, characterized in that: In the case where there are multiple target businesses, generating export data including the job flow, the obtained implementation data and the configuration data includes: For each target business, a product package including a target operation flow, target realization data and target configuration data corresponding to the target business, and a corresponding relationship between the generated product package and the target business is generated, wherein the target operation flow is a operation flow representing the execution process of the job to be exported belonging to the target business, the target realization data is realization data for realizing the job to be exported belonging to the target business, and the target configuration data is configuration data for the job to be exported belonging to the target business; The generated correspondence and product packages are packaged to obtain export data.
4. A data import method, characterized in that: The method comprises: Obtaining the data to be imported of the target business from the import database, wherein the data to be imported includes: a job flow representing the execution process of each job to be imported of the target business, implementation data for implementing each job to be imported of the target business, and configuration data for each job to be imported of the target business; the job to be imported is a data processing business logic to be imported and used to process the business data of the target business, and the import database is used to store: the data to be imported uploaded by the job import service after receiving the data import request; The job flow and the implementation data of each job to be imported are imported into the target business, and each job to be imported is configured according to the configuration data of each job to be imported, so that each job to be imported performs data processing according to the job flow.
5. The method according to claim 4, characterized in that The job import service uploads the data to be imported in the following ways: Based on the received data import request, obtain import data; The imported data is unpacked to obtain product packages and the corresponding relationship between each product package and the business, wherein the product package includes the target operation flow, target realization data and target configuration data of the corresponding business, the target operation flow is: the operation flow that represents the execution process of the job to be exported belonging to the business corresponding to the product package, the target realization data is: the realization data of the job to be exported belonging to the business corresponding to the product package, and the target configuration data is: the configuration data of the job to be exported belonging to the business corresponding to the product package; The obtained product packages and corresponding relationships are uploaded and imported into the database.
6. A data export device, characterized in that: The device comprises: Job determination module, including: The request obtaining submodule is used to obtain the job export request sent by the job export service to the export interface of the target component, wherein the target component is: a component used to provide a target service to the user; A job determination submodule, used to determine the job to be exported of the target business according to the job export request; the job to be exported is the data processing business logic to be exported and used to process the business data of the target business; A job flow acquisition module, used to acquire a job flow representing the execution process of each job to be exported; A data acquisition module, for acquiring, for each job to be exported, implementation data for implementing the job to be exported and configuration data of the job to be exported; The data export module is used to generate export data including the job flow, the obtained implementation data and the configuration data, and export the export data.
7. The device according to claim 6, characterized in that The data export module is specifically used to store the exported data into the export database through the export interface.
8. The device according to any one of claims 6 to 7, characterized in that: In the case where there are multiple target businesses, the data export module includes: The data generation submodule is used to generate, for each target business, a product package including a target operation flow, target realization data and target configuration data corresponding to the target business, and a corresponding relationship between the generated product package and the target business, wherein the target operation flow is a operation flow that represents the execution process of the job to be exported belonging to the target business, the target realization data is realization data for realizing the job to be exported belonging to the target business, and the target configuration data is configuration data for the job to be exported belonging to the target business; The data acquisition submodule is used to package the generated corresponding relationships and product packages to obtain export data.
9. A data import device, characterized in that: The device comprises: A data acquisition module is used to obtain the data to be imported of the target business from the import database, wherein the data to be imported includes: a job flow representing the execution process of each job to be imported of the target business, implementation data for implementing each job to be imported of the target business, and configuration data of each job to be imported of the target business; the job to be imported is a data processing business logic to be imported for processing the business data of the target business, and the import database is used to store: the data to be imported uploaded by the job import service after receiving the data import request; The data import module is used to import the operation flow and the implementation data of each operation to be imported into the target business, and configure each operation to be imported according to the configuration data of each operation to be imported, so that each operation to be imported performs data processing according to the operation flow.
10. The device according to claim 9, characterized in that The job import service specifically uploads the data to be imported in the following manner: based on the received data import request, the import data is obtained; the import data is unpacked to obtain a product package and the correspondence between each product package and the business, wherein the product package contains the target job flow, target implementation data and target configuration data of the corresponding business, the target job flow is: a job flow that represents the execution process of the job to be exported of the business corresponding to the product package, the target implementation data is: implementation data for realizing the job to be exported of the business corresponding to the product package, and the target configuration data is: configuration data for the job to be exported of the business corresponding to the product package; the obtained product package and the correspondence are uploaded and imported into the database.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-3 or 4-5 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1-3 or 4-5 are implemented.
