CN111047134A - Flow rollback method and device, computer readable storage medium and electronic equipment - Google Patents

Flow rollback method and device, computer readable storage medium and electronic equipment Download PDF

Info

Publication number
CN111047134A
CN111047134A CN201910982810.4A CN201910982810A CN111047134A CN 111047134 A CN111047134 A CN 111047134A CN 201910982810 A CN201910982810 A CN 201910982810A CN 111047134 A CN111047134 A CN 111047134A
Authority
CN
China
Prior art keywords
node
flow
rollback
execution
executing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910982810.4A
Other languages
Chinese (zh)
Inventor
赵金辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beike Technology Co Ltd
Original Assignee
Beike Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN201910982810.4A priority Critical patent/CN111047134A/en
Publication of CN111047134A publication Critical patent/CN111047134A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0633Workflow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate
    • G06Q50/167Closing

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Educational Administration (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The embodiment of the disclosure discloses a flow rollback method and device, a computer readable storage medium and an electronic device, wherein the method comprises the following steps: acquiring execution state information of a process; in response to a first node executing in a process meeting a rollback condition, determining a second node corresponding to rollback operation based on the rollback condition; determining at least one third node corresponding to the fallback operation based on the second node; executing the rollback operation on the flow according to the second node, and rolling back the flow to the second node; re-executing the process from the second node, and updating execution result data corresponding to the first node, the second node and the at least one third node; the embodiment of the disclosure realizes automatic rollback according to the set rollback condition without manual operation, improves the rollback efficiency, avoids redundant data from being generated, and can directly respond to data change; the problem that the final result is wrong due to missing nodes is solved.

Description

Flow rollback method and device, computer readable storage medium and electronic equipment
Technical Field
The present disclosure relates to a process management technology, and in particular, to a process rollback method and apparatus, a computer-readable storage medium, and an electronic device.
Background
For a flow with long running time and complex links, once a certain node in the flow has a problem, serious consequences can be caused, and in the prior art, the problem of the flow node is usually solved by adopting a manual return reprocessing mode. For example, for a real estate transaction flow, a flow change due to a change in business occurs sometimes, the business change needs to follow up a link data change in the flow, and the transaction flow needs to be processed again because an affected link cannot be predicted, so that a large amount of labor consumption and unnecessary repeated data entry are caused.
Disclosure of Invention
The present disclosure is proposed to solve the above technical problems. The embodiment of the disclosure provides a flow rollback method and device, a computer-readable storage medium and an electronic device.
According to an aspect of the embodiments of the present disclosure, there is provided a flow rollback method, including:
acquiring execution state information of a process;
in response to that a first node executing in the process meets a rollback condition, determining a second node corresponding to rollback operation based on the rollback condition;
determining at least one third node corresponding to the fallback operation based on the second node;
executing the rollback operation on the flow according to the second node, and rolling back the flow to the second node;
and re-executing the process from the second node, and updating execution result data corresponding to the first node, the second node and the at least one third node.
Optionally, the determining, in response to that a first node executing in the flow satisfies a fallback condition, a second node corresponding to a fallback operation based on the fallback condition includes:
responding to the fact that execution result data of a first node executing in the process meets a preset condition, and determining a second node retreating to according to configuration information of the current node; or the like, or, alternatively,
in response to receiving a fallback request, a fallback to second node is determined according to the fallback request.
Optionally, the determining, based on the second node, at least one third node corresponding to the fallback operation includes:
acquiring all nodes passing from the second node to the first node in the flow as the at least one third node; and/or the presence of a gas in the gas,
and acquiring all nodes executed in all branches corresponding to the second node in the flow as the at least one third node.
Optionally, after determining, based on the second node, at least one third node corresponding to the fallback operation, the method further includes:
suspending execution of all nodes in the flow below the second node.
Optionally, the re-executing the process from the second node, and updating execution result data corresponding to the first node, the second node, and the at least one third node includes:
generating a flow execution task according to the second node, wherein the flow execution task comprises executing the first node, the second node and the at least one third node;
asynchronously executing the flow execution task;
and updating the execution result data corresponding to the first node, the second node and the at least one third node in response to the completion of the execution of the flow execution task.
Optionally, before asynchronously executing the flow execution task, the method further includes:
setting task completion degrees corresponding to each node in the flow execution task according to the number of the nodes included in the flow execution task;
the asynchronous execution of the flow execution task comprises:
executing the flow execution tasks in order from the second node to the first node and the at least one third node.
Optionally, the method further comprises:
and acquiring and displaying the task completion degree of the flow execution task on a front-end page through a query interface.
Optionally, the method further comprises:
and recording the rollback operation and the flow execution task.
According to another aspect of the embodiments of the present disclosure, there is provided a flow rollback apparatus, including:
the information acquisition module is used for acquiring the execution state information of the process;
a rollback determining module, configured to determine, in response to a first node executing in the process meeting a rollback condition, a second node corresponding to a rollback operation based on the rollback condition;
a node determining module, configured to determine, based on the second node, at least one third node corresponding to the fallback operation;
a rollback operation module, configured to execute the rollback operation on the flow according to the second node, so as to rollback the flow to the second node;
and the process updating module is used for re-executing the process from the second node and updating the execution result data corresponding to the first node, the second node and the at least one third node.
Optionally, the rollback determining module is specifically configured to determine, in response to that execution result data of a first node being executed in a process satisfies a preset condition, a second node to which a rollback is to be rolled back according to configuration information of a current node; or, in response to receiving a fallback request, determining a fallback to second node according to the fallback request.
Optionally, the node determining module is specifically configured to obtain all nodes passing through from the second node to the first node in the flow as the at least one third node; and/or acquiring all nodes executed in all branches corresponding to the second node in the flow as the at least one third node.
Optionally, the apparatus further comprises:
and the flow suspending module is used for suspending the execution of all nodes below the second node in the flow.
Optionally, the process updating module includes:
a task generating unit, configured to generate a flow execution task according to the second node, where the flow execution task includes executing the first node, the second node, and the at least one third node;
the asynchronous execution unit is used for asynchronously executing the flow execution task;
and the data updating unit is used for responding to the completion of the execution of the flow execution task and updating the execution result data corresponding to the first node, the second node and the at least one third node.
Optionally, the process updating module further includes:
the completion degree setting unit is used for setting task completion degrees corresponding to each node in the flow execution task according to the number of the nodes included in the flow execution task;
the asynchronous execution unit is specifically configured to execute the flow execution tasks in an order from the second node to the first node and the at least one third node.
Optionally, the asynchronous execution unit is further configured to obtain and display a task completion degree of the process execution task through a query interface on a front-end page.
Optionally, the apparatus further comprises:
and the recording module is used for recording the rollback operation and the flow execution task.
According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is configured to execute the flow rollback method according to any one of the embodiments.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the flow rollback method according to any one of the embodiments.
Based on the method and the device for process rollback, the computer-readable storage medium and the electronic device provided by the above embodiments of the present disclosure, the execution state information of the process is acquired; in response to a first node executing in a process meeting a rollback condition, determining a second node corresponding to rollback operation based on the rollback condition; determining at least one third node corresponding to the fallback operation based on the second node; executing the rollback operation on the flow according to the second node, and rolling back the flow to the second node; re-executing the process from the second node, and updating execution result data corresponding to the first node, the second node and the at least one third node; the embodiment of the disclosure realizes automatic rollback according to the set rollback condition without manual operation, improves the rollback efficiency, avoids redundant data from being generated, and can directly respond to data change; the nodes needing rollback and re-execution in the whole process are all executed by determining the second node starting rollback and the third node needing re-execution, so that the problem of final result errors caused by missing nodes is avoided.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a flowchart illustrating a flow rollback method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a flowchart rollback method according to another exemplary embodiment of the present disclosure.
FIG. 3 is a schematic flow chart of step 110 in the embodiment shown in FIG. 1 of the present disclosure.
FIG. 4 is another flow chart illustrating step 110 in the embodiment shown in FIG. 1 of the present disclosure.
Fig. 5 is a flowchart illustrating a flowchart rollback method according to another exemplary embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of a flow rollback apparatus according to an exemplary embodiment of the present disclosure.
Fig. 7 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.
Detailed Description
Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Summary of the application
In the process of implementing the present disclosure, the inventor finds that, in the prior art, the process rollback is based on manual judgment, and manual operation is performed to rollback, but the technical solution has at least the following problems: a large amount of manual participation is needed, the manpower is wasted, the efficiency is low, and the error rate is high.
Exemplary method
Fig. 1 is a flowchart illustrating a flow rollback method according to an exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device, as shown in fig. 1, and includes the following steps:
step 102, obtaining the execution state information of the process.
And step 104, in response to that the first node executing in the flow meets the rollback condition, determining a second node corresponding to the rollback operation based on the rollback condition.
The flow in this embodiment includes a plurality of nodes, an execution order exists between the nodes, and the flow may include at least one branch, for example, the flow may include a tree structure; the second node in this embodiment is executed before the first node, that is, the first node can be executed only after the second node needs to be executed in the process, and therefore, when the first node needs to be rolled back, the first node is rolled back to the second node.
And 106, determining at least one third node corresponding to the rollback operation based on the second node.
In some alternative embodiments, the third node may be all nodes that have executed as a result of utilizing the second node and that have executed when the flow is executed to the first node.
And 108, executing a rollback operation on the process according to the second node, so that the process is rolled back to the second node.
In this embodiment, the position of the second node to be returned is already determined, and at this time, returning the execution of the process to the second node can complete the returning operation, thereby implementing automatic returning.
And step 110, re-executing the process from the second node, and updating the execution result data corresponding to the first node, the second node and at least one third node.
After the execution rollback, the previously obtained execution result data of the first node, the second node, and all the third nodes are all invalidated, at this time, the execution result data of the new first node, the new second node, and all the third nodes are obtained based on the result of the re-execution flow, and the new execution result data are updated to the corresponding nodes.
The flow rollback method provided by the above embodiment of the present disclosure obtains execution state information of a flow; in response to that a first node executing in the process meets a rollback condition, determining a second node corresponding to rollback operation based on the rollback condition; determining at least one third node corresponding to the rollback operation based on the second node; executing a rollback operation on the process according to the second node, and enabling the process to roll back to the second node; re-executing the flow from the second node, and updating execution result data corresponding to the first node, the second node and at least one third node; the embodiment of the disclosure realizes automatic rollback according to the set rollback condition without manual operation, improves the rollback efficiency, avoids redundant data from being generated, and can directly respond to data change; the nodes needing rollback and re-execution in the whole process are all executed by determining the second node starting rollback and the third node needing re-execution, so that the problem of final result errors caused by missing nodes is avoided.
In some alternative embodiments, step 104 may include:
responding to the fact that execution result data of a first node executing in the process meets a preset condition, and determining a second node retreating to according to configuration information of the current node; or the like, or, alternatively,
in response to receiving the fallback request, a second node to fallback to is determined according to the fallback request.
Two fallback conditions are proposed in this embodiment: when execution result data of a first node meets a preset condition, determining a second node according to rollback information configured in the first node; another is according to an external request, for example, when executing to a first node, there is data change in the executed flow node, and at this time, a second node that needs to be fallback to may be determined according to the fallback request.
In some alternative embodiments, step 106 may include:
acquiring all nodes passing from a second node to a first node in a flow as at least one third node; and/or the presence of a gas in the gas,
and acquiring all executed nodes of the second node in all branches corresponding to the flow as at least one third node.
Optionally, the second node may be directly connected to the first node, that is, the first node is directly executed after the second node is executed, but the second node may include other branches (in addition to being connected to the first node), where a parent node (second node) in the tree structure corresponds to at least two child nodes (one of the child nodes is the first node), and at this time, an executed node corresponding to the other branch is a third node; or, the second node is indirectly connected to the first node, that is, the second node is connected to the first node through at least one intermediate node, at this time, the intermediate nodes are third nodes, and at this time, the second node may also include other branches, and at this time, executed nodes corresponding to the other branches are also third nodes.
Fig. 2 is a flowchart illustrating a flowchart rollback method according to another exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device, as shown in fig. 2, and includes the following steps:
step 102, obtaining the execution state information of the process.
And step 104, in response to that the first node executing in the flow meets the rollback condition, determining a second node corresponding to the rollback operation based on the rollback condition.
And 106, determining at least one third node corresponding to the rollback operation based on the second node.
Step 207, suspend all nodes below the second node in the execution flow.
And 108, executing a rollback operation on the process according to the second node, so that the process is rolled back to the second node.
And step 110, re-executing the process from the second node, and updating the execution result data corresponding to the first node, the second node and at least one third node.
In this embodiment, since it is determined that rollback needs to be executed and nodes below the second node are re-executed, in order to improve the efficiency of process flow processing and avoid generating redundant data, the present embodiment needs to suspend the execution of the nodes in the process flow after determining the nodes (including the first node, the second node, and all the third nodes) that need to be rolled back.
As shown in fig. 3, based on the embodiment shown in fig. 1, step 110 may include the following steps:
step 1102, executing the task according to the second node generation flow.
The process execution task comprises executing a first node, a second node and at least one third node.
And step 1104, asynchronously executing the flow execution task.
The asynchronous execution flow executes the task, can check the current execution progress in real time, and avoids the defect that a user cannot know the task execution progress in the waiting process.
Step 1106, updating the execution result data corresponding to the first node, the second node and the at least one third node in response to the completion of the execution of the flow execution task.
After executing the rollback operation, the current process of the flow is executed to the second node, and nodes below the second node need to be re-executed.
In some optional embodiments, in the embodiment shown in fig. 3, before step 1084, the method may further include:
judging whether the flow meets the execution condition, if so, asynchronously executing the flow to execute the task; otherwise, the execution of the flow is ended.
The embodiment mainly aims at the emergency situation in the process of executing the flow, for example, the flow is determined to terminate the execution due to data or user factors, at this time, the flow is not executed any more, that is, the flow does not meet the execution condition; the process execution task is executed asynchronously only if the process needs to continue execution.
As shown in fig. 4, based on the embodiment shown in fig. 1, step 110 may further include the following steps:
step 1102, executing the task according to the second node generation flow.
The process execution task comprises executing a first node, a second node and at least one third node.
Step 1103, setting task completion corresponding to each node in the flow execution task according to the number of nodes included in the flow execution task.
And 1104, executing the flow execution tasks in the sequence from the second node to the first node and the at least one third node.
Step 1106, updating the execution result data corresponding to the first node, the second node and the at least one third node in response to the completion of the execution of the flow execution task.
In this embodiment, in order to more intuitively view the task execution progress at the front end in the asynchronous execution process, before the asynchronous execution process executes the task, the task completion degree corresponding to each node is determined according to the number of nodes included in the process execution task, for example, when the process execution task includes 5 nodes, the task completion degree advances by 20% every time one node is executed, that is, when the second node is executed, the front end displays the task completion degree as 20%, and when a third node is executed again, the front end displays the task completion degree as 40%.
Optionally, in the embodiment provided in fig. 4, while the step 1104 executes the flow execution task, the step may further include:
and acquiring and displaying the task completion degree of the flow execution task on the front-end page through the query interface.
In the embodiment, the task completion degree of the flow execution task in the execution process is synchronously displayed to the front-end page through the query interface so as to be checked by the user, and the problem that the task completion degree cannot be checked by the user is avoided.
Fig. 5 is a flowchart illustrating a flowchart rollback method according to another exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device, as shown in fig. 5, and includes the following steps:
step 102, obtaining the execution state information of the process.
And step 104, in response to that the first node executing in the flow meets the rollback condition, determining a second node corresponding to the rollback operation based on the rollback condition.
And 106, determining at least one third node corresponding to the rollback operation based on the second node.
And 108, executing a rollback operation on the process according to the second node, so that the process is rolled back to the second node.
And step 110, re-executing the process from the second node, and updating the execution result data corresponding to the first node, the second node and at least one third node.
And step 512, recording rollback operation and flow execution tasks.
In this embodiment, after the rollback operation and the flow execution task are executed, in order to summarize problems that easily occur in the flow or the number of times of flow rollback and the like later, the rollback operation and the flow execution task are recorded, and when similar problems occur in subsequent flows, the stored records may be referred to for processing, or a certain type of flow often occurs to be summarized, and the type of flow may be modified by referring to the records, so as to improve the flow executability.
Any of the process rollback methods provided by the embodiments of the present disclosure may be executed by any suitable device having data processing capabilities, including but not limited to: terminal equipment, a server and the like. Alternatively, any of the flow rollback methods provided by the embodiments of the present disclosure may be executed by a processor, for example, the processor may execute any of the flow rollback methods mentioned in the embodiments of the present disclosure by calling a corresponding instruction stored in a memory. And will not be described in detail below.
Exemplary devices
Fig. 6 is a schematic structural diagram of a flow rollback apparatus according to an exemplary embodiment of the present disclosure. As shown in fig. 6, the present embodiment includes:
and an information obtaining module 61, configured to obtain execution state information of the flow.
And a fallback determining module 62, configured to determine, in response to that a first node executing in the flow satisfies a fallback condition, a second node corresponding to a fallback operation based on the fallback condition.
A node determining module 63, configured to determine, based on the second node, at least one third node corresponding to the fallback operation.
And a rollback operation module 64, configured to execute a rollback operation on the flow according to the second node, so that the flow is rolled back to the second node.
And a process updating module 65, configured to re-execute the process from the second node, and update execution result data corresponding to the first node, the second node, and the at least one third node.
The flow rollback device provided by the above embodiment of the present disclosure acquires execution state information of a flow; in response to that a first node executing in the process meets a rollback condition, determining a second node corresponding to rollback operation based on the rollback condition; determining at least one third node corresponding to the rollback operation based on the second node; executing a rollback operation on the process according to the second node, and enabling the process to roll back to the second node; re-executing the flow from the second node, and updating execution result data corresponding to the first node, the second node and at least one third node; the embodiment of the disclosure realizes automatic rollback according to the set rollback condition without manual operation, improves the rollback efficiency, avoids redundant data from being generated, and can directly respond to data change; the nodes needing rollback and re-execution in the whole process are all executed by determining the second node starting rollback and the third node needing re-execution, so that the problem of final result errors caused by missing nodes is avoided.
Optionally, the fallback determining module 62 is specifically configured to determine, in response to that execution result data of the first node executing in the process meets a preset condition, a fallback second node according to configuration information of the current node; or, in response to receiving the fallback request, determining a second node to fallback to according to the fallback request.
Optionally, the node determining module 63 is specifically configured to obtain all nodes passing from the second node to the first node in the flow as at least one third node; and/or acquiring all executed nodes in all branches corresponding to the second node in the flow as at least one third node.
In some optional embodiments, the apparatus provided in this embodiment further includes:
and the flow suspending module is used for suspending all nodes below the second node in the execution flow.
In this embodiment, since it is determined that rollback needs to be executed and nodes below the second node are re-executed, in order to improve the efficiency of process flow processing and avoid generating redundant data, the present embodiment needs to suspend the execution of the nodes in the process flow after determining the nodes (including the first node, the second node, and all the third nodes) that need to be rolled back.
In some optional embodiments, the flow updating module 65 includes:
the task generating unit is used for generating a flow execution task according to the second node, and the flow execution task comprises a first node, a second node and at least one third node;
the asynchronous execution unit is used for asynchronously executing the flow execution task;
and the data updating unit is used for responding to the completion of the execution of the flow execution task and updating the execution result data corresponding to the first node, the second node and the at least one third node.
After executing the rollback operation, the current process of the flow is executed to the second node, and nodes below the second node need to be re-executed.
Optionally, the flow updating module 65 further includes:
the flow judgment unit is used for judging whether the flow meets the execution condition or not, and if so, the flow execution task is executed asynchronously; otherwise, the execution of the flow is ended.
Optionally, the flow updating module 65 further includes:
the completion degree setting unit is used for setting task completion degrees corresponding to each node in the flow execution tasks according to the number of the nodes included in the flow execution tasks;
and the asynchronous execution unit is specifically used for executing the flow execution tasks according to the sequence from the second node to the first node and the at least one third node.
Optionally, the asynchronous execution unit is further configured to obtain and display a task completion degree of the flow execution task through the query interface on the front-end page.
Optionally, the apparatus provided in this embodiment further includes:
and the recording module is used for recording the rollback operation and the flow execution task.
Exemplary electronic device
Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 7. The electronic device may be either or both of the first device 100 and the second device 200, or a stand-alone device separate from them that may communicate with the first device and the second device to receive the collected input signals therefrom.
FIG. 7 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.
As shown in fig. 7, the electronic device 70 includes one or more processors 71 and a memory 72.
The processor 71 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 70 to perform desired functions.
Memory 72 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by the processor 71 to implement the flow rollback methods of the various embodiments of the present disclosure described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 70 may further include: an input device 73 and an output device 74, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, when the electronic device is the first device 100 or the second device 200, the input device 73 may be a microphone or a microphone array as described above for capturing an input signal of a sound source. When the electronic device is a stand-alone device, the input means 73 may be a communication network connector for receiving the acquired input signals from the first device 100 and the second device 200.
The input device 73 may also include, for example, a keyboard, a mouse, and the like.
The output device 74 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 74 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device 70 relevant to the present disclosure are shown in fig. 7, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device 70 may include any other suitable components, depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in a flow rollback method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a flow rollback method according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A method for flow rollback, comprising:
acquiring execution state information of a process;
in response to that a first node executing in the process meets a rollback condition, determining a second node corresponding to rollback operation based on the rollback condition;
determining at least one third node corresponding to the fallback operation based on the second node;
executing the rollback operation on the flow according to the second node, and rolling back the flow to the second node;
and re-executing the process from the second node, and updating execution result data corresponding to the first node, the second node and the at least one third node.
2. The method of claim 1, wherein, in response to a first node executing in the flow meeting a fallback condition, determining a second node corresponding to a fallback operation based on the fallback condition comprises:
responding to the fact that execution result data of a first node executing in the process meets a preset condition, and determining a second node retreating to according to configuration information of the current node; or the like, or, alternatively,
in response to receiving a fallback request, a fallback to second node is determined according to the fallback request.
3. The method according to claim 1 or 2, wherein the determining, based on the second node, at least one third node corresponding to the fallback operation comprises:
acquiring all nodes passing from the second node to the first node in the flow as the at least one third node; and/or the presence of a gas in the gas,
and acquiring all nodes executed in all branches corresponding to the second node in the flow as the at least one third node.
4. The method according to any of claims 1-3, further comprising, after determining at least one third node corresponding to the fallback operation based on the second node:
suspending execution of all nodes in the flow below the second node.
5. The method according to any of claims 1-4, wherein said re-executing said process from said second node and updating execution result data corresponding to said first node, said second node and said at least one third node comprises:
generating a flow execution task according to the second node, wherein the flow execution task comprises executing the first node, the second node and the at least one third node;
asynchronously executing the flow execution task;
and updating the execution result data corresponding to the first node, the second node and the at least one third node in response to the completion of the execution of the flow execution task.
6. The method of claim 5, further comprising, prior to asynchronously executing the flow execution task:
setting task completion degrees corresponding to each node in the flow execution task according to the number of the nodes included in the flow execution task;
the asynchronous execution of the flow execution task comprises:
executing the flow execution tasks in order from the second node to the first node and the at least one third node.
7. The method of claim 6, further comprising:
and acquiring and displaying the task completion degree of the flow execution task on a front-end page through a query interface.
8. A process rollback apparatus, comprising:
the information acquisition module is used for acquiring the execution state information of the process;
a rollback determining module, configured to determine, in response to a first node executing in the process meeting a rollback condition, a second node corresponding to a rollback operation based on the rollback condition;
a node determining module, configured to determine, based on the second node, at least one third node corresponding to the fallback operation;
a rollback operation module, configured to execute the rollback operation on the flow according to the second node, so as to rollback the flow to the second node;
and the process updating module is used for re-executing the process from the second node and updating the execution result data corresponding to the first node, the second node and the at least one third node.
9. A computer-readable storage medium, wherein the storage medium stores a computer program for executing the process rollback method according to any one of claims 1-7.
10. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the process rollback method of any one of claims 1-7.
CN201910982810.4A 2019-10-16 2019-10-16 Flow rollback method and device, computer readable storage medium and electronic equipment Pending CN111047134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910982810.4A CN111047134A (en) 2019-10-16 2019-10-16 Flow rollback method and device, computer readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910982810.4A CN111047134A (en) 2019-10-16 2019-10-16 Flow rollback method and device, computer readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111047134A true CN111047134A (en) 2020-04-21

Family

ID=70232578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910982810.4A Pending CN111047134A (en) 2019-10-16 2019-10-16 Flow rollback method and device, computer readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111047134A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023231722A1 (en) * 2022-05-31 2023-12-07 中兴通讯股份有限公司 Information transmission method and apparatus, and storage medium and electronic apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714414A (en) * 2013-11-30 2014-04-09 北京科东电力控制系统有限责任公司 Process node returning method used for intelligent power grid dispatching
US20190007278A1 (en) * 2017-06-30 2019-01-03 Microsoft Technology Licensing, Llc Determining an optimal timeout value to minimize downtime for nodes in a network-accessible server set
CN109670686A (en) * 2018-12-05 2019-04-23 泰康保险集团股份有限公司 Construct method, equipment and the business process management system of operation flow template

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714414A (en) * 2013-11-30 2014-04-09 北京科东电力控制系统有限责任公司 Process node returning method used for intelligent power grid dispatching
US20190007278A1 (en) * 2017-06-30 2019-01-03 Microsoft Technology Licensing, Llc Determining an optimal timeout value to minimize downtime for nodes in a network-accessible server set
CN109670686A (en) * 2018-12-05 2019-04-23 泰康保险集团股份有限公司 Construct method, equipment and the business process management system of operation flow template

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王家乐 等: "《软件项目管理实验指导》", 7 September 2013, 浙江工商大学出版社, pages: 41 - 42 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023231722A1 (en) * 2022-05-31 2023-12-07 中兴通讯股份有限公司 Information transmission method and apparatus, and storage medium and electronic apparatus

Similar Documents

Publication Publication Date Title
JP6602435B2 (en) Parallel execution of continuous event processing (CEP) queries
US11269705B2 (en) Method and apparatus for outputting information
US10970200B2 (en) Test result triage for a failed code validation
CN111427915B (en) Information processing method and device, storage medium and electronic equipment
US20130124971A1 (en) Real time web script refresh using asynchronous polling without full web page reload
CN110704273B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN111047134A (en) Flow rollback method and device, computer readable storage medium and electronic equipment
CN113962597A (en) Data analysis method and device, electronic equipment and storage medium
Bakri et al. The formal specification for the inventory system using Z language
CN112445860B (en) Method and device for processing distributed transaction
CN114697398B (en) Data processing method, device, electronic equipment, storage medium and product
CN111176987A (en) Method and device for uniformly outputting front-end log, computer equipment and storage medium
CN111078764A (en) Data processing method and device, computer readable storage medium and electronic equipment
CN111176944A (en) Block chain intelligent contract calling record analysis method, device, terminal and storage medium
CN111144804A (en) Order processing method, device and system
US20190179932A1 (en) Tracking and reusing function results
CN113656239A (en) Monitoring method and device for middleware and computer program product
US10289836B1 (en) Webpage integrity monitoring
CN113051135A (en) Application thread pool monitoring method and thread pool monitoring device
CN113992750A (en) Global transaction coordination method, device, equipment and medium
CN111046028A (en) Time sequence correction method and device, readable storage medium and electronic equipment
US10133758B2 (en) Cell-based database management system
US9280441B2 (en) Detection and correction of race conditions in workflows
CN115344585B (en) Data version management method and device, storage medium and electronic equipment
US20240036861A1 (en) Automatic generation of interfaces for optimizing codebases

Legal Events

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