Data Import Method, Device, Computer Equipment and Storage Medium
By automatically generating intermediate tables and import pages, the inconvenience of data import caused by manual generation of Excel tables is solved, and an efficient and convenient data synchronization process is achieved.
Patent Information
- Application Number
- CN202210727016.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2042-06-24
AI Technical Summary
In the prior art, manually generating excel tables to synchronize business data leads to inconvenient data import process, especially inefficient in large amounts of data.
By obtaining multiple business entity items under the target business, selecting the target business entity items, generating intermediate tables and importing page metadata, automatically generating import pages, and triggering data synchronization to intermediate tables on the page, and finally importing them into the target system.
It improves the convenience and efficiency of data import, reduces manual operations, ensures data accuracy and system privacy, and reduces system processing overhead.
Smart Images

Figure CN115033214B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and particularly to a data import method, apparatus, computer device, and storage medium. Background Art
[0002] With the development of Internet technology, a first software system may have a related second software system to further meet the requirements of related services. Moreover, important business data needs to be transmitted between the two software systems. Therefore, it is necessary to import the business data of the first software system into the second software system.
[0003] Currently, the traditional approach is to manually generate an Excel sheet with a certain data storage rule to synchronize the business data of the first system into the Excel sheet according to the data storage rule, and then directly import the data in the Excel sheet into the second software system. In this way, when the amount of business data is large, a large number of Excel sheets need to be manually created, resulting in a very inconvenient data import process. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a data import method, apparatus, computer device, storage medium, and computer program product that can improve convenience.
[0005] In a first aspect, this application provides a data import method. The method includes:
[0006] Obtain multiple business entity items under a target service;
[0007] Determine a target business entity item selected from the multiple business entity items;
[0008] Generate an intermediate table and import page metadata for the target business entity item; the intermediate table is used to carry target business data corresponding to the target business entity item;
[0009] Generate an import page based on the import page metadata;
[0010] When a data import operation is triggered on the import page, synchronize the target business data to the intermediate table, and import the target business data into a target system based on the synchronized intermediate table.
[0011] In one embodiment, the obtaining multiple business entity items under a target service includes:
[0012] When an entity object selection operation is triggered on the initialization introduction interface, determine the selected page entity object belonging to the target business; the page entity object represents the metadata of the original import page; the original import page is the original import page for importing the business data of the target business into the target system.
[0013] Obtain multiple business entity items under the page entity object for display in the initialization introduction interface.
[0014] The generation of the intermediate table and import page metadata for the target business entity item includes:
[0015] Generate an intermediate table for the target business entity item, and generate import page metadata based on the metadata in the original import page and corresponding to the target business entity item.
[0016] In one embodiment, the import page metadata includes metadata node information of multiple categories for different page controls; the metadata node information of each category is used to display the target business data under the corresponding page control in the import page.
[0017] In one embodiment, the generation of the intermediate table and import page metadata for the target business entity item includes:
[0018] Generate an intermediate table for the target business entity item.
[0019] For each target business entity item, when the target business entity item belongs to a target basic business entity item, modify the corresponding attribute in the target metadata according to the attribute of the target basic business entity item; the target metadata is the metadata for the target business entity item.
[0020] Generate the import page metadata based on the modified target metadata.
[0021] In one embodiment, the import of the target business data into the target system based on the synchronized intermediate table includes:
[0022] Allocate the target business data in the synchronized intermediate table to different subtasks in batches.
[0023] Import the target business data of the corresponding batch into the target system through the subtasks.
[0024] In one embodiment, the import of the target business data of the corresponding batch into the target system through the subtasks includes:
[0025] Each subtask asynchronously sends a processing message to a message queue; the message queue is implemented on a distributed system and is connected to multiple processing units; the processing units are used to obtain the processing message from the message queue and import the target service data corresponding to the processing message into a target system.
[0026] In one embodiment, the intermediate table is further used to record the import result and operation status for the target service data; the import page is used to display the import result and the operation status recorded in the intermediate table.
[0027] In a second aspect, the present application further provides a data import device. The device includes:
[0028] A determination module, configured to obtain multiple service entity items under a target service; determine a target service entity item selected from the multiple service entity items;
[0029] A generation module, configured to generate an intermediate table and import page metadata for the target service entity item; the intermediate table is used to carry target service data corresponding to the target service entity item;
[0030] An import module, configured to generate an import page based on the import page metadata; in the case of triggering a data import operation on the import page, synchronize the target service data to the intermediate table, and import the target service data into a target system based on the synchronized intermediate table.
[0031] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the steps of the above data import method.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and the computer program is executed by a processor to perform the steps of the above data import method.
[0033] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and the computer program is executed by a processor to perform the steps of the above data import method.
[0034] The above data import method, apparatus, computer device, storage medium, and computer program product obtain multiple business entity items under a target business, determine a target business entity item selected from the multiple business entity items, and generate an intermediate table and import page metadata for the target business entity item. The intermediate table is used to carry target business data corresponding to the target business entity item. In this way, an intermediate table and page metadata can be automatically generated according to the selected target business entity item without manual production. An import page is generated based on the import page metadata; when a data import operation is triggered on the import page, the target business data is synchronized to the intermediate table, and the target business data is imported into the target system based on the synchronized intermediate table. In this way, a data import operation can be performed on the automatically generated import page, thereby improving the convenience of data import. Description of the Drawings
[0035] Figure 1 It is an application environment diagram of the data import method in an embodiment;
[0036] Figure 2 It is a schematic flowchart of the data import method in an embodiment;
[0037] Figure 3 It is a schematic principle diagram of the data import method in an embodiment;
[0038] Figure 4 It is a schematic flowchart of the data import method in an embodiment;
[0039] Figure 5 It is a schematic flowchart of the data import method in an embodiment;
[0040] Figure 6 It is a schematic principle diagram of the data import method in an embodiment;
[0041] Figure 7 It is a schematic flowchart of the data import method in an embodiment;
[0042] Figure 8 It is a schematic flowchart of the data import method in an embodiment;
[0043] Figure 9 It is a structural block diagram of the data import apparatus in an embodiment;
[0044] Figure 10 It is an internal structure diagram of a computer device in an embodiment. Detailed Description of the Invention
[0045] In order to make the objectives, technical solutions, and advantages of this application more clearly understood, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain this application and are not intended to limit this application.
[0046] The data import method provided in the embodiments of this application can be applied to an application environment as Figure 1 shown. Among them, the terminal 110 communicates with the first server 120 through a network, and the first server 120 communicates with the second server 130 through a network. The second server 130 runs a target system. Among them, the terminal 110 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the servers 120 and 130 can be implemented by independent servers or a server cluster composed of multiple servers.
[0047] The server 120 obtains multiple business entity items under the target business and determines the target business entity item selected from the multiple business entity items. The server 120 generates an intermediate table and import page metadata for the target business entity item; the intermediate table is used to carry the target business data corresponding to the target business entity item. The server 120 generates an import page based on the import page metadata. In the case where a data import operation is triggered on the import page displayed on the terminal 110, the server 120 synchronizes the target business data to the intermediate table and imports the target business data into the second server 130 based on the synchronized intermediate table.
[0048] In one embodiment, the server 120 can also be replaced by a terminal, and there is no limitation in this regard.
[0049] In one embodiment, as Figure 2 shown, a data import method is provided. In this embodiment, an example is given in which this method is applied to the first server. It can be understood that this method can also be applied to the terminal, and can also be applied to a system including the terminal and the first server, and is implemented through the interaction between the terminal and the first server. In this embodiment, the method includes the following steps:
[0050] S202. Obtain multiple business entity items under the target business and determine the target business entity item selected from the multiple business entity items.
[0051] Among them, the business entity item is used to represent the object of the entity carrying the business data. The data content of each business entity item is the corresponding business data.
[0052] Specifically, the first server obtains multiple business entity items under the target business, so that the terminal displays the multiple business entity items on the interface. The user performs a business entity item selection operation on the interface of the terminal, and the first server determines the target business entity item selected from the multiple business entity items.
[0053] S204, generate an intermediate table and import page metadata for the target business entity item; the intermediate table is used to carry the target business data corresponding to the target business entity item.
[0054] Among them, the import page metadata is used to generate an import page.
[0055] Specifically, the first server determines the selected target business entity item, and generates an intermediate table and import page metadata for the target business entity item. Among them, the intermediate table is used to carry the target business data corresponding to the target business entity item. It can be understood that automatically generating the intermediate table and import page metadata avoids manually creating the intermediate table and intermediate table metadata, greatly improving the efficiency and convenience of data import.
[0056] In one embodiment, the business entity item is the business entity item displayed on the original import page, and the first server can generate the import page metadata based on the metadata in the original import page and corresponding to the target business entity item.
[0057] In one embodiment, the import page metadata includes metadata node information of various categories for different page controls, so as to display the target business data under the corresponding page controls on the import page.
[0058] In one embodiment, when the target business entity item belongs to the target basic business entity item, the first server can modify the attributes of the metadata for the target business entity item according to the attributes of the target basic business entity item.
[0059] In one embodiment, for different businesses, the first server can generate corresponding intermediate tables and page metadata to import the business data of different businesses.
[0060] In one embodiment, when the import requirement of the target business changes, the corresponding intermediate table and page metadata can be deleted, and new intermediate tables and page metadata can be regenerated, thus conveniently solving the problem of incompatibility in page metadata upgrade.
[0061] S206, generate an import page based on the import page metadata; when a data import operation is triggered on the import page, synchronize the target business data to the intermediate table, and import the target business data into the target system based on the synchronized intermediate table.
[0062] Specifically, the first server generates an import page for display on the terminal based on the imported page metadata. When a data import operation is triggered on the import page, the first server synchronizes the target business data to the intermediate table and imports the target business data into the target system based on the synchronized intermediate table. In this way, the second system does not need to provide an interface to the first system, thus ensuring the privacy and security of the second system and reducing the processing overhead of the second system.
[0063] In one implementation, the first server synchronizes the target business data to the intermediate table, performs a full-volume verification on the target business data in the intermediate table, and imports the target business data into the target system based on the synchronized and successfully verified intermediate table. It can be understood that importing into the target system after performing a full-volume verification on the target business data in the intermediate table can avoid errors in the target business data. Compared with the solution of directly importing the target business data into the target system, using the intermediate table can ensure the accuracy of the data.
[0064] In one embodiment, the first server asynchronously imports the target business data in the same intermediate table into the target system in batches.
[0065] In one embodiment, the first server sends multiple processing messages for batch-processing the target business data to the message queue, so that multiple processing units connected to the message queue can obtain the processing messages and perform data import.
[0066] In one embodiment, the import page can display the import results and operation status recorded in the intermediate table.
[0067] The above data import method obtains multiple business entity items under the target business, determines the target business entity items selected from the multiple business entity items, and generates an intermediate table and import page metadata for the target business entity items. The intermediate table is used to carry the target business data corresponding to the target business entity items. In this way, the intermediate table and page metadata can be automatically generated according to the selected target business entity items without manual production. An import page is generated based on the import page metadata; when a data import operation is triggered on the import page, the target business data is synchronized to the intermediate table, and the target business data is imported into the target system based on the synchronized intermediate table. In this way, the data import operation can be executed on the automatically generated import page, thereby improving the convenience of data import.
[0068] In one embodiment, obtaining multiple business entity items under a target business includes: when an entity object selection operation is triggered on an initialization introduction interface, determining the selected page entity object belonging to the target business; the page entity object represents the metadata of the original import page; the original import page is the original import page for importing the business data of the target business into the target system. Obtaining multiple business entity items under the page entity object for display on the initialization introduction interface; generating an intermediate table for the target business entity items and import page metadata includes: generating an intermediate table for the target business entity items, and generating import page metadata based on the metadata in the original import page and corresponding to the target business entity items.
[0069] Specifically, when an entity object selection operation is triggered on the initialization introduction interface, the first server determines the selected page entity object belonging to the target business. Among them, the page entity object represents the metadata of the original import page, and the original import page is the original import page for importing the business data of the target business into the target system. The first server obtains multiple business entity items under the page entity object for display on the initialization introduction interface, generates an intermediate table for the target business entity items, and generates import page metadata based on the metadata in the original import page and corresponding to the target business entity items.
[0070] In one embodiment, the first server can also display extended business entity items for the target business, and the target business entity items can include the extended business entity items. As Figure 3 shown, a schematic diagram of the generation principle of the intermediate table and page metadata is shown. Specifically, select the page entity object "Administrative Organization" on the initialization introduction interface. Among them, there are business entity items such as "Code", "Name", "Organization Type", etc. and extended business entity items such as "Group Vision" and "Group Mission" under the page entity object. Display the above-mentioned various business entity items on the initialization import interface, and distinguish and display the selected business entity items and unselected business entity items. For example, the selected business entity items can be displayed in bold, and the unselected business entity items can be indicated with an underline. The first server generates an intermediate table for target business entity items such as "Code", "Name", "Organization Type", and "Group Mission", and generates import page metadata based on the metadata in the "Administrative Organization" page entity object and corresponding to the target business entity items.
[0071] In this embodiment, a page entity object is selected on the initialization introduction interface, so as to display the business entity items of the page entity object. In this way, the business entity items for different services can be flexibly selected. Moreover, import page metadata is generated based on the metadata in the original import page and corresponding to the target business entity items. In this way, when the import requirements change, it is only necessary to reselect the business entity items on the initialization introduction interface, thereby improving the convenience and flexibility of generating import page metadata.
[0072] In one embodiment, the import page metadata includes metadata node information of various categories for different page controls; the metadata node information of each category is used to display target business data under the corresponding page control in the import page.
[0073] Specifically, the import page metadata includes metadata node information of various categories for different page controls. Among them, the metadata node information of each category is used to display target business data under the corresponding page control in the import page. For example, the metadata node information can be at least one of list metadata node information and form element data node information. The list metadata node information is used to display target business data on the list control. The form element data node information is used to display target business data on the form control.
[0074] In one embodiment, the first server can generate import page metadata based on the metadata in the original import page corresponding to the target business entity items and the metadata for the new page controls.
[0075] In one embodiment, as Figure 4 shown, the generation process of the intermediate table and page metadata is presented. Specifically, the first server saves the target business entity items selected by the user in the initialization introduction template and records the generation log of the intermediate table. The first server reads the name of the target business entity item for which the intermediate table needs to be generated and loads the original metadata. Here, the original metadata is used to represent the original metadata in the original import page corresponding to the target business entity items. In the case where the target business entity item includes extended business entity items, the first server can also load the original extended metadata. Further, the first server can add multiple metadata node information for different page controls, such as form element data node information, entity metadata node information, entity attribute metadata node information, list metadata node information, etc. The first server can also compare the field names involved in the page metadata with the corresponding field names in the intermediate table and adaptively modify the field names in the intermediate table to make the intermediate table and page metadata unified. Among them, the field name can be the name of the target business entity item, etc.
[0076] In this embodiment, the imported page metadata includes metadata node information of multiple categories for different page controls, enabling the display of target business data on different page controls during the import process.
[0077] In one embodiment, generating an intermediate table for a target business entity item and imported page metadata includes: generating an intermediate table for the target business entity item; for each target business entity item, when the target business entity item belongs to a target basic business entity item, modifying the corresponding attribute in the target metadata according to the attribute of the target basic business entity item; the target metadata is the metadata for the target business entity item; generating imported page metadata based on the modified target metadata.
[0078] Specifically, the first server generates an intermediate table for the target business entity item. The first server, for each target business entity item, when the target business entity item belongs to a target basic business entity item, modifies the corresponding attribute in the target metadata according to the attribute of the target basic business entity item. Among them, the target metadata is the metadata for the target business entity item. The first server generates imported page metadata based on the modified target metadata.
[0079] In one embodiment, as Figure 5 shown, a flowchart for modifying the attributes in the metadata is presented. During the process of adding metadata node information such as table cell data node information and list metadata node information, the first server can modify the attributes in the metadata node information. Specifically, for each target business entity item, the first server determines whether it belongs to a basic business entity item. If it is a basic business entity item, the attributes related to the target basic business entity item are obtained. Among them, the attributes related to the target basic business entity item belong to the category of basic data. If the attribute is for multiple options, the content of the multiple options is converted into a common large text field, and the corresponding attribute in the target metadata is modified according to the large text field. If the attribute is not the content of multiple options, the corresponding attribute in the target metadata is modified according to the attribute of the target basic business entity item. For example, type conversion or clearing the attribute value to 0, etc., can be performed. Then, the modified metadata node information is added to the page metadata.
[0080] In this embodiment, the corresponding attributes in the target metadata are modified according to the attributes of the target basic business entity item, so that the business entity items belonging to the basic business entity item all have the attributes related to the basic business entity item, thus meeting the unified requirement for metadata.
[0081] In one embodiment, importing target service data into a target system based on a synchronized intermediate table includes: allocating the target service data in the synchronized intermediate table to different subtasks in batches; and importing the target service data corresponding to each batch into the target system through the subtasks.
[0082] Specifically, a first server allocates the target service data in the synchronized intermediate table to different subtasks in batches, and imports the target service data corresponding to each batch into the target system through the subtasks.
[0083] In this embodiment, the target service data is imported into the target system asynchronously and in batches through multiple asynchronously processed subtasks, so that the whole can be broken into parts, the time for processing data can be reduced, the import scenario with a large amount of data can be handled, and the import efficiency is improved.
[0084] In one embodiment, importing the target service data corresponding to each batch into the target system through a subtask includes: each subtask asynchronously sending a processing message to a message queue; the message queue is implemented on a distributed system and connects multiple processing units; and the processing unit is configured to obtain the processing message from the message queue and import the target service data corresponding to the processing message into the target system.
[0085] Specifically, each subtask asynchronously sends a processing message to a message queue. Among them, the message queue is implemented on a distributed system and connects multiple processing units. The processing unit is configured to obtain the processing message from the message queue and import the target service data corresponding to the processing message into the target system.
[0086] In one embodiment, as Figure 6As shown, it presents a schematic diagram of the principle of data import. Specifically, by performing a data import operation on the import interface, the target business data of the first system is imported into the intermediate table through methods such as ETL (Extract-Transform-Load, a data warehouse technology) tools. In the process of importing the data in the intermediate table into the business table of the second system, a big data synchronization solution and a distributed transaction solution are used. Specifically, the first server distributes the target business data in the synchronized intermediate table into different subtasks in batches, and through the subtasks, the corresponding batches of target business data are imported into the target system, thus achieving big data synchronization. Each subtask of the first server asynchronously sends processing messages to the message queue. Among them, the message queue is implemented on a distributed system and is connected to multiple processing units. The processing unit is used to obtain the processing messages from the message queue and import the target business data corresponding to the processing messages into the target system, thus importing into the target system in a distributed manner. Compared with the solution of importing the target business data of the intermediate table into the target system by calling microservices, using the big data synchronization solution and the distributed transaction solution can avoid the situation where when the relevant processing units are down, the target business data cannot be continuously imported, resulting in inconsistent target business data in the intermediate table and the target business data in the target system; it can also avoid data import failure caused by microservice call timeouts.
[0087] In one embodiment, the first server can support ORM data fetching (Object Relational Mapping, a programming technique used to implement the conversion between data of different types of systems in object-oriented programming languages). The consumption unit can directly read the target business data in the intermediate table through ORM data fetching and convert it into a dynamic object. Compared with using microservices for network transmission of target business data, it reduces network overhead and improves the overall performance of the system.
[0088] In this embodiment, multiple processing messages for processing the target business data are sent to the message queue on the distributed system, so that the multiple processing units connected to the message queue obtain the processing messages and perform data import, enabling the business data in the intermediate table to be imported into the business table in a distributed and parallel manner, improving reliability and overall import performance.
[0089] In one embodiment, the intermediate table is also used to record the import results and operation status of the target business data; the import page is used to display the import results and operation status recorded in the intermediate table.
[0090] Specifically, when performing a data import operation on the import interface, the intermediate table is also used to record the operation status of the target business data. After importing the target business data, the intermediate table also records the import result of the target business data. The import page displayed on the terminal shows the import result and operation status recorded in the intermediate table. It can be understood that the target business data is pre-synchronized to the intermediate table, and the import result and operation status are recorded. In this way, in the case of a failed import of the target business data, it can still be traced through the intermediate table.
[0091] In one embodiment, as Figure 7 shown, a schematic diagram of the principle of distributed data import is presented. Specifically, the user performs a data import operation on the client side. The production unit in the first server generates multiple subtasks, distributes multiple target business data batches to different subtasks, and imports the corresponding batch of target business data into the target system through the subtasks. Specifically, each subtask assigned with target business data sends a processing message to the message queue. The consumption unit obtains the processing message from the message queue, invokes the processing logic of the business processing class, and feeds back the processing result to the message queue. The production unit obtains the processing result from the message queue and updates the import result recorded in the intermediate table according to the processing result. The import result recorded in the intermediate table can be displayed on the import interface of the client, and the processing progress of the subtasks is shown in the form of a progress bar. The subtasks in the production unit can also resend the processing message for the business data that has not been processed successfully, so that the consumption unit can import the business data that was not imported successfully last time again.
[0092] In this embodiment, by recording the import result and operation status in the intermediate table and displaying them on the interface, it is convenient for the user to confirm the result. And it enables the intermediate table to have a complete record of data operations, and problem backtracking can be carried out.
[0093] It should be understood that although the steps in the flowcharts in some embodiments of this application are sequentially shown according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0094] In one embodiment, during the generation process of the intermediate table, there is a corresponding generation log, and the availability of the intermediate table can be determined through the generation log. As Figure 8As shown, it shows the reliability processing flow for the generation of the intermediate table. Specifically, the first server records the generation log for the intermediate table. If the generation of the intermediate table is successful, the success information is updated to the generation log. If the generation of the intermediate table fails, the failure information is updated to the generation log. In this way, it is further confirmed whether the intermediate table is successfully generated through the generation log, ensuring the accuracy of the intermediate table used.
[0095] Based on the same inventive concept, an embodiment of the present application further provides a data import device for implementing the data import method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the data import device provided below can refer to the limitations on the data import method in the above text and will not be elaborated here.
[0096] In one embodiment, as Figure 9 shown, a data import device 900 is provided, including: a determination module 902, a generation module 904, and an import module 908, where:
[0097] The determination module 902 is configured to obtain multiple business entity items under the target business; determine the target business entity item selected from the multiple business entity items.
[0098] The generation module 904 is configured to generate an intermediate table and import page metadata for the target business entity item; the intermediate table is used to carry the target business data corresponding to the target business entity item.
[0099] The import module 906 is configured to generate an import page based on the import page metadata; in the case of triggering a data import operation on the import page, synchronize the target business data to the intermediate table, and import the target business data into the target system based on the synchronized intermediate table.
[0100] In one embodiment, the determination module 902 is further configured to, in the case of triggering an entity object selection operation on the initialization introduction interface, determine the page entity object belonging to the target business selected; the page entity object represents the metadata of the original import page; the original import page is the original import page for importing the business data of the target business into the target system; obtain multiple business entity items under the page entity object to be displayed in the initialization introduction interface. The generation module 904 is further configured to generate an intermediate table for the target business entity item, and generate import page metadata based on the metadata in the original import page and corresponding to the target business entity item.
[0101] In one embodiment, the import page metadata includes various types of metadata node information for different page controls; each type of metadata node information is used to display the target business data under the corresponding page control in the import page.
[0102] In one embodiment, the generation module 904 is further configured to generate an intermediate table for a target business entity item; for each target business entity item, when the target business entity item belongs to a target basic business entity item, modify the corresponding attribute in the target metadata according to the attribute of the target basic business entity item; the target metadata is the metadata for the target business entity item; generate import page metadata based on the modified target metadata.
[0103] In one embodiment, the import module 906 is further configured to batch-assign the target business data in the synchronized intermediate table to different subtasks; import the target business data corresponding to the corresponding batch into the target system through the subtasks.
[0104] In one embodiment, the import module 906 is further configured to asynchronously send a processing message to a message queue for each subtask; the message queue is implemented on a distributed system and is connected to multiple processing units; the processing unit is configured to obtain the processing message from the message queue and import the target business data corresponding to the processing message into the target system.
[0105] In one embodiment, the intermediate table is further configured to record the import result and operation status of the target business data; the import page is used to display the import result and operation status recorded by the intermediate table.
[0106] The above data import device determines the target business entity items selected from multiple business entity items by obtaining multiple business entity items under a target business, and generates an intermediate table and import page metadata for the target business entity items. The intermediate table is used to carry the target business data corresponding to the target business entity items. In this way, the intermediate table and page metadata can be automatically generated according to the selected target business entity items without manual production. Generate an import page based on the import page metadata; when a data import operation is triggered on the import page, synchronize the target business data to the intermediate table, and import the target business data into the target system based on the synchronized intermediate table. In this way, a data import operation can be performed on the automatically generated import page, thereby improving the convenience of data import.
[0107] For the specific limitations of the above data import device, reference can be made to the limitations on the above data import method in the foregoing text, which will not be elaborated here. Each module in the above data import device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0108] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structural diagram may be as shown in Figure 10 . The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, a data import method is implemented.
[0109] Those skilled in the art can understand that Figure 10 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0110] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0111] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0112] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0113] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0114] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0115] The above embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A data import method, characterized in that, The method includes: Obtaining a plurality of business entity items under a target business; Determining a target business entity item selected from the plurality of business entity items through an initialization introduction interface; Generating an intermediate table for the target business entity item, and generating import page metadata based on the metadata corresponding to the target business entity item in the metadata of the original import page; the intermediate table is used to carry target business data corresponding to the target business entity item; Generating an import page based on the import page metadata; When a data import operation is triggered on the import page, synchronizing the target business data to the intermediate table, and importing the target business data into a target system based on the synchronized intermediate table.
2. The method according to claim 1, wherein The obtaining a plurality of business entity items under a target business includes: When an entity object selection operation is triggered on an initialization introduction interface, determining a page entity object belonging to the target business selected; the page entity object represents the metadata of the original import page; the original import page is an original import page for importing business data of the target business into the target system; Obtaining a plurality of business entity items under the page entity object for display in the initialization introduction interface.
3. The method according to claim 1, wherein The import page metadata includes metadata node information of multiple categories for different page controls; the metadata node information of each category is used to display the target business data under the corresponding page control in the import page.
4. The method according to claim 1, wherein The generating import page metadata based on the metadata corresponding to the target business entity item in the metadata of the original import page includes: For each target business entity item, when the target business entity item belongs to a target basic business entity item, modifying the corresponding attribute in the target metadata according to the attribute of the target basic business entity item; the target metadata is the metadata for the target business entity item; Generating the import page metadata based on the modified target metadata.
5. The method according to claim 1, wherein The importing the target business data into a target system based on the synchronized intermediate table includes: Allocating the target business data in the synchronized intermediate table to different subtasks in batches; Importing the target business data of the corresponding batch into the target system through the subtasks.
6. The method according to claim 5, wherein The importing the target business data of the corresponding batch into the target system through the subtasks includes: Each subtask asynchronously sends a processing message to a message queue; the message queue is implemented on a distributed system and is connected to multiple processing units; the processing unit is used to obtain the processing message from the message queue and import the target business data corresponding to the processing message into the target system.
7. The method according to any one of claims 1 to 6, characterized in that The intermediate table is further used to record the import result and operation status of the target business data; the import page is used to display the import result and the operation status recorded in the intermediate table.
8. A data import device, characterized in that, The device includes: A determination module, configured to obtain a plurality of business entity items under a target business; determine a target business entity item selected from the plurality of business entity items through an initialization introduction interface; A generation module, configured to generate an intermediate table for the target business entity item, and generate import page metadata based on the metadata corresponding to the target business entity item in the metadata of the original import page; the intermediate table is used to carry the target business data corresponding to the target business entity item; An import module, configured to generate an import page based on the import page metadata; in the case of triggering a data import operation on the import page, synchronize the target business data to the intermediate table, and import the target business data into the target system based on the synchronized intermediate table.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data synchronizing method and device
CN107203642A