CN116089138A - Service data processing method, device, computer equipment and storage medium - Google Patents

Service data processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116089138A
CN116089138A CN202211560093.4A CN202211560093A CN116089138A CN 116089138 A CN116089138 A CN 116089138A CN 202211560093 A CN202211560093 A CN 202211560093A CN 116089138 A CN116089138 A CN 116089138A
Authority
CN
China
Prior art keywords
service
node
abnormal
nodes
service node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211560093.4A
Other languages
Chinese (zh)
Inventor
文泽天
孙炜
熊浩敏
陈磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Agricultural Products Co ltd
Shenzhen Zhongnong Yixun Information Technology Co ltd
Original Assignee
Shenzhen Agricultural Products Co ltd
Shenzhen Zhongnong Yixun Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Agricultural Products Co ltd, Shenzhen Zhongnong Yixun Information Technology Co ltd filed Critical Shenzhen Agricultural Products Co ltd
Priority to CN202211560093.4A priority Critical patent/CN116089138A/en
Publication of CN116089138A publication Critical patent/CN116089138A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Hardware Redundancy (AREA)

Abstract

The application relates to a business data processing method, a business data processing device, computer equipment and a storage medium. The method comprises the following steps: when the business data corresponding to the business is abnormal, determining the node type of the business node corresponding to the business; the node type comprises normal nodes and abnormal nodes; based on the node type of the service node, executing each service node according to the execution sequence of the service node by adopting a corresponding execution program; the execution program comprises a virtual execution program and a normal execution program; and correcting the service based on the service data of the service node obtained by the normal execution program. The method for repairing abnormal service data can be used for rapidly and accurately repairing abnormal service data, and simultaneously, the service function test can be rapidly completed according to the condition of service data modification, so that the processing capacity of service data is accelerated.

Description

