A distributed transaction management method and system

By analyzing business requirements and dismantling distributed transactions, optimizing the execution order of sub-transactions solves the problems of low efficiency of distributed transaction management and concurrency conflicts in the existing technology, and improves system performance and data consistency.

CN118349319BActive Publication Date: 2024-09-03HUANENG INFORMATION TECH CO LTD +1
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202410782235.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-03
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

The existing distributed transaction management methods are inefficient and fail to effectively manage the execution order of sub-transactions, resulting in concurrency conflicts and data consistency issues, which affect the performance of the distributed system.

Method used

By obtaining business requirements, analyzing transaction boundaries and global transaction scope, dismantling them into sub-transactions, determining the execution order of sub-transactions based on the priority discrimination principle, and adjusting the utilization efficiency of sub-transactions on shared resources to optimize the execution order.

Benefits of technology

It effectively solves the problems of unclear sub-transaction execution order and concurrency conflicts, improves the performance of distributed systems, and ensures data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118349319B
    Figure CN118349319B
Patent Text Reader

Abstract

The present invention discloses a management method and system for distributed transactions, which includes: obtaining business requirements, analyzing business requirements to determine transaction boundaries, and determining the scope and content of global transactions according to transaction boundaries and business requirements; determining transaction division conditions according to business requirements and the scope of global transactions, and disassembling global transactions into multiple sub-transactions according to the transaction division conditions; scanning the content of global transactions to determine priority discrimination principles, determining the priorities of sub-transactions according to the priority discrimination principles, and determining the execution order of sub-transactions according to the priorities of sub-transactions; obtaining the utilization efficiency of sub-transactions on shared resources according to the execution order, adjusting the execution order according to the utilization efficiency of sub-transactions on shared resources; and managing sub-transactions according to the adjusted execution order. The present invention effectively solves the concurrent conflict problem of sub-transactions through optimized management of sub-transactions, improves the performance of distributed systems, and ensures data consistency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a distributed transaction management method and system. Background Art

[0002] The ordering management of sub-transactions of distributed transactions refers to the process of determining and managing the execution order of sub-transactions. In a distributed system, a distributed transaction is a complex operation composed of multiple sub-transactions, and the execution order of each transaction involves the final data consistency and transaction correctness of the distributed transaction. Therefore, the ordering management of transactions becomes crucial. It is necessary to ensure that they are executed in the correct order to ensure the reliability and stability of the distributed system.

[0003] However, the existing management methods are very chaotic and inefficient in managing distributed transactions. They also fail to comprehensively consider the impact of multiple factors on the execution order of transactions, resulting in unclear execution order between transactions and concurrency conflicts. They cannot guarantee the data consistency and correctness of distributed transactions, ultimately leading to a decline in the performance of distributed systems. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a distributed transaction management method and system, including:

[0005] Obtain business requirements, analyze business requirements to determine transaction boundaries, and determine the scope and content of global transactions based on transaction boundaries and business requirements;

[0006] Determine the transaction division conditions based on business requirements and the scope of the global transaction, and split the global transaction into multiple sub-transactions based on the transaction division conditions;

[0007] Scan the content of the global transaction to determine the priority determination principle, determine the priority of the sub-transaction according to the priority determination principle, and determine the execution order of the sub-transaction according to the priority of the sub-transaction;

[0008] Obtaining the utilization efficiency of the subtransactions on the shared resources according to the execution order, and adjusting the execution order according to the utilization efficiency of the subtransactions on the shared resources;

[0009] Subtransactions are managed according to the adjusted execution order.

[0010] Further, the obtaining of business requirements, analyzing the business requirements to determine transaction boundaries, and determining the scope and content of global transactions according to the transaction boundaries and business requirements include:

[0011] Obtain and analyze business requirements to determine the relationships between business operations in business requirements and the consistency requirements between business operations;

[0012] The transaction boundaries are determined based on the relationship between various business operations, and the scope and content of the global transaction are determined based on the transaction boundaries and consistency requirements.

[0013] Furthermore, determining the transaction division condition according to the business requirements and the scope of the global transaction, and splitting the global transaction into multiple sub-transactions according to the transaction division condition, includes:

