Transaction processing methods, apparatuses, devices, media, and computer program products

By passing characteristic values ​​and non-characteristic data between executors in different execution environments, the problem of executors being unable to execute transaction commands is solved, thus improving the efficiency of transaction processing.

CN116257534BActive Publication Date: 2026-12-01CETC JINCANG (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211711803.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2026-12-01
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

In the prior art, in order to ensure the integrity of transaction data, the executor needs to use an executor in an independent environment when executing transaction commands, which causes other executors to be unable to execute transaction commands and reduces the execution efficiency of transactions.

Method used

By acquiring the state data of the first executor, characteristic data and non-characteristic data are determined, and the characteristic values ​​and non-characteristic data are written to the second executor located in a different execution environment, so that the second executor inherits the execution state of the first executor and executes the command of the target transaction.

Benefits of technology

It improves the efficiency of transaction execution, reduces the amount of data transferred, and shortens the time for executing commands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257534B_ABST
    Figure CN116257534B_ABST
Patent Text Reader

Abstract

The application provides a transaction processing method, device, equipment, medium and computer program product. The method comprises: acquiring state data of a first executor of a target transaction; determining feature data and non-feature data of the first executor in the state data, and acquiring a feature value corresponding to the feature data, the feature data being used to indicate data unique to the first executor; writing the feature value and the non-feature data to a second executor, so that the second executor inherits the execution state of the first executor, the first executor and the second executor being located in different execution environments; and controlling the second executor to execute a command of the target transaction based on the feature value and the non-feature data. The application improves the processing efficiency of transactions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data execution technology, and in particular to a transaction processing method, apparatus, device, medium, and computer program product. Background Technology

[0002] In a database, the executor is the engine responsible for executing commands for transactions. The execution of the executor depends on the context, meaning that the executor's operation depends on its own execution state.

[0003] The database has a transaction mechanism that ensures the integrity of transaction data. Transaction processing and the execution of the executor simultaneously affect the entire lifecycle of command execution.

[0004] When the current executor executes transaction commands, in order to ensure the integrity of transaction data, it needs to use an executor in an independent environment to execute the transaction commands. However, other executors do not have the execution status of an executor for executing transactions, which makes it impossible for other executors to execute transaction commands and reduces the execution efficiency of transactions. Summary of the Invention

[0005] This invention provides a transaction processing method, apparatus, device, medium, and computer program product to solve the problem of low transaction execution efficiency.

[0006] On one hand, the present invention provides a transaction processing method, comprising:

[0007] Obtain the status data of the first executor executing the target transaction;

[0008] The characteristic data and non-characteristic data of the first actuator are determined from the state data, and the characteristic value corresponding to the characteristic data is obtained. The characteristic data is used to indicate data unique to the first actuator.

[0009] The feature value and the non-feature data are written to the second executor so that the second executor inherits the execution state of the first executor, and the first executor and the second executor are located in different execution environments;

[0010] The second executor is controlled to execute the command for the target transaction based on the feature value and the non-feature data.

[0011] In one embodiment, the step of determining the characteristic data and non-characteristic data of the first actuator from the state data includes:

[0012] Determine the attributes of each first data point in each state data set;

[0013] Based on the attribute, determine whether the corresponding first data is unique to the first executor;

[0014] When the first data is unique to the first actuator, the first data is determined as the feature data;

[0015] When the first data is not data unique to the first actuator, the first data is determined to be the non-feature data.

[0016] In one embodiment, the step of determining whether the corresponding first data is data unique to the first executor based on the attribute includes:

[0017] Based on the attributes, determine whether the corresponding first data is temporary data or intermediate data;

[0018] When the first data is temporary data and / or intermediate data, it is determined that the first data is unique to the first actuator;

[0019] If the first data is neither temporary data nor intermediate data, it is determined that the first data is not data unique to the first actuator.

[0020] In one embodiment, the step of determining the characteristic data of the first actuator from the state data includes:

[0021] The environmental data of the first actuator is obtained from the status data;

[0022] The session-level configuration parameters and session-level variables in the environmental data are identified as feature data.

[0023] In one embodiment, before the step of controlling the second executor to execute the command for the target transaction based on the feature value and the non-feature data, the method further includes:

[0024] The environmental feature value of the first sub-actuator is obtained based on the feature value;

[0025] The environmental characteristic values ​​are reset so that the second sub-executor inherits the environmental data of the first sub-executor. The environmental characteristic values ​​include the values ​​of session-level configuration parameters and session-level variables.

[0026] In one embodiment, the step of obtaining the status data of the first executor executing the target transaction includes:

[0027] Obtain the current command of the target transaction;

[0028] When it is determined that the current command needs to be executed in an independent environment, the status data of the first executor executing the target transaction is obtained.

[0029] On the other hand, the present invention also provides a transaction processing apparatus, comprising:

[0030] The acquisition module is used to acquire the status data of the first executor executing the target transaction;

[0031] The determination module is used to determine the characteristic data and non-characteristic data of the first actuator in the state data, and to obtain the characteristic value corresponding to the characteristic data, wherein the characteristic data is used to indicate data unique to the first actuator;

[0032] The writing module is used to write the feature value and the non-feature data to the second executor, so that the second executor inherits the execution state of the first executor, and the first executor and the second executor are located in different execution environments;

[0033] The control module is used to control the second executor to execute the command of the target transaction based on the feature value and the non-feature data.

[0034] On the other hand, the present invention also provides a transaction processing device, including: a memory and a processor;

[0035] The memory stores computer-executed instructions;

[0036] The processor executes computer execution instructions stored in the memory, causing the transaction processing device to perform the transaction processing method described above.

[0037] On the other hand, the present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the transaction processing method described above.

[0038] On the other hand, the present invention also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the transaction processing method described above.

[0039] The transaction processing method, apparatus, device, medium, and computer program product provided by this invention acquires the state data of a first executor executing a target transaction, determines the characteristic data and non-characteristic data of the first executor from the state data, obtains the characteristic values ​​of the characteristic data, and writes the characteristic values ​​and non-characteristic data to a second executor. Then, the second executor is controlled to execute the command of the target transaction based on the characteristic values ​​and non-characteristic data. In this invention, the second executor, located in a different execution environment than the first executor, inherits the state data of the first executor, thereby enabling the second executor to execute the command of the transaction, improving the execution efficiency of the transaction. Furthermore, the apparatus writes the characteristic values ​​of the characteristic data unique to the first executor to the second executor, without having to write all the characteristic data to the second executor, reducing the data transmission volume of the first executor and shortening the execution time of the second executor, thereby improving the execution efficiency of the transaction. Attached Figure Description

[0040] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0041] Figure 1 This is a schematic diagram of a scenario for the transaction processing method of the present invention;

