Business data processing method and device, computer device and storage medium
Patent Information
- Application Number
- CN202211560093.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-12-07
AI Technical Summary
[0003]又或者当对业务中某些服务进行了修改,相应的需要重新测试该业务中所有的功能是否正常,如果该功能包括大量的业务节点、且修改位于执行顺序靠后的业务节点时,此时需要大量的测试工作,给测试工作带来较大的工作量
Smart Images

Figure CN116089138B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of business data processing technology, and in particular to a business data processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] With the development of internet technology, the use of microservices is increasing. A microservice is a small service comprised of a single application, possessing its own process and lightweight processing. Services are designed based on business functions, deployed in a fully automated manner, and communicate with other services using HTTP APIs. HTTP APIs provide a way to integrate platform functions with control panels or applications. Microservices have been around for over 17 years, and more and more individuals and enterprises are adopting the microservice style for developing and designing functions. Microservices offer excellent scalability and extensibility, and reduce development difficulty and communication costs. However, as services become "micro-sized," the number of business nodes increases, gradually creating problems in management and usage. When a process engine orchestrates multiple service calls, multiple business nodes are needed to implement business functions. Sometimes, if one service returns incorrect data, all subsequent downstream services will also generate incorrect data, requiring the correction of the service that caused the error.
[0003] Alternatively, if certain services in a business are modified, it is necessary to retest all functions in that business to ensure they function correctly. If the function involves a large number of business nodes and the modification is located in a later business node in the execution order, a lot of testing work is required, which will increase the workload of the testing work.
[0004] For example, if the function contains 100 business nodes, and the modification is located at the 99th business node, then the preceding 98 business nodes need to be tested and 98 steps need to be executed to obtain the data of the 99th business node; if the modification involves the process of multiple 100 business nodes, the corresponding test needs to be executed 98 to the power of n steps to complete the test. Summary of the Invention
[0005] Therefore, it is necessary to provide a business data processing method, apparatus, computer equipment, and storage medium that can quickly repair abnormal data and accelerate business testing, in order to address the above-mentioned technical problems.
[0006] A business data processing method, the method comprising:
[0007] When the business data corresponding to a business is abnormal, the node type of the business node corresponding to the business is determined; the node type includes normal nodes and abnormal nodes.
[0008] Based on the node type of the business node, a corresponding execution program is used to execute each business node in the execution order of the business nodes; the execution program includes a virtual execution program and a normal execution program;
[0009] The service is corrected based on the service data of the service node obtained from the normal execution procedure.
[0010] In one embodiment, the method further includes:
[0011] Receive services initiated by users based on business scenarios;
[0012] A set of business nodes is created based on the business scenario corresponding to the business; the set of business nodes includes multiple business nodes that are executed sequentially.
[0013] The business data corresponding to the business is obtained by executing each business node in the set of business nodes in the order of execution.
[0014] The business data is stored in the historical execution database.
[0015] In one embodiment, the step of executing each business node according to its execution order using a corresponding execution program based on the node type of the business node includes:
[0016] The virtual execution program is loaded and executed on the business nodes of each of the normal nodes in the corresponding execution order;
[0017] When the business node is executed sequentially to the abnormal node, the virtual execution program is paused and the normal execution program is invoked to execute the business node of the abnormal node.
[0018] In one embodiment, the step of invoking the virtual executor to execute the business nodes of each of the normal nodes in the corresponding execution order includes:
[0019] The business node corresponding to the first normally executing node of the aforementioned business is taken as the current business node;
[0020] The virtual execution program is loaded to retrieve the business data of the current business node from the historical execution database.
[0021] Based on the business data of the current business node, the current business node is executed through the virtual execution program;
[0022] The business node corresponding to the next execution order of the aforementioned business is invoked as the current business node;
[0023] When the current business node is a normal node, return to the step of loading the virtual execution program to obtain the business data of the current business node from the historical execution database, until the current business node becomes an abnormal node, then switch the execution program to execute the current business node.
[0024] In one embodiment, the business data includes node return values and node request parameters; the correction of the business based on the business data of the business node executed by the normal execution program includes:
[0025] Based on the node return value and node request parameters of the business node executed by the normal execution program, update the business data of the corresponding business node in the historical execution database;
[0026] Based on the updated business data, the corresponding business nodes are corrected to obtain the corrected business.
[0027] In one embodiment, determining the node type of the service node corresponding to the service includes:
[0028] Obtain the business node corresponding to the abnormal business data as a reference abnormal business node;
[0029] Based on the business scenario of the aforementioned business, other business nodes related to the reference abnormal business node are identified as candidate abnormal business nodes.
[0030] The node types of the reference abnormal service node and the candidate abnormal service node are determined as abnormal nodes;
[0031] The node type of all business nodes in the service, excluding the abnormal node, is determined to be a normal node.
[0032] In one embodiment, the method further includes:
[0033] The business node that is adjacent to the reference abnormal business node among the abnormal nodes is called the current adjacent abnormal business node;
[0034] The normal execution procedure is used to execute the currently adjacent abnormal service nodes in sequence to obtain the corresponding current corrected service data;
[0035] The current corrected business data is compared with the business data corresponding to the adjacent abnormal business nodes in the historical execution database;
[0036] If they match, the current adjacent abnormal service node is excluded from the abnormal nodes, and the abnormal node is updated.
[0037] The business node adjacent to the reference abnormal business node in the updated abnormal nodes is taken as the current adjacent abnormal business node.
[0038] Return to the normal execution procedure and sequentially execute the steps of the current adjacent abnormal service nodes to obtain the corresponding current corrected service data, until the loop stop condition is reached, and obtain the abnormal node of the service.
[0039] In one embodiment, among the adjacent abnormal service nodes, the service node with the earlier execution order is designated as the left adjacent abnormal service node, and the other is designated as the right adjacent abnormal service node; the method further includes:
[0040] If there is a discrepancy, the current adjacent abnormal service node will be considered an abnormal node.
[0041] The business nodes that are left-adjacent to the current left-adjacent abnormal business node and the business nodes that are right-adjacent to the current right-adjacent abnormal business node are defined as the current adjacent abnormal business nodes.
[0042] Return to the normal execution procedure and sequentially execute the steps of the currently adjacent abnormal service nodes to obtain the corresponding current corrected service data, until the loop stop condition is reached, and obtain the abnormal node of the service.
[0043] A business data processing apparatus, the apparatus comprising:
[0044] The node type determination module is used to determine the node type of the business node corresponding to the business when the business data corresponding to the business is abnormal; the node type includes normal nodes and abnormal nodes.
[0045] The node execution module is used to execute each of the business nodes according to the execution order of the business nodes, based on the node type of the business node and using the corresponding execution program; the execution program includes a virtual execution program and a normal execution program;
[0046] The business data correction module is used to correct the business based on the business data of the business nodes obtained from the normal execution procedure.
[0047] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the business data processing method described in the above embodiments.
[0048] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the business data processing method described in the above embodiments.
[0049] The aforementioned business data processing method, apparatus, computer equipment, and storage medium, when business data corresponding to a business operation becomes abnormal—for example, an error is found in the business data corresponding to a certain business node during business verification, or when business data corresponding to certain functions of a business is modified—can be considered as indicating business data anomalies. In such cases, the computer equipment first determines the node type of the business node corresponding to the business operation, thereby identifying which business nodes are abnormal and which are normal. Then, based on the different node types, corresponding execution programs are used to execute the business data according to the execution order corresponding to the business nodes. Finally, the business data obtained from the normally executed programs is used to repair the business. This provides a fast and accurate method for repairing abnormal business data, and also enables rapid functional testing of modified business data, thus accelerating business data processing capabilities. Attached Figure Description
[0050] Figure 1 This is an application scenario diagram of a business data processing method in one embodiment;
[0051] Figure 2 This is a flowchart illustrating a business data processing method in one embodiment;
[0052] Figure 3 This is a structural block diagram of a business data processing device in one embodiment;
[0053] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] The business data processing method provided in this application can be applied to, for example... Figure 1The application environment shown is illustrated. This business data processing method is applied to a business data processing system, which includes a virtual process group 102, a historical execution database 104, a trajectory execution database 106, a process engine 108, a virtual execution program 110, and a normal execution program 112. The virtual process group 102 communicates with the historical execution database 104, the trajectory execution database 106, and the process engine 108 via networks. The virtual process group 102 can call either the virtual execution program 110 or the normal execution program 112. The virtual process group 102 is used to repair business data or retest the business when anomalies occur in the business data corresponding to a business. The historical execution database 104 stores the business data of each business node; the trajectory execution database 106 stores the execution trajectory corresponding to each business node; the process engine 108 is used to process data based on the node request parameters and node return values corresponding to the business nodes, and load and call the business nodes in the next execution order. Virtual Execution Program 110 uses a simulated execution method. Based on the business identifier and the node identifier of the business node, it retrieves the node request parameters and node return values from the historical execution database and transmits them to the node engine. The node engine processes the data according to the node request parameters and node return values according to the normal flow and calls the next business node in the execution sequence to process its data. Normal Execution Program 112 is the actual execution method. Based on the node request parameters corresponding to the business node, it remotely calls the corresponding module to execute it and obtains the corresponding node return value.
[0056] The virtual process group 102 can be applied to terminals, servers, or systems that include both terminals and servers, and is implemented through interaction between the terminals and servers. The terminals can be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, while the servers can be standalone servers or server clusters composed of multiple servers.
[0057] In one embodiment, such as Figure 2 As shown, a business data processing method is provided. This embodiment illustrates the method by applying it to a virtual process group 102. In this embodiment, the method includes the following steps:
[0058] Step S202: When the business data corresponding to the business is abnormal, determine the node type of the business node corresponding to the business; the node type includes normal nodes and abnormal nodes.
[0059] Business data anomalies include errors, modifications, increases in business data due to the addition of new business nodes, and decreases in business data due to the removal of new business nodes. Node type refers to whether the business data of a business node is normal or abnormal; there are normal nodes and abnormal nodes. The node type of a business node can be determined based on the anomaly of the business data. A business node includes its execution order and node identifier. The execution order is the order in which business nodes are executed within the entire process of the corresponding business. The node identifier is a unique identifier used to distinguish each business node. Each business has a business identifier used to uniquely distinguish each business. Business data includes node request parameters and node return values.
[0060] Specifically, when the business data corresponding to a business is abnormal, the virtual process group determines the node type of the business node corresponding to the business. That is, based on the abnormal business data, the abnormal business node is identified as the abnormal node, and the business nodes in the business other than the abnormal node are identified as normal nodes, thus obtaining the node type of each business node.
[0061] In one embodiment, determining the node type of the business node corresponding to the business includes: obtaining the business node corresponding to the abnormal business data as a reference abnormal business node; determining other business nodes associated with the reference abnormal business node as candidate abnormal business nodes based on the business scenario of the business; determining the node type of the reference abnormal business node and the candidate abnormal business node as abnormal nodes; and determining the node type of the business nodes other than the abnormal nodes in the business as normal nodes.
[0062] A business scenario is an overview of a set of possible situations in a business environment. Typically, a scenario is based on a combination of events and factors that constitute the current business situation, and then expanded upon with some predictions of possible future events.
[0063] Because the business involves a large number of business nodes, and these nodes execute in a specific order, their execution results influence each other. Sometimes, the result of a single adjacent business node is affected; sometimes, multiple adjacent business nodes are affected; sometimes the result of one business node influences the return value of the next; and sometimes, the return value of the next business node influences the result of the previous business node. Therefore, in addition to identifying the reference abnormal node with anomalous data, it is necessary to identify other business nodes associated with the reference abnormal node as candidate abnormal business nodes. There is also the possibility that the business data of these candidate abnormal business nodes may also contain errors, thus requiring extended processing of the abnormal nodes to improve the accuracy of abnormal data repair. However, if there are many candidate abnormal business nodes, it will increase the data processing time, thereby reducing the data processing speed.
[0064] In one embodiment, the method further includes: designating a business node adjacent to the reference abnormal business node among the abnormal nodes as a current adjacent abnormal business node; executing the current adjacent abnormal business node sequentially using the normal execution program to obtain corresponding current corrected business data; comparing the current corrected business data with the business data corresponding to the adjacent abnormal business node in the historical execution database; if they match, excluding the current adjacent abnormal business node from the abnormal nodes and updating the abnormal node; designating the business node adjacent to the reference abnormal business node among the updated abnormal nodes as the current adjacent abnormal business node; returning to the step of executing the current adjacent abnormal business node sequentially using the normal execution program to obtain corresponding current corrected business data, until a loop stop condition is reached to obtain the abnormal node of the business.
[0065] In one embodiment, among the adjacent abnormal service nodes, the service node with the earlier execution order is designated as the left adjacent abnormal service node, and the other is designated as the right adjacent abnormal service node. The current corrected service data is compared with the service data corresponding to the adjacent abnormal service nodes in the historical execution database. If they are inconsistent, the current adjacent abnormal service node among the abnormal nodes is retained. The service nodes that are left-adjacent to the current left adjacent abnormal service node and right-adjacent to the current right adjacent abnormal service node among the abnormal nodes are designated as the current adjacent abnormal service nodes. The process returns to the step of executing the current adjacent abnormal service nodes in sequence using the normal execution program to obtain the corresponding current corrected service data, until the loop stop condition is reached, and the abnormal node of the service is obtained.
[0066] In one embodiment, obtaining the abnormal node of the service until the loop stops includes: until the number of consecutive exclusions of the abnormal node reaches a preset number, excluding all service nodes whose execution order is before the current left adjacent abnormal service node and after the current right adjacent abnormal service node, to obtain the updated abnormal node.
[0067] Among adjacent abnormal business nodes, the business node that is executed earlier in the order is designated as the left adjacent abnormal business node, and the other is designated as the right adjacent abnormal business node. Adjacent includes left adjacent and right adjacent. Left adjacent refers to the business node that is located to the left of the target business node and is adjacent to it. Similarly, right adjacent refers to the business node that is located to the right of the target business node and is adjacent to it.
[0068] In this embodiment, to address the challenge of improving the speed of repairing abnormal data or accelerating service testing when there are a large number of candidate abnormal service nodes, this embodiment first considers the correlation between service nodes. Given that candidate service nodes with a high probability of errors are most likely to be adjacent to the reference abnormal service node, the embodiment first selects service nodes adjacent to the reference abnormal service node as the current adjacent abnormal service nodes. Then, the normal execution program executes each of the current adjacent abnormal service nodes sequentially according to the execution order corresponding to the service nodes, obtaining the current corrected service data for each service node. Finally, the current corrected service data for each current adjacent abnormal service node is compared with the corresponding service data in the historical execution database to determine the current adjacent abnormal service node. The virtual process group checks whether the business data of the current adjacent abnormal business node has also become abnormal. If the comparison results are consistent, the virtual process group can determine that the business data of the current adjacent abnormal business node has not become abnormal, and can exclude the current adjacent abnormal business node from the abnormal nodes to obtain the updated abnormal node. Further, the above steps are executed repeatedly, that is, the business nodes adjacent to the reference abnormal business node in the updated abnormal nodes are taken as the current adjacent abnormal business nodes. The process returns to the normal execution procedure and executes the steps of the current adjacent abnormal business nodes in sequence to obtain the corresponding current corrected business data, until the loop stops when the number of consecutive exclusions of an abnormal node reaches a preset number. In this case, business nodes whose execution order is before or after the current adjacent abnormal business node are excluded to obtain the updated abnormal node. For example, if the current number of exceptions is 2, and the preset number is 2, then business nodes whose execution order is before or after the current adjacent abnormal business node are excluded to obtain the updated abnormal node.
[0069] Accordingly, if there is a discrepancy, the virtual process group will designate the current adjacent abnormal business node as the abnormal node. Then, the virtual process group will designate the business nodes that are left-adjacent to the current left-adjacent abnormal business node and right-adjacent to the current right-adjacent abnormal business node as the current adjacent abnormal business nodes. The normal execution program will then execute the current adjacent abnormal business nodes sequentially to obtain the corresponding current corrected business data. The current corrected business data will be compared with the business data corresponding to the adjacent abnormal business nodes in the historical execution database. If there is a discrepancy, the business nodes that are left-adjacent to the current left-adjacent abnormal business node and right-adjacent to the current right-adjacent abnormal business node will be designated as the current adjacent abnormal business nodes. The process will return to the step of executing the current adjacent abnormal business nodes sequentially using the normal execution program to obtain the corresponding current corrected business data, until the loop stop condition is met, thus obtaining the abnormal node of the business. If they match, the current adjacent abnormal service node is excluded from the list of abnormal nodes, and the abnormal node is updated. The service node adjacent to the reference abnormal service node in the updated list is then taken as the current adjacent abnormal service node. The process returns to the normal execution procedure, sequentially executing the steps to obtain the corresponding current corrected service data for the current adjacent abnormal service node, until the loop stops, thus obtaining the abnormal node of the service. The method provided in this embodiment can further accurately and quickly identify service nodes that are normal nodes among the candidate abnormal nodes, thereby improving the speed of service data repair or service testing.
[0070] Step S104: Based on the node type of the business node, use the corresponding execution program to execute each business node in the execution order of the business nodes; the execution program includes a virtual execution program and a normal execution program.
[0071] In one embodiment, the method further includes, after the virtual process group has completed the execution of each business node, recording the execution trajectory of the corresponding business node of the normal execution program and storing it in the trajectory execution database.
[0072] In one embodiment, the method further includes: receiving a service initiated by a user based on a business scenario; creating a set of business nodes according to the business scenario corresponding to the service; the set of business nodes includes multiple business nodes executed in sequence; the business nodes include an execution order and a node identifier; executing each business node in the execution order of the set of business nodes to obtain business data corresponding to the service; and storing the business data in a historical execution database.
[0073] Among them, business scenarios refer to the functions of a business in different usage scenarios; for example... The historical execution database stores the business data of each business's corresponding business nodes, and the corresponding business data can be found based on the business identifier and the business node identifier.
[0074] Specifically, before repairing or testing business data, the virtual process group first processes the business data to obtain the business data corresponding to each business node. Then, when anomalies occur in the business data, the business data is repaired and tested. The virtual process group receives business requests initiated based on business scenarios, and determines the corresponding business scenario according to the required functions of the business; then, it creates a set of business nodes based on the business scenario, where the set of business nodes includes multiple sequentially executed business nodes; and executes them according to the execution order of each business node in the set, obtaining the corresponding business data, which is then stored in the historical execution database.
[0075] In one embodiment, the step of executing each business node according to the execution order of the business nodes using the corresponding execution program based on the node type of the business node includes: loading a virtual execution program to execute the business nodes of each normal node in the corresponding execution order; when the business nodes are executed sequentially to the abnormal node, pausing the virtual execution program and calling the normal execution program to execute the business node of the abnormal node.
[0076] In one embodiment, the step of invoking the virtual executor to execute the business nodes of each normal node in the corresponding execution order includes: taking the business node of the first normal node to be executed corresponding to the business as the current business node; loading the virtual executor to obtain the business data of the current business node from the historical execution database; executing the current business node through the virtual executor based on the business data of the current business node; invoking the business node of the next execution order corresponding to the business as the current business node; when the node type of the current business node is a normal node, returning to the step of loading the virtual executor to obtain the business data of the current business node from the historical execution database, until the current business node is an abnormal node, switching the executor to execute the current business node.
[0077] The virtual executor employs a simulated execution method. Based on the business identifier and the node identifier of the business node, it retrieves node request parameters and node return values from the historical execution database and transmits them to the node engine. The node engine then processes the data according to the normal workflow based on the node request parameters and node return values, and calls the next business node in the execution sequence to process its data. Therefore, executing a remote call within the virtual executor does not trigger a real remote call.
[0078] Normal program execution involves actual execution, remotely calling the corresponding module to execute based on the node request parameters of the business node, and obtaining the corresponding node return value.
[0079] Specifically, after determining the node type of the business node corresponding to the business, the virtual process group selects the business node that is first in the execution order as the current business node and starts execution. Based on the node type of the current business node, it selects and loads the corresponding execution program to execute the current business node. For example, if the current business node is a normal node, the virtual process group loads a virtual execution program to process it. Then, the process engine loads the next business node in the execution order as the current business node. If the current business node is an abnormal node, the virtual execution program is paused, and a normal execution program is called to execute the current business node. The node return value of the current business node is obtained and stored in the historical execution database. The process engine continues to load the next business node in the execution order as the current business node, and loads the corresponding execution program based on the node type of the current business node to execute it.
[0080] Step S106: Correct the service based on the service data of the service node obtained from the normal execution procedure.
[0081] In one embodiment, the business data includes node return values; the step of correcting the business based on the business data of the business node executed by the normal execution program includes: updating the business data of the corresponding business node in the historical execution database based on the node return values of the business node executed by the normal execution program; and correcting the business node corresponding to the business based on the updated business data to obtain the corrected business.
[0082] Specifically, the virtual process group executes the business nodes of the abnormal nodes according to the normal execution procedure, and updates the node return value in the business data of the corresponding business node in the historical execution database based on the node return value and node request parameters obtained after execution, or stores the node return value and node request parameters in the corresponding business node in the historical execution database as business data. The node request parameters are stored on the server or in the node engine, and can be modified according to the user's changes to the functionality of the business node. For example, when modifying the business data of a business node, the node request parameters may also be modified.
[0083] For example, in the e-commerce industry, taking the business scenario of a user purchasing goods on an e-commerce platform as an example, this solution illustrates how to quickly correct erroneous data, as detailed below:
[0084] 1. User Xiaoming browsed products in the online store and took a liking to a Huawei Make50 mobile phone;
[0085] 2. Xiaoming selected this phone and clicked "Buy Now";
[0086] 3. The system will then display the shipping address and supported payment methods (online payment, cash on delivery);
[0087] 4. Xiaoming chose cash on delivery and submitted the order;
[0088] 5. After the merchant sees the order, they notify the finance department to generate a cash-on-delivery accounts receivable.
[0089] 6. Arrange for warehouse staff to deduct inventory, issue goods out of the warehouse, and hand over the goods to logistics personnel;
[0090] 7. After receiving the goods, logistics personnel sort them, arrange them in carts, and deliver them.
[0091] 8. After receiving the goods, Xiaoming opened the box, inspected them, and paid the driver in cash.
[0092] 9. After receiving the money, the driver will hand it over to the company's finance staff;
[0093] 10. The logistics company deposits the payment into the company's corporate account;
[0094] 11. Settlement between the logistics company and the seller;
[0095] 12. The seller's finance department received the payment;
[0096] 13. After receiving payment, the finance department will verify the payment according to the payer and order number provided by the logistics company.
[0097] In the above process, if the finance department discovers a problem with the amount in step 5, and if the problem is ultimately found to be caused by an error in the calculation of the discount amount, then the business data processing method provided in this solution can be used to execute the virtual process up to the node before the discount amount calculation, and then execute the normal node at the discount amount calculation point to repair the order. This will refresh the order amount on the order page and provide an amount prompt on the order page (e.g., due to changes in product information, your product price has changed), and further ask the user Xiaoming whether he agrees. If he agrees, the subsequent business node process will continue to be executed.
[0098] In the aforementioned business data processing method, when business data corresponding to a business operation becomes abnormal—for example, when an error is discovered in the business data corresponding to a certain business node during business verification, or when modifying the business data corresponding to certain functions of a business—these situations can be considered as business data anomalies. In such cases, the computer equipment first determines the node type of the business node corresponding to the business operation, thereby identifying which business nodes are abnormal and which are normal. Then, based on the different node types, the corresponding execution program is used to execute according to the execution order corresponding to the business nodes. Finally, the business data obtained from the normally executed program is used to repair the business data. This provides a fast and accurate method for repairing abnormal business data, and also enables rapid functional testing of the business data in cases of modification, thus accelerating business data processing capabilities.
[0099] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0100] In one embodiment, such as Figure 3 As shown, a business data processing device 300 is provided, including: a node type determination module 302, a node execution module 304, and a business data correction module 306, wherein:
[0101] The node type determination module 302 is used to determine the node type of the business node corresponding to the business when the business data corresponding to the business is abnormal; the node type includes normal nodes and abnormal nodes.
[0102] The node execution module 304 is used to execute each of the business nodes according to the execution order of the business nodes using the corresponding execution program based on the node type of the business node; the execution program includes a virtual execution program and a normal execution program.
[0103] The business data correction module 306 is used to correct the business based on the business data of the business node obtained by the normal execution procedure.
[0104] In one embodiment, the apparatus further includes a historical business data generation module, configured to receive a business initiated by a user based on a business scenario; create a business node set according to the business scenario corresponding to the business; the business node set includes multiple sequentially executed business nodes; execute each business node in the business node set according to its execution order to obtain business data corresponding to the business; and store the business data in a historical execution database.
[0105] In one embodiment, the node execution module is further configured to load a virtual execution program to execute the business nodes of each normal node in the corresponding execution order; when the business nodes are executed sequentially to the abnormal node, the virtual execution program is paused and the normal execution program is invoked to execute the business nodes of the abnormal node.
[0106] In one embodiment, the node execution module is further configured to: select the business node of the first normal node to be executed corresponding to the business as the current business node; load a virtual execution program to obtain the business data of the current business node from the historical execution database; execute the current business node through the virtual execution program according to the business data of the current business node; call the business node of the next execution order corresponding to the business as the current business node; when the node type of the current business node is a normal node, return to the step of loading the virtual execution program to obtain the business data of the current business node from the historical execution database, until the current business node is an abnormal node, and switch the execution program to execute the current business node.
[0107] In one embodiment, the business data correction module is further configured to update the business data of the corresponding business node in the historical execution database based on the node return value and node request parameters of the business node executed by the normal execution program; and to correct the business node corresponding to the business based on the updated business data to obtain the corrected business.
[0108] In one embodiment, the node type determination module is further configured to obtain the business node corresponding to the abnormal business data as a reference abnormal business node; based on the business scenario of the business, determine other business nodes related to the reference abnormal business node as candidate abnormal business nodes; determine the node type of the reference abnormal business node and the candidate abnormal business node as abnormal nodes; and determine the node type of the business nodes in the business other than the abnormal nodes as normal nodes.
[0109] In one embodiment, the node type determination module is further configured to: designate the business nodes adjacent to the reference abnormal business node among the abnormal nodes as current adjacent abnormal business nodes; execute the current adjacent abnormal business nodes sequentially using the normal execution program to obtain the corresponding current corrected business data; compare the current corrected business data with the business data corresponding to the adjacent abnormal business nodes in the historical execution database; if they match, exclude the current adjacent abnormal business node from the abnormal nodes and update the abnormal node; designate the business nodes adjacent to the reference abnormal business node among the updated abnormal nodes as current adjacent abnormal business nodes; return to the step of executing the current adjacent abnormal business nodes sequentially using the normal execution program to obtain the corresponding current corrected business data, until the loop stop condition is reached, and obtain the abnormal node of the business.
[0110] In one embodiment, the node type determination module is further configured to, if inconsistent, identify the current adjacent abnormal service node as an abnormal node; identify the service node that is left-adjacent to the current left adjacent abnormal service node and the service node that is right-adjacent to the current right adjacent abnormal service node as the current adjacent abnormal service node; return to the step of executing the current adjacent abnormal service node in sequence using the normal execution program to obtain the corresponding current corrected service data, until the loop stop condition is reached to obtain the abnormal node of the service.
[0111] The aforementioned business data processing device addresses anomalies in business data. For example, errors might be discovered during business data verification at a specific business node, or when modifying business data for certain functions. In such cases, the computer first determines the node type of the corresponding business node, identifying which nodes are abnormal and which are normal. Then, based on the different node types, appropriate execution programs are used to execute the data in the correct order. Finally, the business data obtained from the normally executed programs is used to repair the business data. This provides a fast and accurate method for repairing abnormal business data, and also enables rapid functional testing of modified business data, thus accelerating business data processing capabilities.
[0112] Specific limitations regarding the business data processing device can be found in the limitations of the business data processing method described above, and will not be repeated here. Each module in the aforementioned business data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0113] In one embodiment, a computer device is provided, which may be a business data processing system or a server configured with virtual process groups, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores execution traces and business data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a business data processing method.
[0114] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0115] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the business data processing method described above.
[0116] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the business data processing method described in the above embodiment.
[0117] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0118] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 specification.
[0119] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A business data processing method, characterized in that, The method includes: When the business data corresponding to a business is abnormal, the node type of the business node corresponding to the business is determined; the node type includes normal nodes and abnormal nodes. The virtual execution program executes the business nodes of each normal node in the corresponding execution order. When the business node is executed to the abnormal node in the order, the virtual execution program is paused and the normal execution program is called to execute the abnormal node. The virtual execution program uses a simulated execution method to obtain the node request parameters and node return values from the historical execution database according to the business identifier and the node identifier of the business node, and transmits them to the node engine. The node engine processes the data according to the node request parameters and node return values according to the normal process, and calls the business nodes of the next execution order to perform data processing. The normal execution program remotely calls the corresponding module to execute the abnormal node according to the node request parameters corresponding to the abnormal node, and obtains the corresponding node return value. Based on the node return value and node request parameters of the business node executed by the normal execution program, the business data of the corresponding business node in the historical execution database is updated. The business data includes the node return value and node request parameters of the abnormal node. Based on the updated business data, the business node corresponding to the business is corrected to obtain the corrected business.
2. The method according to claim 1, characterized in that, The method further includes: Receive services initiated by users based on business scenarios; A set of business nodes is created based on the business scenario corresponding to the business; the set of business nodes includes multiple business nodes that are executed sequentially. The business data corresponding to the business is obtained by executing each business node in the set of business nodes in the order of execution. The business data is stored in the historical execution database.
3. The method according to claim 1, characterized in that, The step of invoking the virtual execution program to execute the business nodes of each normal node in the corresponding execution order includes: The business node corresponding to the first normally executing node of the aforementioned business is taken as the current business node; The virtual execution program is loaded to retrieve the business data of the current business node from the historical execution database. Based on the business data of the current business node, the current business node is executed through the virtual execution program; The business node corresponding to the next execution order of the aforementioned business is invoked as the current business node; When the current business node is a normal node, return to the step of loading the virtual execution program to obtain the business data of the current business node from the historical execution database, until the current business node becomes an abnormal node, then switch the execution program to execute the current business node.
4. The method according to claim 1, characterized in that, The node type for determining the business node corresponding to the business includes: Obtain the business node corresponding to the abnormal business data as a reference abnormal business node; Based on the business scenario of the aforementioned business, other business nodes related to the reference abnormal business node are identified as candidate abnormal business nodes. The node types of the reference abnormal service node and the candidate abnormal service node are determined as abnormal nodes; The node type of all business nodes in the service, excluding the abnormal node, is determined to be a normal node.
5. The method according to claim 4, characterized in that, The method further includes: The business node that is adjacent to the reference abnormal business node among the abnormal nodes is called the current adjacent abnormal business node; The normal execution procedure is used to execute the currently adjacent abnormal service nodes in sequence to obtain the corresponding current corrected service data; The current corrected business data is compared with the business data corresponding to the adjacent abnormal business nodes in the historical execution database; If they match, the current adjacent abnormal service node is excluded from the abnormal nodes, and the abnormal node is updated. The business node adjacent to the reference abnormal business node in the updated abnormal nodes is taken as the current adjacent abnormal business node. Return to the normal execution procedure and sequentially execute the steps of the current adjacent abnormal service nodes to obtain the corresponding current corrected service data, until the loop stop condition is reached, and obtain the abnormal node of the service.
6. The method according to claim 5, characterized in that, Among the adjacent abnormal service nodes, the service node with the earlier execution order is designated as the left adjacent abnormal service node, and the other is designated as the right adjacent abnormal service node; the method further includes: If there is a discrepancy, the current adjacent abnormal service node will be considered an abnormal node. The business nodes that are left-adjacent to the current left-adjacent abnormal business node and the business nodes that are right-adjacent to the current right-adjacent abnormal business node are defined as the current adjacent abnormal business nodes. Return to the normal execution procedure and sequentially execute the steps of the currently adjacent abnormal service nodes to obtain the corresponding current corrected service data, until the loop stop condition is reached, and obtain the abnormal node of the service.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Fault recovery method and device, electronic equipment and computer readable storage medium
CN110018926A