Service data processing method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of service data processing technologies, and in particular, to a service data processing method, a device, a computer device, and a storage medium.
Background
With the development of internet technology, micro services are increasingly used. The micro-service is a small service formed by a single application program, has own processes and light weight processing, is deployed in a full-automatic mode by virtue of service function design, and communicates with other services by using HTTP API. The HTTP API provides a way to integrate platform functionality with a control panel or application, among other things. Micro services have been developed by more and more individuals and enterprises in the style of micro services from the proposal to the past 17 years, and the micro services bring about good expansibility and scalability to us, and also reduce development difficulty and communication cost, but with the miniaturization of services, more and more service nodes of the services become a problem in management and use. When the flow engine composes a plurality of service calls, a plurality of service nodes are required to realize service functions correspondingly, and the situation that one service returns wrong data to cause that all the following downstream services generate wrong data can occur, and the service generating the errors needs to be repaired.
Or when some services in the service are modified, whether all functions in the service are normal or not is correspondingly required to be retested, if the functions comprise a large number of service nodes, and when the service nodes positioned at the rear of the execution sequence are modified, a large amount of testing work is required at the moment, and a large workload is brought to the testing work.
For example, the function comprises 100 service nodes, the 99 th service node is modified, the 98 first service nodes are correspondingly required to be tested, and 98 steps are executed to obtain the data of the 99 th service node; if the modification involves a flow of more than 100 service nodes, the corresponding test needs to be performed in n steps of 98 to complete the test.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a service data processing method, apparatus, computer device, and storage medium that can quickly repair abnormal data while also accelerating service test speed.
A business data processing method, the method comprising:
when the business data corresponding to the business is abnormal, determining the node type of the business node corresponding to the business; the node type comprises normal nodes and abnormal nodes;
based on the node type of the service node, executing each service node according to the execution sequence of the service node by adopting a corresponding execution program; the execution program comprises a virtual execution program and a normal execution program;
and correcting the service based on the service data of the service node obtained by the normal execution program.
In one embodiment, the method further comprises:
receiving a service initiated by a user based on a service scene;
creating a service node set according to the service scene corresponding to the service; the service node set comprises a plurality of service nodes which are executed in sequence;
executing according to the execution sequence of each service node in the service node set to obtain service data corresponding to the service;
and storing the business data into a historical execution database.
In one embodiment, the executing each service node according to the execution sequence of the service node by adopting a corresponding execution program based on the node type of the service node includes:
loading a virtual execution program to execute the service node of each normal node according to the corresponding execution sequence;
and when the service node sequentially executes to the abnormal node, suspending the virtual execution program and calling the normal execution program to execute the service node of the abnormal node.
In one embodiment, the invoking the virtual execution program executing the service node of each normal node in the corresponding execution sequence includes:
taking a service node of a first executed normal node corresponding to the service as a current service node;
Loading a virtual execution program to acquire service data of the current service node from the historical execution database;
executing the current service node through the virtual execution program according to the service data of the current service node;
calling a service node of the next execution sequence corresponding to the service as a current service node;
and when the node type of the current service node is a normal node, returning to the step of loading a virtual execution program to acquire service data of the current service node from the historical execution database until the current service node is an abnormal node, and executing the current service node by switching the execution program.
In one embodiment, the traffic data includes a node return value and a node request parameter; the modifying the service based on the service data of the service node executed by the normal execution program comprises the following steps:
updating service data of the corresponding service node in the history execution database based on the node return value and the node request parameter of the service node executed by the normal execution program;
and correcting the service node corresponding to the service based on the updated service data to obtain the corrected service.
In one embodiment, the determining the node type of the service node corresponding to the service includes:
acquiring a service node corresponding to the abnormal service data as a reference abnormal service node;
based on the service scene of the service, other service nodes related to the reference abnormal service node are determined to be alternative abnormal service nodes;
determining node types of the reference abnormal service node and the alternative abnormal service node as abnormal nodes;
and determining the node types of the service nodes except the abnormal node in the service as normal nodes.
In one embodiment, the method further comprises:
the service node adjacent to the reference abnormal service node in the abnormal nodes is called as a current adjacent abnormal service node;
the normal execution program is adopted to execute the current adjacent abnormal service nodes in sequence to obtain corresponding current correction service data;
comparing the current correction service data with the service data corresponding to the adjacent abnormal service nodes in the historical execution database;
if the current adjacent abnormal service nodes are consistent, the current adjacent abnormal service nodes are removed from the abnormal nodes, and the abnormal nodes are updated;
Taking the service node adjacent to the reference abnormal service node in the updated abnormal nodes as the current adjacent abnormal service node;
and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
In one embodiment, the service node with the front execution sequence in the adjacent abnormal service nodes is used as a left adjacent abnormal service node, and the other service node is used as a right adjacent abnormal service node; the method further comprises the steps of:
if not, taking the current adjacent abnormal service node as an abnormal node;
the service node left adjacent to the current left adjacent abnormal service node and the service node right adjacent to the current right adjacent abnormal service node in the abnormal nodes are used as current adjacent abnormal service nodes;
and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
A traffic data processing apparatus, the apparatus comprising:
The node type determining module is used for determining the node type of the service node corresponding to the service when the service data corresponding to the service is abnormal; the node type comprises normal nodes and abnormal nodes;
the node execution module is used for executing each service node according to the execution sequence of the service node by adopting a corresponding execution program based on the node type of the service node; the execution program comprises a virtual execution program and a normal execution program;
and the service data correction module is used for correcting the service based on the service data of the service node obtained by the normal execution program.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the business data processing method of the above embodiments when the processor executes the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the traffic data processing method of the above-described embodiment.
The business data processing method, the business data processing device, the computer equipment and the storage medium find that the business data corresponding to a certain business node has errors when the business data corresponding to the business are abnormal, for example, when the business is checked; for example, when modifying service data corresponding to certain functions of the service; under the condition that the service data is abnormal, the computer equipment firstly determines the node type of the service node corresponding to the service under the condition that the service is abnormal, thereby determining which service nodes are abnormal nodes and which service nodes are normal nodes; further, based on the service nodes with different node types, corresponding execution programs are adopted to execute according to the execution sequence corresponding to the service nodes; and repairing the service based on the service data of the service node obtained by the normal execution program. The method for repairing the abnormal service data rapidly and accurately is provided, and meanwhile, the functional test of the service can be rapidly completed according to the condition of service data modification, so that the processing capacity of the service data is accelerated.
Drawings
FIG. 1 is an application scenario diagram of a business data processing method in one embodiment;
FIG. 2 is a flow chart of a business data processing method in one embodiment;
FIG. 3 is a block diagram of a business data processing device in one embodiment;
fig. 4 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The service data processing method provided by the application can be applied to an application environment shown in fig. 1. The business data processing method is applied to a business data processing system, and the system comprises a virtual flow group 102, a historical execution database 104, a track execution database 106, a flow engine 108, a virtual execution program 110 and a normal execution program 112. The virtual flow set 102 communicates with the historical execution database 104, the trajectory execution database 106, and the flow engine 108, respectively, via a network. Wherein the virtual flow group 102 may call the virtual executive 110 or the normal executive 112. The virtual flow set 102 is used for repairing service data or retesting service when abnormality occurs in service data corresponding to the service. The history execution database 104 stores service data of service nodes corresponding to each service; the track execution database 106 stores the execution track corresponding to each service node; the flow engine 108 is configured to perform data processing according to the node request parameter and the node return value corresponding to the service node, and load and call the service node in the next execution order. The virtual execution program 110 is in a mode of analog execution, obtains a node request parameter and a node return value from a historical execution database according to a service identifier and a node identifier of a service node, and transmits the node request parameter and the node return value to a node engine, and the node engine processes data according to a normal flow and invokes the service node of the next execution sequence to process the data of the service node of the next execution sequence. The normal execution program 112 is a real execution mode, and remotely invokes a corresponding module to execute according to the node request parameter corresponding to the service node, so as to obtain a corresponding node return value.
The virtual flow set 102 may be applied to a terminal, a server, a system including a terminal and a server, and implemented through interaction between the terminal and the server. The terminal may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers and portable wearable devices, and the server may be implemented by a separate server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a service data processing method is provided, where the method is applied to the virtual flow set 102 for illustration, and the method includes the following steps:
step S202, when the business data corresponding to the business is abnormal, determining the node type of the business node corresponding to the business; the node types include normal nodes and abnormal nodes.
The abnormal service data comprises service data errors, service data modification, service data increase caused by newly added service nodes, service data reduction caused by reduced service nodes and the like. The node type refers to whether the service data of the service node is normal or abnormal, and the node type includes normal nodes and abnormal nodes. The node type of the service node can be determined according to the abnormal condition of the service data. The service node includes an execution order and a node identification. The execution order is the execution order of the service node in the entire flow of the corresponding service. The node identity is a unique identity for distinguishing between the individual service nodes. The services have service identities for uniquely distinguishing the respective services. The traffic data includes node request parameters and node return values.
Specifically, when the service data corresponding to the service is abnormal, the virtual flow group determines the node type of the service node corresponding to the service, namely, determines the abnormal service node as an abnormal node according to the abnormal service data, and uses the service nodes except the abnormal node in the service as normal nodes, thereby obtaining the node type of each service node.
In one embodiment, the determining the node type of the service node corresponding to the service includes: acquiring a service node corresponding to the abnormal service data as a reference abnormal service node; based on the service scene of the service, other service nodes associated with the reference abnormal service node are determined to be alternative abnormal service nodes; determining node types of the reference abnormal service node and the alternative abnormal service node as abnormal nodes; and determining the node types of the service nodes except the abnormal node in the service as normal nodes.
Where a business scenario is an overview of a set of situations that may occur in a business environment. Typically, the scenario is based on a combination of events and factors that make up the current traffic situation, and then augmented by some prediction of events that may occur in the future.
Because the number of the service nodes corresponding to the service is large, and each service node has a sequential execution sequence, that is, the execution results of each service node are mutually affected, some of the execution results of one service node of adjacent service are affected, some of the execution results of the adjacent service nodes are affected, some of the execution results of the last service node affect the return value of the next service node, and some of the return values of the next service node affect the execution results of the last service node; therefore, in addition to determining the reference abnormal node with abnormal data, other service nodes related to the reference abnormal service node are required to be determined as alternative abnormal service nodes, and the situation that the service data of the alternative abnormal service nodes are also wrong exists, so that the abnormal nodes are required to be expanded, and the accuracy of repairing the abnormal data is improved. However, if the number of the candidate abnormal service nodes is large, the data processing time is correspondingly increased, so that the data processing speed is reduced.
In one embodiment, the method further comprises: the service node adjacent to the reference abnormal service node in the abnormal nodes is called as a current adjacent abnormal service node; the normal execution program is adopted to execute the current adjacent abnormal service nodes in sequence to obtain corresponding current correction service data; comparing the current correction service data with the service data corresponding to the adjacent abnormal service nodes in the historical execution database; if the current adjacent abnormal service nodes are consistent, the current adjacent abnormal service nodes are removed from the abnormal nodes, and the abnormal nodes are updated; taking the service node adjacent to the reference abnormal service node in the updated abnormal nodes as the current adjacent abnormal service node; and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
In one embodiment, the service node with the front execution sequence in the adjacent abnormal service nodes is used as a left adjacent abnormal service node, and the other service node is used as a right adjacent abnormal service node; comparing the current correction service data with the service data corresponding to the adjacent abnormal service nodes in the historical execution database; if the two abnormal service nodes are inconsistent, reserving the current adjacent abnormal service node in the abnormal nodes; and taking the service node adjacent to the left of the current left abnormal service node and the service node adjacent to the right of the current right abnormal service node in the abnormal nodes as the current adjacent abnormal service nodes, and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
In one embodiment, the obtaining the abnormal node of the service until the loop stopping condition is reached includes: and eliminating the service nodes which are positioned before the current left adjacent abnormal service node and after the current right adjacent abnormal service node in the execution sequence in the abnormal nodes until the continuous eliminating times of the abnormal nodes reach the preset times, so as to obtain updated abnormal nodes.
Wherein, the service node with the front execution sequence in the adjacent abnormal service nodes is used as a left adjacent abnormal service node, and the other service node is used as a right adjacent abnormal service node; adjacent includes left and right adjacencies; the left adjacent refers to the service node which is positioned at the left side of the target service node and is adjacent, and the right adjacent refers to the service node which is positioned at the right side of the target service node and is adjacent.
In this embodiment, in order to solve the problem of how to increase the speed of repairing abnormal data in a service or increase the test speed of the service when the number of alternative abnormal service nodes is large, according to the relevance between service nodes, the present embodiment considers that the alternative service node with a large probability of error occurrence is the service node adjacent to the reference abnormal service node, so that the service node adjacent to the reference abnormal service node is selected from the abnormal nodes as the current adjacent abnormal service node first, and then a normal execution program is adopted to execute each service node in the current adjacent abnormal service node in sequence according to the execution sequence corresponding to the service node, so as to obtain the current corrected service data corresponding to each service node; then comparing the current correction service data corresponding to each current adjacent abnormal service node with the corresponding service data in the historical execution database so as to judge whether the service data of the current adjacent abnormal service node is abnormal or not; if the comparison results are consistent, the virtual flow group can judge that the service data of the current adjacent abnormal service node is not abnormal, and the current adjacent abnormal service node can be removed from the abnormal nodes to obtain updated abnormal nodes; further, the steps are circularly executed, namely, the service node adjacent to the reference abnormal service node in the updated abnormal nodes is used as the current adjacent abnormal service node; and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data, and obtaining corresponding current correction service data until the circulation stop condition can be that the continuous elimination times of the abnormal nodes reach the preset times, and eliminating the service nodes of which the execution sequence is positioned before and after the current adjacent abnormal service nodes in the abnormal nodes to obtain updated abnormal nodes. For example, the current abnormal node eliminating times are 2 times, the preset times are 2 times, and service nodes of the abnormal nodes, the execution sequence of which is positioned before and after the current adjacent abnormal service node, are all eliminated, so that updated abnormal nodes are obtained.
Correspondingly, if the service nodes are inconsistent, the virtual flow group takes the current adjacent abnormal service node as an abnormal node, and further the virtual flow group takes the service node which is adjacent to the current left adjacent abnormal service node in the abnormal node and the service node which is adjacent to the current right adjacent abnormal service node in the abnormal node as the current adjacent abnormal service node; then the normal execution program is adopted to execute the current adjacent abnormal service nodes in sequence to obtain corresponding current correction service data; comparing the current correction service data with the service data corresponding to the adjacent abnormal service nodes in the historical execution database; if the service nodes are inconsistent, the service node left adjacent to the current left adjacent abnormal service node and the service node right adjacent to the current right adjacent abnormal service node in the abnormal nodes are used as the current adjacent abnormal service nodes; and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service. If the current adjacent abnormal service nodes are consistent, the current adjacent abnormal service nodes are removed from the abnormal nodes, and the abnormal nodes are updated; taking the service node adjacent to the reference abnormal service node in the updated abnormal nodes as the current adjacent abnormal service node; and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service. By the method provided by the embodiment, the service node belonging to the normal node in the candidate abnormal nodes can be further accurately and rapidly checked, so that the repair speed of the service data or the test speed of the service is improved.
Step S104, based on the node type of the service node, executing each service node according to the execution sequence of the service node by adopting a corresponding execution program; the execution program includes a virtual execution program and a normal execution program.
In one embodiment, the method further includes, after the virtual flow group executes each service node, recording an execution track corresponding to the corresponding service node executed by the normal execution program, and storing the execution track in the track execution database.
In one embodiment, the method further comprises: receiving a service initiated by a user based on a service scene; creating a service node set according to the service scene corresponding to the service; the service node set comprises a plurality of service nodes which are executed in sequence; the service node comprises an execution sequence and a node identification; executing according to the execution sequence of each service node in the service node set to obtain service data corresponding to the service; and storing the business data into a historical execution database.
The service scene is a function of the service corresponding to different service scenes; such as … …. The history execution database stores service data of service nodes corresponding to each service, and corresponding service data can be found according to the service identification and the service node identification.
Specifically, before repairing or testing service data, the virtual flow group performs data processing on the service to obtain service data corresponding to each service node. And when the service data is abnormal, repairing and testing the service data of the service. The virtual flow group is used for initiating the service based on the service scene and determining the corresponding service scene according to the function required by the service; then creating a service node set according to a service scene corresponding to the service, wherein the service node set comprises a plurality of service nodes which are executed in sequence; and executing according to the execution sequence of each service node in the service node set to obtain service data corresponding to the service, and storing the service data into a history execution database.
In one embodiment, the executing each service node according to the execution sequence of the service node by adopting a corresponding execution program based on the node type of the service node includes: loading a virtual execution program to execute the service node of each normal node according to the corresponding execution sequence; and when the service node sequentially executes to the abnormal node, suspending the virtual execution program and calling the normal execution program to execute the service node of the abnormal node.
In one embodiment, the invoking the virtual execution program executing the service node of each normal node in the corresponding execution sequence includes: taking a service node of a first executed normal node corresponding to the service as a current service node; loading a virtual execution program to acquire service data of the current service node from the historical execution database; executing the current service node through the virtual execution program according to the service data of the current service node; calling a service node of the next execution sequence corresponding to the service as a current service node; and when the node type of the current service node is a normal node, returning to the step of loading a virtual execution program to acquire service data of the current service node from the historical execution database until the current service node is an abnormal node, and executing the current service node by switching the execution program.
The virtual execution program adopts a mode of simulating execution, obtains node request parameters and node return values from a historical execution database according to the service identification and the node identification of the service node, transmits the node request parameters and the node return values to a node engine, processes data according to the normal flow by the node engine according to the node request parameters and the node return values, and calls the service node of the next execution sequence to process the data of the service node of the next execution sequence. Thus, executing a remote call in a virtual executive does not trigger a real remote call.
The normal execution program adopts a real execution mode, and remotely invokes the corresponding module to execute according to the node request parameters corresponding to the service node to obtain the corresponding node return value.
Specifically, after determining the node type of the service node corresponding to the service, the virtual flow group starts to execute the service node with the first service execution sequence as the current service node, and selects and loads the corresponding execution program to execute the current service node according to the node type of the current service node. For example, the node type of the current service node is a normal node, the virtual flow group loads a virtual execution program to execute the current service node, then the flow engine loads the service node in the next execution sequence as the current service node, if the current service node is an abnormal node, the virtual execution program is suspended, the normal execution program is invoked to execute the current service node, and a node return value of the current service node is obtained and stored in the history execution database. The flow engine continues to load the service node with the next execution sequence as the current service node, and loads the corresponding execution program to execute the current service node based on the node type of the current service node.
And step S106, the service is revised based on the service data of the service node obtained by the normal execution program.
In one embodiment, the traffic data includes a node return value; the modifying the service based on the service data of the service node executed by the normal execution program comprises the following steps: updating service data of the corresponding service node in the history execution database based on the node return value of the service node executed by the normal execution program; and correcting the service node corresponding to the service based on the updated service data to obtain the corrected service.
Specifically, the virtual flow group executes the service node of the abnormal node according to the normal execution program, and updates the node return value in the service data of the corresponding service node in the historical execution database according to the node return value and the node request parameter obtained after the execution, or stores the node return value and the node request parameter obtained after the execution into the corresponding service node in the historical execution database to be used as the service data. The node request parameters are stored in a server or a node engine, and the node request parameters can be modified according to the functions of the service nodes by the user. Such as when modifying service data for a service node, it is also possible to modify the node request parameters.
For example, in the e-commerce industry, a business scenario in which a user purchases a commodity on an e-commerce platform is taken as an example, which describes how to apply the scheme to quickly correct error data, and the method specifically comprises the following steps:
1. the user's Ming's shop browses goods and sees a mobile phone of make 50;
2. in the Ming dynasty, clicking the 'immediate purchase' on the mobile phone;
3. with the pop-up of the shipping address, supported payment methods (online payment, pay-to-pay);
4. selecting goods to pay and submitting orders;
5. after seeing the order, the merchant notifies the finance to generate a payable receivables;
6. arranging warehouse personnel to deduct the inventory and deliver the goods to the warehouse and giving the goods to logistics personnel;
7. after receiving the commodity, logistics personnel sort, arrange vehicles and deliver the commodity;
8. after receiving goods, the xiaoming opens the box to check and accept, and gives the goods to the driver in cash form;
9. after receiving the money, the driver gives the money to the financial staff of the company;
10. the logistics company stores the goods into the public account of the company;
11. the logistics company settles with the seller;
12. the seller finances and receives the payment;
13. after the finance receives the goods, the payor and the order number are verified and approved according to the payor provided by the logistics company.
In the above-mentioned flow, if the problem occurs in the financial account found at this time in step 5, if the cause of the final found problem is the result of the calculation error of the preferential amount, then the business data processing method provided by the present scheme is adopted, the virtual flow is utilized to execute to the node before the calculation of the preferential amount, then the normal node is used to execute the process of repairing the order, so that the order amount is refreshed on the order page, and the order page can be provided with an amount prompt (for example, the price of your commodity is changed due to the commodity information change), further inquires the user whether the Ming's agreement is given, and if the agreement is given, the following business node flow is executed.
In the service data processing method, when the service data corresponding to the service is abnormal, for example, when the service is checked, the service is found to have errors in the service data corresponding to a certain service node; for example, when modifying service data corresponding to certain functions of the service; under the condition that the service data is abnormal, the computer equipment firstly determines the node type of the service node corresponding to the service under the condition that the service is abnormal, thereby determining which service nodes are abnormal nodes and which service nodes are normal nodes; further, based on the service nodes with different node types, corresponding execution programs are adopted to execute according to the execution sequence corresponding to the service nodes; and repairing the service based on the service data of the service node obtained by the normal execution program. The method for repairing the abnormal service data rapidly and accurately is provided, and meanwhile, the functional test of the service can be rapidly completed according to the condition of service data modification, so that the processing capacity of the service data is accelerated.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 3, there is provided a service data processing apparatus 300, comprising: a node type determination module 302, a node execution module 304, and a traffic data modification module 306, wherein:
the node type determining module 302 is configured to determine a node type of a service node corresponding to a service when abnormality occurs in service data corresponding to the service; the node types include normal nodes and abnormal nodes.
A node execution module 304, configured to execute each service node according to an execution sequence of the service node by adopting a corresponding execution program based on a node type of the service node; the execution program includes a virtual execution program and a normal execution program.
And the service data correction module 306 is configured to correct the service based on the service data of the service node obtained by the normal execution program.
In one embodiment, the device further comprises a historical service data generation module, which is used for receiving a service initiated by a user based on a service scene; creating a service node set according to the service scene corresponding to the service; the service node set comprises a plurality of service nodes which are executed in sequence; executing according to the execution sequence of each service node in the service node set to obtain service data corresponding to the service; and storing the business data into a historical execution database.
In one embodiment, the node execution module is further configured to load a virtual execution program to execute the virtual execution program on the service node of each normal node according to a corresponding execution sequence; and when the service node sequentially executes to the abnormal node, suspending the virtual execution program and calling the normal execution program to execute the service node of the abnormal node.
In one embodiment, the node executing module is further configured to use a service node of a first executed normal node corresponding to the service as a current service node; loading a virtual execution program to acquire service data of the current service node from the historical execution database; executing the current service node through the virtual execution program according to the service data of the current service node; calling a service node of the next execution sequence corresponding to the service as a current service node; and when the node type of the current service node is a normal node, returning to the step of loading a virtual execution program to acquire service data of the current service node from the historical execution database until the current service node is an abnormal node, and executing the current service node by switching the execution program.
In one embodiment, the service data correction module is further configured to update service data of a corresponding service node in the history execution database based on a node return value and a node request parameter of the service node executed by the normal execution program; and correcting the service node corresponding to the service based on the updated service data to obtain the corrected service.
In one embodiment, the node type determining module is further configured to obtain, as a reference abnormal service node, a service node corresponding to the service data in which the abnormality occurs; based on the service scene of the service, other service nodes related to the reference abnormal service node are determined to be alternative abnormal service nodes; determining node types of the reference abnormal service node and the alternative abnormal service node as abnormal nodes; and determining the node types of the service nodes except the abnormal node in the service as normal nodes.
In one embodiment, the node type determining module is further configured to refer to a service node adjacent to the reference abnormal service node among the abnormal nodes as a current adjacent abnormal service node; the normal execution program is adopted to execute the current adjacent abnormal service nodes in sequence to obtain corresponding current correction service data; comparing the current correction service data with the service data corresponding to the adjacent abnormal service nodes in the historical execution database; if the current adjacent abnormal service nodes are consistent, the current adjacent abnormal service nodes are removed from the abnormal nodes, and the abnormal nodes are updated; taking the service node adjacent to the reference abnormal service node in the updated abnormal nodes as the current adjacent abnormal service node; and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
In one embodiment, the node type determining module is further configured to use the current neighboring abnormal service node as an abnormal node if the node types are inconsistent; the service node left adjacent to the current left adjacent abnormal service node and the service node right adjacent to the current right adjacent abnormal service node in the abnormal nodes are used as current adjacent abnormal service nodes; and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
When the service data corresponding to the service is abnormal, for example, when the service is checked, the service data processing device discovers that the service data corresponding to a certain service node is wrong; for example, when modifying service data corresponding to certain functions of the service; under the condition that the service data is abnormal, the computer equipment firstly determines the node type of the service node corresponding to the service under the condition that the service is abnormal, thereby determining which service nodes are abnormal nodes and which service nodes are normal nodes; further, based on the service nodes with different node types, corresponding execution programs are adopted to execute according to the execution sequence corresponding to the service nodes; and repairing the service based on the service data of the service node obtained by the normal execution program. The method for repairing the abnormal service data rapidly and accurately is provided, and meanwhile, the functional test of the service can be rapidly completed according to the condition of service data modification, so that the processing capacity of the service data is accelerated.
For specific limitations of the service data processing apparatus, reference may be made to the above limitation of the service data processing method, and no further description is given here. The various modules in the service data processing device described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a business data processing system, or a server provided with a virtual flow set, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store execution traces and business data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a business data processing method.
Those skilled in the art will appreciate that the structures shown in FIG. 4 are block diagrams only and do not constitute a limitation of the computer device on which the present aspects apply, and that a particular computer device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment a computer device is provided comprising a memory storing a computer program and a processor implementing the steps of the business data processing method of the above embodiments when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the business data processing method of the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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 a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method for processing service data, the method comprising:
when the business data corresponding to the business is abnormal, determining the node type of the business node corresponding to the business; the node type comprises normal nodes and abnormal nodes;
based on the node type of the service node, executing each service node according to the execution sequence of the service node by adopting a corresponding execution program; the execution program comprises a virtual execution program and a normal execution program;
And correcting the service based on the service data of the service node obtained by the normal execution program.
2. The method according to claim 1, wherein the method further comprises:
receiving a service initiated by a user based on a service scene;
creating a service node set according to the service scene corresponding to the service; the service node set comprises a plurality of service nodes which are executed in sequence;
executing according to the execution sequence of each service node in the service node set to obtain service data corresponding to the service;
and storing the business data into a historical execution database.
3. The method of claim 1, wherein the executing each service node in the execution order of the service nodes using the corresponding execution program based on the node type of the service node comprises:
loading a virtual execution program to execute the service node of each normal node according to the corresponding execution sequence;
and when the service node sequentially executes to the abnormal node, suspending the virtual execution program and calling the normal execution program to execute the service node of the abnormal node.
4. A method according to claim 3, wherein said invoking the virtual executive is performed on the traffic node of each of the normal nodes in the corresponding order of execution, comprising:
Taking a service node of a first executed normal node corresponding to the service as a current service node;
loading a virtual execution program to acquire service data of the current service node from the historical execution database;
executing the current service node through the virtual execution program according to the service data of the current service node;
calling a service node of the next execution sequence corresponding to the service as a current service node;
and when the node type of the current service node is a normal node, returning to the step of loading a virtual execution program to acquire service data of the current service node from the historical execution database until the current service node is an abnormal node, and executing the current service node by switching the execution program.
5. The method of claim 1, wherein the traffic data comprises a node return value and a node request parameter; the modifying the service based on the service data of the service node executed by the normal execution program comprises the following steps:
updating service data of the corresponding service node in the history execution database based on the node return value and the node request parameter of the service node executed by the normal execution program;
And correcting the service node corresponding to the service based on the updated service data to obtain the corrected service.
6. The method of claim 1, wherein the determining the node type of the service node to which the service corresponds comprises:
acquiring a service node corresponding to the abnormal service data as a reference abnormal service node;
based on the service scene of the service, other service nodes related to the reference abnormal service node are determined to be alternative abnormal service nodes;
determining node types of the reference abnormal service node and the alternative abnormal service node as abnormal nodes;
and determining the node types of the service nodes except the abnormal node in the service as normal nodes.
7. The method of claim 6, wherein the method further comprises:
the service node adjacent to the reference abnormal service node in the abnormal nodes is called as a current adjacent abnormal service node;
the normal execution program is adopted to execute the current adjacent abnormal service nodes in sequence to obtain corresponding current correction service data;
comparing the current correction service data with the service data corresponding to the adjacent abnormal service nodes in the historical execution database;
If the current adjacent abnormal service nodes are consistent, the current adjacent abnormal service nodes are removed from the abnormal nodes, and the abnormal nodes are updated;
taking the service node adjacent to the reference abnormal service node in the updated abnormal nodes as the current adjacent abnormal service node;
and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
8. The method according to claim 7, wherein one of the adjacent abnormal service nodes is a left adjacent abnormal service node and the other is a right adjacent abnormal service node; the method further comprises the steps of:
if not, taking the current adjacent abnormal service node as an abnormal node;
the service node left adjacent to the current left adjacent abnormal service node and the service node right adjacent to the current right adjacent abnormal service node in the abnormal nodes are used as current adjacent abnormal service nodes;
and returning to the step of sequentially executing the current adjacent abnormal service nodes by adopting the normal execution program to obtain corresponding current correction service data until a circulation stop condition is reached to obtain the abnormal nodes of the service.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 8 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
CN202211560093.4A 2022-12-07 2022-12-07 Service data processing method, device, computer equipment and storage medium Pending CN116089138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211560093.4A CN116089138A (en) 2022-12-07 2022-12-07 Service data processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211560093.4A CN116089138A (en) 2022-12-07 2022-12-07 Service data processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116089138A true CN116089138A (en) 2023-05-09

