Service arrangement method, device, computer equipment, readable storage medium and program product

By determining transaction nodes in the business connection flow and setting an exception rollback process, the problem of inefficient exception handling in traditional technology is solved, and the rapid response and efficient processing of business processes are achieved.

CN119440675BActive Publication Date: 2025-04-01SHENZHEN LANLING SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510027567.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-01
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

When traditional business process orchestration technology faces abnormal situations, it is difficult to respond quickly and handle effectively, resulting in transaction consistency problems and inefficiency.

Method used

Automatic exception handling is achieved by determining the transaction node in the service connection flow and setting up an exception rollback process for it, including preset rollback mode and preset exception end mode.

Benefits of technology

It effectively avoids abnormal spread, ensures the controllability and consistency of the process, improves the abnormal response speed and processing efficiency, and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440675B_ABST
    Figure CN119440675B_ABST
Patent Text Reader

Abstract

The present application relates to a business arrangement method, device, computer equipment, readable storage medium and program product, and relates to the field of business process technology, which can improve the efficiency of handling abnormal situations in business arrangement. The method includes: determining a transaction node in a business connection flow; setting an abnormal rollback process for the transaction node through the business connection flow; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode; when an abnormality occurs in a transaction node, entering the abnormal rollback process, and performing a rollback operation according to the preset rollback mode; when the rollback operation is completed, ending the abnormal rollback process according to the preset abnormal end mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of business process technology, and in particular to a business orchestration method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of business process technology, connection flow technology has emerged. Connection flow solves the problem of arranging multiple business system interfaces in the order of business logic. However, when an abnormal situation occurs in the connection flow, there will be transaction consistency issues when the called interface is executed.

[0003] In traditional business process orchestration technology, exception handling is usually performed in a hard-coded manner, and the specific implementation includes monitoring of abnormal situations and manual intervention. For example, in complex business scenarios, developers need to write exception handling logic for each business interface and locate the exception through logging or alarm systems. After discovering data anomalies, they need to supplement the data to ensure the integrity of the overall business, or directly delete the relevant data of the abnormal situation. These methods require a lot of manpower to track and handle exceptions. At the same time, the efficiency of exception handling is low, and it is difficult to quickly respond to dynamic changes in complex business processes. Summary of the invention

[0004] Based on this, it is necessary to provide a service orchestration method, apparatus, computer device, computer readable storage medium and computer program product to address the above technical issues.

[0005] In a first aspect, the present application provides a service orchestration method, comprising:

[0006] Determine the transaction node in the business connection flow;

[0007] By means of the business connection flow, an abnormal rollback process is set for the transaction node; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode;

[0008] When an exception occurs in the transaction node, the exception rollback process is entered, and a rollback operation is performed according to the preset rollback method;

[0009] When the rollback operation is completed, the abnormal rollback process is ended according to a preset abnormal ending method.

[0010] In one of the embodiments, determining the transaction node in the business connection flow includes: performing business processing analysis on the business process interface in the business connection flow to obtain a business processing analysis result; and packaging the business process interface indicated as abnormal by the business processing analysis result to obtain the transaction node.

[0011] In one of the embodiments, the transaction node includes multiple business process interfaces; after setting the exception rollback process for the transaction node through the business connection flow, it also includes: if there is an abnormal business process interface among the multiple business process interfaces of the transaction node, it is determined that the transaction node is abnormal, and the abnormal business process interface is determined as an abnormal process interface; if the transaction node is abnormal, the business process interface packaged in the transaction node is adjusted according to the number of abnormal process interfaces of the transaction node.

[0012] In one of the embodiments, the business process interface packaged in the transaction node is adjusted according to the number of abnormal process interfaces of the transaction node, including: if the number of abnormal process interfaces of the transaction node does not exceed the preset abnormal number, the abnormal process interfaces of other transaction nodes other than the transaction node are obtained, and when the number of abnormal process interfaces of the transaction node meets the preset abnormal interface number, the abnormal process interfaces of the other transaction nodes are added to the transaction node; if the number of abnormal process interfaces of the transaction node exceeds the preset abnormal interface number, the abnormal process interfaces of the transaction node are reduced until the number of abnormal process interfaces of the transaction node meets the preset abnormal number.

[0013] In one of the embodiments, when the rollback operation is completed, the abnormal rollback process is ended according to a preset abnormal ending method, including: when the rollback operation is completed, entering the node in the next business connection flow of the transaction node; or, when the rollback operation is completed, entering the process end node in the business connection flow.