[0014] Determine the transaction partitioning elements based on business requirements and the scope of global transactions, analyze the transaction partitioning elements, and identify the partitioning elements that are suitable as transaction partitioning conditions;

[0015] The global transactions are divided according to multiple division conditions to obtain several transaction sets, and it is determined whether there is an intersection among each transaction set;

[0016] If each transaction set has an intersection, determine the intersection transactions in the intersection, analyze the compliance strength between the intersection transactions and the transaction set they are in, and remove the intersection transactions from the transaction set with a small compliance strength according to the compliance strength. Only the intersection transactions with the highest compliance strength with a certain transaction set are retained in each transaction set, and the intersection transactions in the remaining transaction sets are all removed. Then, each transaction set after the removal is used as a sub-transaction;

[0017] If there is no intersection among each transaction set, each transaction set will be directly regarded as a sub-transaction.

[0018] Furthermore, the scanning of the content of the global transaction to determine a priority determination principle, and determining the priority of the sub-transaction according to the priority determination principle, includes:

[0019] Scan the content of the global transaction, obtain each content information, and calculate the impact of each content information on the global transaction, and determine the content information with an impact higher than a preset threshold as the priority judgment principle of the global transaction;

[0020] Analyze the priority logic of the priority judgment principle for the sub-transaction, and divide the priority logic into the first priority logic and the second priority logic, and determine the weights of the first priority logic and the second priority logic according to their importance to the sub-transaction;

[0021] Determine the priority evaluation indicators corresponding to the first priority logic and the second priority logic and the weights corresponding to the indicators respectively, and quantify the values ​​of each priority evaluation indicator to obtain the evaluation value of each priority evaluation indicator;

[0022] Obtaining a priority logic value of a priority discrimination principle according to the weights of the first priority logic and the second priority logic, and the evaluation values ​​and weights of the priority evaluation indicators corresponding to the first priority logic and the second priority logic;

[0023] The priority logic values ​​based on each priority determination principle are added together to obtain the total priority logic value of the sub-transaction, and the priority of the sub-transaction is determined according to the preset mapping relationship between the total priority logic value of the sub-transaction and the priority of the sub-transaction.

[0024] Furthermore, the first priority granularity and the second priority granularity corresponding to the evaluation priority logic include:

[0025] ;

[0026] Among them, S is the priority logic value of the priority judgment principle, is the weight of the first priority logic, n is the number of priority evaluation indicators corresponding to the first priority logic, is the weight of the priority evaluation indicator corresponding to the first priority logic, is the evaluation value of the priority evaluation index corresponding to the first priority logic, is the weight of the second priority logic, m is the number of priority evaluation indicators corresponding to the second priority logic, is the weight of the priority evaluation indicator corresponding to the second priority logic, is the evaluation value of the priority evaluation indicator corresponding to the second priority logic.

[0027] Further, determining the execution order of the sub-transactions according to the priorities of the sub-transactions includes:

[0028] Sort the priorities of the subtransactions from large to small to obtain the priority sequence of the subtransactions;

[0029] The priority sequence of the subtransactions is set to the execution order of the corresponding subtransactions.

[0030] Further, obtaining the utilization efficiency of the subtransactions on the shared resources according to the execution order, and adjusting the execution order according to the utilization efficiency of the subtransactions on the shared resources, includes:

[0031] After each sub-transaction is executed in the order of execution, the utilization efficiency of each sub-transaction on shared resources is obtained;

[0032] Compare the utilization efficiency of shared resources of adjacent sub-transactions in order, and arrange the execution order of sub-transactions with higher utilization efficiency of shared resources before the execution order of sub-transactions with lower utilization efficiency of shared resources;

[0033] If the execution order of the subtransaction with higher utilization efficiency of shared resources is at the front of the sequence, no order adjustment is made; if the execution order of the subtransaction with lower utilization efficiency of shared resources is at the end of the sequence, no order adjustment is made.

[0034] The present invention also provides a distributed transaction management system, comprising:

[0035] The acquisition module is used to obtain business requirements, analyze business requirements to determine transaction boundaries, and determine the scope and content of global transactions based on transaction boundaries and business requirements;

[0036] The partitioning module is used to determine the transaction partitioning conditions according to business requirements and the scope of the global transaction, and to split the global transaction into multiple sub-transactions according to the transaction partitioning conditions;