[0042] Figure 2 This is a flowchart illustrating the first embodiment of the transaction processing method of the present invention;

[0043] Figure 3 This is a schematic diagram illustrating the acquisition of a feature value involved in the transaction processing method of the present invention;

[0044] Figure 4 This is a schematic diagram illustrating the acquisition of another feature value involved in the transaction processing method of the present invention;

[0045] Figure 5 This is a flowchart illustrating the second embodiment of the transaction processing method of the present invention;

[0046] Figure 6 This is a flowchart illustrating the third embodiment of the transaction processing method of the present invention;

[0047] Figure 7 This is a flowchart illustrating the fourth embodiment of the transaction processing method of the present invention;

[0048] Figure 8 This is a simplified interactive diagram of the transaction processing method of the present invention;

[0049] Figure 9 This is a schematic diagram of the functional modules of the transaction processing device of the present invention;

[0050] Figure 10This is a schematic diagram of the hardware structure of the transaction processing device of the present invention.

[0051] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0052] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0053] In a database, the executor is the engine responsible for executing commands for transactions. The execution of the executor depends on the context, meaning that the executor's operation depends on its own execution state.

[0054] The database has a transaction mechanism that ensures the integrity of transaction data. Transaction processing and the execution of the executor simultaneously affect the entire lifecycle of command execution.

[0055] The inventors of this patent discovered that, in order to ensure the integrity of transaction data, current executors need to use executors in an independent environment to execute transaction commands when executing transaction commands. However, other executors do not have the execution status of an executor executing a transaction, which causes other executors to be unable to execute transaction commands, thus reducing the execution efficiency of transactions.

[0056] The inventors of this patent therefore conceived of a second executor located in a different execution environment than the first executor, which inherits the state data of the first executor. This allows the second executor to execute the commands of the transaction, thereby improving the execution efficiency of the transaction. Furthermore, the device writes the feature values ​​of the unique feature data of the first executor to the second executor, without having to write all the feature data to the second executor. This reduces the amount of data transmitted by the first executor and shortens the time it takes for the second executor to execute commands, thus improving the execution efficiency of the transaction.

[0057] Reference Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of transaction processing methods. For example... Figure 1As shown, the transaction processing device 100 includes a first executor 110 and a second executor 120. The first executor 110 executes the commands of the transaction corresponding to session 1, and the second executor 120 executes the commands of the transaction corresponding to session 2. The first executor 110 and the second executor 120 reside in different execution environments (the dashed boxes represent the execution environments). The transaction processing device 100 obtains the status data of the first executor 110 executing the target transaction, and extracts feature data and non-feature data from the status data. The feature data is unique to the first executor 110. The transaction processing device 100 extracts the feature values ​​from the feature data, i.e., the feature values ​​are used to characterize the feature data. The transaction processing device 100 then transmits the feature values ​​and non-feature data to the second executor 120, thereby enabling the second executor 120 to execute the commands of the target transaction based on the feature values ​​and non-feature data.

[0058] The technical solutions of the present invention and how they solve the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0059] Reference Figure 2 , Figure 2 This is a first embodiment of the transaction processing method of the present invention, which includes the following steps:

[0060] Step S201: Obtain the status data of the first executor executing the target transaction.

[0061] In this embodiment, the executing entity is a transaction processing device. For ease of description, the term "device" will be used to refer to the transaction processing device below. The device can be a physical device containing a database or a terminal device equipped with a database.

[0062] The execution of transactions in a database depends on the execution of executors within the device. One session in the database corresponds to one executor. The executor that executes the target transaction is defined as the first executor, and the target transaction can be any currently executing transaction.

[0063] The device acquires the status data of the first executor executing the target transaction. The status data includes the environmental data and execution data of the first executor. The environmental data refers to the data of the execution environment in which the first executor is located, while the execution data refers to the data generated by the first executor itself during operation.

[0064] The state data source includes the raw data processed by the first executor, information about the database program, information about database variables, information about database data types, the transaction status of the first executor, information about local variables processed by the first executor, the context relationship of the first executor, the snapshot information of the first executor, the exception information of the first executor, the cached data of the first executor, the plug-in information of the first executor, the recursion depth of the first executor, the memory context of the SQL statements in the first executor, the memory context of the data in the first executor, and the expression environment in the first executor.

[0065] Step S202: Determine the characteristic data and non-characteristic data of the first actuator in the status data, and obtain the characteristic value corresponding to the characteristic data. The characteristic data is used to indicate data unique to the first actuator.

[0066] The device identifies characteristic data and non-characteristic data within the status data. Characteristic data indicates data unique to the first actuator. In one example, characteristic data is data temporarily generated by the first actuator, which the device cannot obtain through other means; therefore, temporarily generated data is characteristic data. In another example, the first actuator generates intermediate data at a certain stage, which cannot be obtained from other stages; therefore, the intermediate data is characteristic data of the first actuator. It is understood that non-characteristic data is not unique to the first actuator; the device can obtain non-characteristic data through multiple channels.

[0067] In one example, the database transaction state, executor recursion level, cached data, database snapshot, and memory state are all dynamic data, but they lack timeliness and are therefore non-feature data. Furthermore, the plugin information for the first executor is uniformly allocated by the database system and is identical to every executor; therefore, it is not an inherited feature value, meaning it is also non-feature data. The original SQL command is the most basic data generated by the executor and therefore needs to be inherited; it is a feature value. Database local variables and exception information are data generated during the executor's runtime. This data can only be generated during the execution phase. To prevent duplicate execution of SQL commands from causing data anomalies, this data needs to be inherited and is therefore a feature value. Therefore, the original SQL command, database local variables, and exception information are feature data.

[0068] In another example, the database operation has some configuration parameters and independent variables. Global-level configuration parameters and variables are assigned by the database system and are consistent across sessions, so they do not need to be inherited and are not characteristic values; that is, this primary data is non-characteristic data. Transactions and memory contexts are database-level resources, independent of each session and do not affect each other, so they do not need to be inherited and are not characteristic values; that is, transactions and memory contexts are database-level non-characteristic data. Session-level configuration parameters and session-level variables are inconsistent across sessions and may affect the execution result; they need to be inherited and are characteristic values; that is, session-level configuration parameters and session-level variables are characteristic data.

[0069] After acquiring feature data and non-feature data, the device extracts the numerical values ​​from the feature data as feature values, which can be used to represent the feature data.

[0070] Step S203: Write the feature value and non-feature data to the second executor so that the second executor inherits the execution state of the first executor. The first executor and the second executor are located in different execution environments.

[0071] After obtaining the characteristic values ​​and non-characteristic data, the device writes them to the second actuator, thereby enabling the second actuator to inherit the execution state of the first actuator. The execution environment of the second actuator is different from that of the first actuator. The first actuator can be the parent actuator, while the second actuator is the child actuator.

[0072] Reference Figure 3 The status data includes executor data, which is the execution data mentioned above. Execution data includes original SQL commands, database programs, database local variables, database type, database transaction status, cached data, exception information, SQL statements, expressions, memory status, executor (first executor) recursion level, database snapshot, and executor (first executor) plug-in information. The device extracts feature data based on the timeliness of the execution data. Since original SQL commands, database local variables, and exception information are time-sensitive, the feature data includes original SQL commands, database local variables, and exception information. Feature values ​​are then extracted from these elements. The extracted feature values ​​are execution feature values.

[0073] Reference Figure 4The status data includes the environmental data of the first executor. The environmental data includes session-level configuration parameters, global-level configuration parameters, session-level variables, global-level variables, database transactions, and memory context. The device extracts feature data based on the timeliness of the environmental data. Since session-level configuration parameters and session-level variables are time-sensitive, the feature data includes session-level configuration parameters and session-level variables. Feature values ​​are then extracted from these session-level configuration parameters and session-level variables; these extracted feature values ​​are the environmental feature values.

[0074] Step S204: Control the second executor to execute the command of the target transaction based on the feature value and non-feature data.

[0075] The feature values ​​include the commands to be executed for the target transaction. The second executor inherits the execution state of the first executor based on the non-feature data, thereby controlling the second executor to execute the commands to be executed.

[0076] In this embodiment, the state data of the first executor executing the target transaction is obtained. Feature data and non-feature data of the first executor are determined from the state data, and the feature values ​​of the feature data are obtained. The feature values ​​and non-feature data are then written to the second executor. The second executor is then controlled to execute the command of the target transaction based on the feature values ​​and non-feature data. In this embodiment, the second executor, located in a different execution environment than the first executor, inherits the state data of the first executor, thereby enabling the second executor to execute the command of the transaction, improving the execution efficiency of the transaction. Furthermore, the device writes the feature values ​​of the feature data unique to the first executor to the second executor, instead of writing all the feature data to the second executor, reducing the data transfer volume of the first executor and shortening the execution time of the second executor, thereby improving the execution efficiency of the transaction.

[0077] Reference Figure 5 , Figure 5 This is a second embodiment of the transaction processing method of the present invention. Based on the first embodiment, step S202 includes:

[0078] Step S501: Determine the attributes of each first data in each state data.

[0079] Step S502: Determine whether the corresponding first data is unique to the first executor based on the attribute.

[0080] In this embodiment, the status data includes multiple data sets, which are defined as first data. Each first data set has a corresponding attribute, and the device acquires the attribute of each first data set.

[0081] The device determines whether the first data corresponding to the attribute is unique to the first actuator based on the attribute of the first data.

[0082] In one example, the database program, database data type, SQL statement, expression, etc., are primary data, meaning that the attributes of this primary data indicate that it is static. Static data is not data specific to the executor, therefore the primary data representing static data can be identified as non-feature data.

[0083] In another example, the attribute can characterize how the first data was obtained. If there are multiple ways to obtain the data, then the first data is non-feature data.

[0084] In another example, the device determines whether the corresponding first data is temporary or intermediate data based on attributes. If the first data is temporary and / or intermediate data, it is determined that the first data is unique to the first actuator. If the first data is neither temporary nor intermediate data, it is determined that the first data is not unique to the first actuator.

[0085] Step S503: When the first data is data unique to the first actuator, the first data is determined as feature data.

[0086] Step S504: When the first data is not data unique to the first actuator, the first data is determined to be non-feature data.

[0087] If the device determines that the first data is unique to the first actuator, then it defines the first data as characteristic data. If it determines that the first data is not unique to the first actuator, then it defines the first data as non-characteristic data.

[0088] Reference Figure 6 , Figure 6 This is a third embodiment of the transaction processing method of the present invention. Based on the first embodiment, step S202 includes:

[0089] Step S601: Obtain the environmental data of the first actuator from the status data.

[0090] Step S602: The session-level configuration parameters and session-level variables in the environment data are identified as feature data.

[0091] In this embodiment, the device obtains the environment data of the first actuator from the state data. The environment data includes session-level configuration parameters, global-level configuration parameters, local variables, global variables, transactions, and memory context.

[0092] The device extracts feature data from environmental data based on timeliness. For example, if session-level variables and session-level configuration parameters have timeliness, then the session-level configuration parameters and session-level variables are identified as feature data.

[0093] In this embodiment, the device obtains the environmental data of the first actuator from the status data, thereby determining the session-level configuration parameters and session-level variables in the environmental data as feature data.

[0094] In one embodiment, the operation of the second actuator relies on a large amount of data, meaning its operation depends on state data. When controlling the operation of the second actuator, it needs to inherit the environmental data and execution state of the first actuator. To this end, the device obtains the environmental feature values ​​of the first sub-actuator based on feature values ​​and determines the environmental data and execution data of the first actuator based on non-feature data.

[0095] The device first initializes the environment data, which includes session-level configuration parameters, global-level configuration parameters, session-level variables, global-level variables, database transactions, and memory context. Since the session in which the first executor resides differs from the session in which the second executor resides, the values ​​of the session-level configuration parameters and session-level variables need to be reset, i.e., the environment characteristic values ​​need to be reset. This allows the second executor to restore the environment data of the first executor, thus enabling the second executor to inherit the environment data of the first executor. After inheriting the environment data, the second executor writes the execution characteristic values ​​and execution data from the non-characteristic data into the second executor, allowing the second executor to inherit the execution data of the first executor. This, in turn, allows the device to control the second executor to execute commands for the target transaction.

[0096] In this embodiment, the second executor first initializes the environment data of the first executor, then restores the environment data of the first executor (inheriting the environment data of the first executor), initializes the second executor, and finally the second executor inherits the execution state of the first executor, thereby enabling the second executor to take over the execution of the target transaction command from the first executor.

[0097] In one embodiment, when the device controls the second executor to execute the command of the target transaction, the device first determines the target command that the first executor has not executed based on the status data, and then controls the second executor to execute the target command corresponding to the target transaction. Specifically, the device determines the commands that the first executor has already executed from the status data, and then controls the second executor to execute the commands that the first executor has not executed. That is, the second executor skips the commands that the first executor has already executed and executes the unexecuted commands of the target transaction sent by the first executor. After the second executor executes the target command, it commits the transaction in which the target command is located to ensure the independence of the transaction.

[0098] In one embodiment, when the device needs to obtain the state data of the first executor, it extracts the state data of the first executor corresponding to the first session. When writing feature values ​​and non-feature data to the second executor, the first session first serializes the target data (which includes feature values ​​and non-feature data) and also serializes the SQL command to be executed into the target data. The device then writes the serialized target data to the second session. The device can send the serialized target data to the second session based on shared memory. The second session deserializes the serialized target data to obtain the target data, i.e., the environment data of the first executor and the execution data including the SQL command to be executed. The second session then writes the target data to the second executor.

[0099] Reference Figure 7 , Figure 7 In the fourth embodiment of the transaction processing method of the present invention, based on any one of the first to third embodiments, step S201 includes:

[0100] Step S701: Obtain the current command of the target transaction.

[0101] Step S702: When it is determined that the current command needs to be executed in an independent environment, obtain the status data of the first executor that executes the target transaction.

[0102] In this embodiment, the target transaction has multiple commands, some of which need to be executed in an independent environment. The device obtains the current command of the target transaction, which is the command to be executed by the first executor.

[0103] The device determines whether the current command needs to be executed in an independent environment. If the current command needs to be executed in an independent environment, the device obtains the status data of the first executor executing the target transaction, that is, the device writes the status data to the second executor, so that the second executor executes the current command in the independent environment.

[0104] Furthermore, the device controls the second actuator to execute the current command, and after the second actuator executes the current command, it controls the second actuator to stop running, and controls the first actuator to execute the pending command of the target transaction. The pending command does not need to be executed in an independent environment.

[0105] Reference Figure 8 The overall process of this embodiment will be briefly described below.

[0106] 1. The main process within the device first controls the startup of session 1 based on a fork child process (the child process created by the fork function of the main process);

[0107] 2. Configure environment parameters for Session 2, initialize memory context, start database transaction, and start the executor of Session 1;

[0108] 3. After the executor starts, if any of the SQL commands in the multi-statement SQL commands (SQL command 1, SQL command 2, SQL command n) do not need to be under independent transaction control, the executor of session 1 will execute the SQL command.

[0109] 4. If the SQL command needs to be under independent transaction control, trigger the fork child process command so that session 1 serializes the executor's state data;

[0110] 5. Session 1 transmits the serialized state data (which is the state of the executor in Session 1) to Session 2;

[0111] 6. Deserialize the state data of Session 2, and write the environment feature value of the executor of Session 1 and the feature value of the executor of Session 1 to the executor of Session 2 based on the deserialized state data. The environment feature value and the feature value of the executor represent the state data of the executor in Session 1.

[0112] 7. The executor of Session 2 executes the SQL command, commits the current transaction, returns the execution result to Session 1, and the executor of Session 2 stops running;

[0113] 8. The executor of Session 1 continues to execute other commands that do not require independent transaction control.

[0114] In this embodiment, the device obtains the current command of the target transaction. If the current command needs to be executed in an independent environment, it obtains the status data of the first executor that executes the target transaction, so that the second executor executes the current command in an independent environment to ensure the integrity of the transaction.

[0115] The present invention also provides a transaction processing apparatus, with reference to Figure 9 The transaction processing device 900 includes:

[0116] The acquisition module 910 is used to acquire the status data of the first executor executing the target transaction;

[0117] The determination module 920 is used to determine the characteristic data and non-characteristic data of the first actuator in the status data, and to obtain the characteristic value corresponding to the characteristic data. The characteristic data is used to indicate data unique to the first actuator.

[0118] The writing module 930 is used to write feature values ​​and non-feature data to the second executor so that the second executor inherits the execution state of the first executor. The first executor and the second executor are located in different execution environments.

[0119] The control module 940 is used to control the second executor to execute commands for the target transaction based on feature values ​​and non-feature data.

[0120] In one embodiment, the transaction processing apparatus 900 includes:

[0121] The determination module 920 is used to determine the attributes of each first data in each state data;

[0122] The determination module 920 is used to determine whether the corresponding first data is unique to the first executor based on the attribute.

[0123] The determination module 920 is used to determine the first data as feature data when the first data is data unique to the first actuator;

[0124] The determination module 920 is used to determine the first data as non-feature data when the first data is not data unique to the first actuator.

[0125] In one embodiment, the transaction processing apparatus 900 includes:

[0126] The determination module 920 is used to determine whether the corresponding first data is temporary data or intermediate data based on the attributes.

[0127] The determination module 920 is used to determine that the first data is data unique to the first actuator when the first data is temporary data and / or intermediate data;

[0128] The determination module 920 is used to determine that the first data is not data unique to the first actuator when the first data is neither temporary data nor intermediate data.

[0129] In one embodiment, the transaction processing apparatus 900 includes:

[0130] The acquisition module 910 is used to acquire environmental data of the first actuator from the status data.

[0131] The determination module 920 is used to determine the session-level configuration parameters and session-level variables in the environment data as feature data.

[0132] In one embodiment, the transaction processing apparatus 900 includes:

[0133] The acquisition module 910 is used to obtain the environmental feature values ​​of the first sub-executor based on the feature values;

[0134] The reset module is used to reset the environment characteristic values ​​so that the second sub-executor inherits the environment data of the first sub-executor. The environment characteristic values ​​include the values ​​of session-level configuration parameters and session-level variables.

[0135] In one embodiment, the transaction processing apparatus 900 includes:

[0136] Module 910 is used to obtain the current command of the target transaction;

[0137] The acquisition module 910 is used to acquire the status data of the first executor executing the target transaction when it is determined that the current command needs to be executed in an independent environment.

[0138] Figure 10 This is a schematic diagram of the hardware structure of a transaction processing device according to an exemplary embodiment.

[0139] Transaction processing device 1000 may include: a processor 1001, such as a CPU, a memory 1002, and a transceiver 1003. Those skilled in the art will understand that... Figure 10 The structure shown does not constitute a limitation on the transaction processing device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Memory 1002 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0140] The processor 1001 can call computer programs or computer execution instructions stored in the memory 1002 to complete all or part of the steps of the above-described transaction processing method.

[0141] Transceiver 1003 is used to receive information sent by external devices and to send information to external devices.

[0142] A non-transitory computer-readable storage medium, wherein instructions (computer-executable instructions) in the storage medium, when executed by a processor of a transaction processing device, enable the transaction processing device to perform the aforementioned transaction processing method.

[0143] A computer program product includes a computer program that, when executed by a processor of a transaction processing device, enables the transaction processing device to perform the aforementioned transaction processing method.

[0144] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0145] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A transaction processing method, characterized in that, include: Obtain the current command among multiple commands of the target transaction. When it is determined that the current command needs to be executed in an independent environment, obtain the status data of the first executor executing the target transaction. The status data includes the environment data and execution data of the first executor. The current command is the command to be executed by the first executor. Based on timeliness, session-level configuration parameters and session-level variables are extracted from environmental data, and the session-level configuration parameters and session-level variables are determined as feature data. If the feature data is data and / or intermediate data temporarily generated by the first executor at a certain stage, then the feature data is data unique to the first executor. The feature value corresponding to the feature data is obtained, and the feature value includes the current command of the target transaction. The non-feature data of the first actuator is determined from the status data, wherein the non-feature data is data that can be acquired in multiple ways or static data that has no time limit; The first executor's environment feature value is obtained based on the feature value. The second executor is then controlled to initialize the first executor's environment data. The values ​​of session-level configuration parameters and session-level variables in the environment feature value are then reset so that the second executor restores the first executor's environment data, thus completing the second executor's inheritance of the first executor's environment data. The second executor is then initialized, and the execution data in the execution feature value and non-feature data is written into the second executor so that the second executor inherits the execution data of the first executor. The first executor and the second executor are located in different execution environments. The second executor is controlled to skip the commands already executed by the first executor and execute the current command of the target transaction sent by the first executor; After the second executor executes the current command, the second executor is stopped, and the first executor is executed to carry out the pending command of the target transaction. The pending command does not need to be executed in an independent environment.

2. The transaction processing method according to claim 1, characterized in that, Also includes: Determine the attributes of each first data point in each state data set; Based on the attribute, determine whether the corresponding first data is unique to the first executor; When the first data is unique to the first actuator, the first data is determined as the feature data; When the first data is not data unique to the first actuator, the first data is determined to be the non-feature data.

3. The transaction processing method according to claim 2, characterized in that, The step of determining whether the corresponding first data is unique to the first executor based on the attribute includes: Based on the attributes, determine whether the corresponding first data is temporary data or intermediate data; When the first data is temporary data and / or intermediate data, it is determined that the first data is unique to the first actuator; If the first data is neither temporary data nor intermediate data, it is determined that the first data is not data unique to the first actuator.

4. A transaction processing apparatus, characterized in that, include: The acquisition module is used to acquire the current command among multiple commands of the target transaction. When it is determined that the current command needs to be executed in an independent environment, the module acquires the status data of the first executor executing the target transaction. The status data includes the environment data and execution data of the first executor. The current command is the command to be executed by the first executor. The determination module is used to extract session-level configuration parameters and session-level variables from environmental data based on timeliness, and determine the session-level configuration parameters and session-level variables as feature data. If the feature data is data temporarily generated by the first executor at a certain stage and / or intermediate data, then the feature data is unique to the first executor. The module also obtains the feature value corresponding to the feature data, the feature value including the current command of the target transaction; and determines the non-feature data of the first executor from the status data, the non-feature data being data with multiple acquisition methods or static data without timeliness. The writing module is used to obtain the environmental feature values ​​of the first executor based on the feature values, control the second executor to initialize the environmental data of the first executor, and then reset the values ​​of session-level configuration parameters and session-level variables in the environmental feature values ​​so that the second executor restores the environmental data of the first executor, completing the inheritance of the environmental data of the first executor by the second executor; and initialize the second executor by writing the execution feature values ​​and execution data in the non-feature data into the second executor so that the second executor inherits the execution data of the first executor; the first executor and the second executor are located in different execution environments; The control module is used to control the second executor to skip the commands already executed by the first executor and execute the current command of the target transaction sent by the first executor; after the second executor executes the current command, it controls the second executor to stop running and controls the first executor to execute the pending command of the target transaction, which does not need to be executed in an independent environment.

5. A transaction processing device, characterized in that, include: Memory and processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the transaction processing device to perform the transaction processing method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the transaction processing method as described in any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it is used to implement the transaction processing method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Masking server outages from clients and applications

    CN103782573A