Business data storage method, device and medium based on ERP system
By distributing document information to cache and relational databases in the ERP system, the archiving log problem caused by data flow and auditing in the traditional ERP system is solved, achieving faster data updates and higher system performance.
Patent Information
- Application Number
- CN202310904515.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-07-21
AI Technical Summary
In traditional ERP systems, business data is stored in relational databases, resulting in frequent data transfers and audit operations that generate a large number of archived log files, affecting system performance.
By building a data storage mapping relationship, business document information is allocated to the cache database and the relational database. The storage location is determined based on the attributes and update frequency of the document information. The status is updated in the cache database to generate business document data, and finally the final data is synchronized to the relational database.
It improves the data update speed, reduces the archive log files of the relational database, reduces the system load, and improves the overall performance.
Smart Images

Figure CN116881258B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of ERP technology, and in particular to a business data storage method, device, and medium based on an ERP system. Background Art
[0002] An Enterprise Resource Planning (ERP) system is a management platform built on information technology, integrating information technology with advanced management concepts. It uses systematic management concepts to provide decision-making tools for enterprise employees and decision-makers. During the implementation of economic operations, business documents are entered into the system, and data flows after entry. During the data flow process, there are often only a few pieces of data that change, and most business information is not allowed to be modified during the flow. For example, when a business trip user fills out a travel expense report and submits it, the original document's amount, reimbursement person, itinerary, and other information will not change. However, the document's approval status and payment status will change during this process.
[0003] Traditional ERP systems usually use a database for storage. The data storage method uses a relational database for storage, or a cache database for storage. Tables with small data volumes are placed in the cache database for storage. Since the amount of business data is relatively large, the business data is not placed in the cache database, but is stored in a relational database. In addition, due to the characteristics of business data flow, updating data in a relational database is an IO operation, and its update speed is slower than the memory operation of cache data. During the flow of business data, it is easy to generate archive log files due to data changes such as document approval, resulting in an increase in the number of files in the relational database, affecting system performance. Therefore, the traditional ERP system storage method stores business data in a relational database. Economic business data is prone to generate archive log files due to the need for data flow, auditing, and other data changes. This leads to an increase in the number of files in the relational database, affecting system performance. Summary of the Invention
[0004] One or more embodiments of this specification provide a business data storage method, device, and medium based on an ERP system, which are used to solve the following technical problems: the traditional ERP system storage method stores business data in a relational database. Since economic business data requires data flow, auditing, and other operations, it is easy to generate archive log files, resulting in an increase in the number of files in the relational database, affecting system performance.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of the present specification provide a business data storage method based on an ERP system, characterized in that the method includes: obtaining a pending business document in the ERP system, and determining corresponding multiple document information based on the pending business document; determining multiple flow nodes corresponding to the pending business document, and filling in the document information in the pending business document through the flow nodes to generate initial document information, wherein the flow nodes include a business document filling node and at least one business document update node; obtaining a pre-established data storage mapping relationship, wherein the data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, wherein the storage database includes a cache database and a relational database; based on the data storage mapping relationship, storing each piece of document information in the initial document information in a corresponding storage database; determining the document information to be updated in the initial document information, and updating the status of the document information to be updated in the cache database corresponding to the document information to be updated through each of the business document update nodes to generate business document data, thereby implementing storage of business data, wherein the document information to be updated includes document status information.
[0007] Furthermore, before obtaining the pre-built data storage mapping relationship, the method also includes: determining information attributes of each document information, wherein the information attributes include at least one business document update node corresponding to the document information, the number of times to be updated corresponding to the document information, and the data volume of each document information; based on the information attributes of each document information, determining the storage database of each document information to establish a data storage mapping relationship between the document information and the storage database, wherein the storage database includes any one of a cache database and a relational database.
[0008] Furthermore, based on the information attributes of each document information, a storage database for each document information is determined, specifically including: determining the data volume in the information attributes of each document information; screening multiple document information according to the data volume of each document information and a preset data volume threshold to obtain a first category of document information, wherein the data volume of each first document information in the first category of document information is not greater than the preset data volume threshold; in the first category of document information, document information is screened according to at least one business document update node corresponding to each first document information, or according to the number of pending updates corresponding to each first document information, to obtain first designated document information, wherein, in the first category of document information, the number of business document update nodes corresponding to the first designated document information is the largest or the number of pending updates corresponding to the first designated document information is the largest; establishing a first correspondence between the first designated document information and the cache database, and establishing a second correspondence between other document information except the first designated document information and the relational database.
[0009] Furthermore, based on the data storage mapping relationship, each document information in the initial document information is stored in the corresponding storage database respectively, specifically including: determining the first correspondence between the first specified document information in the initial document information and the cache database, and the second correspondence between the other document information in the initial document information and the relational database according to the data storage mapping relationship; according to the first correspondence relationship, the first specified document information in the initial document information is stored in the cache database, and according to the second correspondence relationship, the other document information is stored in the relational database.
[0010] Furthermore, by each of the business document update nodes, updating the status of the document information to be updated in a cache database corresponding to the document information to be updated to generate business document data, specifically including: determining an update order of the document information to be updated by the multiple business document update nodes and a cache database corresponding to the document information to be updated;
[0011] According to the update order, the status of the document information to be updated is updated in the cache database in turn through each of the business document update nodes to generate updated document data; the current document status in the updated document data is determined, and based on the current document status and the pre-acquired document status evolution information, it is judged whether the current document status is the end state in the document status evolution information; when the current document status is the end state in the document status evolution information, the current document status is synchronized from the cache database to the relational database; based on the current document status corresponding to the updated document data and other document data in the initial document information except the updated document data, the business document data is generated.
[0012] Furthermore, before determining whether the current document status is the terminal state in the document status evolution information based on the current document status and the pre-acquired document status evolution information, the method also includes: obtaining the status change of the pending business document during the circulation process; and setting the document status evolution information corresponding to the pending business document based on the status change of the pending business document during the circulation process, wherein the document status evolution information includes multiple document statuses arranged in a specified order and the sequence identifier of each document status in the document status evolution information.
[0013] Furthermore, after generating the business document data, the method also includes: when a user needs to query the current document status of the business document data, determining the document identifier of the business document data; based on the document identifier, performing a document status search in the cache database to determine whether there is a current document status corresponding to the document identifier in the cache database; if the current document status corresponding to the document identifier does not exist in the cache database, then based on the document identifier, using the end point status corresponding to the business document data in the relational data as the current document status of the business document data.
[0014] Furthermore, after generating the business document data, the method further includes: after completing filling in the business document data, removing the updated document data from the cache database.
[0015] One or more embodiments of this specification provide a business data storage device based on an ERP system, including:
[0016] at least one processor; and,
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0019] Obtain a business document to be processed in an ERP system, and determine corresponding multiple document information based on the business document to be processed; determine multiple flow nodes corresponding to the business document to be processed, and fill in the document information in the business document to be processed through the flow nodes to generate initial document information, wherein the flow nodes include a business document filling node and at least one business document update node; obtain a pre-built data storage mapping relationship, wherein the data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, and the storage database includes a cache database and a relational database; based on the data storage mapping relationship, store each document information in the initial document information in a corresponding storage database; determine the document information to be updated in the initial document information, and update the status of the document information to be updated in the cache database corresponding to the document information to be updated through each business document update node to generate business document data and realize the storage of business data, wherein the document information to be updated includes document status information.
[0020] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to:
[0021] Obtain a business document to be processed in an ERP system, and determine corresponding multiple document information based on the business document to be processed; determine multiple flow nodes corresponding to the business document to be processed, and fill in the document information in the business document to be processed through the flow nodes to generate initial document information, wherein the flow nodes include a business document filling node and at least one business document update node; obtain a pre-built data storage mapping relationship, wherein the data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, and the storage database includes a cache database and a relational database; based on the data storage mapping relationship, store each document information in the initial document information in a corresponding storage database; determine the document information to be updated in the initial document information, and update the status of the document information to be updated in the cache database corresponding to the document information to be updated through each business document update node to generate business document data and realize the storage of business data, wherein the document information to be updated includes document status information.
[0022] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: Through the above technical solution, the document information in the business document data to be processed is filled in by the flow node to generate initial document information. According to the storage database corresponding to each document information in the initial document information, each document information is stored in the relational database or cache database. The status data with large changes and small data volume in the business data is placed in the cache database. After the data changes to the final state, this part of the data is synchronized from the cache database to the relational database, and only the document status information in the cache database is updated. The operation of updating the cache database is a memory operation. Compared with the data file update corresponding to the IO operation in the relational database, the update speed is fast. In addition, the relational database no longer generates archive logs due to data changes, and the data files in the relational database will not increase due to document approval. Since no archive logs and other database operations are generated, the pressure on the relational database will be reduced, and the overall performance of the system will be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some of the embodiments described in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work. In the drawings:
[0024] Figure 1 A flowchart of a business data storage method based on an ERP system provided in an embodiment of this specification;
[0025] Figure 2 This is a schematic diagram of an application of a business data storage method based on an ERP system provided in an embodiment of this specification;
[0026] Figure 3 This is a schematic diagram of the structure of a business data storage device based on an ERP system provided in an embodiment of this specification. DETAILED DESCRIPTION
[0027] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this specification without creative work should fall within the scope of protection of this specification.
[0028] An Enterprise Resource Planning (ERP) system is a management platform built on information technology, integrating information technology with advanced management concepts. It uses systematic management concepts to provide decision-making tools for enterprise employees and decision-makers. During the implementation of economic operations, business documents are entered into the system, and data flows after entry. During the data flow process, there are often only a few pieces of data that change, and most business information is not allowed to be modified during the flow. For example, when a business trip user fills out a travel expense report and submits it, the original document's amount, reimbursement person, itinerary, and other information will not change. However, the document's approval status and payment status will change during this process.
[0029] Traditional ERP systems usually use a database for storage. The data storage method uses a relational database for storage, or a cache database for storage. Tables with small data volumes are placed in the cache database for storage. Since the amount of business data is relatively large, the business data is not placed in the cache database, but is stored in a relational database. In addition, due to the characteristics of business data flow, updating data in a relational database is an IO operation, and its update speed is slower than the memory operation of cache data. During the flow of business data, it is easy to generate archive log files due to data changes such as document approval, resulting in an increase in the number of files in the relational database, affecting system performance. Therefore, the traditional ERP system storage method stores business data in a relational database. Economic business data is prone to generate archive log files due to the need for data flow, auditing, and other data changes. This leads to an increase in the number of files in the relational database, affecting system performance.
[0030] The embodiments of this specification provide a business data storage method based on an ERP system. It should be noted that the execution subject in the embodiments of this specification can be a server or any device with data processing capabilities. Figure 1 A flowchart of a business data storage method based on an ERP system is provided in the embodiment of this specification, as shown in FIG. Figure 1 As shown, it mainly includes the following steps:
[0031] Step S101: Obtain pending business documents in the ERP system, and determine corresponding multiple document information based on the pending business documents.
[0032] In one embodiment of the present disclosure, pending business documents in an ERP system are obtained, and based on the pending business documents, corresponding document information is determined. The pending business documents herein may be economic business documents such as reimbursement documents and purchase approval documents. Economic business documents herein refer to business documents in business data that involve economic transactions, such as a reimbursement document that includes a document payment process.
[0033] Step S102: determining a plurality of transfer nodes corresponding to the business document to be processed, filling in the document information in the business document to be processed through the transfer nodes, and generating initial document information.
[0034] The flow nodes include a business document filling node and at least one business document updating node;
[0035] In one embodiment of the present specification, multiple flow nodes corresponding to a pending business document are determined. These flow nodes include a business document reporting node and at least one business document update node. A business document update node may also be referred to as a review node, payment node, or the like. The business document reporting node can be considered the initiator of the business document and fills in initial information for the business document. The at least one business document update node updates the document information, including review, approval, and payment. The business document reporting node in the flow nodes reports document information in the pending business document to generate initial document information. Figure 2 This is a schematic diagram of an application of a business data storage method based on an ERP system provided in an embodiment of this specification, such as Figure 2 As shown in the figure, a user logs into the ERP system, creates a new expense report, completes the form, and submits it. Here, the user is the business document reporting node within the flow node. The initial document information includes multiple document information, such as the reimbursement user, reimbursement unit, reimbursement amount, accounting organization, and document status.
[0036] Step S103: Acquire a pre-built data storage mapping relationship.
[0037] The data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, and the storage database includes a cache database and a relational database.
[0038] Before obtaining the pre-built data storage mapping relationship, the method also includes: determining the information attributes of each document information, wherein the information attributes include at least one business document update node corresponding to the document information, the number of times to be updated corresponding to the document information, and the data volume of each document information; based on the information attributes of each document information, determining the storage database of each document information to establish a data storage mapping relationship between the document information and the storage database, wherein the storage database includes any one of a cache database and a relational database.
[0039] In one embodiment of the present specification, prior to step S103, a data storage mapping relationship needs to be established based on multiple document information in the initial document information. First, the information attributes of each document information are determined. The information attributes herein include at least one business document update node corresponding to the document information, the number of pending updates corresponding to the document information, and the data volume of each document information. The at least one business document update node corresponding to the document information refers to a node with update authority for the document information. For example, the business document update node corresponding to document information in the document status is a node with approval authority, a node with payment authority, etc. For document information such as the reimbursement amount, the business document update node is the business document filling node, and the user node corresponding to the reimbursement initiating user fills in such document information. Similarly, the number of pending updates corresponding to the document information refers to the number of times the document information needs to be updated during the data flow process. For example, the number of pending updates corresponding to the reimbursement user, reimbursement unit, reimbursement amount, accounting organization, etc. is 1, which means that such document information can only be filled in once by the user node corresponding to the reimbursement initiating user during the initial filling. Secondly, according to the information attributes of each document information, the storage database of each document information is determined to establish a data storage mapping relationship between the document information and the storage database, where the storage database includes any one of a cache database and a relational database.
[0040] Based on the information attributes of each piece of document information, a storage database for each piece of document information is determined, specifically including: determining the data volume in the information attributes of each piece of document information; screening multiple pieces of document information according to the data volume of each piece of document information and a preset data volume threshold to obtain first-category document information, wherein the data volume of each piece of first document information in the first-category document information is not greater than the preset data volume threshold; screening the document information in the first-category document information according to at least one business document update node corresponding to each piece of the first document information, or according to the number of pending updates corresponding to each piece of the first document information, to obtain first designated document information, wherein, in the first-category document information, the first designated document information corresponds to the largest number of business document update nodes or the largest number of pending updates; establishing a first correspondence between the first designated document information and a cache database, and establishing a second correspondence between other document information other than the first designated document information and a relational database.
[0041] In one embodiment of the present specification, the data volume of each document information item is determined, and based on the data volume of each document information item, multiple document information items are screened to obtain first-category document information items whose data volume does not exceed a preset data volume threshold. Within the first-category document information, the document information is screened based on at least one business document update node corresponding to each first document information item, or based on the number of pending updates corresponding to each first document information item, to obtain first designated document information items. Within the first-category document information, the first designated document information items have the largest number of business document update nodes or the largest number of pending updates corresponding to the first designated document information items. A first correspondence is established between the first designated document information items and a cache database, and a second correspondence is established between the remaining document information items, excluding the first designated document information items, and a relational database.
[0042] In one embodiment of the present specification, a data storage mapping relationship is obtained.
[0043] Step S104: Based on the data storage mapping relationship, each piece of document information in the initial document information is stored in a corresponding storage database.
[0044] Based on the data storage mapping relationship, each document information in the initial document information is stored in the corresponding storage database respectively, specifically including: determining a first correspondence between the first designated document information in the initial document information and the cache database, and a second correspondence between the other document information in the initial document information and the relational database according to the data storage mapping relationship; according to the first correspondence relationship, the first designated document information in the initial document information is stored in the cache database, and according to the second correspondence relationship, the other document information is stored in the relational database.
[0045] In one embodiment of the present specification, a first correspondence between the first designated document information in the initial document information and the cache database is determined based on the data storage mapping relationship, and the first designated document information in the initial document information is stored in the cache database according to the first correspondence relationship. A second correspondence between other document information in the initial document information and the relational database is determined based on the data storage mapping relationship, and the other document information is stored in the relational database according to the second correspondence relationship. Figure 2 Taking the reimbursement document in as an example, the document information such as the document number, filling date, reimburser, reimbursement unit, reimbursement instructions, reimbursement amount, and reimbursement currency are stored in the BXDJ table in the relational database, and the document status information such as the document number and document status is stored in a cache database, such as the Remote Dictionary Server (Redis) database.
[0046] Step S105 , determining the document information to be updated in the initial document information, and updating the status of the document information to be updated in the cache database corresponding to the document information to be updated through each business document update node to generate business document data and realize storage of business data.
[0047] The method includes: updating the status of the document information to be updated in the cache database corresponding to the document information to be updated by each of the business document update nodes to generate business document data, specifically including: determining an update order of the document information to be updated by multiple business document update nodes and a cache database corresponding to the document information to be updated; updating the status of the document information to be updated in the cache database in sequence according to the update order to generate updated document data by each of the business document update nodes; determining a current document status in the updated document data, and judging whether the current document status is an end state in the document status evolution information based on the current document status and pre-acquired document status evolution information; synchronizing the current document status from the cache database to the relational database when the current document status is the end state in the document status evolution information; and generating the business document data based on the current document status corresponding to the updated document data and other document data in the initial document information except the updated document data.
[0048] In one embodiment of the present specification, the update order of multiple business document update nodes for document information to be updated and the designated storage database corresponding to the document information to be updated are determined. The update order here can be based on a pre-set review logic. For example, the review logic is that department A conducts an initial review first, department B conducts a review, and then department C makes the payment. The corresponding update order is the business document update node corresponding to department A, the business document update node corresponding to department B, and the business document update node corresponding to department C. Review, payment, etc. need to be performed in sequence according to the review logic.
[0049] When the designated storage database corresponding to the document information to be updated is a cache database, the status of the document information to be updated is updated in the cache database in turn through each business document update node in the update order, and the updated document data is generated. The current document status in the updated document data is determined. The current document status here can be the latest status obtained after the status is updated in the corresponding document information after the business data update node completes the corresponding review, payment and other operations. Figure 2 As shown, when the user node corresponding to the initiating user fills in the document information, the document status corresponds to the document creation status, meaning the current document status is the document creation status. Based on the current document status and pre-acquired document status evolution information, a determination is made as to whether the current document status is the endpoint state in the document status evolution information. If the current document status is the endpoint state in the document status evolution information, the current document status is synchronized from the cache database to the relational database. Business document data is generated based on the current document status corresponding to the updated document data and all document data in the initial document information, excluding the updated document data.
[0050] This example uses document approval, document payment, and document completion as examples. When approving a document through the corresponding business data update node, only the document status in the Redis database needs to be updated; when paying a document, only the document status in the Redis database needs to be updated to "Payment Completed." Since Redis updates are in-memory operations, data file updates are faster than I / O operations in relational databases. Furthermore, the relational database no longer generates archive logs due to data changes, and the data files in the relational database do not increase due to document approval. Without archive logs and other database operations, the pressure on the relational database is reduced, improving overall system performance. After the document is completed, the Redis database determines that the document status is "Completed" and synchronizes it with the relational database for data archiving. Although database synchronization is performed, the frequency is significantly reduced: from document creation to completion, the document status is synchronized only once.
[0051] Before determining whether the current document state is the terminal state in the document state evolution information based on the current document state and the pre-acquired document state evolution information, the method further includes: obtaining the state change of the pending business document during the circulation process; and setting the document state evolution information corresponding to the pending business document based on the state change of the pending business document during the circulation process, wherein the document state evolution information includes multiple document states arranged in a specified order and a sequence identifier of each document state in the document state evolution information.
[0052] In one embodiment of the present specification, state changes of pending business documents during their circulation process are obtained, for example, state changes corresponding to the four processes of document creation, document review, document payment completion, and document completion. Based on the state changes of the pending business documents during their circulation process, document state evolution information corresponding to the pending business documents is set, with the document creation state, review state, payment completion state, and document completion state being used as the document state evolution information and arranged in the aforementioned order. It should be noted that the document state evolution information includes multiple document states arranged in a specified order and a sequence identifier for each document state in the document state evolution information, and the multiple document states must change in this order.
[0053] After the business document data is generated, the method further includes: after the business document data is completed, removing the updated document data from the cache database.
[0054] In one embodiment of the present specification, when a document is completed, the data in the Redis database is removed to make room for subsequent business information.
[0055] After generating the business document data, the method further includes: when a user needs to query the current document status of the business document data, determining the document identifier of the business document data; based on the document identifier, performing a document status search in the cache database to determine whether a current document status corresponding to the document identifier exists in the cache database; if the current document status corresponding to the document identifier does not exist in the cache database, then based on the document identifier, using the endpoint status corresponding to the business document data in the relationship data as the current document status of the business document data.
[0056] Through the above technical solution, the document information in the business document data to be processed is filled in by the flow node to generate initial document information. According to the storage database corresponding to each document information in the initial document information, each document information is stored in a relational database or a cache database. The status data with large changes and small data volume in the business data is placed in the cache database. After the data changes to the final state, this part of the data is synchronized from the cache database to the relational database, and only the document status information in the cache database is updated. The operation of updating the cache database is a memory operation. Compared with the data file update corresponding to the IO operation in the relational database, the update speed is fast. In addition, the relational database no longer generates archive logs due to data changes, and the data files in the relational database will not increase due to document approval. Since no archive logs and other database operations are generated, the pressure on the relational database will be reduced, and the overall performance of the system will be improved.
[0057] The embodiment of this specification also provides a business data storage device based on the ERP system, such as Figure 3 As shown, the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0058] Obtain a pending business document in an ERP system, and determine corresponding multiple document information based on the pending business document; determine multiple flow nodes corresponding to the pending business document, and fill in the document information in the pending business document through the flow nodes to generate initial document information, wherein the flow nodes include a business document filling node and at least one business document update node; obtain a pre-built data storage mapping relationship, wherein the data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, and the storage database includes a cache database and a relational database; based on the data storage mapping relationship, store each document information in the initial document information in a corresponding storage database; determine the document information to be updated in the initial document information, and update the status of the document information to be updated in the cache database corresponding to the document information to be updated through each business document update node to generate business document data and realize the storage of business data, wherein the document information to be updated includes document status information.
[0059] The embodiments of this specification also provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0060] Obtain a pending business document in an ERP system, and determine corresponding multiple document information based on the pending business document; determine multiple flow nodes corresponding to the pending business document, and fill in the document information in the pending business document through the flow nodes to generate initial document information, wherein the flow nodes include a business document filling node and at least one business document update node; obtain a pre-built data storage mapping relationship, wherein the data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, and the storage database includes a cache database and a relational database; based on the data storage mapping relationship, store each document information in the initial document information in a corresponding storage database; determine the document information to be updated in the initial document information, and update the status of the document information to be updated in the cache database corresponding to the document information to be updated through each business document update node to generate business document data and realize the storage of business data, wherein the document information to be updated includes document status information.
[0061] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, apparatus, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant details, refer to the descriptions of the method embodiments.
[0062] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0063] The devices and media provided in the embodiments of this specification correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0064] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0065] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0066] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0068] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0069] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0070] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0071] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0072] The foregoing description is merely one or more embodiments of this specification and is not intended to limit this specification. It will be apparent to those skilled in the art that various modifications and variations may be made to one or more embodiments of this specification. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of one or more embodiments of this specification are intended to be within the scope of the claims of this specification.
Claims
1. A business data storage method based on an ERP system, characterized in that: The method comprises: Obtaining pending business documents in the ERP system, and determining corresponding multiple document information based on the pending business documents; Determining a plurality of flow nodes corresponding to the pending business document, and filling in document information in the pending business document through the flow nodes to generate initial document information, wherein the flow nodes include a business document filling node and at least one business document update node; Acquire a pre-built data storage mapping relationship, wherein the data storage mapping relationship includes multiple document information and a storage database corresponding to each document information, and the storage database includes a cache database and a relational database; Based on the data storage mapping relationship, each piece of document information in the initial document information is stored in a corresponding storage database; Determining document information to be updated in the initial document information, and updating the status of the document information to be updated in a cache database corresponding to the document information to be updated through each of the business document update nodes to generate business document data, thereby implementing storage of the business data, wherein the document information to be updated includes document status information; By each of the business document update nodes, the state of the document information to be updated is updated in the cache database corresponding to the document information to be updated to generate business document data, specifically including: Determining an update order of the document information to be updated by the plurality of business document update nodes and a cache database corresponding to the document information to be updated; According to the update order, through each of the business document update nodes, in the cache database, the status of the document information to be updated is updated in sequence to generate updated document data; Determining a current document state in the updated document data, and judging whether the current document state is an end state in the document state evolution information based on the current document state and pre-acquired document state evolution information; When the current document state is the end state in the document state evolution information, synchronizing the current document state from the cache database to the relational database; generating the business document data based on a current document status corresponding to the updated document data and other document data in the initial document information except the updated document data; Before determining, based on the current document state and pre-acquired document state evolution information, whether the current document state is the end state in the document state evolution information, the method further includes: Obtaining the status changes of the pending business document during the circulation process; Based on the status changes of the pending business document during the circulation process, the document status evolution information corresponding to the pending business document is set, wherein the document status evolution information includes multiple document statuses arranged in a specified order and the sequence identifier of each document status in the document status evolution information.
2. The business data storage method based on the ERP system according to claim 1, characterized in that: Before obtaining the pre-built data storage mapping relationship, the method further includes: Determining information attributes of each document information, wherein the information attributes include at least one business document update node corresponding to the document information, the number of pending updates corresponding to the document information, and the data volume of each document information; Based on the information attributes of each document information, a storage database for each document information is determined to establish a data storage mapping relationship between the document information and the storage database, wherein the storage database includes any one of a cache database and a relational database.
3. The business data storage method based on the ERP system according to claim 2, characterized in that: Based on the information attributes of each document information, determine the storage database for each document information, specifically including: Determine the amount of data in the information attributes of each document information; Filtering the plurality of document information according to the data volume of each document information and a preset data volume threshold to obtain first-category document information, wherein the data volume of each first document information in the first-category document information is not greater than the preset data volume threshold; In the first category of document information, document information is filtered based on at least one business document update node corresponding to each piece of the first document information, or based on the number of pending updates corresponding to each piece of the first document information, to obtain first designated document information, wherein, in the first category of document information, the first designated document information has the largest number of business document update nodes corresponding to it or the largest number of pending updates corresponding to it; A first corresponding relationship is established between the first designated document information and the cache database, and a second corresponding relationship is established between other document information except the first designated document information and the relational database.
4. The business data storage method based on the ERP system according to claim 3 is characterized in that: Based on the data storage mapping relationship, each piece of document information in the initial document information is stored in the corresponding storage database, specifically including: Determining, based on the data storage mapping relationship, a first correspondence between the first designated document information in the initial document information and the cache database, and a second correspondence between the other document information in the initial document information and the relational database; According to the first corresponding relationship, the first designated document information in the initial document information is stored in the cache database, and according to the second corresponding relationship, the other document information is stored in the relational database.
5. The business data storage method based on the ERP system according to claim 1, characterized in that: After generating the business document data, the method further includes: When a user needs to query the current document status of the business document data, determining the document identifier of the business document data; Based on the document identifier, searching for the document status in the cache database to determine whether the current document status corresponding to the document identifier exists in the cache database; If the current document state corresponding to the document identifier does not exist in the cache database, based on the document identifier, the end state corresponding to the business document data in the relational data is used as the current document state of the business document data.
6. The business data storage method based on the ERP system according to claim 1, characterized in that: After generating the business document data, the method further includes: When the business document data is completed, the updated document data is removed from the cache database.
7. A business data storage device based on an ERP system, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
8. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Voucher processing method based on ERP system and voucher processing device based on ERP system
CN105787625A
Workflow data processing method and device, computer equipment and storage medium
CN112579606A