CN116991547A - Transaction execution method, device, terminal equipment and storage medium based on sub-transaction - Google Patents

Transaction execution method, device, terminal equipment and storage medium based on sub-transaction Download PDF

Info

Publication number
CN116991547A
CN116991547A CN202310908554.0A CN202310908554A CN116991547A CN 116991547 A CN116991547 A CN 116991547A CN 202310908554 A CN202310908554 A CN 202310908554A CN 116991547 A CN116991547 A CN 116991547A
Authority
CN
China
Prior art keywords
node
transaction
function
sub
execution
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
CN202310908554.0A
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.)
Haoyun Technologies Co Ltd
Original Assignee
Haoyun Technologies 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 Haoyun Technologies Co Ltd filed Critical Haoyun Technologies Co Ltd
Priority to CN202310908554.0A priority Critical patent/CN116991547A/en
Publication of CN116991547A publication Critical patent/CN116991547A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a transaction execution method, a device, a terminal device and a storage medium based on sub-transactions, which comprise the following steps: through the configuration interface of the function chain, a user can arrange the execution sequence of each function node and divide sub-transactions according to specific requirements to generate a function chain to be executed; in the process of executing the function chain through the main transaction, the execution of the whole function chain can be realized by judging whether the current function node belongs to the function node of the sub-transaction, and when all the function nodes in the target main transaction are executed, all the execution results in the main transaction are submitted. The invention can output all the execution results without waiting for all the functional nodes of the main transaction to be successfully executed, so that the execution results of the sub transactions can be timely output, and the invention can avoid the situation of blocking and the like in the execution process of the main transaction with the multifunctional node as much as possible, thereby reducing the waste of process resource expenditure to a certain extent.

Description

