Document data processing method, device and equipment and computer readable storage medium
By analyzing and merging document data in the ERP system and using intermediate tables to extract and merge target document information, the problem of low document processing efficiency in traditional technology is solved, and the system performance and document data processing efficiency are improved.
Patent Information
- Application Number
- CN202411759896.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-11
AI Technical Summary
In traditional technology, when documents generated by e-commerce platforms are processed in the ERP system, a large number of documents and entries may be generated, resulting in a degradation in the system operation performance and a low document operation efficiency.
By analyzing the document data sent by a third party, extracting the target document information and writing it to the intermediate table, combining data based on the target fields of the intermediate table, and generating downstream documents, thereby reducing the number of processing documents and improving system performance.
Extracting and merging document data through intermediate tables reduces document processing volume, improves the system's operating performance and document data processing efficiency.
Smart Images

Figure CN119807209A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a document data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] ERP (Enterprise Resource Planning) system is an enterprise management software that integrates material resource management (logistics), human resource management (personnel flow), financial resource management (financial flow), and information resource management (information flow). Integrating a third-party platform with the ERP system can achieve seamless connection of key business processes such as order management, inventory control, and financial management of the third-party platform, thereby forming an efficient and coordinated operation system. For example, for the e-commerce industry, achieving business and financial integration is an important measure to improve the operating efficiency of the e-commerce platform, reduce costs, and enhance data accuracy and decision-making support capabilities.
[0003] In traditional technology, the e-commerce platform sends the generated documents to the ERP system for processing. After the review is passed, multi-level downstream documents may be generated. As a result, a large number of documents and entries may be generated in the ERP system, seriously affecting the system's operating performance and resulting in low document operation efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a document data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve document operation efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides a document data processing method, comprising:
[0006] Parse the first document data sent by the third party to obtain the target document information;
[0007] Writing the target document information into the corresponding intermediate table to obtain the intermediate table data;
[0008] Based on the target field of the intermediate table, the data in the intermediate table are merged to obtain second document data;
[0009] The second document data is processed to obtain a target document downstream of the second document data.
[0010] In one embodiment, the step of merging the intermediate table data based on the target field of the intermediate table to obtain the second document data includes:
[0011] Determine the data merging rule corresponding to the intermediate table according to the type of the intermediate table;
[0012] determining the target field of the intermediate table based on the data merging rule, and
[0013] The field values of the target fields in the intermediate table data are merged according to the data merging rule to obtain the second document data.
[0014] In one embodiment, the processing of the second document data to obtain a target document downstream of the second document data includes:
[0015] Determine a node scanner group corresponding to the second document data; the node scanner group includes at least one node scanner, and the node scanner is configured with a scheme for processing a document in a first state into a document in a second state; the second state is a state next to the first state;
[0016] The second document data is processed by a node scanner in the node scanner group to obtain the target document.
[0017] In one embodiment, determining the node scanner group corresponding to the second document data includes:
[0018] identifying the document type to which the second document data belongs;
[0019] The node scanner group corresponding to the second document data is determined according to the mapping relationship between the document type and the node scanner group.
[0020] In one embodiment, processing a document in a first state into a document in a second state by a node scanner includes:
[0021] Put the documents in the first status into the queue according to the priority order;
[0022] The node scanner sequentially processes the documents in the first state that are dequeued from the queue into the documents in the second state.
[0023] In one embodiment, the method further comprises:
[0024] According to a preset migration plan, the second document data and the target document are migrated to a target database for storage; the preset migration plan includes an association relationship between the second document data and the target document.
[0025] In a second aspect, the present application further provides a document data processing device, comprising:
[0026] A document data parsing module, used to parse the first document data sent by a third party to obtain target document information;
[0027] An intermediate table writing module is used to write the target document information into the corresponding intermediate table to obtain intermediate table data;
[0028] A document data merging module, used for merging the intermediate table data based on the target field of the intermediate table to obtain second document data;
[0029] The downstream document generation module is used to process the second document data to obtain a target document downstream of the second document data.
[0030] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the document data processing method provided in the first aspect when executing the computer program.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the document data processing method provided in the first aspect.
[0032] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the document data processing method provided in the first aspect.
[0033] The above-mentioned document data processing method, device, computer equipment, computer-readable storage medium and computer program product parse the first document data sent by a third party to obtain the target document information, write the target document information into the corresponding intermediate table to obtain the intermediate table data, merge the intermediate table data based on the target field of the intermediate table to obtain the second document data, process the second document data to obtain the target document downstream of the second document data, and can extract the target document information from the numerous first document data through the corresponding intermediate table, thereby merging the document data based on the target document information, and then processing the merged document data, that is, processing a smaller number of document data to generate downstream documents, which can improve the operating performance of the system and thus improve the processing efficiency of document data. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1An application environment diagram of a document data processing method in one embodiment;
[0036] Figure 2 A schematic diagram of a process flow of a document data processing method in one embodiment;
[0037] Figure 3 is a flow chart of step 206 in one embodiment;
[0038] Figure 4 is a flow chart of step 208 in one embodiment;
[0039] Figure 5 is a flow chart of step 404 in one embodiment;
[0040] Figure 6 A schematic diagram of a data migration process in one embodiment;
[0041] Figure 7 A schematic diagram of a flow chart of a document data processing method in another embodiment;
[0042] Figure 8 is a structural block diagram of a document data processing device in one embodiment;
[0043] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] The document data processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 receives the first document data sent by the third-party terminal 102, and the server parses the first document data sent by the third party to obtain the target document information, and then writes the target document information into the corresponding intermediate table to obtain the intermediate table data, and merges the intermediate table data based on the target field of the intermediate table to obtain the second document data, and processes the second document data to obtain the target document downstream of the second document data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. It is understandable that the document processing method provided in the embodiment of the present application is not only applicable to the interaction scenario between the server and the terminal, but also to the scenario of server-to-server interaction, or the scenario of terminal-to-terminal interaction, or the scenario of a single server or a single terminal.
[0046] In an exemplary embodiment, Figure 2 As shown, a document data processing method is provided, which is applied to Figure 1 The server in the example is used to illustrate, including the following steps 202 to 208. Among them:
[0047] Step 202: parse the first document data sent by the third party to obtain target document information.
[0048] The first document data is document data generated by a third party, and the first document data may be, for example, a purchase order, a sales order, a delivery note, a return note, a logistics note, an invoice, or a receipt. A third party refers to a service provider that is independent of the provider and demander of a product or service, such as an e-commerce platform. The target document information is used to characterize the key information of the first document data. The third party and the server may implement data transmission based on an API (Application Programming Interface).
[0049] Optionally, an ERP system is installed on the server, and the first document data sent by the third party is parsed based on the ERP system to obtain the target document data. The third party may send the first document data through a terminal or server of the third party. The server may parse and extract the target document information from the first document data according to a preset parsing rule. The preset parsing rule is set according to the type of the first document data, and different types of first document data correspond to different preset parsing rules. It is easy to understand that the third party's server and the server that parses the first document data may be different servers or the same server.
[0050] Step 204, write the target document information into the corresponding intermediate table to obtain the intermediate table data.
[0051] Different types of first document data correspond to different intermediate tables. In other words, the intermediate table is used to store target document information of the first document data of the corresponding type. There is a one-to-one correspondence between the type of the first document data and the intermediate table.
[0052] In actual application scenarios, the first document data sent by a third party may include multiple types. Each type of first document data is parsed using corresponding preset parsing rules to obtain corresponding target document information, which is then written into the corresponding intermediate table to obtain intermediate table data.
[0053] Step 206: Based on the target field of the intermediate table, merge the intermediate table data to obtain the second document data.
[0054] Each type of first document data corresponds to a data merging rule. The corresponding data merging rule can be determined according to the type of the intermediate table. The type of the intermediate table can characterize the type of the first document data. The target field of the intermediate table is determined according to the data merging rule. The intermediate table data is merged according to the target field to obtain the second document data. In other words, the first document data type, the intermediate table type and the data merging rule have a one-to-one mapping relationship.
[0055] Optionally, a target field of the intermediate table is determined, where the target field is a field for merging, and the field values corresponding to the target field in the intermediate table are merged to obtain the second document data. The target field may be, for example, a time field, an amount field, a quantity field, etc. The second document data may include the target field.
[0056] Step 208: Process the second document data to obtain a target document downstream of the second document data.
[0057] The target document refers to a downstream document obtained by processing the second document data. In an actual application scenario, the processed target document can be used for business statistics or financial statistics.
[0058] Optionally, the target document may be a document in the next state of the second document data, or a document in any state after the next state of the second document data. For example, the second document data is processed to obtain document A, document A is processed to obtain document B, and document B is processed to obtain document C. Then, the target document may be any one of document A, document B, and document C. It can be understood that in different business scenarios, the target document type obtained by processing the second document data may not be the same. For example, in the first business scenario, the downstream document obtained by processing the second document data may be document A, while in the second business scenario, the downstream document obtained by processing the second document data may be document C. The downstream document types corresponding to different scenarios can be set according to actual needs.
[0059] In the above-mentioned document data processing method, the target document information is obtained by parsing the first document data sent by the third party, the target document information is written into the corresponding intermediate table to obtain the intermediate table data, the intermediate table data is merged based on the target field of the intermediate table to obtain the second document data, the second document data is processed to obtain the target document downstream of the second document data, and it can be achieved by extracting the target document information from the numerous first document data through the corresponding intermediate table, thereby merging the document data based on the target document information, and then processing the merged document data, that is, processing a smaller number of document data to generate downstream documents, which can improve the operating performance of the system in the process of generating downstream documents, thereby improving the processing efficiency of document data.
[0060] In some embodiments, based on the target field of the intermediate table, the step 206 of merging the intermediate table data to obtain the second document data includes:
[0061] According to the type of the intermediate table, a data merging rule corresponding to the intermediate table is determined; based on the data merging rule, a target field of the intermediate table is determined; and according to the data merging rule, the field value of the target field in the intermediate table data is merged to obtain the second document data.
[0062] Each type of intermediate table corresponds to a data merging rule. According to the correspondence between the type of the intermediate table and the data merging rule, the data merging rule corresponding to the intermediate table can be determined according to the type of the intermediate table, and then the target field of the intermediate table is determined based on the data merging rule, and the field value of the target field is merged to obtain the second document data. The target field can be, for example, a third-party name or identification field, a product name field, a time field, an amount field, a quantity field, or other custom fields.
[0063] Optionally, the data merge rule may include a data merge object and a merge strategy, etc. The data merge object refers to the data object to be merged, and the merge strategy refers to the specific way of merging. The data merge rule can be configured by the user, and the corresponding intermediate table field can also be determined according to the data merge rule. According to the type of the intermediate table, the data merge rule corresponding to the intermediate table is determined, and then the target field of the intermediate table is determined based on the data merge object in the data merge rule, and the field value of the target field is merged based on the merge strategy in the data merge rule to obtain the second document data. Among them, the merge strategy is, for example, addition, subtraction, etc.
[0064] In one example, if Figure 3 As shown, the third party is a system of a third-party e-commerce platform, which sends the first document data to the ERP system of the server at a ratio of 1:1 through an API interface. The server parses the first document data based on the ERP system to obtain target document information, writes the target document information into an intermediate table of the corresponding type, and merges the target fields of the intermediate table through a data merging rule corresponding to the intermediate table type, thereby achieving a merger of an N:1 ratio, where N is greater than or equal to 2, to obtain the second document data, that is, merging multiple first document data into one second document data.
[0065] In this embodiment, by determining the data merging rule corresponding to the intermediate table according to the type of the intermediate table, determining the target field of the intermediate table based on the data merging rule, and merging the field values of the target field to obtain the second document data, it is possible to accurately and quickly determine the corresponding data merging rule according to the type of the intermediate table, and then merge the field values of the target field based on the data merging rule, thereby improving the accuracy and efficiency of the merging, and thereby improving the efficiency of document data processing.
[0066] In an exemplary embodiment, Figure 4 As shown, the step 208 of processing the second document data to obtain the target document downstream of the second document data includes the following steps 402 to 404.
[0067] Step 402, determine the node scanner group corresponding to the second document data; the node scanner group includes at least one node scanner, and the node scanner is configured with a solution for processing a document in a first state into a document in a second state; the second state is the next state of the first state.
[0068] Among them, the node scanner can realize the processing of documents into downstream documents, and the type of downstream documents can be obtained through configuration. For example, node scanner 1 can process document A into document B, and node scanner 2 can process document A into document C, and both document B and document C are downstream documents of document A. In other words, the node scanner is configured with a scheme for processing a document in the first state into a document in the second state, and the document type of the second state may be different in different node scanners, and the node scanner can process the document in the first state into a document in the second state. The target document includes at least one downstream document. For example, node scanner 1 can process document A into document B, and node scanner 2 can process document A into document C. The processing schemes configured by node scanner 1 and node scanner 2 are different, then the type of document B may also be different from the type of document C, such as document A is a sales order, document B is a sales delivery order, document C is an account receivable, etc.
[0069] Optionally, the corresponding node scanner group can be determined according to the type of the second document data. Different types of second document data correspond to different node scanner groups, and the downstream documents generated by different node scanner groups are also different. Alternatively, the node scanner group corresponding to the second document data can also be determined in a user-specified manner, for example, in response to the user's selection trigger of the node scanner group, the node scanner group corresponding to the second document data is determined.
[0070] Step 404: Process the second document data by a node scanner in the node scanner group to obtain a target document.
[0071] Among them, the node scanner group may include multiple node scanners and the order of multiple node scanners, the order of multiple node scanners is pre-configured, and the order of node scanners is used to characterize the generation order of downstream documents of the second document data. The node scanners in the node scanner group are processed in sequence to obtain the target document downstream of the second document data. Exemplarily, the node scanner group includes node scanner A, node scanner B, and node scanner C in sequence, then the second document data can be processed into document A through node scanner A, document A can be processed into document B through node scanner B, and document B can be processed into document C through node scanner C, then the obtained target document can be at least one of document A, document B and document C.
[0072] In an alternative example, Figure 5As shown, the pre-configured node scanner group may include multiple node scanners, each node scanner group includes multiple node scanners, and each node scanner is configured with a push-down scheme for processing a document in a first state into a document in a second state. Taking one of the node scanner groups as an example, the node scanner group includes node scanner 1, node scanner 2, and node scanner N. Node scanner 1 is configured with a push-down scheme 1 for processing document 1 into downstream document 1. Therefore, node scanner 1 can process document 1 into downstream document 1. Node scanner 2 is configured with a push-down scheme 2 for processing downstream document 1 into downstream document 2. Node scanner 2 can process downstream document 1 into downstream document 2. By analogy, node scanner N is configured with a push-down scheme for processing downstream document 2 into downstream document N. Node scanner N can process downstream document 2 into downstream document N. Alternatively, the node scanner group includes node scanner 1 and node scanner 2, and node scanner 1 is configured with a push-down scheme 1 for processing document 2 as downstream document 1, so node scanner 1 can process document 2 as downstream document 1, and node scanner 2 is configured with a push-down scheme 2 for processing downstream document 1 as downstream document 2, and node scanner 2 can process downstream document 1 as downstream document 2. Alternatively, the node scanner group includes node scanner 1, and node scanner 1 is configured with a push-down scheme for processing document 3 as downstream document 1, and node scanner 1 can process document 3 as downstream document 1, or node scanner 1 is configured with a push-down scheme for processing document N as downstream document 1, etc., where N is a positive integer greater than 2.
[0073] In this embodiment, by determining the node scanner group corresponding to the second document data, the second document data is processed by the node scanner in the node scanner group to obtain the target document downstream of the second document data. Different types of second document data can be processed simultaneously by different node scanner groups, thereby achieving decoupling of different types of second document data, avoiding data blocking, deadlock or response timeout problems, and improving the processing efficiency of document data.
[0074] In some embodiments, determining the node scanner group corresponding to the second document data in step 402 includes:
[0075] Identify the document type to which the second document data belongs; and determine the node scanner group corresponding to the second document data based on a mapping relationship between the document type and the node scanner group.
[0076] Among them, corresponding types of second document data can be generated based on different types of intermediate tables. Therefore, the type of the corresponding second document data can be obtained according to the type of the intermediate table used to generate the second document data.
[0077] Optionally, the mapping relationship between the document type and the node scanner group can be pre-configured. When determining the node scanner group corresponding to the second document data, the node scanner group corresponding to the type of the second document data can be determined according to the corresponding mapping relationship. For example, the mapping relationship between the pre-configured document type and the node scanner group can be stored in the form of a table to obtain a mapping relationship table. After determining the document type of the second document data, the type of the second document data is searched from the mapping relationship table. If the type of the second document data is found, the standard scanner group corresponding to the type of the second document in the mapping relationship table is determined as the node scanner group corresponding to the second document data. Among them, the document type or the node scanner group can be characterized by a corresponding name or number.
[0078] For example, the document type to which the second document data belongs can be identified based on the field information of the second document data, and different types of second document data have different corresponding field information. It can be understood that the scope of the document type and the specific document type can be set according to the actual application scenario.
[0079] In this embodiment, by identifying the document type to which the second document data belongs and determining the node scanner group corresponding to the second document data based on the mapping relationship between the document type and the node scanner group, the node scanner group corresponding to the second document data can be determined quickly and accurately, thereby improving the efficiency of generating downstream documents for the second document data.
[0080] In some embodiments, processing a document in a first state into a document in a second state by a node scanner includes:
[0081] The documents in the first state are put into the queue in order of priority; the documents in the first state that are taken out of the queue are processed into documents in the second state in sequence by the node scanner.
[0082] In actual application scenarios, for a node scanner, there may be multiple documents in the first state to be processed. When the node scanner processes the documents in the first state, processing blockage, deadlock or timeout may occur. Therefore, by enqueuing multiple documents in the first state into a queue in order of priority from high to low or from low to high, the node scanner processes the documents in the first state in the order of dequeuing from the queue to obtain the corresponding documents in the second state. Among them, the priority order of the documents in the first state can be set according to the actual application scenario. The size of the queue can be determined according to the number of documents in the first state to be processed corresponding to the node scanner in the actual application scenario. Each node scanner can correspond to a queue to achieve orderly processing of documents in the first state.
[0083] In this embodiment, by enqueuing documents in the first state into a queue in order of priority, and processing the documents in the first state that are taken out of the queue into documents in the second state in sequence through a node scanner, it is possible to achieve orderly and stable processing of documents, avoid system blocking, deadlock and timeout problems, improve system performance, and at the same time improve the efficiency of generating downstream documents.
[0084] In an exemplary embodiment, the method further includes:
[0085] According to the preset migration plan, the second document data and the target document are migrated to the target database for storage; the preset migration plan includes the association relationship between the second document data and the target document.
[0086] The preset migration scheme refers to a preset scheme for migrating data to a database for storage. The preset migration scheme may include the association between the second document data and the target document, data query conditions, migration time, target migration address, etc.
[0087] Optionally, the second document data and the target document may be saved in a local database, and the data in the local database may be checked at preset intervals to see whether they meet preset migration conditions. If the preset migration conditions are met, the data in the local database may be migrated to a target database, which is a database other than the local database, such as a cloud database.
[0088] Exemplarily, the server may search for associated second document data and target documents according to the associated relationship between the second document data and the target document in the preset migration scheme, and then migrate all associated second document data and target documents to the target database at the target address.
[0089] Optionally, the migration time in the preset migration scheme has a one-to-one correspondence with the target migration address, that is, the preset migration scheme may include different migration times, and different migration times correspond to different target migration addresses. Alternatively, the second document data and the target document generated in different time periods may be migrated to different target databases.
[0090] Optionally, after migrating the second document data and the target document to the target database according to the preset migration plan, the data in the target database may be compressed into a file format for storage, thereby improving the space utilization of the database.
[0091] In one example, the data migration process is as follows Figure 6As shown, taking the migration of the second document data as an example, the rule engine can be used to pre-set the data migration plan, and data migration can be performed once every target time interval. During the data migration process, other documents that are associated with the second document data will be migrated together according to the pre-set data migration plan to achieve full-link migration, and preset migration conditions will be detected for cross-domain data. When the preset migration conditions are met, data migration will be performed. Multiple migration tasks can also be used concurrently to achieve data migration, and the second document data can be migrated to the target database according to the preset migration plan. The target database can include multiple. The data stored in the target database can also be compressed into a file format for storage. The migration efficiency can be improved through multi-threaded migration, while ensuring reasonable resource allocation and load balancing.
[0092] In this embodiment, by migrating the second document data and the target document to the target database for storage according to the preset migration plan, the accuracy and consistency of data migration can be improved, thereby improving the efficiency of data migration.
[0093] In an exemplary embodiment, Figure 7 As shown, the process of the document data processing method includes the following steps 702 to 712.
[0094] Step 702: Receive first document data sent by a third party through an API interface, and parse the first document data to obtain target document information.
[0095] Step 704, write the target document information into the corresponding intermediate table to obtain the intermediate table data.
[0096] Step 706: Determine the data merging rule corresponding to the intermediate table according to the type of the intermediate table.
[0097] Step 708, determine the target field of the intermediate table according to the data merging rule, and merge the field values of the target field in the intermediate table data according to the data merging rule to obtain the second document data.
[0098] Step 710, determining a node scanner group corresponding to the second document data, and processing the second document in sequence by the node scanners in the node scanner group to obtain a target document.
[0099] Step 712: according to a preset migration plan, migrate the second document data and the target document to the target database for storage; the preset migration plan includes the association relationship between the second document data and the target document.
[0100] In the above embodiment, the target document information is obtained by parsing the document sent by the third party, the target document information is written into the intermediate table to obtain the intermediate table data, the document data is merged based on the intermediate table to obtain the merged document, and then the merged document is processed to generate the downstream document, and the downstream document is migrated and stored. It is possible to merge the data through the intermediate table and then process it to generate the downstream document, thereby reducing the data processing volume and improving the document processing efficiency. In addition, migrating the documents according to the preset migration plan can improve the migration efficiency and improve the system performance as a whole.
[0101] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0102] Based on the same inventive concept, the embodiment of the present application also provides a document data processing device for implementing the document data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more document data processing device embodiments provided below can refer to the limitations of the document data processing method above, and will not be repeated here.
[0103] In an exemplary embodiment, Figure 8 As shown, a document data processing device is provided, including: a document data parsing module 802, an intermediate table writing module 804, a document data merging module 806 and a downstream document generating module 808, wherein:
[0104] The document data parsing module 802 is used to parse the first document data sent by the third party to obtain the target document information;
[0105] The intermediate table writing module 804 is used to write the target document information into the corresponding intermediate table to obtain the intermediate table data;
[0106] The document data merging module 806 is used to merge the intermediate table data based on the target field of the intermediate table to obtain the second document data;
[0107] The downstream document generation module 808 is used to process the second document data to obtain a target document downstream of the second document data.
[0108] In some embodiments, the document data merge module 806 is also used to determine the data merge rule corresponding to the intermediate table according to the type of the intermediate table; determine the target field of the intermediate table based on the data merge rule, and merge the field value of the target field in the intermediate table data according to the data merge rule to obtain the second document data.
[0109] In some embodiments, the downstream document generation module 808 is also used to determine the node scanner group corresponding to the second document data; the node scanner group includes at least one node scanner, and the node scanner is configured with a scheme for processing a document in a first state into a document in a second state; the second state is the next state of the first state; the second document data is processed by the node scanner in the node scanner group to obtain the target document.
[0110] In some embodiments, the downstream document generation module 808 is further used to identify the document type to which the second document data belongs; and determine the node scanner group corresponding to the second document data according to the mapping relationship between the document type and the node scanner group.
[0111] In some embodiments, the downstream document generation module 808 is further used to queue the documents in the first state into the queue in order of priority; and process the documents in the first state that are dequeued from the queue into documents in the second state in sequence through the node scanner.
[0112] In some embodiments, the above-mentioned device also includes a data migration module, which is used to migrate the second document data and the target document to the target database for storage according to a preset migration plan; the preset migration plan includes the association relationship between the second document data and the target document.
[0113] Each module in the document data processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0114] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. 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. 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 database of the computer device is used to store document data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a document data processing method is implemented.
[0115] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present 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 a different arrangement of components.
[0116] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the document data processing method in the above embodiment are implemented.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the document data processing method in the above embodiment are implemented.
[0118] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the document data processing method in the above embodiment when executed by a processor.
[0119] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0120] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0121] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this application.
[0122] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A document data processing method, characterized in that: The method comprises: Parse the first document data sent by the third party to obtain the target document information; Writing the target document information into the corresponding intermediate table to obtain intermediate table data; Based on the target field of the intermediate table, the data in the intermediate table are merged to obtain second document data; The second document data is processed to obtain a target document downstream of the second document data.
2. The method according to claim 1, characterized in that The step of merging the intermediate table data based on the target field of the intermediate table to obtain the second document data includes: Determine the data merging rule corresponding to the intermediate table according to the type of the intermediate table; determining the target field of the intermediate table based on the data merging rule, and The field values of the target fields in the intermediate table data are merged according to the data merging rule to obtain the second document data.
3. The method according to claim 1, characterized in that The step of processing the second document data to obtain a target document downstream of the second document data includes: Determine a node scanner group corresponding to the second document data; the node scanner group includes at least one node scanner, and the node scanner is configured with a scheme for processing a document in a first state into a document in a second state; the second state is a state next to the first state; The second document data is processed by a node scanner in the node scanner group to obtain the target document.
4. The method according to claim 3, characterized in that The determining the node scanner group corresponding to the second document data includes: identifying the document type to which the second document data belongs; The node scanner group corresponding to the second document data is determined according to the mapping relationship between the document type and the node scanner group.
5. The method according to claim 3, characterized in that: Processing the document in the first state into the document in the second state through the node scanner includes: Put the documents in the first status into the queue according to the priority order; The node scanner sequentially processes the documents in the first state that are dequeued from the queue into the documents in the second state.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: According to a preset migration plan, the second document data and the target document are migrated to a target database for storage; the preset migration plan includes an association relationship between the second document data and the target document.
7. A document data processing device, characterized in that: The device comprises: A document data parsing module, used to parse the first document data sent by a third party to obtain target document information; An intermediate table writing module is used to write the target document information into the corresponding intermediate table to obtain intermediate table data; A document data merging module, used for merging the intermediate table data based on the target field of the intermediate table to obtain second document data; The downstream document generation module is used to process the second document data to obtain a target document downstream of the second document data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.