[0014] In one embodiment, performing the rollback operation according to the preset rollback mode includes:

[0015] The preset rollback mode is adjusted according to the type of exception occurring in the transaction node to obtain an adjusted preset rollback mode; and a rollback operation is performed according to the rollback sequence and rollback content in the adjusted preset rollback mode.

[0016] In a second aspect, the present application further provides a service arrangement device, including:

[0017] A transaction node determination module, used to determine the transaction node in the business connection flow;

[0018] An abnormal rollback process setting module is used to set an abnormal rollback process for the transaction node through the business connection flow; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode;

[0019] An abnormal rollback operation module is used to enter the abnormal rollback process and perform a rollback operation according to the preset rollback method when an abnormality occurs in the transaction node;

[0020] The abnormal rollback end management module is used to end the abnormal rollback process according to a preset abnormal end method when the rollback operation is completed.

[0021] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0022] Determine a transaction node in a business connection flow; set an exception rollback process for the transaction node through the business connection flow; the operation mode of the exception rollback process includes a preset rollback mode and a preset exception end mode; when an exception occurs in the transaction node, enter the exception rollback process and perform a rollback operation according to the preset rollback mode; when the rollback operation is completed, end the exception rollback process according to the preset exception end mode.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0024] Determine a transaction node in a business connection flow; set an exception rollback process for the transaction node through the business connection flow; the operation mode of the exception rollback process includes a preset rollback mode and a preset exception end mode; when an exception occurs in the transaction node, enter the exception rollback process and perform a rollback operation according to the preset rollback mode; when the rollback operation is completed, end the exception rollback process according to the preset exception end mode.

[0025] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0026] Determine a transaction node in a business connection flow; set an exception rollback process for the transaction node through the business connection flow; the operation mode of the exception rollback process includes a preset rollback mode and a preset exception end mode; when an exception occurs in the transaction node, enter the exception rollback process and perform a rollback operation according to the preset rollback mode; when the rollback operation is completed, end the exception rollback process according to the preset exception end mode.

[0027] The above-mentioned business arrangement method, device, computer equipment, computer-readable storage medium and computer program product determine the transaction node in the business connection flow; through the business connection flow, set the abnormal rollback process for the transaction node; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode; when an abnormality occurs in the transaction node, enter the abnormal rollback process and perform the rollback operation according to the preset rollback mode; when the rollback operation is completed, end the abnormal rollback process according to the preset abnormal end mode. In this application, through the clear division of transaction nodes, the exception handling logic can be decoupled from the normal business process, effectively avoiding the spread of the exception to the entire business process and ensuring the controllability of the process; after the exception occurs, it can quickly switch to the abnormal rollback process, shortening the abnormal response time and improving the automation of exception handling; through the preset rollback mode, the automatic processing after the exception occurs is realized, avoiding the influence of manual intervention on the process efficiency; through the preset abnormal end mode, it is allowed to determine the subsequent direction of the process according to business needs, improving the pertinence and processing efficiency of exception management, thereby effectively ensuring the transaction consistency of the business process while improving the processing efficiency of the business process. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 A schematic diagram of a process flow of a service arrangement method in an embodiment;

[0030] Figure 2 A schematic diagram of a service connection flow framework in one embodiment;

[0031] Figure 3 A schematic diagram of a service connection flow in an embodiment;

[0032] Figure 4 A schematic diagram of a normal transaction process in a transaction node in an embodiment;

[0033] Figure 5 A schematic diagram of a process flow of an abnormal rollback process in a transaction node in an embodiment;

[0034] Figure 6 is a structural block diagram of a service arrangement device in an embodiment;

[0035] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0037] In an exemplary embodiment, Figure 1 As shown, a service orchestration method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0038] Step S102: determine the transaction node in the service connection flow.

[0039] Among them, the business connection flow is a logical collection of multiple service interfaces or operation modules combined in a predetermined order to achieve business goals. The design and configuration of the business connection flow rely on a visual interface so that users can intuitively view the process structure and make adjustments. The transaction node is a logical unit in the business connection flow, encapsulating a set of interfaces or operation steps that require transactional guarantees.

[0040] Exemplarily, the terminal determines a logical unit in the middle of the service connection flow as a transaction node.

[0041] Step S104, setting an abnormal rollback process for the transaction node through the business connection flow; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode.

[0042] Among them, the abnormal rollback process refers to when an abnormality occurs in a transaction node, the computer terminal rolls back the business operation to the state before the abnormality occurs through predefined rules and logic, including but not limited to various operation logics such as rolling back data, undoing operations and restoring the original state. The preset rollback method refers to the rollback rules and their execution order defined in the transaction node for different abnormal situations, including but not limited to the triggering conditions of the rollback, the data range involved and the execution content. The preset abnormal end method refers to the predefined logic of how the business connection flow continues to execute after the rollback operation of the transaction node is completed.

[0043] Exemplarily, the terminal sets an abnormal rollback process for the transaction node through preset rules, and the process includes two parts: a preset rollback method and a preset abnormal end method.

[0044] For the preset rollback method, the terminal defines the rollback scope and rollback order of the rollback method by analyzing the interface logic and dependency relationship of the transaction node. For example, for the data that needs to be rolled back, its rollback scope is defined as "interface operations affected by exceptions in the transaction node". The rollback order is determined based on the dependency relationship between the interfaces, and rolls back in reverse order from the last executed interface to the earliest executed interface.

[0045] For the preset abnormal ending method, different process processing methods are defined to handle the abnormal ending after the rollback operation according to the preset rollback method is completed.

[0046] Step S106: When an exception occurs in a transaction node, the abnormal rollback process is entered, and a rollback operation is performed according to a preset rollback method.

[0047] When an exception occurs in an interface in a transaction node, the computer terminal automatically starts the exception rollback process according to the preset rollback method. First, the terminal detects that the interface returns to an abnormal state, triggering the rollback logic. Then, according to the preset rollback method, the terminal gradually undoes the operations that have been executed in the transaction node. For example, the rollback range is "operations affected by the exception" and the rollback order is "executed in reverse order according to the interface dependency relationship." The entire process is automatically completed by the terminal to ensure that the rollback is executed accurately and does not affect other business operations.

[0048] The preset rollback method can include a variety of rollback contents, such as data deletion, state reset, or re-calling the front-end interface. These logics are predefined during the system configuration phase and are directly called and executed when an exception occurs.

[0049] Step S108, when the rollback operation is completed, the abnormal rollback process is ended according to a preset abnormal ending method.

[0050] For example, when the abnormal rollback process in the transaction node is completed, the computer terminal automatically ends the rollback process according to the preset abnormal ending method. The system selects subsequent actions according to the predefined strategy. If the business logic requires, after the rollback operation is completed, the terminal can turn to the specified node to continue execution, such as aggregating to a certain transaction node or process interface.

[0051] Optionally, the terminal ensures that the subsequent execution logic complies with predefined rules by recording the rollback process status and its results.

[0052] In the above-mentioned business arrangement method, by determining the transaction node in the business connection flow; through the business connection flow, setting the exception rollback process for the transaction node; the operation mode of the exception rollback process includes a preset rollback mode and a preset exception end mode; when an exception occurs in the transaction node, enter the exception rollback process, and perform the rollback operation according to the preset rollback mode; when the rollback operation is completed, end the exception rollback process according to the preset exception end mode. In this embodiment, through the clear division of transaction nodes, the exception handling logic can be decoupled from the normal business process, effectively avoiding the spread of exceptions to the entire business process, and ensuring the controllability of the process; after the exception occurs, it can quickly switch to the exception rollback process, shortening the exception response time and improving the automation of exception handling; through the preset rollback mode, the automatic processing after the exception occurs is realized, avoiding the influence of manual intervention on the process efficiency; through the preset exception end mode, it is allowed to determine the subsequent direction of the process according to business needs, improving the pertinence and processing efficiency of exception management, thereby effectively ensuring the transaction consistency of the business process while improving the processing efficiency of the business process.

[0053] In an exemplary embodiment, step S102 of determining a transaction node in a service connection flow includes:

[0054] Perform business processing analysis on the business process interface in the business connection flow to obtain a business processing analysis result; package the business process interface indicated by the business processing analysis result to obtain a transaction node.

[0055] Among them, the business process interface refers to the logical unit interface used to complete specific tasks in the business connection flow. It is called and returns results through preset parameters to support node operations in the business process. Business process analysis is the process of evaluating and judging the functional logic, execution sequence and abnormal risk of the business process interface through a computer terminal. It relies on rule engines, historical data analysis or manually defined logic to identify the possibility of abnormal occurrence or interface dependency, and provide a basis for the construction of transaction nodes. Transaction nodes are logical units formed by encapsulating key interfaces or interfaces that require transaction management after business process analysis.