[0037] A sorting module is used to scan the content of the global transaction to determine the priority discrimination principle, determine the priority of the sub-transaction according to the priority discrimination principle, and determine the execution order of the sub-transaction according to the priority of the sub-transaction;

[0038] An adjustment module, used to obtain the utilization efficiency of the sub-transactions on the shared resources according to the execution order, and adjust the execution order according to the utilization efficiency of the sub-transactions on the shared resources;

[0039] The management module is used to manage the sub-transactions according to the adjusted execution order.

[0040] Compared with the prior art, the distributed transaction management method and system of the embodiment of the present invention have the following beneficial effects:

[0041] The present invention optimizes the execution order of sub-transactions and effectively solves the problems of unclear execution order of sub-transactions and concurrent conflicts, greatly improves the performance of the distributed system, and ensures data consistency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the process structure of the method for managing distributed transactions in an embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of the composition of the management system of distributed transactions in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0045] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the platform or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0046] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0047] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0048] like Figure 1 As shown, in an embodiment of the present application, a distributed transaction management method is provided, including: S100: obtaining business requirements, analyzing business requirements to determine transaction boundaries, and determining the scope and content of global transactions according to transaction boundaries and business requirements; S200: determining transaction division conditions according to business requirements and the scope of global transactions, and splitting global transactions into multiple sub-transactions according to the transaction division conditions; S300: scanning the content of the global transaction to determine a priority judgment principle, determining the priority of the sub-transaction according to the priority judgment principle, and determining the execution order of the sub-transaction according to the priority of the sub-transaction; S400: obtaining the utilization efficiency of shared resources by the sub-transactions according to the execution order, and adjusting the execution order according to the utilization efficiency of the sub-transactions on the shared resources; S500: managing the sub-transactions according to the adjusted execution order.

[0049] Furthermore, by optimizing the execution order of sub-transactions, the unclear execution order of sub-transactions and the problems of concurrency conflicts can be effectively solved, which greatly improves the performance of the distributed system and ensures data consistency.

[0050] In an embodiment of the present application, a method for managing distributed transactions is provided, wherein business requirements are obtained, business requirements are analyzed to determine transaction boundaries, and the scope and content of global transactions are determined based on the transaction boundaries and business requirements, including: obtaining business requirements and analyzing them to determine the relationship between business operations in the business requirements and the consistency requirements between business operations; determining transaction boundaries based on the relationship between each business operation, and jointly determining the scope and content of the global transaction based on the transaction boundaries and consistency requirements.

[0051] Specifically, business requirements are obtained and analyzed to determine the relationship between various business operations. Based on the relationship between business operations included in the business requirements, consistency requirements between business operations are determined. The consistency requirements describe the data consistency and business logic requirements that need to be met in the process of executing business operations. Based on the relationship and consistency requirements between business operations, transaction boundaries are determined. Transaction boundaries define the scope of an atomic operation. Business operations within this scope are either all executed successfully or all rolled back. Based on transaction boundaries and consistency requirements, the scope and content of global transactions are jointly determined. Global transactions include all business operations that need to be performed in one atomic operation.

[0052] In an embodiment of the present application, a distributed transaction management method is provided, wherein the transaction division condition is determined according to the business demand and the scope of the global transaction, and the global transaction is decomposed into multiple sub-transactions according to the transaction division condition, including: determining the transaction division elements according to the business demand and the scope of the global transaction, analyzing the transaction division elements, and identifying the division elements suitable as the transaction division conditions in the division elements; dividing the global transaction according to multiple division conditions to obtain a plurality of transaction sets, and judging whether each transaction set has an intersection; if each transaction set has an intersection, determining the intersection transaction in the intersection, analyzing the conformity strength of the intersection transaction with the transaction set in which it is located, and removing the intersection transaction from the transaction set with a small conformity strength according to the conformity strength, retaining only the intersection transaction with the highest conformity strength with a certain transaction set in each transaction set, and removing all the intersection transactions in the remaining transaction sets, and then treating each transaction set after the removal as a sub-transaction; if each transaction set does not have an intersection, treating each transaction set directly as a sub-transaction.

[0053] Specifically, according to business requirements and the scope of global transactions, determine the transaction partitioning elements, and analyze the partitioning elements to identify elements suitable as transaction partitioning conditions; then, divide the global transactions according to multiple partitioning conditions to obtain multiple transaction sets; determine whether each transaction set has an intersection. If each transaction set has an intersection, find the intersection transaction in the intersection, that is, the transaction that exists in all transaction sets. For each intersection transaction, analyze its compliance strength with the transaction set in which it is located, where the compliance strength can be evaluated based on business requirements, data dependencies and other factors. According to the compliance strength, the intersection transaction is removed from the transaction set with a smaller compliance strength, and only the intersection transaction with the highest compliance strength with a certain transaction set is retained in each transaction set. Each transaction set after the elimination process is used as a sub-transaction; if each transaction set does not have an intersection, each transaction set is directly used as a sub-transaction. Through the above steps, global transactions can be divided according to the transaction partitioning elements, but the transactions after the division are inevitably crossed. According to the compliance strength between the transaction and the transaction set, the intersection can be eliminated, and the global transaction can be more clearly divided, thereby satisfying the isolation between different sub-transactions.

[0054] In an embodiment of the present application, a method for managing distributed transactions is provided, wherein the method scans the content of a global transaction to determine a priority determination principle, and determines the priority of a sub-transaction according to the priority determination principle, including: scanning the content of the global transaction to obtain each content information, and calculating the degree of influence of each content information on the global transaction, and determining the content information with an influence degree higher than a preset threshold as the priority determination principle of the global transaction; analyzing the priority logic of the priority determination principle for the sub-transaction, and dividing the priority logic into a first priority logic and a second priority logic, and determining the weight of the first priority logic and the second priority logic according to the importance of the first priority logic and the second priority logic to the sub-transaction; respectively determining the priority evaluation indicators corresponding to the first priority logic and the second priority logic and the weights corresponding to the indicators, and quantifying and valuing each priority evaluation indicator to obtain an evaluation value of each priority evaluation indicator; obtaining a priority logic value of the priority determination principle according to the weights of the first priority logic and the second priority logic, and the evaluation values ​​and weights of the priority evaluation indicators corresponding to the first priority logic and the second priority logic; obtaining a total priority logic value of the sub-transaction based on the addition calculation of the priority logic values ​​of each priority determination principle, and determining the priority of the sub-transaction according to the preset mapping relationship between the total priority logic value of the sub-transaction and the priority of the sub-transaction.

[0055] Specifically, the content of the global transaction is scanned to obtain each content information; for each content information, its influence on the global transaction is calculated, and the content information with an influence higher than the preset threshold is determined as the priority judgment principle of the global transaction; according to the priority judgment principle, the priority logic is divided into the first priority logic and the second priority logic; according to the importance of the first priority logic and the second priority logic to the sub-transaction, the weight of the first priority logic and the second priority logic is determined; the priority evaluation index corresponding to the first priority logic and the second priority logic and the weight corresponding to the index are determined respectively; each priority evaluation index is quantified and the evaluation value of each priority evaluation index is calculated; the priority logic value of the priority judgment principle is calculated according to the weight of the first priority logic and the second priority logic, the evaluation value and the weight of the evaluation index; the priority logic value of the priority judgment principle is calculated by adding the priority logic values ​​of each priority judgment principle to obtain the total priority logic value of the sub-transaction; the priority of the sub-transaction is determined according to the preset mapping relationship between the total priority logic value of the sub-transaction and the priority of the sub-transaction. Through the above steps, the priority of the sub-transaction can be determined according to the content of the global transaction and the priority judgment principle, so that the sub-transaction can be executed in an orderly manner to meet the business needs and priority requirements.

[0056] In an embodiment of the present application, a method for managing distributed transactions is provided, wherein the first priority granularity and the second priority granularity corresponding to the evaluation priority logic include:

[0057] ;

[0058] Among them, S is the priority logic value of the priority judgment principle, is the weight of the first priority logic, n is the number of priority evaluation indicators corresponding to the first priority logic, is the weight of the priority evaluation indicator corresponding to the first priority logic, is the evaluation value of the priority evaluation index corresponding to the first priority logic, is the weight of the second priority logic, m is the number of priority evaluation indicators corresponding to the second priority logic, is the weight of the priority evaluation indicator corresponding to the second priority logic, is the evaluation value of the priority evaluation indicator corresponding to the second priority logic.

[0059] In an embodiment of the present application, a method for managing distributed transactions is provided, wherein the execution order of sub-transactions is determined according to the priorities of the sub-transactions, including: sorting the priorities of the sub-transactions in descending order to obtain a priority sequence of the sub-transactions; and setting the priority sequence of the sub-transactions as the execution order of the corresponding sub-transactions.

[0060] In an embodiment of the present application, a distributed transaction management method is provided, wherein the method of obtaining the utilization efficiency of shared resources by subtransactions in the execution order and adjusting the execution order according to the utilization efficiency of shared resources by subtransactions comprises: obtaining the utilization efficiency of shared resources by each subtransaction after each subtransaction is executed in the execution order; sequentially comparing the size relationship between the utilization efficiency of shared resources by adjacent subtransactions, and arranging the execution order of subtransactions with greater utilization efficiency of shared resources before the execution order of subtransactions with less utilization efficiency of shared resources; if the execution order of subtransactions with greater utilization efficiency of shared resources is at the front end of the sequence, no sequence adjustment is made; and if the execution order of subtransactions with less utilization efficiency of shared resources is at the end of the sequence, no sequence adjustment is made.

[0061] Specifically, according to the priority sequence of the transaction, each sub-transaction is executed in sequence, and the utilization efficiency of each sub-transaction on the shared resources is recorded; the utilization efficiency of the adjacent sub-transactions on the shared resources is compared in sequence, and the comparison method is a comparison strategy of directly comparing the numerical values ​​of the utilization efficiency; the execution order of the sub-transaction with greater utilization efficiency of the shared resources is arranged before the execution order of the sub-transaction with less utilization efficiency of the shared resources, so that the sub-transaction with higher utilization efficiency can be executed first, and the utilization efficiency of the shared resources can be improved; if the execution order of the sub-transaction with greater utilization efficiency of the shared resources is already at the front of the sequence, the sequence adjustment is not made, and similarly, if the execution order of the sub-transaction with less utilization efficiency of the shared resources is already at the end of the sequence, the sequence adjustment is not made. Through the above steps, the utilization efficiency of the shared resources can be compared and adjusted according to the sub-transactions, ensuring that the sub-transaction with higher utilization efficiency is executed first when executing the global transaction, thereby improving the utilization efficiency of the shared resources, helping to optimize the effect of transaction execution, and meeting business needs and resource utilization efficiency requirements.

[0062] like Figure 2 As shown, in an embodiment of the present application, a distributed transaction management system is provided, including: an acquisition module, used to acquire business requirements, analyze business requirements to determine transaction boundaries, and determine the scope and content of global transactions based on transaction boundaries and business requirements; a division module, used to determine transaction division conditions based on business requirements and the scope of global transactions, and split global transactions into multiple sub-transactions based on the transaction division conditions; a sorting module, used to scan the content of global transactions to determine priority discrimination principles, determine the priorities of sub-transactions based on the priority discrimination principles, and determine the execution order of sub-transactions based on the priorities of sub-transactions; an adjustment module, used to obtain the utilization efficiency of shared resources by sub-transactions according to the execution order, and adjust the execution order according to the utilization efficiency of shared resources by sub-transactions; a management module, used to manage sub-transactions based on the adjusted execution order.

[0063] In summary, the embodiment of the present invention provides a method and system for managing distributed transactions, which includes: obtaining business requirements, analyzing business requirements to determine transaction boundaries, and determining the scope and content of global transactions according to transaction boundaries and business requirements; determining transaction division conditions according to business requirements and the scope of global transactions, and disassembling global transactions into multiple sub-transactions according to the transaction division conditions; scanning the content of global transactions to determine priority discrimination principles, determining the priorities of sub-transactions according to the priority discrimination principles, and determining the execution order of sub-transactions according to the priorities of sub-transactions; obtaining the utilization efficiency of sub-transactions on shared resources according to the execution order, adjusting the execution order according to the utilization efficiency of sub-transactions on shared resources; managing sub-transactions according to the adjusted execution order. The present invention effectively solves the concurrency conflict problem of sub-transactions through optimized management of sub-transactions, improves the performance of distributed systems, and ensures data consistency.

[0064] Finally, it should be noted that it is obvious that those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0065] The above is only an example of implementation of the present invention, but it cannot be used to limit the scope of the present invention. Any structural changes made according to the present invention, as long as they do not lose the essence of the present invention, should be regarded as falling within the scope of protection of the present invention and being restricted. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and related instructions of the platform described above can refer to the corresponding process in the aforementioned platform embodiment, and will not be repeated here.

[0066] The term "comprises" or any other similar term is intended to cover a non-exclusive inclusion such that a process, platform, article, or apparatus / platform that includes a list of elements includes not only those elements but also other elements not expressly listed or inherent to such process, platform, article, or apparatus / platform.

[0067] So far, the technical solutions of the present invention have been described in conjunction with the further embodiments shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.

Claims

1. A distributed transaction management method, characterized in that: include: Obtain business requirements, analyze business requirements to determine transaction boundaries, and determine the scope and content of global transactions based on transaction boundaries and business requirements; Determine the transaction division conditions based on business requirements and the scope of the global transaction, and split the global transaction into multiple sub-transactions based on the transaction division conditions; Scan the content of the global transaction to determine the priority determination principle, determine the priority of the sub-transaction according to the priority determination principle, and determine the execution order of the sub-transaction according to the priority of the sub-transaction; Obtaining the utilization efficiency of the subtransactions on the shared resources according to the execution order, and adjusting the execution order according to the utilization efficiency of the subtransactions on the shared resources; Manage sub-transactions according to the adjusted execution order; The obtaining of business requirements, analyzing business requirements to determine transaction boundaries, and determining the scope and content of global transactions based on transaction boundaries and business requirements include: Obtain and analyze business requirements to determine the relationships between business operations in business requirements and the consistency requirements between business operations; Determine transaction boundaries based on the relationship between various business operations, and jointly determine the scope and content of global transactions based on transaction boundaries and consistency requirements; The transaction division conditions are determined according to the business requirements and the scope of the global transaction, and the global transaction is split into multiple sub-transactions according to the transaction division conditions, including: Determine the transaction partitioning elements based on business requirements and the scope of global transactions, analyze the transaction partitioning elements, and identify the partitioning elements that are suitable as transaction partitioning conditions; The global transactions are divided according to multiple division conditions to obtain several transaction sets, and it is determined whether there is an intersection among each transaction set; If each transaction set has an intersection, determine the intersection transactions in the intersection, analyze the compliance strength between the intersection transactions and the transaction set they are in, and remove the intersection transactions from the transaction set with a small compliance strength according to the compliance strength. Only the intersection transactions with the highest compliance strength with a certain transaction set are retained in each transaction set, and the intersection transactions in the remaining transaction sets are all removed. Then, each transaction set after the removal is used as a sub-transaction; If there is no intersection among each transaction set, each transaction set will be directly regarded as a sub-transaction.

2. A distributed transaction management method according to claim 1, characterized in that: The scanning of the content of the global transaction to determine the priority determination principle, and determining the priority of the sub-transaction according to the priority determination principle, includes: Scan the content of the global transaction, obtain each content information, and calculate the impact of each content information on the global transaction, and determine the content information with an impact higher than a preset threshold as the priority judgment principle of the global transaction; Analyze the priority logic of the priority judgment principle for the sub-transaction, and divide the priority logic into the first priority logic and the second priority logic, and determine the weights of the first priority logic and the second priority logic according to their importance to the sub-transaction; Determine the priority evaluation indicators corresponding to the first priority logic and the second priority logic and the weights corresponding to the indicators respectively, and quantify the values ​​of each priority evaluation indicator to obtain the evaluation value of each priority evaluation indicator; Obtaining a priority logic value of a priority discrimination principle according to the weights of the first priority logic and the second priority logic, and the evaluation values ​​and weights of the priority evaluation indicators corresponding to the first priority logic and the second priority logic; The priority logic values ​​based on each priority determination principle are added together to obtain the total priority logic value of the sub-transaction, and the priority of the sub-transaction is determined according to the preset mapping relationship between the total priority logic value of the sub-transaction and the priority of the sub-transaction.

3. A distributed transaction management method according to claim 2, characterized in that: The first priority granularity and the second priority granularity corresponding to the priority determination principle include: ; Among them, S is the priority logic value of the priority judgment principle, is the weight of the first priority logic, n is the number of priority evaluation indicators corresponding to the first priority logic, is the weight of the priority evaluation indicator corresponding to the first priority logic, is the evaluation value of the priority evaluation index corresponding to the first priority logic, is the weight of the second priority logic, m is the number of priority evaluation indicators corresponding to the second priority logic, is the weight of the priority evaluation indicator corresponding to the second priority logic, is the evaluation value of the priority evaluation indicator corresponding to the second priority logic.

4. A distributed transaction management method according to claim 2, characterized in that: Determining the execution order of the sub-transactions according to the priorities of the sub-transactions includes: Sort the priorities of the subtransactions from large to small to obtain the priority sequence of the subtransactions; The priority sequence of the subtransactions is set to the execution order of the corresponding subtransactions.

5. A distributed transaction management method according to claim 4, characterized in that: The obtaining the utilization efficiency of the subtransactions on the shared resources according to the execution order, and adjusting the execution order according to the utilization efficiency of the subtransactions on the shared resources, includes: After each sub-transaction is executed in the order of execution, the utilization efficiency of each sub-transaction on shared resources is obtained; Compare the utilization efficiency of shared resources of adjacent sub-transactions in order, and arrange the execution order of sub-transactions with higher utilization efficiency of shared resources before the execution order of sub-transactions with lower utilization efficiency of shared resources; If the execution order of the subtransaction with higher utilization efficiency of shared resources is at the front of the sequence, no order adjustment is made; if the execution order of the subtransaction with lower utilization efficiency of shared resources is at the end of the sequence, no order adjustment is made.

6. A distributed transaction management system, characterized in that: include: The acquisition module is used to obtain business requirements, analyze business requirements to determine transaction boundaries, and determine the scope and content of global transactions based on transaction boundaries and business requirements; The partitioning module is used to determine the transaction partitioning conditions according to business requirements and the scope of the global transaction, and to split the global transaction into multiple sub-transactions according to the transaction partitioning conditions; A sorting module is used to scan the content of the global transaction to determine the priority discrimination principle, determine the priority of the sub-transaction according to the priority discrimination principle, and determine the execution order of the sub-transaction according to the priority of the sub-transaction; An adjustment module, used to obtain the utilization efficiency of the sub-transactions on the shared resources according to the execution order, and adjust the execution order according to the utilization efficiency of the sub-transactions on the shared resources; A management module, used to manage sub-transactions according to the adjusted execution order; The obtaining of business requirements, analyzing business requirements to determine transaction boundaries, and determining the scope and content of global transactions based on transaction boundaries and business requirements include: Obtain and analyze business requirements to determine the relationships between business operations in business requirements and the consistency requirements between business operations; Determine transaction boundaries based on the relationship between various business operations, and jointly determine the scope and content of global transactions based on transaction boundaries and consistency requirements; The transaction division conditions are determined according to the business requirements and the scope of the global transaction, and the global transaction is split into multiple sub-transactions according to the transaction division conditions, including: Determine the transaction partitioning elements based on business requirements and the scope of global transactions, analyze the transaction partitioning elements, and identify the partitioning elements that are suitable as transaction partitioning conditions; The global transactions are divided according to multiple division conditions to obtain several transaction sets, and it is determined whether there is an intersection among each transaction set; If each transaction set has an intersection, determine the intersection transactions in the intersection, analyze the compliance strength between the intersection transactions and the transaction set they are in, and remove the intersection transactions from the transaction set with a small compliance strength according to the compliance strength. Only the intersection transactions with the highest compliance strength with a certain transaction set are retained in each transaction set, and the intersection transactions in the remaining transaction sets are all removed. Then, each transaction set after the removal is used as a sub-transaction; If there is no intersection among each transaction set, each transaction set will be directly regarded as a sub-transaction.

Citation Information

Patent Citations

  • Transaction scheduling method of heterogeneous distributed real-time system

    CN102207883A

  • Transaction-based service control system and method

    CN102346460A

  • Multi-process synchronization control method

    CN105760216A

  • Data processing control method and device based on stream-oriented computation, server and medium

    CN108182281A

  • Transaction processing method, apparatus, equipment and storage medium

    CN110990182A