Transaction execution method, device, terminal equipment and storage medium based on sub-transaction
Technical Field
The present invention relates to the field of transaction processing technologies, and in particular, to a transaction execution method, apparatus, terminal device, and storage medium based on sub-transactions.
Background
All functional nodes in a service operation link in the current system need to share a main transaction, and after all functional nodes in the service operation return results, the transaction completion results of all functional nodes are submitted together to complete the execution of the main transaction. When a functional chain with a longer link needs to be executed, if a main transaction is adopted to execute each functional node in the functional chain one by one, all the functional nodes of the main transaction need to be successfully executed and then all execution results are output, and the execution results corresponding to each functional node cannot be timely output due to the adoption of the scheme in the prior art, and the problem of blocking, deadlock or lock competition of the main transaction with the multifunctional node in the execution process can be caused, so that the resource waste of the execution process is caused.
Disclosure of Invention
The embodiment of the invention provides a transaction execution method, a device, a terminal device and a storage medium based on sub-transactions, which can effectively solve the problems that in the prior art, execution results corresponding to all functional nodes cannot be output in time and a main transaction with a multifunctional node is blocked, deadlocked or locked in the execution process possibly to compete, so that the resource waste of an execution process is caused.
An embodiment of the present invention provides a transaction execution method based on sub-transactions, including:
generating a configuration interface for indicating a function chain corresponding to the transaction execution; the configuration interface comprises: a function node selection area and a function chain editing interface; the function node selected area is provided with a plurality of function nodes; the function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed;
responding to the function node selection operation of the user in the function node selection area, and acquiring each selected function node;
responding to node editing operation of a user in the function chain editing interface, and generating a corresponding function chain; wherein the node editing operation includes: selecting a plurality of function nodes from the selected function nodes, dragging the function nodes into a child transaction canvas container, and connecting the function nodes;
analyzing the functional chain to generate an analysis result;
establishing a main transaction according to the analysis result, then executing each function node in the function chain one by one, and when judging that the current function node does not belong to the function node of the sub transaction and the execution of the business operation is not indicated to be completed, feeding back the corresponding execution result to the main transaction after the current function node is executed, and continuing to acquire the next function node; when judging that the current functional node belongs to the functional node of the sub-transaction, if judging that the current functional node is not used for indicating the completion of the execution of the business operation, directly executing the current functional node and continuously acquiring the next functional node, and if judging that the current functional node is used for indicating the completion of the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the execution of the current functional node and feeding back the execution result corresponding to the sub-transaction to the main transaction, and continuously acquiring the next functional node;
and submitting all execution results in the main transaction when all the functional nodes are detected to be executed.
Preferably, the parsing the functional chain to generate a parsing result includes:
analyzing the functional chain to obtain the circulation direction of the functional chain and the operation parameters of each functional node in the functional chain;
and generating an analysis result corresponding to the function chain according to the circulation direction of the function chain and the operation parameters of each function node in the function chain.
Preferably, the functional node includes:
a start node for indicating to start performing a business operation, an end node for indicating to end the performance of the business operation, and a business node for indicating the business operation.
Preferably, the selecting a plurality of function nodes from the selected function nodes to drag into the sub-transaction canvas container includes:
at least a start node, an end node and a service node are selected from the selected function nodes, and dragged into the child transaction canvas container.
Preferably, when the current function node is judged to belong to a function node of a sub-transaction, if the current function node is judged not to be used for indicating that the execution of the business operation is completed, the current function node is directly executed and the next function node is continuously acquired, and if the current function node is judged to be used for indicating that the execution of the business operation is completed, after the current function node is executed, an execution result corresponding to the sub-transaction is submitted and fed back to the main transaction, and the next function node is continuously acquired, including:
when judging that the current functional node belongs to the functional node of the sub-transaction, then judging whether the current functional node is a starting node, an ending node or a service node;
if the current functional node is judged to be a starting node for indicating to start executing business operation, acquiring current context information in a main transaction, after the current functional node is executed, then acquiring a next functional node, and transmitting the current context information in the main transaction to the next functional node;
if the current functional node is judged to be the service node for indicating the service operation, directly executing the service operation corresponding to the service node, and then acquiring the next functional node;
if the current functional node is judged to be the ending node for indicating the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the current functional node is executed, and feeding back the execution result of the sub-transaction and the current context information corresponding to the sub-transaction to the main transaction, so as to acquire the next functional node.
Preferably, when it is detected that all the functional nodes have been executed, submitting all the execution results in the main transaction, including:
when the current functional node is detected not to belong to the functional node of the sub-transaction and is the ending node, all the functional nodes of the functional chain are considered to be executed, and all execution results in the main transaction are submitted.
Preferably, the method further comprises:
when the current functional node is detected to be not a functional node of the sub-transaction and is a service node, if the current functional node is interrupted in the execution process, interrupting the execution process of the main transaction;
and taking an execution result corresponding to the sub-transaction which is already executed as a result of the current execution of the main transaction.
On the basis of the method embodiment, the invention correspondingly provides the device item embodiment.
An embodiment of the present invention provides a transaction execution device based on sub-transactions, including: the system comprises a function chain generation module, a function chain analysis module, a function chain execution module and an execution result submitting module;
the function chain generation module is used for generating a configuration interface for indicating the function chain corresponding to the transaction execution; the configuration interface comprises: a function node selection area and a function chain editing interface; the function node selected area is provided with a plurality of function nodes; the function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed; responding to the function node selection operation of the user in the function node selection area, and acquiring each selected function node; responding to node editing operation of a user in the function chain editing interface, and generating a corresponding function chain; wherein the node editing operation includes: selecting a plurality of function nodes from the selected function nodes, dragging the function nodes into a child transaction canvas container, and connecting the function nodes;
the function chain analysis module is used for analyzing the function chain and generating an analysis result;
the function chain execution module is used for establishing a main transaction according to the analysis result, then executing each function node in the function chain one by one, and when judging that the current function node does not belong to the function node of the sub transaction and the execution of the business operation is not indicated to be completed, feeding back the corresponding execution result to the main transaction after the current function node is executed, and continuing to acquire the next function node; when judging that the current functional node belongs to the functional node of the sub-transaction, if judging that the current functional node is not used for indicating the completion of the execution of the business operation, directly executing the current functional node and continuously acquiring the next functional node, and if judging that the current functional node is used for indicating the completion of the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the execution of the current functional node and feeding back the execution result corresponding to the sub-transaction to the main transaction, and continuously acquiring the next functional node;
and the execution result submitting module is used for submitting all the execution results in the main transaction when all the functional nodes are detected to be executed.
Based on the method embodiment, the invention correspondingly provides the terminal equipment item embodiment.
Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements a transaction execution method based on sub-transactions according to the embodiment of the present invention when the processor executes the computer program.
Based on the method embodiments described above, the present invention correspondingly provides storage medium item embodiments.
Another embodiment of the present invention provides a storage medium, where the storage medium includes a stored computer program, and when the computer program runs, the device where the storage medium is controlled to execute a transaction execution method based on a sub-transaction according to the embodiment of the present invention.
The invention has the following beneficial effects:
the embodiment of the invention provides a transaction execution method, a device, a terminal device and a storage medium based on sub-transactions, which can enable a user to arrange the execution sequence of each function node according to specific requirements through a configuration interface of a function chain so as to generate the function chain to be executed after the sub-transactions are divided; in the process of executing the function chain through the main transaction, the execution of the whole function chain can be realized by judging whether the current function node belongs to the function node of the sub transaction, namely when judging that the current function node belongs to the function node of the sub transaction, if judging that the current function node is not used for indicating the execution of the completion service operation, directly executing the current function node and continuously acquiring the next function node, if judging that the current function node is used for indicating the execution of the completion service operation, submitting an execution result corresponding to the sub transaction after the current function node is executed and feeding back the execution result corresponding to the sub transaction to the main transaction, and continuously acquiring the next function node, namely, submitting the execution result corresponding to the sub transaction without waiting for each function node of the main transaction to complete; when judging that the current functional node is a common functional node of a non-sub transaction, feeding back a corresponding execution result to the main transaction; and submitting all execution results in the main transaction when all the functional nodes in the target main transaction are executed. Compared with the prior art, the method has the advantages that the function chain is divided into the plurality of sub-transactions, and the corresponding execution results are directly submitted after the sub-transactions are completed to execute the main transaction with a longer link, so that all the execution results are output without waiting for all the function nodes of the main transaction to be successfully executed, and the execution results of the sub-transactions can be output in time partially.
Drawings
Fig. 1 is a flow chart of a transaction execution method based on a sub-transaction according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a functional chain according to an embodiment of the present invention.
FIG. 3 is a diagram of context linking of sub-transaction execution provided by an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a transaction execution device based on a sub-transaction according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 is a schematic flow chart of a transaction execution method based on sub-transactions according to an embodiment of the present invention; the embodiment of the invention provides a transaction execution method based on sub-transactions, which comprises the following steps:
step S1: generating a configuration interface for indicating a function chain corresponding to the transaction execution; the configuration interface comprises: a function node selection area and a function chain editing interface; the function node selected area is provided with a plurality of function nodes; the function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed;
step S2: responding to the function node selection operation of the user in the function node selection area, and acquiring each selected function node;
step S3: responding to node editing operation of a user in the function chain editing interface, and generating a corresponding function chain; wherein the node editing operation includes: selecting a plurality of function nodes from the selected function nodes, dragging the function nodes into a child transaction canvas container, and connecting the function nodes;
step S4: analyzing the functional chain to generate an analysis result;
step S5: establishing a main transaction according to the analysis result, then executing each function node in the function chain one by one, and when judging that the current function node does not belong to the function node of the sub transaction and the execution of the business operation is not indicated to be completed, feeding back the corresponding execution result to the main transaction after the current function node is executed, and continuing to acquire the next function node; when judging that the current functional node belongs to the functional node of the sub-transaction, if judging that the current functional node is not used for indicating the completion of the execution of the business operation, directly executing the current functional node and continuously acquiring the next functional node, and if judging that the current functional node is used for indicating the completion of the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the execution of the current functional node and feeding back the execution result corresponding to the sub-transaction to the main transaction, and continuously acquiring the next functional node;
step S6: and submitting all execution results in the main transaction when all the functional nodes are detected to be executed.
For step S1, in a preferred embodiment, the configuration interface includes a function node selection area and a function chain editing interface; a plurality of function nodes are arranged in the function node selected area;
wherein each function node is divided into 3 kinds of function nodes including a start node for instructing to start execution of a service operation, an end node for instructing to end execution of the service operation, and a service node for instructing to the service operation.
The function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed; wherein each sub-transaction canvas container comprises at least a start node, an end node and a service node, and the service node is between the start node and the end node, so that a complete sub-function chain exists in the sub-transaction canvas container, and a sub-function chain comprises at least a start node, a service node and an end node.
In a preferred embodiment, the child transaction container is a canvas container having a closed boundary and into which nodes can be dragged, which is used to delineate the boundary and accommodate concurrently executing nodes.
It should be noted that, if the ending node is in the child transaction canvas container, the ending node is used for indicating the execution of the ending service operation, that is, indicating the completion and submission of the child transaction; if the end node is not in the child transaction canvas container, but at the end of the function chain, it is used to indicate the completion and commit of the main transaction.
For step S2, in a preferred embodiment, in response to a user selecting a function node in the function node selecting area, for example, clicking or dragging, the present invention obtains a function node selected by the user, and displays the selected function node in the function chain editing interface;
further, for step S3, in a preferred embodiment, a corresponding function chain is generated in response to a node editing operation of the user in the function chain editing interface; as shown in fig. 2, each circle represents a functional node, and the functional nodes include a start node, an end node and a service node for indicating service operation, and as shown in fig. 2, the query, update and new addition all belong to the service node for indicating service operation; illustratively, in a sub-transaction container, the service node that is the sub-transaction is updated.
The node editing operation comprises the steps of selecting a plurality of function nodes from the selected function nodes to drag the function nodes into a sub-transaction canvas container so as to generate sub-transactions; the node editing operation further includes connecting the respective function nodes to generate corresponding function chains.
The invention can make the user edit the function chains according to the actual demands through the visualized function chain editing interface, such as the sequence of each function node and whether to execute certain function nodes as sub-transactions, so that when the main transaction executes the function chains in the follow-up process, if detecting that some service nodes belong to the sub-transactions, the execution results corresponding to the service operations can be submitted to the database for updating after the sub-transactions are executed, and the execution results are not submitted to the database for updating after all the function chains of the main transaction are executed.
In a preferred embodiment, the functional chain of the present invention may be a rule chain, which is composed of a plurality of functional nodes, and the functional nodes as service nodes represent an independent service function or task, and the plurality of functional nodes are combined together according to a specific sequence to form a complete functional chain including a start and an end. The operation parameters of each function node are defined when the ApbDSL is rendered, and different nodes are different according to different operation parameters of the implemented service functions, so that when the corresponding function chain is acquired, the function chain to be executed needs to be analyzed, and then the transaction is built to execute the function chain.
For step S4, in a preferred embodiment, the function chain parses to generate a parsing result, including:
analyzing the functional chain to obtain the circulation direction of the functional chain and the operation parameters of each functional node in the functional chain;
and generating an analysis result corresponding to the function chain according to the circulation direction of the function chain and the operation parameters of each function node in the function chain.
Specifically, the invention obtains all the function nodes and the circulation directions of the function nodes by analyzing the ApbDSL, and then checks and prepares operation resources, namely obtains the operation parameters of each function node by requesting to obtain and analyze the ApbDSL, thereby generating an analysis result corresponding to the function chain according to the circulation direction of the function chain and the operation parameters of each function node in the function chain.
For step S5, in a preferred embodiment, a master transaction is established according to the parsing result, so that in the master transaction, each function node in the function chain is acquired one by one, and the type of the function node is determined one by one, and then corresponding execution is performed;
specifically, when the current functional node is judged not to belong to the functional node of the sub-transaction and the execution of the service operation is not instructed, feeding back a corresponding execution result to the main transaction after the current functional node is executed, and continuing to acquire the next functional node; when the current functional node does not belong to the functional node of the sub-transaction and does not indicate that the execution of the service operation is completed, the functional node may be a starting node or a common service node which does not belong to the sub-transaction;
when judging that the current functional node belongs to the functional node of the sub-transaction, then judging whether the current functional node is a starting node, an ending node or a service node; when judging that the current functional node belongs to the functional node in the sub-transaction, judging whether the current functional node is the start of the sub-transaction, or the business operation (such as updating business) of the sub-transaction, or judging whether the current functional node is the end node in the sub-transaction;
specifically, in a preferred embodiment, if it is determined that the current functional node is a start node for indicating to start executing a service operation, as shown in fig. 3, the current context information in the main transaction is first copied, and after the sub transaction is established, a corresponding sub-functional chain is executed in the sub-transaction, that is, the current context information in the main transaction is copied to the sub-functional chain of the current sub-transaction, and each node of the sub-functional chain is executed in sequence; after the starting node of the current function is executed, a next function node is then acquired, and the current context information in the main transaction is transmitted to the next function node, so that the next function node can execute according to the context information of the main transaction; illustratively, the service operation node is generally located behind the start node, such as updating, deleting, searching, adding, etc. the database;
if the current functional node is a service node for indicating service operation, directly executing the service operation corresponding to the service node, such as adding, deleting, modifying and checking a database, and the like, and then acquiring the next functional node;
if the current functional node is judged to be the ending node for indicating the execution of the business operation, after the current ending functional node is executed, submitting an execution result corresponding to the sub-transaction, feeding back the execution result of the sub-transaction and the current context information corresponding to the sub-transaction to the main transaction, and then acquiring the next functional node.
After the current end function node is executed, the execution result corresponding to the sub-transaction is submitted, as shown in fig. 2, if the update service in the sub-transaction container is executed, the updated result is fed back to the database at the moment, and the updated result is fed back to the database to update the database without waiting for the execution of the newly added service operation of the function chain, but based on the division of the sub-transaction, the result corresponding to the sub-transaction can be timely output.
For step S6, in a preferred embodiment, when it is detected that all the functional nodes have been executed, all the execution results in the master transaction are submitted, which specifically includes:
when the current functional node is detected not to belong to the functional node of the sub-transaction and is the ending node, all the functional nodes of the functional chain are considered to be executed, and all execution results in the main transaction are submitted.
It should be noted that, before the execution result of the main transaction is submitted, if there is a sub-transaction in front, the execution result of the corresponding sub-transaction is already submitted.
In a preferred embodiment, when it is detected that a function node does not belong to a function node of a sub-transaction and is a service node, if the current function node interrupts the execution process, the current execution process of the main transaction is interrupted, and an execution result corresponding to the sub-transaction that has been executed is used as a result of the current execution of the main transaction.
In a preferred embodiment, as shown in fig. 2, if a new service node is detected after the execution of a new service in a sub-transaction, the new service node is continuously executed, if an error or an interruption is detected in the new service node, it is indicated that the main transaction cannot smoothly complete the execution of the current function chain, but the execution result of the new service in the sub-transaction can be submitted to the database for refreshing without being influenced by the main transaction, at this time, the current execution process of the main transaction is interrupted, the main transaction is rolled back, and the execution result corresponding to the executed sub-transaction is used as the current execution result of the main transaction, so that the sub-transaction does not need to wait for all the function nodes of the main transaction to output all the execution results after the successful execution of all the function nodes of the main transaction, but the execution result of the sub-transaction can be output in time.
The invention can realize the independence between the main transaction and the sub-transaction, and when the function chain of the main transaction is abnormal, only the main transaction can be rolled back without the sub-transaction being affected. The invention can split the functional chain to be executed into one or more sub-transactions through the visual configuration, thereby avoiding a great deal of transaction operations generated when the functional chain of a longer link is executed, and avoiding the common problems of large transactions such as blocking, deadlock, lock competition and the like.
Compared with the prior art, the method has the advantages that the functional chain is divided into the plurality of sub-transactions, and the corresponding execution results are submitted directly after the sub-transactions are completed to execute the main transaction with a longer link, so that when the main transaction with the longer link is executed, all the execution results are output without waiting for all the functional nodes of the main transaction to be successfully executed, and the execution results of the sub-transactions can be output in time partially.
As shown in FIG. 4, on the basis of the above-mentioned various embodiments of the sub-transaction based transaction execution methods, the present invention correspondingly provides apparatus item embodiments;
an embodiment of the present invention provides a transaction execution device based on sub-transactions, including: the system comprises a function chain generation module, a function chain analysis module, a function chain execution module and an execution result submitting module;
the function chain generation module is used for generating a configuration interface for indicating the function chain corresponding to the transaction execution; the configuration interface comprises: a function node selection area and a function chain editing interface; the function node selected area is provided with a plurality of function nodes; the function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed; responding to the function node selection operation of the user in the function node selection area, and acquiring each selected function node; responding to node editing operation of a user in the function chain editing interface, and generating a corresponding function chain; wherein the node editing operation includes: selecting a plurality of function nodes from the selected function nodes, dragging the function nodes into a child transaction canvas container, and connecting the function nodes;
the function chain analysis module is used for analyzing the function chain and generating an analysis result;
the function chain execution module is used for establishing a main transaction according to the analysis result, then executing each function node in the function chain one by one, and when judging that the current function node does not belong to the function node of the sub transaction and the execution of the business operation is not indicated to be completed, feeding back the corresponding execution result to the main transaction after the current function node is executed, and continuing to acquire the next function node; when judging that the current functional node belongs to the functional node of the sub-transaction, if judging that the current functional node is not used for indicating the completion of the execution of the business operation, directly executing the current functional node and continuously acquiring the next functional node, and if judging that the current functional node is used for indicating the completion of the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the execution of the current functional node and feeding back the execution result corresponding to the sub-transaction to the main transaction, and continuously acquiring the next functional node;
and the execution result submitting module is used for submitting all the execution results in the main transaction when all the functional nodes are detected to be executed.
It should be noted that the above-described apparatus embodiments are merely illustrative, and the units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
It will be clearly understood by those skilled in the art that, for convenience and brevity, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Based on the above embodiments of the transaction execution methods based on the sub-transactions, the present invention correspondingly provides embodiments of terminal equipment items.
An embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements a transaction execution method based on a sub-transaction according to any one of the embodiments of the present invention when the processor executes the computer program.
The terminal equipment can be computing terminal equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The terminal device may include, but is not limited to, a processor, a memory.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center of the terminal device, and which connects various parts of the entire terminal device using various interfaces and lines.
The memory may be used to store the computer program, and the processor may implement various functions of the terminal device by running or executing the computer program stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the cellular phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid state storage device.
Based on the above-mentioned various embodiments of the transaction execution method based on sub-transactions, the present invention correspondingly provides storage medium item embodiments.
An embodiment of the present invention provides a storage medium, where the storage medium includes a stored computer program, where when the computer program runs, the device where the computer readable storage medium is located is controlled to execute a transaction execution method based on a sub-transaction according to an embodiment of any one of the method of the present invention.
The storage medium is a computer readable storage medium, and the computer program is stored in the computer readable storage medium, and when executed by a processor, the computer program can implement the steps of the above-mentioned method embodiments. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (10)

1. A sub-transaction based transaction execution method, comprising:
generating a configuration interface for indicating a function chain corresponding to the transaction execution; the configuration interface comprises: a function node selection area and a function chain editing interface; the function node selected area is provided with a plurality of function nodes; the function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed;
responding to the function node selection operation of the user in the function node selection area, and acquiring each selected function node;
responding to node editing operation of a user in the function chain editing interface, and generating a corresponding function chain; wherein the node editing operation includes: selecting a plurality of function nodes from the selected function nodes, dragging the function nodes into a child transaction canvas container, and connecting the function nodes;
analyzing the functional chain to generate an analysis result;
establishing a main transaction according to the analysis result, then executing each function node in the function chain one by one, and when judging that the current function node does not belong to the function node of the sub transaction and the execution of the business operation is not indicated to be completed, feeding back the corresponding execution result to the main transaction after the current function node is executed, and continuing to acquire the next function node; when judging that the current functional node belongs to the functional node of the sub-transaction, if judging that the current functional node is not used for indicating the completion of the execution of the business operation, directly executing the current functional node and continuously acquiring the next functional node, and if judging that the current functional node is used for indicating the completion of the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the execution of the current functional node and feeding back the execution result corresponding to the sub-transaction to the main transaction, and continuously acquiring the next functional node;
and submitting all execution results in the main transaction when all the functional nodes are detected to be executed.
2. The method for executing a transaction based on a sub-transaction of claim 1, wherein parsing the functional chain to generate a parsing result comprises:
analyzing the functional chain to obtain the circulation direction of the functional chain and the operation parameters of each functional node in the functional chain;
and generating an analysis result corresponding to the function chain according to the circulation direction of the function chain and the operation parameters of each function node in the function chain.
3. The sub-transaction based transaction execution method as claimed in claim 1, wherein the function node includes:
a start node for indicating to start performing a business operation, an end node for indicating to end the performance of the business operation, and a business node for indicating the business operation.
4. The sub-transaction based transaction execution method as recited in claim 3, wherein the selecting of the plurality of function nodes from the selected function nodes to drag into the sub-transaction canvas container comprises:
at least a start node, an end node and a service node are selected from the selected function nodes, and dragged into the child transaction canvas container.
5. The method for executing transaction based on sub-transaction as claimed in claim 4, wherein when judging that the current function node belongs to the function node of sub-transaction, if judging that the current function node is not used for indicating that the execution of the business operation is completed, directly executing the current function node and continuously obtaining the next function node, if judging that the current function node is used for indicating that the execution of the business operation is completed, submitting the execution result corresponding to the sub-transaction after executing the current function node and feeding back the execution result corresponding to the sub-transaction to the main transaction, continuously obtaining the next function node, comprising:
when judging that the current functional node belongs to the functional node of the sub-transaction, then judging whether the current functional node is a starting node, an ending node or a service node;
if the current functional node is judged to be a starting node for indicating to start executing business operation, acquiring current context information in a main transaction, after the current functional node is executed, then acquiring a next functional node, and transmitting the current context information in the main transaction to the next functional node;
if the current functional node is judged to be the service node for indicating the service operation, directly executing the service operation corresponding to the service node, and then acquiring the next functional node;
if the current functional node is judged to be the ending node for indicating the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the current functional node is executed, and feeding back the execution result of the sub-transaction and the current context information corresponding to the sub-transaction to the main transaction, so as to acquire the next functional node.
6. The method for executing transaction based on sub-transaction as claimed in claim 3, wherein said submitting all execution results in the main transaction when it is detected that all functional nodes have been executed, comprises:
when the current functional node is detected not to belong to the functional node of the sub-transaction and is the ending node, all the functional nodes of the functional chain are considered to be executed, and all execution results in the main transaction are submitted.
7. The sub-transaction based transaction execution method as claimed in claim 3, further comprising:
when the current functional node is detected to be not a functional node of the sub-transaction and is a service node, if the current functional node is interrupted in the execution process, interrupting the execution process of the main transaction;
and taking an execution result corresponding to the sub-transaction which is already executed as a result of the current execution of the main transaction.
8. A sub-transaction based transaction execution device, comprising: the system comprises a function chain generation module, a function chain analysis module, a function chain execution module and an execution result submitting module;
the function chain generation module is used for generating a configuration interface for indicating the function chain corresponding to the transaction execution; the configuration interface comprises: a function node selection area and a function chain editing interface; the function node selected area is provided with a plurality of function nodes; the function chain editing interface is provided with a sub-transaction canvas container for indicating a sub-transaction which can be independently executed; responding to the function node selection operation of the user in the function node selection area, and acquiring each selected function node; responding to node editing operation of a user in the function chain editing interface, and generating a corresponding function chain; wherein the node editing operation includes: selecting a plurality of function nodes from the selected function nodes, dragging the function nodes into a child transaction canvas container, and connecting the function nodes;
the function chain analysis module is used for analyzing the function chain and generating an analysis result;
the function chain execution module is used for establishing a main transaction according to the analysis result, then executing each function node in the function chain one by one, and when judging that the current function node does not belong to the function node of the sub transaction and the execution of the business operation is not indicated to be completed, feeding back the corresponding execution result to the main transaction after the current function node is executed, and continuing to acquire the next function node; when judging that the current functional node belongs to the functional node of the sub-transaction, if judging that the current functional node is not used for indicating the completion of the execution of the business operation, directly executing the current functional node and continuously acquiring the next functional node, and if judging that the current functional node is used for indicating the completion of the execution of the business operation, submitting an execution result corresponding to the sub-transaction after the execution of the current functional node and feeding back the execution result corresponding to the sub-transaction to the main transaction, and continuously acquiring the next functional node;
and the execution result submitting module is used for submitting all the execution results in the main transaction when all the functional nodes are detected to be executed.
9. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing a sub-transaction based transaction execution method according to any of claims 1 to 7 when the computer program is executed.
10. A storage medium comprising a stored computer program, wherein the computer program, when run, controls a device in which the storage medium is located to perform a sub-transaction based transaction execution method as claimed in any one of claims 1 to 7.
CN202310908554.0A 2023-07-21 2023-07-21 Transaction execution method, device, terminal equipment and storage medium based on sub-transaction Pending CN116991547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310908554.0A CN116991547A (en) 2023-07-21 2023-07-21 Transaction execution method, device, terminal equipment and storage medium based on sub-transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310908554.0A CN116991547A (en) 2023-07-21 2023-07-21 Transaction execution method, device, terminal equipment and storage medium based on sub-transaction

Publications (1)

Publication Number Publication Date
CN116991547A true CN116991547A (en) 2023-11-03

Family

ID=88527727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310908554.0A Pending CN116991547A (en) 2023-07-21 2023-07-21 Transaction execution method, device, terminal equipment and storage medium based on sub-transaction

Country Status (1)

Country Link
CN (1) CN116991547A (en)

Similar Documents

Publication Publication Date Title
CN109324791B (en) Financial self-service terminal business process development method and device and terminal equipment
CN111277639B (en) Method and device for maintaining data consistency
WO2021022714A1 (en) Message processing method for cross-block chain node, device, apparatus and medium
CN113157710B (en) Block chain data parallel writing method and device, computer equipment and storage medium
CN116302708A (en) Data backup method, device, equipment and storage medium based on load balancing
CN111950776A (en) Business process optimization method and device, computer equipment and storage medium
CN112667631B (en) Automatic editing method, device, equipment and storage medium for business field
CN115878589A (en) Version management method and device of structured data and related equipment
CN112364005B (en) Data synchronization method, device, computer equipment and storage medium
CN111858366B (en) Test case generation method, device, equipment and storage medium
CN112947907A (en) Method for creating code branch
CN116991547A (en) Transaction execution method, device, terminal equipment and storage medium based on sub-transaction
CN111027196B (en) Simulation analysis task processing method and device for power equipment and storage medium
CN113377608A (en) Method and device for alarming task abnormity, terminal equipment and storage medium
CN113495723A (en) Method and device for calling functional component and storage medium
CN116301758B (en) Rule editing method, device, equipment and medium based on event time points
CN116860362B (en) Plug-in transaction management method and device applied to flow programming engine
CN112199428B (en) Application management system, method and terminal equipment of functional data block
CN114785847B (en) Network control software development configuration method, terminal and storage medium
CN111984369B (en) Container calling method and device
CN117234512B (en) Method, system, electronic equipment and storage medium for rapidly developing business
CN117056068B (en) JobEngine task splitting method in ETL
CN117170570A (en) Tree component node dragging method and device, terminal equipment and storage medium
CN108459914B (en) Middleware command execution method and device
CN115328468A (en) Business processing method and device, computer equipment and storage medium

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