[0056] Specifically, the terminal identifies the functional logic and dependencies of the business process interface, such as whether the input data of a certain interface depends on the output of other interfaces. By analyzing historical operation data or predefined rules, the probability of interface exceptions is calculated. For example, interfaces that frequently time out or return errors are considered to have a high risk of exceptions. Business process interfaces are sorted according to their importance and degree of dependency, and high-priority interfaces with abnormal risks are marked as critical interfaces.

[0057] After the analysis is completed, the computer terminal will package the critical interfaces indicating the anomaly. The packaging logic includes but is not limited to defining the scope of the transaction node, calling rules and transaction attributes.

[0058] In a specific embodiment, in the procurement system, the business connection flow includes "commodity order interface", "payment interface" and "inventory update interface". The computer terminal processes and analyzes these interfaces and finds that there is a strong logical dependency between the commodity order interface and the payment interface, and historical operation data shows that the payment interface has a high abnormality rate, while the inventory update interface is less important and has no direct dependency. Based on the analysis results, the terminal packages the "commodity order interface" and "payment interface" into a transaction node and configures an abnormal rollback rule to ensure that the order status can be rolled back when the payment is abnormal.

[0059] In this embodiment, through business processing analysis of logical analysis and abnormal risk assessment, it is possible to accurately identify interfaces that have a greater impact on business processes, provide a basis for transaction node generation, and by packaging abnormal interfaces as transaction nodes, these interfaces can be effectively processed transactionally to ensure business logic consistency.

[0060] In an exemplary embodiment, a transaction node includes multiple business process interfaces; after setting an exception rollback process for the transaction node through a business connection flow, it also includes: if there is an abnormal business process interface among the multiple business process interfaces of the transaction node, it is determined that the transaction node is abnormal, and the business process interface with the abnormality is determined as an abnormal process interface; if the transaction node is abnormal, the business process interface packaged in the transaction node is adjusted according to the number of abnormal process interfaces of the transaction node.

[0061] Among them, the abnormal process interface refers to the interface in the transaction node where the business logic cannot be executed normally due to call failure or return of abnormal status. It marks the point where the abnormality of the business process occurs and provides a basis for subsequent rollback or adjustment.

[0062] Exemplarily, when a computer terminal runs a transaction node, it first monitors the execution status of multiple business process interfaces in the transaction node to determine whether there is an abnormal interface. If it is detected that the interface returns an abnormal status (such as an error code or timeout), the terminal determines that an abnormality has occurred in the transaction node, and records the number and specific location of the abnormal interface, and dynamically adjusts the interface range included in the transaction node according to the number of abnormal interfaces.

[0063] In this embodiment, the accuracy of exception management is improved by identifying abnormal interfaces in transaction nodes and determining the scope of abnormal impact. By adjusting the scope of transaction nodes according to the number of abnormal interfaces, it is ensured that transaction nodes have both transaction management capabilities and avoid increased management complexity due to too many interfaces, thereby improving the stability of the system.

[0064] In an exemplary embodiment, in step S106, adjusting the business process interface packaged in the transaction node according to the number of abnormal process interfaces of the transaction node includes:

[0065] If the number of abnormal process interfaces of the transaction node does not exceed the preset abnormal number, the abnormal process interfaces of other transaction nodes except the transaction node are obtained, and when the number of abnormal process interfaces of the transaction node meets the preset abnormal interface number, the abnormal process interfaces of other transaction nodes are added to the transaction node; if the number of abnormal process interfaces of the transaction node exceeds the preset abnormal interface number, the abnormal process interfaces of the transaction node are reduced until the number of abnormal process interfaces of the transaction node meets the preset abnormal number.

[0066] The preset number of exceptions refers to setting a threshold for the number of abnormal process interfaces based on business requirements, fault tolerance, and the complexity of business processes, which is used to decide when to start expanding or reducing interface adjustments in transaction nodes.

[0067] On the computer terminal, the terminal determines whether the interface of the current transaction node needs to be adjusted according to the number of abnormal process interfaces of the transaction node.

[0068] If the number of abnormal interfaces does not exceed the preset number of abnormalities: the terminal will obtain abnormal interfaces from other transaction nodes. These interfaces can be interfaces where abnormalities occur in other nodes during processing. The terminal adds these interfaces to the current transaction node to ensure that the abnormal processing of the current transaction node can meet the preset standards. This method can effectively increase the fault tolerance of the transaction node, ensure that the terminal can respond flexibly when a small number of abnormalities occur, and avoid excessive impact of abnormalities.

[0069] If the number of abnormal interfaces exceeds the preset number of abnormal interfaces: the terminal will reduce the number of abnormal interfaces in the current transaction node according to the preset rules. The reduction operation is achieved by removing some redundant interfaces or non-critical interfaces to ensure that the number of abnormal process interfaces of the transaction node remains within a controllable range. In this way, the terminal avoids the processing complexity caused by too many abnormal interfaces and improves the terminal's response speed and abnormal recovery capabilities.

[0070] Specifically, in the procurement transaction node of the procurement platform, the system monitors the commodity order interface, payment interface, and inventory update interface. If the order interface, payment interface, and inventory update interface all have exceptions (such as timeout or error return), the terminal determines that the abnormal process interface is 3, and the number of pre-set exceptions is 2. The terminal will reduce the scope of the transaction node and only retain the commodity order interface and payment interface to reduce the complexity of the rollback operation.

[0071] In this embodiment, by adjusting the scope of transaction nodes according to the number of abnormal interfaces, it is ensured that the transaction nodes have both transaction management capabilities and increased management complexity due to too many interfaces is avoided, making abnormal rollback and subsequent operations more efficient.

[0072] In an exemplary embodiment, in step S108, when the rollback operation is completed, the abnormal rollback process is ended according to a preset abnormal ending method, including:

[0073] When the rollback operation is completed, enter the next node in the business connection flow of the transaction node; or, when the rollback operation is completed, enter the process end node in the business connection flow.

[0074] Exemplarily, after the rollback operation is completed, the terminal decides how to end the abnormal rollback process according to a preset abnormal end mode. According to preset rules, the terminal can choose to enter a node in the next service connection flow, or enter a process end node in the service connection flow.

[0075] When the rollback operation is completed, if the preset abnormal end method is specified as jumping to the node in the next business connection flow, the terminal will automatically switch to the next node for processing according to the process configuration. This node can be a node related to abnormal rollback post-processing, such as compensation operations, state recovery, etc., which is suitable for scenarios where subsequent operations need to be continued after rollback.

[0076] If the preset abnormal end method is specified as ending the current process, the terminal will jump to the process end node, marking the end of the current transaction or process. It is suitable for situations where subsequent operations cannot be continued or the state has been restored to an acceptable state after rollback, ensuring the stability and consistency of the terminal.

[0077] Specifically, in the order processing system of the procurement platform, suppose an order payment operation is abnormal and the system needs to perform a rollback operation. After the rollback operation is completed, the system will process it according to the preset abnormal end method: if the preset end method is "enter the next business connection flow node", the system will jump to the order cancellation node for further processing. If the preset end method is "enter the process end node", the system will directly end the current order processing process, indicating that the order cannot be processed further.

[0078] In this embodiment, according to different business needs and abnormal situations, you can choose to enter the next node to continue processing, or end the current process, thereby avoiding unnecessary operations in abnormal situations and optimizing system resource usage.

[0079] In an exemplary embodiment, in step S106, a rollback operation is performed according to a preset rollback method, including: adjusting the preset rollback method according to the type of exception occurring in the transaction node to obtain an adjusted preset rollback method; and performing a rollback operation according to the rollback order and rollback content in the adjusted preset rollback method.

[0080] Among them, the exception type refers to different types of abnormal situations that occur during the execution of the transaction node, such as network failure, system crash, data abnormality, etc. Each exception has different characteristics, and different rollback strategies and methods are adopted to handle it.

[0081] Exemplarily, when the terminal performs a rollback operation, it first determines whether the preset rollback method needs to be adjusted based on the type of exception that occurs in the transaction node. For example, if a database connection exception occurs, the terminal may need to restore the database connection first and roll back the database transaction; if a network interruption occurs, it may need to restore the network connection first and then perform other rollback operations. The adjusted rollback method includes a specific rollback order and rollback content.

[0082] After determining the adjusted rollback mode, the terminal performs the rollback operation according to the rollback sequence to ensure that the terminal can gradually return to a normal state during the rollback process.

[0083] Specifically, in the payment node managed by the procurement platform, when a user makes a payment, if a payment service exception occurs (such as payment failure), the system adjusts the rollback method according to the type of exception (such as network exception, payment interface exception, etc.).

[0084] If a network anomaly occurs, the rollback operation will prioritize restoring the network connection and the payment status; if the payment interface is abnormal, the payment data will be rolled back first, the payment operation will be canceled, and the payment status will be updated to "payment failed". After the rollback operation is completed, subsequent operations will be performed according to the preset rules, such as prompting the user that the payment failed, or allowing the user to try to pay again.

[0085] In order to enable those skilled in the art to better understand the above steps, the embodiment of the present application is illustrated below by using an example, but it should be understood that the embodiment of the present application is not limited to this.

[0086] In an exemplary embodiment, the service arrangement may be expressed as follows: Figure 2 The framework shown in the figure has a specific implementation method including: first, by performing business process analysis on the business process interfaces in the business connection flow, the logical associations and dependencies between the interfaces are identified. The business process analysis results indicate which interfaces have transaction management requirements, and these interfaces are packaged as transaction nodes. The establishment of transaction nodes enables the centralized management of key interfaces in the business connection flow, providing basic support for subsequent exception handling and rollback. For example, in Figure 2 As shown, interface B and interface C, as logically associated interfaces, are encapsulated as transaction nodes and are uniformly managed for transactional purposes.

[0087] In the transaction node, in order to deal with potential abnormal situations, an abnormal rollback process is pre-set. The rollback process includes a preset rollback method and a preset abnormal end method. The preset rollback method specifies the rollback logic to be executed when an abnormality occurs in the transaction node, including the triggering conditions, rollback order, and rollback content of the rollback; and the preset abnormal end method determines the subsequent direction of the process after the rollback is completed, such as continuing to execute the next node or directly terminating the current process. Figure 2 As shown, when an exception occurs in any interface in the transaction node (such as interface B fails due to a network error or interface C fails due to data inconsistency), the system will automatically enter the rollback process and undo the completed operations according to the preset rules.

[0088] When an interface in a transaction node is abnormal, it is further identified as an abnormal process interface, and the number of abnormal interfaces in the transaction node is monitored to dynamically adjust the scope of the transaction node. If the number of abnormal interfaces does not exceed the preset abnormal threshold, the system can introduce related interfaces from other transaction nodes to enhance the abnormal handling capability of the current transaction node; if the number of abnormal interfaces exceeds the threshold, the system will reduce the transaction node and only retain the key interfaces to reduce the complexity of rollback. Figure 2 In this case, if both interface B and interface C have exceptions at the same time, the system will prioritize the rollback tasks of the core operations to avoid redundant rollbacks of non-critical interfaces.

[0089] During the rollback operation, the system dynamically adjusts the preset rollback method according to the type of exception of the transaction node and generates an adaptive rollback strategy. Specifically, the system dynamically adjusts the rollback order and content by analyzing the type of exception (such as interface B due to network timeout and interface C due to data error). For example, the system prioritizes restoring the network connection before processing data consistency to ensure the efficiency and accuracy of the rollback operation.

[0090] After the rollback operation is completed, the system determines the subsequent processing method of the process through the preset abnormal end method. If the abnormal end method is set to continue the main process, the system will enter the next node (such as interface D) to continue to execute the subsequent business logic; if it is set to terminate the current process, the system will directly jump to the process end node and terminate the current task.

[0091] In a specific embodiment, in the process of procurement business, the whole business process is first visualized through the business connection flow, such as Figure 3 As shown, the business connection flow includes the main process from the start node N1 to the end node N2, and the transaction node N3 containing the purchase transaction. Figure 4As shown, transaction node N3 is responsible for processing the purchase business logic, including the following operations: N3_1 Purchase start node, start the purchase task and initialize the purchase process. N3_3 Purchase commodity node, complete the purchase operation of the commodity. N3_4 Payment node, complete the order payment.

[0092] According to the operation logic of the procurement business, there is a strong logical correlation between interfaces. For example, the completion of the purchase of goods depends on the success of the payment. Therefore, the system packages N3_1, N3_3 and N3_4 into a transaction node N3 for unified management. Figure 5 As shown in the figure, in transaction node N3, to ensure business consistency and data integrity when an exception occurs, the system configures an exception rollback process for this node. In the preset rules of the exception rollback process, the preset rollback method is set to undo the completed operations in reverse order. For example, if the payment (N3_4) fails, the previous purchase of goods operation (N3_3) needs to be rolled back. The preset exception ending method is set to terminate the main process after the exception handling is completed (such as skipping N4 to notify the supervisor node).

[0093] Transaction node N3 contains the following two process logics: transaction process, which means that under normal circumstances, the transaction node executes all interfaces in the procurement process in sequence. Exception rollback process, which means that when an exception occurs in any interface in the transaction node, the system will enter the exception handling sub-process and restore the system to a consistent state through rollback.

[0094] Specifically, the main process starts from the N1 start node, and after entering the transaction node N3, the steps of the transaction process are executed in sequence. First, the purchase operation is initialized at the N3_1 purchase start node, and then it flows to the N3_3 purchase commodity node to complete the commodity purchase, and then enters the N3_4 payment node to complete the order payment operation. When all operations are successful, the process flows to the N3_2 purchase end node, the transaction node is executed, returns to the main process and continues to flow to the N4 notification supervisor node to complete the entire business logic.

[0095] When an exception occurs in the payment node (N3_4) in transaction node N3 (such as payment failure), the system immediately triggers the exception handling sub-process and enters the exception rollback process. First, the rollback logic is started by the N3_R_1 exception handling start node, and then it flows to the N3_R_3 notification person in charge node, and the system sends an exception notification prompt to the relevant person in charge. Then it enters the N3_R_4 order status modification node and changes the order status to "unfinished" to ensure that abnormal orders cannot enter subsequent links to avoid further affecting other processes. After the exception handling is completed, the system reaches the N3_R_2 exception handling end node. According to the preset "direct termination" rule, it skips the N4 notification supervisor node and flows directly to the N2 end node to terminate the current process.

[0096] In order to improve the system's flexibility in handling exceptions, the present invention optimizes the transaction node range and rollback method in combination with a dynamic adjustment mechanism. When an exception occurs in the N3_4 payment node alone, the system limits the rollback range to the N3_3 commodity purchase node and the N3_4 payment node, without the need to roll back the N3_1 purchase start node, thereby reducing the scope of unnecessary operations. When N3_3 and N3_4 are both abnormal at the same time, the system adjusts the rollback order, giving priority to canceling the payment operation (N3_4), and then rolling back the purchase operation (N3_3) to ensure the logical integrity and efficiency of the rollback. During the rollback process, the system gradually deletes the generated commodity purchase records according to the preset logic, releases the occupied inventory, and restores the order status to ensure data consistency.

[0097] In addition, by setting the preset abnormal end method, the system can select the subsequent processing strategy according to the specific business needs. If the abnormality is recoverable (such as payment can be retried), the system will continue to flow to the N4 notification supervisor node after the process rollback is completed; if the abnormality is unrecoverable (such as a long-term failure of the payment gateway), it will directly jump to the N2 end node after the rollback is completed to terminate the current business process. This design effectively improves the adaptability and flexibility of the system in abnormal situations and ensures the integrity and stability of the process in complex business scenarios.

[0098] Through the above steps, the present application realizes the precise management and dynamic adjustment capabilities of transaction nodes in the business connection flow. First, by centrally managing the business process interface within the transaction node, the overall consistency of transactional operations is effectively guaranteed; second, by dynamically adjusting the transaction node range and rollback method, the system can flexibly respond according to abnormal situations and optimize the efficiency of the rollback process; finally, by setting a preset abnormal end method, the system can meet the exception handling requirements in different scenarios, enhance the adaptability and stability of the process, and thus provide an efficient and reliable solution for complex business scenarios.

[0099] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0100] Based on the same inventive concept, the embodiment of the present application also provides a service orchestration device for implementing the service orchestration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more service orchestration device embodiments provided below can refer to the limitations on the service orchestration method above, and will not be repeated here.

[0101] In an exemplary embodiment, Figure 6 As shown, a service arrangement device is provided, including: a transaction node determination module 610, an abnormal rollback process setting module 620, an abnormal rollback operation module 630 and an abnormal rollback end management module 640, wherein:

[0102] The transaction node determination module 610 is used to determine the transaction nodes in the service connection flow.

[0103] The abnormal rollback process setting module 620 is used to set an abnormal rollback process for a transaction node through a business connection flow; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode.

[0104] The abnormal rollback operation module 630 is used to enter the abnormal rollback process when an abnormality occurs in a transaction node, and perform a rollback operation according to a preset rollback method.

[0105] The abnormal rollback end management module 640 is used to end the abnormal rollback process according to a preset abnormal end method when the rollback operation is completed.

[0106] In one embodiment, the transaction node determination module 610 is further used to perform business processing analysis on the business process interface in the business connection flow to obtain a business processing analysis result; and to package the business process interface indicated as abnormal by the business processing analysis result to obtain a transaction node.

[0107] In one embodiment, the exception rollback operation module 630 is also used to determine that an exception has occurred in a transaction node if an abnormal business process interface exists among multiple business process interfaces of the transaction node, and determine the abnormal business process interface as an abnormal process interface; if an exception has occurred in the transaction node, the business process interface packaged in the transaction node is adjusted according to the number of abnormal process interfaces of the transaction node.