Family

ID=86209265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211560093.4A Pending CN116089138A (en) 2022-12-07 2022-12-07 Service data processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116089138A (en)

Similar Documents

Publication Publication Date Title
CN110782240B (en) Business data processing method and device, computer equipment and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN109474578A (en) Message method of calibration, device, computer equipment and storage medium
CN109285069B (en) Resource transfer method, device and server
CN113032398B (en) Service processing method, computer equipment and storage medium for multi-type service
CN110837493B (en) Price issuing control method and device, computer equipment and storage medium
CN103186466A (en) Information interaction device and method based on automatic generation of associated test cases
CN109039751A (en) Configure method, apparatus, computer equipment and the storage medium of routing
CN112101938A (en) Block chain-based digital seal using method and device and electronic equipment
CN112035350B (en) Test method and device for block chain system and computer equipment
CN109361628A (en) Message assemble method, device, computer equipment and storage medium
CN112685391B (en) Service data migration method and device, computer equipment and storage medium
CN113312259B (en) Interface testing method and device
CN114609995A (en) Fault control method, device, system, equipment, medium and product
CN108776642B (en) Test report generation method and device, computer equipment and storage medium
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN113850603A (en) Method and device for determining reason of payment failure
CN110471696B (en) Clearing data playback comparison method, device, computer equipment and storage medium
CN116089138A (en) Service data processing method, device, computer equipment and storage medium
CN114527974B (en) Method and device for realizing business function of software product and computer equipment
CN111047322A (en) Intelligent contract deployment method and device based on block chain and hardware equipment
CN115934129A (en) Software project updating method and device, computer equipment and storage medium
CN116342256A (en) Wind control strategy testing method and device, computer equipment and storage medium
CN109445758A (en) Data processing method, device, computer equipment and storage medium
CN114119243A (en) Pool financing management method, device, medium and electronic equipment based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination