A delivery service business rollback method and system
By determining the business flow nodes and setting atomic business groups in the delivery service platform, business rollback is realized, solving the problem of low business exception handling efficiency in the existing technology, and improving business operation efficiency and user experience.
Patent Information
- Application Number
- CN202410260582.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-03-07
AI Technical Summary
The existing delivery service platform has problems such as low efficiency, high abnormality rate and poor user experience in business exceptions, revocation and error handling, especially in emergencies, which are more likely to operate errors.
By determining the business flow nodes in the delivery service, setting up an atomic business group, and gradually recovering the business content to the previous state when the business rollback condition is triggered, and business rollback is realized.
It provides a business recovery interface, improves business operation efficiency, ensures the security and consistency of business data, and reduces the business abnormality rate and user experience improvement.
Smart Images

Figure CN118115275B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer data processing technology, and in particular, relates to a delivery service business rollback method and system. Background Art
[0002] The delivery service platform is a financial business platform that provides delivery services as its core business to buyers and sellers. Its core business includes transaction matching, contract transfer, spot futures delivery, financial services, etc. It also provides peripheral functions such as member management, market consultation, warehousing and logistics management. Taking its core business "delivery service" as an example, it is a standardized and process-based business. From position registration to contract matching, and then to delivery and delivery, although it is a long and complicated business process from a time perspective, the various steps are closely connected and the flow is smooth, so it is also a compact business process. Other businesses such as warehousing and logistics management usually have the characteristics of being long and interactively connected. For these businesses, there will inevitably be business anomalies, interruptions, cancellations and other events. The longer the time, the greater the possibility of defects, unexpected and unpredictable problems or errors in the business process. In the rolling matching process of the delivery service, the existing technology usually does not allow cancellation after the matching is successful. However, the seller member may need to cancel the delivery application due to various reasons (for example, there is a priority demand for the transfer of standard warehouse receipts, there is a conflict between negotiated transfer and automatic matching, or key instructions and messages have not been received, there are objections to certain links in the delivery service process, etc.), and the buyer and seller members may also want to cancel the matching due to improper response, operational errors, and objections; in the delivery application process, the transaction processing time stipulated by the current financial rules is certain. If an emergency event with a sudden increase in delivery volume occurs, operational errors and matching errors will occur due to tight delivery time and heavy task pressure. For any delivery participant, the opportunity to make up for the error is precious. In the prior art, the delivery service usually allows each participant to bear the relevant responsibilities of the abnormal event on their own, and does not provide suspension, cancellation and other solutions for transaction abnormalities, and does not provide corresponding operation interfaces such as interruption and cancellation; although some delivery services provide rules and interfaces for cancellation operations, the scope of exception handling is limited, and the data processing for cancellation-related operations only involves the simple restoration of related data to the previous state, with low execution efficiency, high business abnormality rate, inflexible business, and generally low user experience.
[0003] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the application and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a delivery service business rollback method and system.
[0005] Specifically, a delivery service business rollback method claimed in this application is as follows:
[0006] S100, determining one or more service flow nodes in the delivery service according to the service content of the delivery service, and setting at least one atomic service group based on the service content corresponding to the one or more service flow nodes;
[0007] S110, executing the delivery service business process in sequence based on the one or more business flow nodes; setting business rollback conditions and monitoring, and when monitoring that the business rollback operation is triggered, selecting a target business flow node as a target rollback node;
[0008] S120, determine all the intermediate business flow nodes that have executed business content from the target rollback node to the business flow node where the business rollback operation is triggered, obtain all the atomic business groups where all the determined intermediate business flow nodes are located, and use the business content of the business flow nodes included in all the acquired atomic business groups as the business content to be rolled back.
[0009] S130, performing a rollback operation on the business content to be rolled back.
[0010] In one embodiment, the task objectives corresponding to the delivery service business content are distinguished, and the business content set in each task objective is set as a business flow node; the selection of the target business flow node as the target rollback node is specifically: the user selects the target rollback node, or the system automatically determines the target rollback node, or first determines the target rollback time, and uses the business flow node that occurs at the target time as the target business flow node.
[0011] In one embodiment, the correlation between task objectives of multiple business flow nodes is preset, the business flow node set is traversed, and multiple business flow nodes with correlation greater than a correlation threshold are set as an atomic business group.
[0012] The traversal of the service flow node set sets multiple service flow nodes with a correlation greater than a correlation threshold as an atomic service group, specifically:
[0013] a. Traverse the business flow node set, if you traverse to any business flow node, the new atomic business group as the current atomic business group, the traversed to any business flow node to add the current atomic business group;
[0014] b. Traverse the business flow nodes in the current atomic business group, take the traversed business flow node as the first business flow node, determine whether there is a second business flow node in the business flow node set whose correlation with the first business flow node is greater than the correlation threshold, if so, take the second business flow node out of the business flow node set, add it to the current atomic business group, and continue to execute b; if not, execute c;
[0015] c. Determine whether there is an untraversed business flow node in the atomic business group. If so, continue to execute b; otherwise, set the identifier corresponding to the current atomic business group for all business flow nodes in the current atomic business group, and execute d;
[0016] d. Determine whether there is any business flow node that has not been traversed in the traversed business flow node set. If so, execute a; otherwise, treat the business flow nodes with the same identifier as the atomic business group and end.
[0017] In one embodiment, the rollback operation is specifically as follows: setting preset additional conditions corresponding to the business content to be rolled back, and when all the preset additional conditions corresponding to the business content to be rolled back are met, setting an atomic lock for the atomic business group, restoring the business content to be rolled back one by one to the state before the business content is executed, and releasing the atomic lock; if there is any preset additional condition corresponding to the business content to be rolled back that is not met, the system prompts the user that the rollback failed and the reason for the failure of the corresponding preset additional condition not being met.
[0018] The present application also provides a delivery service business rollback system, including:
[0019] An atomic business group generation module, used to determine one or more business flow nodes in the delivery service according to the business content of the delivery service, and set at least one atomic business group based on the business content corresponding to the one or more business flow nodes;
[0020] A rollback trigger module is used to execute the delivery service business process in sequence based on the one or more business flow nodes; set business rollback conditions and monitor them, and when it is monitored that the business rollback operation is triggered, select a target business flow node as a target rollback node;
[0021] The rollback business content determination module is used to determine all intermediate business flow nodes that have executed business content from the target rollback node to the business flow node where the business rollback operation is triggered, obtain all atomic business groups where all determined intermediate business flow nodes are located, and use the business content of the business flow nodes included in all the obtained atomic business groups as the business content to be rolled back;
[0022] The rollback operation module is used to perform a rollback operation on the business content to be rolled back.
[0023] In one embodiment, the task objectives corresponding to the delivery service business content are distinguished, and the business content set in each task objective is set as a business flow node; the selection of the target business flow node as the target rollback node is specifically: the user selects the target rollback node, or the system automatically determines the target rollback node, or first determines the target rollback time, and uses the business flow node that occurs at the target time as the target business flow node.
[0024] The correlation between task objectives of multiple business flow nodes is preset, the business flow node set is traversed, and multiple business flow nodes with correlation greater than a correlation threshold are set as an atomic business group.
[0025] The traversal of the service flow node set sets multiple service flow nodes with a correlation greater than a correlation threshold as an atomic service group, specifically:
[0026] a. Traverse the business flow node set, if you traverse to any business flow node, the new atomic business group as the current atomic business group, the traversed to any business flow node to add the current atomic business group;
[0027] b. Traverse the business flow nodes in the current atomic business group, take the traversed business flow node as the first business flow node, determine whether there is a second business flow node in the business flow node set whose correlation with the first business flow node is greater than the correlation threshold, if so, take the second business flow node out of the business flow node set, add it to the current atomic business group, and continue to execute b; if not, execute c;
[0028] c. Determine whether there is an untraversed business flow node in the atomic business group. If so, continue to execute b; otherwise, set the identifier corresponding to the current atomic business group for all business flow nodes in the current atomic business group, and execute d;
[0029] d. Determine whether there is any business flow node that has not been traversed in the traversed business flow node set. If so, execute a; otherwise, treat the business flow nodes with the same identifier as the atomic business group and end.
[0030] In one embodiment, the rollback operation is specifically as follows: setting preset additional conditions corresponding to the business content to be rolled back, and when all the preset additional conditions corresponding to the business content to be rolled back are met, setting an atomic lock for the atomic business group, restoring the business content to be rolled back one by one to the state before the business content is executed, and releasing the atomic lock; if there is any preset additional condition corresponding to the business content to be rolled back that is not met, the system prompts the user that the rollback failed and the reason for the failure of the corresponding preset additional condition not being met.
[0031] By adopting the above method or system, the present invention can achieve at least the following effects: 1. Providing a business recovery interface, solving business anomaly problems, and significantly improving business operation efficiency; 2. Innovatively providing an atomic business group generation algorithm, controlling the business content of the atomic business group based on a correlation threshold, improving the flexibility and business relevance of the atomic business group, and rolling back business content based on the atomic business group, efficiently ensuring business data security and consistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flow chart of a method for rolling back a delivery service provided by an embodiment of the present invention;
[0033] Figure 2 It is a structural diagram of the delivery service business rollback system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The present application will be described in detail below in conjunction with the various embodiments shown in the accompanying drawings. However, these embodiments do not limit the present application, and any structural, methodological, or functional changes made by a person of ordinary skill in the art based on these embodiments are all included in the protection scope of the present application.
[0035] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1: Figure 1 As shown, the present invention provides a delivery service business rollback method, which is specifically:
[0037] Step S100, determining one or more service flow nodes in the delivery service according to the service content of the delivery service, and setting at least one atomic service group based on the service content corresponding to the one or more service flow nodes;
[0038] Take the three-day delivery method in the "delivery service" as an example. The "three-day delivery method" is a business step set by an institution to realize the delivery business. The first day is the matching day. Before the matching day, the seller member completes the following tasks: transport the goods to the designated warehouse, acceptance, goods replenishment, and holding standard warehouse receipts; on the matching day, the seller member holding the standard warehouse receipt logs in, completes and verifies the application materials, and submits the delivery application; the exchange adopts a direct matching method after the close of the day based on the delivery application of the seller member to match the buyer member for the seller member. In the matching process, the buyer member is determined based on the matching situation and priority rules, and the delivery relationship is determined. After the relationship is determined, it cannot be changed at will; the second day is the notification day, notifying all participants and all participants to go to the exchange to sign and receive the delivery notice within the specified time. The third day is the delivery day. The buyer member transfers the outstanding payment to the exchange account within the specified time and submits the account voucher to the intermediary institution; the seller member submits the standard warehouse receipt certificate to the intermediary institution within the specified time; the intermediary institution verifies the account voucher and delivers the standard warehouse receipt certificate to the buyer. After the delivery date, the buyer submits a receipt application with the standard warehouse receipt certificate. After the warehouse inspects the standard warehouse receipt certificate and passes it, the receipt logistics stage begins; the buyer applies for an invoice, and the delivery process ends.
[0039] One or more business flow nodes in the delivery service are determined according to the business content of the delivery service. It is assumed that the transportation of goods to the designated warehouse is the business flow node N11, the acceptance is the business flow node N12, the replenishment of goods is the business flow node N13, and the holding of standard warehouse receipts is the business flow node N14; the seller member login, completion and certification of application materials are the business flow node N21, and the submission of delivery application is the business flow node N22; the matching is the business flow node N31, and the determination of the delivery relationship is the business flow node N32; the notification of each participant is the business flow node N41, and each participant goes to the exchange to sign for the delivery notice within the specified time is the business flow node N42.
[0040] At least one atomic business group is set based on the business content corresponding to one or more business flow nodes. In one embodiment, the correlation between the task objectives of multiple business flow nodes is preset, the business flow node set is traversed, and multiple business flow nodes with correlation greater than the correlation threshold are set as the atomic business group. In the embodiment, a ternary set {m,n,R} is set, where m and n are node identifiers, respectively, and R represents the correlation between the two, and the default correlation is 0. Assume that the following ternary sets are set: {11, 12, 0.4}, {12, 13, 0.5}, {11, 13, 0}, {11, 14, 0.7}, {14, 21, 0.2}, {14, 22, 0}, {31, 32, 0.6}, {41, 42, 0.8}, where {11, 12, 0.4} indicates that the correlation between N11 and N12 is 0.4, and {12, 13, 0.5} indicates that the correlation between N12 and N13 is 0.5, and so on. A default correlation is set between nodes that do not have a correlation ternary set. Furthermore, the correlation threshold is set to 0.3, and the specific operations of traversing the business flow node set and setting multiple business flow nodes with correlations greater than the correlation threshold as atomic business groups are as follows:
[0041] a. Traverse the business flow node set, if you traverse to any business flow node, the new atomic business group as the current atomic business group, the traversed to any business flow node to add the current atomic business group;
[0042] All business flow nodes form a business flow node set S, and the business flow node set is traversed. Assuming that N11 is traversed, a new atomic business group T1 is created as the current atomic business group, N11 is added to T1, and N11 is deleted from S. After this step, the node included in the atomic business group T1 is N11.
[0043] b. Traverse the business flow nodes in the current atomic business group, take the traversed business flow node as the first business flow node, determine whether there is a second business flow node in the business flow node set whose correlation with the first business flow node is greater than the correlation threshold, if so, take the second business flow node out of the business flow node set, add it to the current atomic business group, and continue to execute b; if not, execute c;
[0044] Traverse the business flow nodes in the current atomic business group. Since the atomic business group T1 contains node N11, N11 is the first business flow node. From the association ternary set, it can be seen that the nodes with a degree of association greater than 0.3 with N11 in set S include N12 and N14. Then N12 and N14 are the second business flow nodes. Delete N12 and N14 from set S and add T1. After this step, the atomic business group T1 contains nodes N11, N12, and N14. Re-execute step b, traverse to obtain node N12 as the first business flow node. From the association ternary set, it can be seen that the nodes with a degree of association greater than 0.3 with N12 in set S include N13. Then N13 is the second business flow node. Delete N13 from set S and add T1. After this step, the atomic business group T1 contains nodes N11, N12, N14, and N13. Step b is executed again, and the traversal shows that node N14 is the first service flow node. From the association degree ternary set, it can be seen that there is no node in the set S with an association degree greater than 0.3 with N14. At this time, step c is executed. At this step, the atomic service group T1 contains nodes N11, N12, N14, and N13.
[0045] c. Determine whether there is a business flow node that has not been traversed in the current atomic business group. If so, continue to execute b; otherwise, set the identifier corresponding to the current atomic business group for all business flow nodes in the current atomic business group, and execute d;
[0046] Determine whether there are any untraversed business flow nodes in the atomic business group. It is known that N13 is a business flow node that has not been traversed. Continue to execute b and traverse to obtain N13. At this time, for N13, there is no node in the set S with a correlation greater than 0.3 with N13, so execute step c again. At this time, there are no untraversed business flow nodes in the current atomic business group. The current atomic business group contains nodes N11, N12, N14, and N13. Set the identifiers corresponding to the current atomic business group for the above nodes, such as FT1. Execute step d.
[0047] d. Determine whether there is any business flow node that has not been traversed in the traversed business flow node set. If so, execute a; otherwise, treat the business flow nodes with the same identifier as the atomic business group and end.
[0048] In step d, the next node in the set S is traversed again, and so on, and finally all atomic service groups T1-Tn can be confirmed.
[0049] S110, executing the delivery service business process in sequence based on the one or more business flow nodes; setting business rollback conditions and monitoring, and when monitoring that the business rollback operation is triggered, selecting a target business flow node as a target rollback node;
[0050] When the business is running normally, set the business rollback conditions, monitor whether the conditions are met, and select the target business flow node as the target rollback node. The rollback conditions can trigger the business rollback operation. The rollback conditions can be set based on business needs. For each business flow node, you can set data anomaly trigger rollback, security risk trigger rollback, abnormal interruption trigger rollback, business failure trigger rollback, administrator manual trigger rollback, and transaction reversal mechanism trigger rollback. When selecting the target business flow node as the target rollback node, the user can select the target rollback node, or the system can automatically determine the target rollback node, or you can first determine the target time of the rollback, and then use the business flow node where the target time occurs as the target business flow node, and determine the target rollback node based on the principle of achieving data recovery.
[0051] S120, determine all the intermediate business flow nodes that have executed business content from the target rollback node to the business flow node where the business rollback operation is triggered, obtain all the atomic business groups where all the determined intermediate business flow nodes are located, and use the business content of the business flow nodes included in all the acquired atomic business groups as the business content to be rolled back.
[0052] A delivery service business process contains a series of business flow nodes, and the business flow nodes form a business flow that is executed in a pipeline or in parallel. When a rollback operation occurs, the business content implemented by the relevant business flow nodes all need to be restored. In the present invention, the business content corresponding to the business flow node that needs to be rolled back is determined by the atomic business group involved, and the atomic business group involved is determined by all the intermediate business flow nodes that have executed the business content from the target rollback node to the business flow node where the business rollback operation is triggered. All atomic business groups where all determined intermediate business flow nodes are located are obtained, and the business content of the business flow nodes contained in these atomic business groups is used as the business content to be rolled back. Continuing from the above embodiment, a data exception occurs when the current business flow node is N41, and the cause of the exception is that the notification cannot be delivered to the buyer member. One rollback solution is to select N41 as the target rollback node and re-execute the notification business. Another rollback scheme is to select N32 as the target rollback node, with the intention of redetermining the new delivery relationship based on the rollback operation. In this scheme, all intermediate business flow nodes that have executed business content from N32 to N41 are N32 and N41, and the atomic business groups where N32 and N41 are located are T3 and T4. The business flow nodes included in T3 are N31 and N32, and the business flow nodes included in T4 are N41 and N42. Therefore, the business content involved in N31, N32, N41, and N42 is used as the business content to be rolled back.
[0053] S130, performing a rollback operation on the business content to be rolled back.
[0054] In an embodiment of the present application, the rollback operation is specifically as follows: setting preset additional conditions corresponding to the business content to be rolled back, and when all the preset additional conditions corresponding to the business content to be rolled back are met, setting an atomic lock for the atomic business group, restoring the business content to be rolled back one by one to the state before the business content is executed, and releasing the atomic lock; if there is any preset additional condition corresponding to the business content to be rolled back that is not met, the system prompts the user of the rollback failure and the reason for the failure of the corresponding preset additional condition not being met.
[0055] Following the above embodiment, the business contents involved in N31, N32, N41, and N42 are used as the business contents to be rolled back, that is, data recovery is performed on the pairing operation business, the business of determining the delivery relationship, the notification business, and the business of signing and receiving the delivery notice (no business record has been formed because it has not been executed yet). The reason for this rollback is that the notification cannot be delivered. If the reason for the failure to deliver is that the communication of several participating members is abnormal, the preset additional conditions corresponding to the business content to be rolled back can be the implementation of a specific punishment mechanism, such as credit downgrade, compensation, and updating of basic information of invalid members; if the reason for the failure to deliver is system data abnormality, the preset additional conditions are such as the corresponding compensation obtained by each participating party. The preset additional conditions can also be empty. When all the preset additional conditions are met, an atomic lock is set for the atomic business group, and the atomic lock is released after the business content to be rolled back is restored to the state before the business content is executed one by one, thereby realizing data rollback. On the contrary, when there are preset additional conditions that are not met, the system prompts the user that the rollback failed and the corresponding preset additional conditions are not met. Furthermore, a rollback failure processing mechanism is set to ensure normal execution of the business process. The rollback failure processing mechanism can adopt conventional methods in the prior art, which is not limited in this application.
[0056] Embodiment 2: Figure 2 As shown, the present invention also provides a delivery service business rollback system, including:
[0057] An atomic business group generation module, used to determine one or more business flow nodes in the delivery service according to the business content of the delivery service, and set at least one atomic business group based on the business content corresponding to the one or more business flow nodes;
[0058] A rollback trigger module is used to execute the delivery service business process in sequence based on the one or more business flow nodes; set business rollback conditions and monitor them, and when it is monitored that the business rollback operation is triggered, select a target business flow node as a target rollback node;
[0059] The rollback business content determination module is used to determine all intermediate business flow nodes that have executed business content from the target rollback node to the business flow node where the business rollback operation is triggered, obtain all atomic business groups where all determined intermediate business flow nodes are located, and use the business content of the business flow nodes included in all the obtained atomic business groups as the business content to be rolled back;
[0060] The rollback operation module is used to perform a rollback operation on the business content to be rolled back.
[0061] In one embodiment, the task objectives corresponding to the delivery service business content are distinguished, and the business content set in each task objective is set as a business flow node; the selection of the target business flow node as the target rollback node is specifically: the user selects the target rollback node, or the system automatically determines the target rollback node, or first determines the target rollback time, and uses the business flow node that occurs at the target time as the target business flow node.
[0062] The correlation between task objectives of multiple business flow nodes is preset, the business flow node set is traversed, and multiple business flow nodes with correlation greater than a correlation threshold are set as an atomic business group.
[0063] The traversal of the service flow node set sets multiple service flow nodes with a correlation greater than a correlation threshold as an atomic service group, specifically:
[0064] a. Traverse the business flow node set, if you traverse to any business flow node, the new atomic business group as the current atomic business group, the traversed to any business flow node to add the current atomic business group;
[0065] b. Traverse the business flow nodes in the current atomic business group, take the traversed business flow node as the first business flow node, determine whether there is a second business flow node in the business flow node set whose correlation with the first business flow node is greater than the correlation threshold, if so, take the second business flow node out of the business flow node set, add it to the current atomic business group, and continue to execute b; if not, execute c;
[0066] c. Determine whether there is an untraversed business flow node in the atomic business group. If so, continue to execute b; otherwise, set the identifier corresponding to the current atomic business group for all business flow nodes in the current atomic business group, and execute d;
[0067] d. Determine whether there is any business flow node that has not been traversed in the traversed business flow node set. If so, execute a; otherwise, treat the business flow nodes with the same identifier as the atomic business group and end.
[0068] In one embodiment, the rollback operation is specifically as follows: setting preset additional conditions corresponding to the business content to be rolled back, and when all the preset additional conditions corresponding to the business content to be rolled back are met, setting an atomic lock for the atomic business group, restoring the business content to be rolled back one by one to the state before the business content is executed, and releasing the atomic lock; if there is any preset additional condition corresponding to the business content to be rolled back that is not met, the system prompts the user that the rollback failed and the reason for the failure of the corresponding preset additional condition not being met.
[0069] By adopting the above method or system, the present invention can achieve at least the following effects: 1. Providing a business recovery interface, solving business anomaly problems, and significantly improving business operation efficiency; 2. Innovatively providing an atomic business group generation algorithm, controlling the business content of the atomic business group based on a correlation threshold, improving the flexibility and business relevance of the atomic business group, and rolling back business content based on the atomic business group, efficiently ensuring business data security and consistency.
[0070] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.
[0071] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute part of this specification.
[0072] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code may be downloaded from a server computer or a cloud via a communication network.
[0073] Those skilled in the art should understand that the various embodiments disclosed above can be modified and altered in various ways without departing from the essence of the invention. Therefore, the protection scope of this specification should be defined by the appended claims.
[0074] It should be noted that not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be ignored according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients, or some components in multiple independent devices may be implemented together.
[0075] In the above embodiments, the hardware unit or module can be implemented mechanically or electrically. For example, a hardware unit, module or processor can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operation. The hardware unit or processor can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete the corresponding operation. The specific implementation method (mechanical method, or dedicated permanent circuit, or temporarily set circuit) can be determined based on cost and time considerations.
[0076] The specific embodiments described above in conjunction with the accompanying drawings describe exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of protection of the claims. The term "exemplary" used throughout this specification means "used as an example, instance or illustration" and does not mean "preferred" or "having advantages" over other embodiments. For the purpose of providing an understanding of the described technology, the specific embodiments include specific details. However, these technologies can be implemented without these specific details. In some instances, in order to avoid making the concepts of the described embodiments difficult to understand, well-known structures and devices are shown in block diagram form.
[0077] The above description of the present disclosure is provided to enable any person of ordinary skill in the art to implement or use the present disclosure. Various modifications to the present disclosure will be apparent to those of ordinary skill in the art, and the general principles corresponding to the present disclosure may be applied to other variations without departing from the scope of protection of the present disclosure. Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the widest range of principles and novel features disclosed herein.
Claims
1. A delivery service business rollback method, characterized in that: The method comprises: S100, determining one or more service flow nodes in the delivery service according to the service content of the delivery service, and setting at least one atomic service group based on the service content corresponding to the one or more service flow nodes; S110, executing the delivery service business process in sequence based on the one or more business flow nodes; setting business rollback conditions and monitoring, and when monitoring that the business rollback operation is triggered, selecting a target business flow node as a target rollback node; S120, determining all intermediate business flow nodes that have executed business content from the target rollback node to the business flow node where the business rollback operation is triggered, obtaining all atomic business groups where all the determined intermediate business flow nodes are located, and using the business content of the business flow nodes included in all the obtained atomic business groups as the business content to be rolled back; S130, performing a rollback operation on the business content to be rolled back, In the step S100, the correlation between the task objectives of multiple business flow nodes is preset, the business flow node set is traversed, and multiple business flow nodes with correlation greater than the correlation threshold are set as atomic business groups. The traversal of the service flow node set sets multiple service flow nodes with a correlation greater than a correlation threshold as an atomic service group, specifically: a. Traverse the business flow node set, if you traverse to any business flow node, the new atomic business group as the current atomic business group, the traversed to any business flow node to add the current atomic business group; b. Traverse the business flow nodes in the current atomic business group, take the traversed business flow node as the first business flow node, determine whether there is a second business flow node in the business flow node set whose correlation with the first business flow node is greater than the correlation threshold, if so, take the second business flow node out of the business flow node set, add it to the current atomic business group, and continue to execute b; if not, execute c; c. Determine whether there is an untraversed business flow node in the atomic business group. If so, continue to execute b; otherwise, set the identifier corresponding to the current atomic business group for all business flow nodes in the current atomic business group, and execute d; d. Determine whether there is any business flow node that has not been traversed in the traversed business flow node set. If so, execute a; otherwise, treat the business flow nodes with the same identifier as the atomic business group and end.
2. The method for rolling back the settlement service business according to claim 1, characterized in that: Distinguish the task objectives corresponding to the delivery service business content, and set the business content set in each task objective as a business flow node; the selection of the target business flow node as the target rollback node is specifically: the user selects the target rollback node, or the system automatically determines the target rollback node, or first determines the target rollback time, and uses the business flow node that occurs at the target time as the target business flow node.
3. The method for rolling back a settlement service as claimed in claim 1, characterized in that: In step S130, the rollback operation is specifically as follows: setting preset additional conditions corresponding to the business content to be rolled back, and when all the preset additional conditions corresponding to the business content to be rolled back are satisfied, setting an atomic lock for the atomic business group, restoring the business content to be rolled back to the state before the business content is executed one by one, and releasing the atomic lock; If any preset additional condition corresponding to the business content to be rolled back is not met, the system prompts the user that the rollback failed and the reason why the corresponding preset additional condition was not met.
4. A delivery service business rollback system, characterized in that: include: The atomic business group generation module is used to determine one or more business flow nodes in the delivery service according to the business content of the delivery service, and set at least one atomic business group based on the business content corresponding to the one or more business flow nodes. It also includes presetting the correlation between the task objectives of multiple business flow nodes, traversing the business flow node set, and setting multiple business flow nodes with a correlation greater than a correlation threshold as an atomic business group, specifically: a. Traverse the business flow node set, if you traverse to any business flow node, the new atomic business group as the current atomic business group, the traversed to any business flow node to add the current atomic business group; b. Traverse the business flow nodes in the current atomic business group, take the traversed business flow node as the first business flow node, determine whether there is a second business flow node in the business flow node set whose correlation with the first business flow node is greater than the correlation threshold, if so, take the second business flow node out of the business flow node set, add it to the current atomic business group, and continue to execute b; if not, execute c; c. Determine whether there is an untraversed business flow node in the atomic business group. If so, continue to execute b; otherwise, set the identifier corresponding to the current atomic business group for all business flow nodes in the current atomic business group, and execute d; d. Determine whether there is a business flow node that has not been traversed in the business flow node set. If so, execute a; otherwise, the business flow node with the same identity is used as the atomic business group and ends; A rollback trigger module, used to execute the delivery service business process in sequence based on the one or more business flow nodes; Set the business rollback conditions and monitor them. When the business rollback operation is triggered, select the target business flow node as the target rollback node. The rollback business content determination module is used to determine all intermediate business flow nodes that have executed business content from the target rollback node to the business flow node where the business rollback operation is triggered, obtain all atomic business groups where all determined intermediate business flow nodes are located, and use the business content of the business flow nodes included in all the obtained atomic business groups as the business content to be rolled back; The rollback operation module is used to perform a rollback operation on the business content to be rolled back.
5. The delivery service business rollback system according to claim 4, characterized in that: Distinguish the task objectives corresponding to the delivery service business content, and set the business content set in each task objective as a business flow node; the selection of the target business flow node as the target rollback node is specifically: the user selects the target rollback node, or the system automatically determines the target rollback node, or first determines the target rollback time, and uses the business flow node that occurs at the target time as the target business flow node.
6. The delivery service business rollback system according to claim 4, characterized in that: In the rollback operation module, the rollback operation is specifically as follows: setting preset additional conditions corresponding to the business content to be rolled back, and when all the preset additional conditions corresponding to the business content to be rolled back are met, setting atomic locks for the atomic business groups, restoring the business content to be rolled back to the state before the business content is executed one by one, and releasing the atomic locks; If any preset additional condition corresponding to the business content to be rolled back is not met, the system prompts the user that the rollback failed and the reason why the corresponding preset additional condition was not met.
Citation Information
Patent Citations
Transaction rollback method and device, storage medium and computer equipment
CN107783861A
Data processing method and apparatus, and storage medium
WO2020233037A1