[0108] In one embodiment, the exception rollback operation module 630 is also used to obtain the exception process interfaces of other transaction nodes except the transaction node if the number of exception process interfaces of the transaction node does not exceed the preset exception number, and add the exception process interfaces of other transaction nodes to the transaction node when the number of exception process interfaces of the transaction node meets the preset exception interface number; if the number of exception process interfaces of the transaction node exceeds the preset exception interface number, reduce the exception process interfaces of the transaction node until the number of exception process interfaces of the transaction node meets the preset exception number.

[0109] In one embodiment, the abnormal rollback end management module 640 is also used to enter the next node in the business connection flow of the transaction node when the rollback operation is completed; or, when the rollback operation is completed, enter the process end node in the business connection flow.

[0110] In one embodiment, the abnormal rollback operation module 630 is further used to adjust the preset rollback method according to the abnormal type occurring in the transaction node to obtain an adjusted preset rollback method; and perform a rollback operation according to the rollback sequence and rollback content in the adjusted preset rollback method.

[0111] Each module in the above-mentioned service arrangement device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a service scheduling method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0113] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0116] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0118] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0120] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A service arrangement method, characterized in that: The method comprises: According to the functional logic and dependency relationship of the business process interface in the business connection flow, a business process analysis is performed on the business process interface in the business connection flow to obtain a business process analysis result; Packaging the business process interface indicated as abnormal by the business process analysis result to obtain a transaction node; By means of the business connection flow, an abnormal rollback process is set for the transaction node; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode; In the case where an exception occurs in the transaction node, adjusting the interface range of the business process interface packaged by the transaction node according to the number of abnormal process interfaces in the transaction node to obtain an adjusted transaction node; the abnormal process interface is used to indicate that an exception occurs in the business process interface; Enter the abnormal rollback process and perform the rollback operation according to the preset rollback method; When the rollback operation is completed, the abnormal rollback process is ended according to a preset abnormal ending method.

2. The method according to claim 1, characterized in that The transaction node includes a plurality of business process interfaces; after setting an abnormal rollback process for the transaction node through the business connection flow, the process further includes: If an abnormal business process interface exists among the multiple business process interfaces of the transaction node, it is determined that the transaction node is abnormal, and the abnormal business process interface is determined as an abnormal process interface.

3. The method according to claim 1, characterized in that According to the number of abnormal process interfaces in the transaction node, the interface range of the business process interface packaged by the transaction node is adjusted to obtain an adjusted transaction node, including: If the number of abnormal process interfaces of the transaction node does not exceed the preset abnormal number, the abnormal process interfaces of other transaction nodes except the transaction node are obtained, and if the number of abnormal process interfaces of the transaction node meets the preset abnormal interface number, the abnormal process interfaces of the other transaction nodes are added to the transaction node; If the number of abnormal process interfaces of the transaction node exceeds the preset number of abnormal interfaces, the abnormal process interfaces of the transaction node are reduced until the number of abnormal process interfaces of the transaction node meets the preset abnormal number.

4. The method according to claim 1, characterized in that: When the rollback operation is completed, ending the abnormal rollback process according to a preset abnormal ending method includes: When the rollback operation is completed, entering a node in the next business connection flow of the transaction node; or, When the rollback operation is completed, the process ends at the service connection flow.

5. The method according to any one of claims 1 to 4, characterized in that: Performing a rollback operation according to the preset rollback method includes: Adjusting the preset rollback mode according to the type of exception occurring in the transaction node to obtain an adjusted preset rollback mode; The rollback operation is performed according to the rollback sequence and rollback content in the adjusted preset rollback mode.

6. A service arrangement device, characterized in that: The device comprises: A transaction node determination module is used to perform business processing analysis on the business process interface in the business connection flow according to the functional logic and dependency relationship of the business process interface in the business connection flow to obtain a business processing analysis result; and to package the business process interface indicated as abnormal by the business processing analysis result to obtain a transaction node; An abnormal rollback process setting module is used to set an abnormal rollback process for the transaction node through the business connection flow; the operation mode of the abnormal rollback process includes a preset rollback mode and a preset abnormal end mode; The abnormal rollback operation module is used to adjust the interface range of the business process interface packaged by the transaction node according to the number of abnormal process interfaces in the transaction node when an abnormality occurs in the transaction node, so as to obtain an adjusted transaction node; the abnormal process interface is used to indicate that an abnormality occurs in the business process interface; enter the abnormal rollback process, and perform a rollback operation according to the preset rollback method; The abnormal rollback end management module is used to end the abnormal rollback process according to a preset abnormal end method when the rollback operation is completed.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Flow processing method, device and equipment

    CN117273648A