An event-driven method for ensuring data consistency and transaction management
Through an event-driven method, intelligently evaluate the correlation of distributed systems, establish a collaboration mechanism, and balance the data processing time interval, it solves the problem that the existing technology is difficult to achieve data consistency guarantee and transaction management in multi-system high concurrency scenarios, and realizes the dynamic, synergistic and real-time nature of data consistency processing.
Patent Information
- Application Number
- CN202510352313.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-03-25
AI Technical Summary
The prior art is difficult to achieve data consistency guarantee and transaction management in multi-system high concurrency scenarios, especially in terms of dynamics, synergies and real-timeness, resulting in imbalance in data processing order, data conflicts and inconsistencies.
The event-driven data consistency guarantee and transaction management method is adopted, and the correlation of distributed systems is intelligently evaluated, the coordination mechanism is established, the constraint coefficients of the distributed processing system are calculated, the data consistency guarantee transaction management group is generated, the data consistency guarantee transaction management group is balanced, and the data processing time interval is avoided imbalance.
Effectively ensure the dynamic, synergistic and real-time nature of data consistency processing, reduce data conflicts and inconsistencies, and ensure the balance and accuracy of data processing.
Smart Images

Figure CN119884136B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to an event-driven method for ensuring data consistency and transaction management. Background Art
[0002] With the rapid development of industrial Internet and enterprise informatization, enterprises are increasingly adopting integrated platforms to connect multiple distributed systems to support complex business requirements. These distributed systems cover multiple fields such as production scheduling, inventory management, order processing, and transportation scheduling. Through the unified architecture of the platform, different systems can achieve data exchange and business process coordination.
[0003] Traditional methods for ensuring data consistency and transaction management adopt the two-phase commit protocol, where a coordinator uniformly manages the commit and rollback of transactions. However, in the scenario of high concurrency in multiple systems, this method exposes significant limitations: the rigid architecture based on static rules lacks dynamic adjustment capabilities and is difficult to cope with complex business environments. Moreover, the existing technology cannot effectively evaluate the association strength between distributed systems, and there is a lack of necessary coordination mechanisms between systems, which further exacerbates the difficulty of maintaining data consistency. At the same time, due to the significant differences in data processing rates between different systems, and the existing technology cannot effectively constrain high-speed data, resulting in an imbalance in data processing order, which in turn leads to data conflicts and inconsistency problems. Typical manifestations are: orders are still confirmed when inventory is insufficient, or a transportation plan has been generated while the order status has not been updated synchronously. In addition, the delay in data update between systems may also lead to decision-making errors and improper resource scheduling, resulting in a high event processing delay and ultimately affecting the business response efficiency. These problems highlight the deficiencies of existing data consistency assurance and transaction management methods in terms of dynamics, coordination, and real-time performance. Summary of the Invention
[0004] An embodiment of the present invention provides an event-driven method for ensuring data consistency and transaction management, which intelligently evaluates the relevance of distributed systems, establishes a coordination mechanism, balances the data consistency processing time intervals of different distributed systems, avoids the imbalance of data processing order, reduces data conflicts and inconsistency problems, and ensures the dynamics, coordination, and real-time performance of data consistency processing.
[0005] To achieve the above object, the present invention provides an event-driven method for ensuring data consistency and transaction management, including:
[0006] Determine multiple data distributed processing systems, obtain the data distributed event information corresponding to each data distributed processing system, calculate the data distributed processing system constraint coefficients between every two data distributed processing systems based on the data distributed event information, and generate a data consistency assurance transaction management group;
[0007] Collect the historical distributed data generation efficiencies corresponding to each data distributed processing system in the data consistency guarantee transaction management group, and generate a historical distributed data generation efficiency sequence based on the collection time sequence;
[0008] Analyze the historical distributed data generation efficiency sequence, calculate the historical distributed data generation efficiency coefficient of the data distributed processing system based on the analysis result, and group all the data distributed processing systems based on the historical distributed data generation efficiency coefficient to obtain a high-efficiency data distributed processing system group and a low-efficiency data distributed processing system group;
[0009] Calculate the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group based on the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group;
[0010] Determine the current data update time interval of the data distributed processing system in the high-efficiency data distributed processing system group, constrain the current data update time interval based on the high-efficiency data distributed processing constraint coefficient to obtain a constrained data update time interval, and perform data consistency guarantee transaction management according to the constrained data update time interval.
[0011] Further, when obtaining the data distributed event information corresponding to each data distributed processing system, calculating the data distributed processing system constraint coefficient of every two data distributed processing systems based on the data distributed event information, and generating a data consistency guarantee transaction management group, it includes:
[0012] Extract the data distributed event information corresponding to each data distributed processing system, where the data distributed event information includes the data distributed event process range and the data distributed event flow direction range;
[0013] Determine the data distributed event process coupling degree based on the data distributed event process ranges corresponding to every two data distributed processing systems;
[0014] Determine the data distributed event flow direction coupling degree based on the data distributed event flow direction ranges corresponding to every two data distributed processing systems;
[0015] Determine the data distributed event two-way coupling degree based on the data distributed event process ranges and the data distributed event flow direction ranges corresponding to every two data distributed processing systems;
[0016] Calculate the data distributed processing system constraint coefficient of every two data distributed processing systems according to the data distributed event process coupling degree, the distributed event flow direction coupling degree, and the data distributed event two-way coupling degree;
[0017] When the constraint coefficient of the data distributed processing system is greater than or equal to the preset constraint coefficient of the data distributed processing system, a data consistency guarantee transaction management identifier is generated for two data distributed processing systems;
[0018] Randomly select two data distributed processing systems for the second time, and calculate the constraint coefficient of the second data distributed processing system. Based on the constraint coefficient of the second data distributed processing system, determine whether a data consistency guarantee transaction management identifier can be generated for the two randomly selected data distributed processing systems for the second time;
[0019] When the constraint coefficient of the data distributed processing system is less than the preset constraint coefficient of the data distributed processing system, randomly select two data distributed processing systems for the second time;
[0020] Randomly extract two data distributed processing systems a1 times to obtain multiple data consistency guarantee transaction management identifiers;
[0021] Count the number of data consistency guarantee transaction management identifiers corresponding to each data distributed processing system, sort them from largest to smallest, and select the data distributed processing systems corresponding to the top a2 data consistency guarantee transaction management identifier numbers to generate the data consistency guarantee transaction management group.
[0022] Furthermore, calculate the coupling degree of the data distributed event processes corresponding to every two data distributed processing systems according to the following formula:
[0023] ;
[0024] where q1 is the coupling degree of the data distributed event processes corresponding to every two data distributed processing systems, is the number of intersections of the data distributed event process ranges corresponding to every two data distributed processing systems, is the number of unions of the data distributed event process ranges corresponding to every two data distributed processing systems;
[0025] Calculate the coupling degree of the data distributed event flows corresponding to every two data distributed processing systems according to the following formula:
[0026] ;
[0027] where q2 is the coupling degree of the data distributed event flows corresponding to every two data distributed processing systems, is the number of intersections of the data distributed event flow ranges corresponding to every two data distributed processing systems, is the number of unions of the data distributed event flow ranges corresponding to every two data distributed processing systems;
[0028] Calculate the two-way coupling degree of data distribution events corresponding to each pair of data distribution processing systems according to the following formula:
[0029] ;
[0030] where q3 is the two-way coupling degree of data distribution events corresponding to each pair of data distribution processing systems;
[0031] Calculate the constraint coefficient of the data distribution processing system for each pair of data distribution processing systems according to the following formula:
[0032] ;
[0033] where y is the constraint coefficient of the data distribution processing system for each pair of data distribution processing systems, t1 is the total number of the data distribution event process range and the data distribution event flow direction range corresponding to one data distribution processing system, t2 is the total number of the data distribution event process range and the data distribution event flow direction range corresponding to another data distribution processing system, max is the maximum value symbol, and min is the minimum value symbol.
[0034] Further, when analyzing the historical distributed data generation efficiency sequence and calculating the historical distributed data generation efficiency coefficient of the data distribution processing system based on the analysis result, it includes:
[0035] Calculate the distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence;
[0036] Calculate the mean value and variance of the characteristic factors corresponding to all distributed data generation efficiency characteristic factors, take the minimum value of the mean value and variance of the characteristic factors as the first division characteristic factor, and take the maximum value of the mean value and variance of the characteristic factors as the second division characteristic factor;
[0037] Perform sequence division on all distributed data generation efficiency characteristic factors according to the first division characteristic factor and the second division characteristic factor, and divide all distributed data generation efficiency characteristic factors less than the first division characteristic factor into the first distributed data generation efficiency characteristic factor sequence;
[0038] Divide all distributed data generation efficiency characteristic factors greater than or equal to the first division characteristic factor and less than the second division characteristic factor into the second distributed data generation efficiency characteristic factor sequence;
[0039] Divide all distributed data generation efficiency characteristic factors greater than or equal to the second division characteristic factor into the third distributed data generation efficiency characteristic factor sequence;
[0040] Calculate the historical distributed data generation efficiency coefficient of the data distributed processing system according to the first distributed data generation efficiency characteristic factor sequence, the second distributed data generation efficiency characteristic factor sequence, and the third distributed data generation efficiency characteristic factor sequence.
[0041] Further, when calculating the distributed data generation efficiency characteristic factors of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, it includes:
[0042] For any historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, use the historical distributed data generation efficiencies on the left and right sides of the historical distributed data generation efficiency as the neighborhood historical distributed data generation efficiencies;
[0043] Calculate the distributed data generation efficiency characteristic factors of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence according to the following formula:
[0044] ;
[0045] where u is the distributed data generation efficiency characteristic factor of the historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, p i is the change value of the i-th historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, p1 is the mean value of the change values of all change values in the historical distributed data generation efficiency sequence, m is the number of neighborhood historical distributed data generation efficiencies of the historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, p i,s is the change value of the s-th neighborhood historical distributed data generation efficiency of the i-th historical distributed data generation efficiency in the historical distributed data generation efficiency sequence.
[0046] Further, when calculating the historical distributed data generation efficiency coefficient of the data distributed processing system according to the first distributed data generation efficiency characteristic factor sequence, the first distributed data generation efficiency characteristic factor sequence, and the first distributed data generation efficiency characteristic factor sequence, it includes:
[0047] Determine the small characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence;
[0048] ;
[0049] where d1 is the small characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence, f1 is a preset factor, and its value range is [0.1, 0.2], and g1 is the mean value corresponding to the first distributed data generation efficiency characteristic factor sequence;
[0050] Determine the large feature factor boundary value of the first distributed data generation efficiency feature factor sequence;
[0051] ;
[0052] where d2 is the large feature factor boundary value of the first distributed data generation efficiency feature factor sequence;
[0053] Determine the feature factor boundary range according to the small feature factor boundary value and the large feature factor boundary value;
[0054] Analyze the distributed data generation efficiency feature factors in the first distributed data generation efficiency feature factor sequence, and count the number of first distributed data generation efficiency feature factors falling within the feature factor boundary range;
[0055] Determine the second small feature factor boundary value of the second distributed data generation efficiency feature factor sequence;
[0056] Determine the second large feature factor boundary value of the second distributed data generation efficiency feature factor sequence;
[0057] Determine the second feature factor boundary range according to the second small feature factor boundary value and the second large feature factor boundary value;
[0058] Analyze the distributed data generation efficiency feature factors in the second distributed data generation efficiency feature factor sequence, and count the number of second distributed data generation efficiency feature factors falling within the second feature factor boundary range;
[0059] Determine the third small feature factor boundary value of the third distributed data generation efficiency feature factor sequence;
[0060] Determine the third large feature factor boundary value of the third distributed data generation efficiency feature factor sequence;
[0061] Determine the third feature factor boundary range according to the third small feature factor boundary value and the third large feature factor boundary value;
[0062] Analyze the distributed data generation efficiency feature factors in the third distributed data generation efficiency feature factor sequence, and count the number of third distributed data generation efficiency feature factors falling within the third feature factor boundary range;
[0063] Calculate the historical distributed data generation efficiency coefficient of the data distributed processing system based on the number of first distributed data generation efficiency feature factors, the number of second distributed data generation efficiency feature factors, and the number of third distributed data generation efficiency feature factors.
[0064] Further, when calculating the historical distributed data generation efficiency coefficient of the data distributed processing system based on the number of the first distributed data generation efficiency characteristic factors, the number of the second distributed data generation efficiency characteristic factors, and the number of the third distributed data generation efficiency characteristic factors, it includes:
[0065] Calculating the historical distributed data generation efficiency coefficient of the data distributed processing system according to the following formula:
[0066] ;
[0067] where h is the historical distributed data generation efficiency coefficient of the data distributed processing system, k1 is the number of the first distributed data generation efficiency characteristic factors, k2 is the number of the second distributed data generation efficiency characteristic factors, k3 is the number of the third distributed data generation efficiency characteristic factors, j1 is the first calculation coefficient, j2 is the second calculation coefficient, j3 is the third calculation coefficient, and j1 < j2 < j3, j1 > 0, j2 > 0, j3 > 0.
[0068] Further, when grouping all the data distributed processing systems based on the historical distributed data generation efficiency coefficient to obtain a high-efficiency data distributed processing system group and a low-efficiency data distributed processing system group, it includes:
[0069] Calculating the average value of the distributed data generation efficiency coefficients of all the historical distributed data generation efficiency coefficients;
[0070] Grouping all the data distributed processing systems according to the average value of the distributed data generation efficiency coefficients;
[0071] When the historical distributed data generation efficiency coefficient is less than the average value of the distributed data generation efficiency coefficients, the corresponding data distributed processing system is assigned to the low-efficiency data distributed processing system group;
[0072] When the historical distributed data generation efficiency coefficient is greater than or equal to the average value of the distributed data generation efficiency coefficients, the corresponding data distributed processing system is assigned to the high-efficiency data distributed processing system group.
[0073] Further, when calculating the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group based on the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group, it includes:
[0074] Calculating the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group according to the following formula;
[0075] ;
[0076] Among them, c is the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group, v1 is the first adjustment coefficient, and b1 x is the x-th historical distributed data generation efficiency coefficient in the high-efficiency data distributed processing system group, and b2 z is the z-th historical distributed data generation efficiency coefficient in the low-efficiency data distributed processing system group. is the minimum value of all , and is the maximum value of all . v2 is the second adjustment coefficient, n1 is the number of historical distributed data generation efficiency coefficients in the high-efficiency data distributed processing system group, and n2 is the number of historical distributed data generation efficiency coefficients in the low-efficiency data distributed processing system group.
[0077] Furthermore, when constraining the current data update time interval based on the high-efficiency data distributed processing constraint coefficient to obtain the constrained data update time interval, it includes:
[0078] Preset a plurality of preset high-efficiency data distributed processing constraint coefficients;
[0079] Preset a plurality of preset update time interval constraint factors;
[0080] Select the corresponding preset update time interval constraint factor according to the relationship between the high-efficiency data distributed processing constraint coefficient and each preset high-efficiency data distributed processing constraint coefficient;
[0081] Calculate the product value of the selected preset update time interval constraint factor and the current data update time interval as the constrained data update time interval.
[0082] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0083] The present invention discloses a method for ensuring data consistency and transaction management based on event-driven. It obtains the data distributed event information of a data distributed processing system, calculates the constraint coefficient of the data distributed processing system, and generates a data consistency guarantee transaction management group; generates a historical distributed data generation efficiency sequence; calculates the historical distributed data generation efficiency coefficient to obtain high- and low-efficiency data distributed processing system groups; calculates the constraint coefficient of the high-efficiency data distributed processing, constrains the data update time interval, obtains the constrained data update time interval, and performs data consistency guarantee transaction management. Through system constraints, the preconditions for effective data consistency processing are ensured. Through time constraints, the data processing time intervals of different distributed systems are balanced, the imbalance of data processing order is avoided, data conflicts and inconsistencies are eliminated, and the dynamics, coordination, and real-time nature of data consistency processing are guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0085] Figure 1 The flowchart of a method for ensuring data consistency and transaction management based on event-driven in an embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0086] The following further describes the specific embodiments of the present invention in detail with reference to the drawings and embodiments. The following embodiments are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0087] The terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, "a plurality" means two or more.
[0088] The following is a description of the preferred embodiments of the present invention in conjunction with the drawings.
[0089] As Figure 1 shown, the embodiments of the present invention disclose a method for ensuring data consistency and transaction management based on event-driven, including:
[0090] S110: Determine multiple data distributed processing systems, obtain the data distributed event information corresponding to each data distributed processing system, calculate the data distributed processing system constraint coefficients for every two data distributed processing systems based on the data distributed event information, and generate a data consistency guarantee transaction management group;
[0091] In some embodiments of the present application, when obtaining the data distributed event information corresponding to each data distributed processing system, calculating the data distributed processing system constraint coefficients for every two data distributed processing systems based on the data distributed event information, and generating a data consistency guarantee transaction management group, it includes:
[0092] Extract the data distributed event information corresponding to each data distributed processing system, where the data distributed event information includes the data distributed event process range and the data distributed event flow range;
[0093] Determine the data distributed event process coupling degree based on the data distributed event process ranges corresponding to every two data distributed processing systems;
[0094] Determine the data distributed event flow coupling degree based on the data distributed event flow ranges corresponding to every two data distributed processing systems;
[0095] Determine the data distributed event two-way coupling degree based on the data distributed event process ranges and the data distributed event flow ranges corresponding to every two data distributed processing systems;
[0096] Calculate the data distributed processing system constraint coefficients for every two data distributed processing systems according to the data distributed event process coupling degree, the distributed event flow coupling degree, and the data distributed event two-way coupling degree;
[0097] When the data distributed processing system constraint coefficient is greater than or equal to the preset data distributed processing system constraint coefficient, generate a data consistency guarantee transaction management identifier for the two data distributed processing systems;
[0098] Randomly select two data distributed processing systems for the second time, calculate the second data distributed processing system constraint coefficient, and determine whether a data consistency guarantee transaction management identifier can be generated for the two randomly selected data distributed processing systems for the second time based on the second data distributed processing system constraint coefficient;
[0099] When the data distributed processing system constraint coefficient is less than the preset data distributed processing system constraint coefficient, randomly select two data distributed processing systems for the second time;
[0100] Randomly extract two data distributed processing systems a1 times to obtain multiple data consistency guarantee transaction management identifiers;
[0101] Count the number of data consistency guarantee transaction management identifiers corresponding to each data distributed processing system, sort them from largest to smallest, and select the top a2 data distributed processing systems corresponding to the number of data consistency guarantee transaction management identifiers to generate the data consistency guarantee transaction management group.
[0102] In this embodiment, the data distributed event information includes the data distributed event process scope and the data distributed event flow direction scope. Among them, the data distributed event process scope refers to the overall scope of the systems, modules, and their interaction relationships involved in the data processing and operations related to a certain business event in the data distributed system. It describes the data transfer and processing process among various systems during the entire life cycle of the event from triggering to completion, including order creation, payment processing, logistics distribution, etc. The data distributed event flow direction scope refers to the direction, path of data flow in the distributed system, and the interaction relationships among the involved nodes and systems. For example, after the order system generates an order, the data flows to the payment system for payment processing, and then to the logistics system for distribution arrangement. For example, the warehouse system provides inventory information to the logistics system, and at the same time, the logistics system feedbacks the distribution status to the warehouse system.
[0103] In this embodiment, the preset data distributed processing system constraint coefficient is preferably 6, and it can be specifically adjusted according to the actual situation.
[0104] In this embodiment, when the data distributed processing system constraint coefficient is greater than or equal to the preset data distributed processing system constraint coefficient, a data consistency guarantee transaction management identifier is generated for each data distributed processing system, that is, two data consistency guarantee transaction management identifiers are generated.
[0105] In this embodiment, the setting of a1 here is the same as the number of data distributed processing systems. For example, if there are 8 data distributed processing systems, then two data distributed processing systems are randomly extracted 8 times.
[0106] In this embodiment, a2 is preferably 5, and it can be specifically adjusted according to the actual situation.
[0107] The beneficial effects of the above technical solution are as follows: calculating the coupling degree of data distributed event processes in the present invention can reflect the associated situation of the data distributed event process scope between two data distributed processing systems, calculating the coupling degree of data distributed event flow directions can reflect the associated situation of the data distributed event flow direction scope between two data distributed processing systems, calculating the two-way coupling degree of data distributed events can reflect the cross-associated situation of the data distributed event process scope and the data distributed event flow direction scope between two data distributed processing systems, and calculating the data distributed processing system constraint coefficient for every two data distributed processing systems based on the coupling degree of data distributed event processes, the coupling degree of distributed event flow directions, and the two-way coupling degree of data distributed events lays a foundation and provides a basis for the division of the data consistency guarantee transaction management group. At the same time, generating the data consistency guarantee transaction management group can provide a reliable prerequisite for data consistency processing and avoid the intrusion of some inconsistent data.
[0108] In some embodiments of the present application, the coupling degree of data distributed event processes corresponding to every two data distributed processing systems is calculated according to the following formula:
[0109] ;
[0110] where q1 is the coupling degree of data distributed event processes corresponding to every two data distributed processing systems, is the number of intersections of the data distributed event process scopes corresponding to every two data distributed processing systems, is the number of unions of the data distributed event process scopes corresponding to every two data distributed processing systems;
[0111] The coupling degree of data distributed event flow directions corresponding to every two data distributed processing systems is calculated according to the following formula:
[0112] ;
[0113] where q2 is the coupling degree of data distributed event flow directions corresponding to every two data distributed processing systems, is the number of intersections of the data distributed event flow direction scopes corresponding to every two data distributed processing systems, is the number of unions of the data distributed event flow direction scopes corresponding to every two data distributed processing systems;
[0114] The two-way coupling degree of data distributed events corresponding to every two data distributed processing systems is calculated according to the following formula:
[0115] ;
[0116] where q3 is the two-way coupling degree of data distributed events corresponding to every two data distributed processing systems;
[0117] Calculate the data distributed processing system constraint coefficient of every two data distributed processing systems according to the following formula:
[0118] ;
[0119] Where y is the data distributed processing system constraint coefficient of every two data distributed processing systems, t1 is the total number of the data distributed event process scope and the data distributed event flow direction scope corresponding to one data distributed processing system, t2 is the total number of the data distributed event process scope and the data distributed event flow direction scope corresponding to another data distributed processing system, max is the maximum value symbol, and min is the minimum value symbol.
[0120] In this embodiment, the following is an example to show the method of judging the intersection and union:
[0121] Intersection and union of the data distributed event process scope:
[0122] 1. Intersection quantity
[0123] Definition: The number of links jointly participated in by two data distributed systems in the data distributed event process scope.
[0124] Judgment method: List the event processes participated in by each of the two data distributed systems, and find out the event process links jointly participated in by the two data distributed systems.
[0125] Example: The event processes participated in by data distributed system A: order creation, payment processing, logistics distribution.
[0126] The event processes participated in by data distributed system B: payment processing, inventory deduction, logistics distribution.
[0127] Intersection: Payment processing, logistics distribution.
[0128] Intersection quantity: 2.
[0129] 2. Union quantity
[0130] Definition: The number of all links participated in by two data distributed systems in the event process (after deduplication).
[0131] Judgment method: List the event processes participated in by each of the two data distributed systems. Merge the event process links of the two data distributed systems and deduplicate them.
[0132] Example: The event processes participated in by data distributed system A: order creation, payment processing, logistics distribution.
[0133] The event processes participated in by data distributed system B: payment processing, inventory deduction, logistics distribution.
[0134] Union: Order creation, payment processing, logistics distribution, inventory deduction.
[0135] Number of elements in the union: 4.
[0136] II. Intersection and union of the scope of data distributed event flow
[0137] 1. Number of elements in the intersection
[0138] Definition: The number of flow directions jointly participated in by two data distributed systems in the data flow path.
[0139] Judgment method: List the data flow paths of the two data distributed systems respectively. Find out the data flow paths jointly participated in by the two data distributed systems.
[0140] Example: The data flow path of data distributed system A: Order system → Payment system, Order system → Logistics system.
[0141] The data flow path of data distributed system B: Payment system → Logistics system, Payment system → Warehousing system.
[0142] Intersection: Payment system → Logistics system.
[0143] Number of elements in the intersection: 1.
[0144] 2. Number of elements in the union
[0145] Definition: The number of all participated flow directions (after deduplication) of two data distributed systems in the data flow path.
[0146] Judgment method: List the data flow paths of the two data distributed systems respectively. Merge the data flow paths of the two data distributed systems and deduplicate.
[0147] Example: The data flow path of data distributed system A: Order system → Payment system, Order system → Logistics system.
[0148] The data flow path of data distributed system B: Payment system → Logistics system, Payment system → Warehousing system.
[0149] Union: Order system → Payment system, Order system → Logistics system, Payment system → Logistics system, Payment system → Warehousing system.
[0150] Number of elements in the union: 4.
[0151] It should be noted that this is shown by way of example, and specific judgment should be made according to the actual situation.
[0152] S120: Collect the historical distributed data generation efficiencies corresponding to each data distributed processing system in the data consistency guarantee transaction management group, and generate a historical distributed data generation efficiency sequence based on the collection time order;
[0153] In this embodiment, the historical distributed data generation efficiency refers to the data generation efficiency in the data distributed processing system. As described above, it is the generation efficiency of order creation.
[0154] In this embodiment, generating a historical distributed data generation efficiency sequence based on the collection time order means sorting all the historical distributed data generation efficiencies according to the collection time to generate a historical distributed data generation efficiency sequence.
[0155] S130: Analyze the historical distributed data generation efficiency sequence, and calculate the historical distributed data generation efficiency coefficient of the data distributed processing system based on the analysis result. Group all the data distributed processing systems based on the historical distributed data generation efficiency coefficient to obtain a high-efficiency data distributed processing system group and a low-efficiency data distributed processing system group;
[0156] In some embodiments of the present application, when analyzing the historical distributed data generation efficiency sequence and calculating the historical distributed data generation efficiency coefficient of the data distributed processing system based on the analysis result, it includes:
[0157] Calculate the distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence;
[0158] Calculate the characteristic factor mean and characteristic factor variance corresponding to all distributed data generation efficiency characteristic factors. Take the minimum value among the characteristic factor mean and characteristic factor variance as the first division characteristic factor, and take the maximum value among the characteristic factor mean and characteristic factor variance as the second division characteristic factor;
[0159] Perform sequence division on all distributed data generation efficiency characteristic factors according to the first division characteristic factor and the second division characteristic factor. Divide all distributed data generation efficiency characteristic factors less than the first division characteristic factor into the first distributed data generation efficiency characteristic factor sequence;
[0160] Divide all distributed data generation efficiency characteristic factors greater than or equal to the first division characteristic factor and less than the second division characteristic factor into the second distributed data generation efficiency characteristic factor sequence;
[0161] Divide all distributed data generation efficiency characteristic factors greater than or equal to the second division characteristic factor into the third distributed data generation efficiency characteristic factor sequence;
[0162] Calculate the historical distributed data generation efficiency coefficient of the data distributed processing system according to the first distributed data generation efficiency characteristic factor sequence, the second distributed data generation efficiency characteristic factor sequence, and the third distributed data generation efficiency characteristic factor sequence.
[0163] In this embodiment, the distributed data generation efficiency characteristic factor refers to the characteristic degree of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, and is calculated based on all historical distributed data generation efficiencies in the historical distributed data generation efficiency sequence.
[0164] In this embodiment, calculate the mean value corresponding to all distributed data generation efficiency characteristic factors as the characteristic factor mean value, and calculate the variance corresponding to all distributed data generation efficiency characteristic factors as the characteristic factor variance.
[0165] In this embodiment, compare the magnitude relationship between the characteristic factor mean value and the characteristic factor variance to determine the minimum value and the maximum value. In case of special circumstances, if the characteristic factor mean value is equal to the characteristic factor variance, then classify all distributed data generation efficiency characteristic factors less than the characteristic factor mean value and the characteristic factor variance into the first distributed data generation efficiency characteristic factor sequence, and classify all distributed data generation efficiency characteristic factors greater than or equal to the characteristic factor mean value and the characteristic factor variance into the second distributed data generation efficiency characteristic factor sequence. That is to say, the third distributed data generation efficiency characteristic factor sequence is not classified, and the calculation method is the same as above, that is, one sequence is missing.
[0166] The beneficial effects of the above technical solution are: The present invention realizes the refined classification of the distributed data generation efficiency characteristic factors according to the characteristic factor mean value and the characteristic factor variance, laying a foundation for calculating the historical distributed data generation efficiency coefficient.
[0167] In some embodiments of the present application, when calculating the distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, it includes:
[0168] For any historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, use the historical distributed data generation efficiencies on the left and right sides of the historical distributed data generation efficiency as the neighborhood historical distributed data generation efficiencies;
[0169] Calculate the distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence according to the following formula:
[0170] ;
[0171] Among them, u is the distributed data generation efficiency characteristic factor of the historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, and p i is the change value of the i-th historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, p1 is the mean value of the change values of all change values in the historical distributed data generation efficiency sequence, m is the number of the neighborhood historical distributed data generation efficiencies of the historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, and p i,s is the change value of the s-th neighborhood historical distributed data generation efficiency of the i-th historical distributed data generation efficiency in the historical distributed data generation efficiency sequence.
[0172] In this embodiment, for the sake of easy understanding, an example is given here. For example, if the historical distributed data generation efficiency sequence is {ΔS1, ΔS2, ΔS3, ΔS4, ΔS5, ΔS6}, and any one of the historical distributed data generation efficiencies is selected, such as ΔS3, then ΔS1, ΔS2, ΔS4, ΔS5, ΔS6 are used as the neighborhood historical distributed data generation efficiencies. The change value of ΔS3 is ΔS2 - ΔS3, and then the absolute value is taken. The number of m in the formula is 5. The change value of the s-th neighborhood historical distributed data generation efficiency of the i-th historical distributed data generation efficiency, for example, first extract ΔS5, and the change value of ΔS5 is ΔS4 - ΔS5, that is, p i,s is ΔS4 - ΔS5. It should be noted that the absolute value is not taken here, and the absolute value is taken only when summing up finally. The change value of ΔS1 is itself, that is, ΔS1.
[0173] In some embodiments of the present application, when calculating the historical distributed data generation efficiency coefficient of the data distributed processing system according to the first distributed data generation efficiency characteristic factor sequence, the first distributed data generation efficiency characteristic factor sequence, and the first distributed data generation efficiency characteristic factor sequence, it includes:
[0174] Determine the small characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence;
[0175] ;
[0176] Among them, d1 is the small characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence, f1 is a preset factor, and its value range is [0.1, 0.2], and g1 is the mean value corresponding to the first distributed data generation efficiency characteristic factor sequence;
[0177] Determine the large characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence;
[0178] ;
[0179] Among them, d2 is the large feature factor boundary value of the first distributed data generation efficiency feature factor sequence;
[0180] Determine the feature factor boundary range according to the small feature factor boundary value and the large feature factor boundary value;
[0181] Analyze the distributed data generation efficiency feature factors in the first distributed data generation efficiency feature factor sequence, and count the number of first distributed data generation efficiency feature factors falling within the feature factor boundary range;
[0182] Determine the second small feature factor boundary value of the second distributed data generation efficiency feature factor sequence;
[0183] Determine the second large feature factor boundary value of the second distributed data generation efficiency feature factor sequence;
[0184] Determine the second feature factor boundary range according to the second small feature factor boundary value and the second large feature factor boundary value;
[0185] Analyze the distributed data generation efficiency feature factors in the second distributed data generation efficiency feature factor sequence, and count the number of second distributed data generation efficiency feature factors falling within the second feature factor boundary range;
[0186] Determine the third small feature factor boundary value of the third distributed data generation efficiency feature factor sequence;
[0187] Determine the third large feature factor boundary value of the third distributed data generation efficiency feature factor sequence;
[0188] Determine the third feature factor boundary range according to the third small feature factor boundary value and the third large feature factor boundary value;
[0189] Analyze the distributed data generation efficiency feature factors in the third distributed data generation efficiency feature factor sequence, and count the number of third distributed data generation efficiency feature factors falling within the third feature factor boundary range;
[0190] Calculate the historical distributed data generation efficiency coefficient of the data distributed processing system based on the first distributed data generation efficiency feature factor quantity, the second distributed data generation efficiency feature factor quantity, and the third distributed data generation efficiency feature factor quantity.
[0191] In this embodiment, when counting the number of first distributed data generation efficiency feature factors falling within the feature factor boundary range, if the distributed data generation efficiency feature factor is equal to the small feature factor boundary value or equal to the large feature factor boundary value, the quantity statistics is also performed.
[0192] In this embodiment, the calculation methods of the second smallest characteristic factor boundary value and the second largest characteristic factor boundary value will not be introduced here. They are the same as those of the first smallest characteristic factor boundary value and the first largest characteristic factor boundary value, and can be adaptively calculated.
[0193] In this embodiment, the calculation methods of the third smallest characteristic factor boundary value and the third largest characteristic factor boundary value will not be introduced here. They are the same as those of the first smallest characteristic factor boundary value and the first largest characteristic factor boundary value, and can be adaptively calculated.
[0194] The beneficial effects of the above technical solutions are as follows: The present invention calculates the historical distributed data generation efficiency coefficient of the data distributed processing system based on the number of the first distributed data generation efficiency characteristic factors, the number of the second distributed data generation efficiency characteristic factors, and the number of the third distributed data generation efficiency characteristic factors, which ensures the calculation accuracy of the historical distributed data generation efficiency coefficient, eliminates the need for manual calculation, improves the calculation accuracy, and avoids calculation errors. At the same time, the historical data generation rate of the data distributed processing system can be reflected through the historical distributed data generation efficiency coefficient, providing a reliable basis for data consistency processing and data update time interval constraints.
[0195] In some embodiments of the present application, when calculating the historical distributed data generation efficiency coefficient of the data distributed processing system based on the number of the first distributed data generation efficiency characteristic factors, the number of the second distributed data generation efficiency characteristic factors, and the number of the third distributed data generation efficiency characteristic factors, it includes:
[0196] Calculate the historical distributed data generation efficiency coefficient of the data distributed processing system according to the following formula:
[0197] ;
[0198] Where h is the historical distributed data generation efficiency coefficient of the data distributed processing system, k1 is the number of the first distributed data generation efficiency characteristic factors, k2 is the number of the second distributed data generation efficiency characteristic factors, k3 is the number of the third distributed data generation efficiency characteristic factors, j1 is the first calculation coefficient, j2 is the second calculation coefficient, j3 is the third calculation coefficient, and j1 < j2 < j3, j1 > 0, j2 > 0, j3 > 0.
[0199] In some embodiments of the present application, when grouping all data distributed processing systems based on the historical distributed data generation efficiency coefficient to obtain a high-efficiency data distributed processing system group and a low-efficiency data distributed processing system group, it includes:
[0200] Calculate the average value of the distributed data generation efficiency coefficients of all historical distributed data generation efficiency coefficients;
[0201] Group all data distributed processing systems according to the mean value of the distributed data generation efficiency coefficients;
[0202] When the historical distributed data generation efficiency coefficient is less than the mean value of the distributed data generation efficiency coefficients, the corresponding data distributed processing system is assigned to the low-efficiency data distributed processing system group;
[0203] When the historical distributed data generation efficiency coefficient is greater than or equal to the mean value of the distributed data generation efficiency coefficients, the corresponding data distributed processing system is assigned to the high-efficiency data distributed processing system group.
[0204] In this embodiment, calculate the mean value of all historical distributed data generation efficiency coefficients as the mean value of the distributed data generation efficiency coefficients.
[0205] In this embodiment, the data processing efficiency of the data distributed processing systems in the low-efficiency data distributed processing system group is slower, and the data processing efficiency of the data distributed processing systems in the high-efficiency data distributed processing system group is faster.
[0206] The beneficial effect of the above technical solution is that the present invention groups all data distributed processing systems according to the mean value of the distributed data generation efficiency coefficients, obtains the low-efficiency data distributed processing system group and the high-efficiency data distributed processing system group, and thus provides a prerequisite guarantee for the constraints of the high-efficiency data distributed processing system group to avoid errors.
[0207] S140: Calculate the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group based on the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group;
[0208] In some embodiments of the present application, when calculating the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group based on the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group, it includes:
[0209] Calculate the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group according to the following formula;
[0210] ;
[0211] where c is the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group, v1 is the first adjustment coefficient, b1 x is the xth historical distributed data generation efficiency coefficient in the high-efficiency data distributed processing system group, b2 zGenerate an efficiency coefficient for the z-th historical distributed data generation in the low-efficiency data distributed processing system group, for all the minimum value of, for all the maximum value of, v2 is the second adjustment coefficient, n1 is the number of historical distributed data generation efficiency coefficients in the high-efficiency data distributed processing system group, and n2 is the number of historical distributed data generation efficiency coefficients in the low-efficiency data distributed processing system group.
[0212] In this embodiment, v1 < v2, and v1 + v2 = 1. Among them, the first adjustment coefficient is preferably 0.3, and the second adjustment coefficient is preferably 0.7. Specifically, it can also be adaptively adjusted according to the actual situation.
[0213] The beneficial effects of the above technical solution are: By cross-combining and processing the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group, a high-efficiency data distributed processing constraint coefficient is obtained. Through the high-efficiency data distributed processing constraint coefficient, the data update time interval of the high-efficiency data distributed processing system group can be constrained to ensure the constraint accuracy.
[0214] S150: Determine the current data update time interval of the data distributed processing system in the high-efficiency data distributed processing system group, and based on the high-efficiency data distributed processing constraint coefficient, constrain the current data update time interval to obtain a constrained data update time interval, and perform data consistency guarantee transaction management according to the constrained data update time interval.
[0215] In this embodiment, as described above, after the order creation is completed, audits, corrections, etc. will be carried out, and the time spent on audits, corrections, etc. will be used as the current data update time interval. If the time for audits, corrections, etc. is 10 minutes, then the current data update time interval will be determined as 10 minutes, which can be obtained according to the actual situation.
[0216] In some embodiments of the present application, when constraining the current data update time interval based on the high-efficiency data distributed processing constraint coefficient to obtain a constrained data update time interval, it includes:
[0217] Preset multiple preset high-efficiency data distributed processing constraint coefficients;
[0218] Preset multiple preset update time interval constraint factors;
[0219] According to the relationship between the high-efficiency data distributed processing constraint coefficient and each preset high-efficiency data distributed processing constraint coefficient, select the corresponding preset update time interval constraint factor;
[0220] Calculate the product value of the selected preset update time interval constraint factor and the current data update time interval as the constrained data update time interval.
[0221] In this embodiment, a plurality of preset high-efficiency data distributed processing constraint coefficients are preset. Here, the number of preset high-efficiency data distributed processing constraint coefficients is preferably 3, including a first preset high-efficiency data distributed processing constraint coefficient, a second preset high-efficiency data distributed processing constraint coefficient, and a third preset high-efficiency data distributed processing constraint coefficient. Among them, the first preset high-efficiency data distributed processing constraint coefficient is preferably 0.3, the second preset high-efficiency data distributed processing constraint coefficient is preferably 0.6, and the third preset high-efficiency data distributed processing constraint coefficient is preferably 0.9. Specifically, it can also be adjusted according to the actual situation.
[0222] In this embodiment, a plurality of preset update time interval constraint factors are preset. Here, the number of preset update time interval constraint factors is preferably 4, including a first preset update time interval constraint factor, a second preset update time interval constraint factor, a third preset update time interval constraint factor, and a fourth preset update time interval constraint factor. Among them, the first preset update time interval constraint factor is preferably 1.1, the second preset update time interval constraint factor is preferably 1.15, the third preset update time interval constraint factor is preferably 1.2, and the fourth preset update time interval constraint factor is preferably 1.25. Specifically, it can also be adjusted according to the actual situation.
[0223] In this embodiment, when the high-efficiency data distributed processing constraint coefficient is less than the first preset high-efficiency data distributed processing constraint coefficient, calculate the first product value of the first preset update time interval constraint factor and the current data update time interval as the constrained data update time interval. When the high-efficiency data distributed processing constraint coefficient is greater than or equal to the first preset high-efficiency data distributed processing constraint coefficient and less than the second preset high-efficiency data distributed processing constraint coefficient, calculate the second product value of the second preset update time interval constraint factor and the current data update time interval as the constrained data update time interval. When the high-efficiency data distributed processing constraint coefficient is greater than or equal to the second preset high-efficiency data distributed processing constraint coefficient and less than the third preset high-efficiency data distributed processing constraint coefficient, calculate the third product value of the third preset update time interval constraint factor and the current data update time interval as the constrained data update time interval. When the high-efficiency data distributed processing constraint coefficient is greater than or equal to the third preset high-efficiency data distributed processing constraint coefficient, calculate the fourth product value of the fourth preset update time interval constraint factor and the current data update time interval as the constrained data update time interval.
[0224] The beneficial effects of the above technical solution are as follows: According to the relationship between the high-efficiency data distributed processing constraint coefficient and each preset high-efficiency data distributed processing constraint coefficient, the present invention selects the corresponding preset update time interval constraint factor, calculates the product value of the selected preset update time interval constraint factor and the current data update time interval, and uses it as the constraint data update time interval. Through the preset update time interval constraint factor, the current data update time interval can be accurately constrained, and the data processing time intervals of different distributed systems can be balanced. For example, if the current data update time interval is 10 minutes and the third preset update time interval constraint factor is selected for constraint, the obtained constraint data update time interval is 12 minutes, that is, the generated data will be updated and published after 12 minutes. This can avoid the imbalance of data processing order, eliminate data conflicts and inconsistencies, and ensure the dynamics, coordination and real-time nature of data consistency processing.
[0225] In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner.
[0226] Although the present invention has been described above with reference to the embodiments, various improvements can be made to it and components therein can be replaced with equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed by the present invention can be combined with each other in any way, and the situations of these combinations are not all described in this specification only for the consideration of saving space and resources.
[0227] Those of ordinary skill in the art can understand that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data consistency assurance and transaction management method based on event-driven, characterized in that: include: Determine multiple data distributed processing systems, obtain data distributed event information corresponding to each data distributed processing system, calculate the data distributed processing system constraint coefficient of every two data distributed processing systems based on the data distributed event information, and generate a data consistency assurance transaction management group; Collecting multiple historical distributed data generation efficiencies corresponding to each data distributed processing system in the data consistency assurance transaction management group, and generating a historical distributed data generation efficiency sequence based on the collection time sequence; Analyze the historical distributed data generation efficiency sequence, calculate the historical distributed data generation efficiency coefficient of the data distributed processing system based on the analysis result, and group all the data distributed processing systems based on the historical distributed data generation efficiency coefficient to obtain a high-efficiency data distributed processing system group and a low-efficiency data distributed processing system group; Calculating a high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group based on the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group; Determine the current data update time interval of the data distributed processing system in the high-efficiency data distributed processing system group, constrain the current data update time interval based on the high-efficiency data distributed processing constraint coefficient to obtain the constrained data update time interval, and perform data consistency assurance transaction management according to the constrained data update time interval.
2. The event-driven data consistency assurance and transaction management method according to claim 1 is characterized in that: When obtaining data distributed event information corresponding to each data distributed processing system, calculating the data distributed processing system constraint coefficient of every two data distributed processing systems based on the data distributed event information, and generating a data consistency assurance transaction management group, it includes: Extracting data distributed event information corresponding to each data distributed processing system, wherein the data distributed event information includes a data distributed event process range and a data distributed event flow direction range; Determine the data distributed event process coupling degree based on the data distributed event process range corresponding to each two data distributed processing systems; Determine the data distributed event flow direction coupling degree based on the data distributed event flow direction range corresponding to every two data distributed processing systems; Determine the bidirectional coupling degree of data distributed events based on the data distributed event process range and the data distributed event flow direction range corresponding to every two data distributed processing systems; Calculate the data distributed processing system constraint coefficient of every two data distributed processing systems according to the data distributed event process coupling degree, the distributed event flow direction coupling degree and the data distributed event bidirectional coupling degree; When the constraint coefficient of the data distributed processing system is greater than or equal to the preset constraint coefficient of the data distributed processing system, a data consistency assurance transaction management identifier is generated for the two data distributed processing systems; Randomly selecting two data distributed processing systems for the second time, and calculating the constraint coefficient of the second data distributed processing system, and judging whether a data consistency assurance transaction management identifier can be generated for the two data distributed processing systems randomly selected for the second time based on the constraint coefficient of the second data distributed processing system; When the constraint coefficient of the data distributed processing system is less than the preset constraint coefficient of the data distributed processing system, two data distributed processing systems are randomly selected for the second time; Randomly extract a1 times two data distributed processing systems to obtain multiple data consistency guarantee transaction management identifiers; The number of data consistency assurance transaction management identifiers corresponding to each data distributed processing system is counted and sorted from large to small, and the data distributed processing systems corresponding to the first a2 numbers of data consistency assurance transaction management identifiers are selected to generate the data consistency assurance transaction management group.
3. The event-driven data consistency assurance and transaction management method according to claim 2 is characterized in that: The data distributed event flow coupling degree corresponding to each two data distributed processing systems is calculated according to the following formula: ; Among them, q1 is the data distributed event process coupling degree corresponding to each two data distributed processing systems, is the number of intersections of the data distributed event flow ranges corresponding to every two data distributed processing systems, The number of unions of data distributed event process ranges corresponding to every two data distributed processing systems; The data distributed event flow coupling degree corresponding to each two data distributed processing systems is calculated according to the following formula: ; Among them, q2 is the data distributed event flow coupling degree corresponding to each two data distributed processing systems, is the number of intersections of the data distribution event flow ranges corresponding to every two data distribution processing systems, The number of unions of data distribution event flow ranges corresponding to every two data distribution processing systems; The bidirectional coupling degree of data distributed events corresponding to each two data distributed processing systems is calculated according to the following formula: ; Among them, q3 is the bidirectional coupling degree of data distributed events corresponding to every two data distributed processing systems; The data distributed processing system constraint coefficient of each two data distributed processing systems is calculated according to the following formula: ; Among them, y is the data distributed processing system constraint coefficient of every two data distributed processing systems, t1 is the total number of data distributed event flow ranges and data distributed event flow direction ranges corresponding to one data distributed processing system, t2 is the total number of data distributed event flow ranges and data distributed event flow direction ranges corresponding to another data distributed processing system, max is the maximum value symbol, and min is the minimum value symbol.
4. The event-driven data consistency assurance and transaction management method according to claim 1 is characterized in that: When analyzing the historical distributed data generation efficiency sequence and calculating the historical distributed data generation efficiency coefficient of the data distributed processing system based on the analysis result, it includes: Calculating a distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence; Calculate the characteristic factor means and characteristic factor variances corresponding to all distributed data generation efficiency characteristic factors, take the minimum value of the characteristic factor means and the characteristic factor variances as the first partition characteristic factor, and take the maximum value of the characteristic factor means and the characteristic factor variances as the second partition characteristic factor; Sequentially divide all distributed data generation efficiency characteristic factors according to the first division characteristic factor and the second division characteristic factor, and divide all distributed data generation efficiency characteristic factors that are smaller than the first division characteristic factor into a first distributed data generation efficiency characteristic factor sequence; dividing all distributed data generation efficiency characteristic factors greater than or equal to the first division characteristic factor and less than the second division characteristic factor into a second distributed data generation efficiency characteristic factor sequence; dividing all distributed data generation efficiency characteristic factors greater than or equal to the second division characteristic factor into a third distributed data generation efficiency characteristic factor sequence; The historical distributed data generation efficiency coefficient of the data distributed processing system is calculated according to the first distributed data generation efficiency characteristic factor sequence, the second distributed data generation efficiency characteristic factor sequence and the third distributed data generation efficiency characteristic factor sequence.
5. The event-driven data consistency assurance and transaction management method according to claim 4 is characterized in that: When calculating the distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, it includes: For any historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, the historical distributed data generation efficiencies on the left and right sides of the historical distributed data generation efficiency are used as neighborhood historical distributed data generation efficiencies; The distributed data generation efficiency characteristic factor of each historical distributed data generation efficiency in the historical distributed data generation efficiency sequence is calculated according to the following formula: ; Among them, u is the distributed data generation efficiency characteristic factor of the historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, and p i is the change value of the i-th historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, p1 is the mean change value of all change values in the historical distributed data generation efficiency sequence, m is the number of neighborhood historical distributed data generation efficiencies of the historical distributed data generation efficiency in the historical distributed data generation efficiency sequence, p i,s is the change value of the s-th neighborhood historical distributed data generation efficiency of the ith historical distributed data generation efficiency in the historical distributed data generation efficiency sequence.
6. The event-driven data consistency assurance and transaction management method according to claim 4 is characterized in that: When calculating the historical distributed data generation efficiency coefficient of the data distributed processing system according to the first distributed data generation efficiency characteristic factor sequence, the first distributed data generation efficiency characteristic factor sequence and the first distributed data generation efficiency characteristic factor sequence, it includes: Determine a small characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence; ; Among them, d1 is the small characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence, f1 is a preset factor, and the value range is [0.1, 0.2], and g1 is the mean value corresponding to the first distributed data generation efficiency characteristic factor sequence; Determine a large characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence; ; Wherein, d2 is the large characteristic factor boundary value of the first distributed data generation efficiency characteristic factor sequence; Determine a characteristic factor boundary range according to the small characteristic factor boundary value and the large characteristic factor boundary value; Analyzing the distributed data generation efficiency characteristic factors in the first distributed data generation efficiency characteristic factor sequence, and counting the number of first distributed data generation efficiency characteristic factors falling within the characteristic factor boundary range; Determine a second minimum characteristic factor boundary value of the second distributed data generation efficiency characteristic factor sequence; Determine a second largest characteristic factor boundary value of the second distributed data generation efficiency characteristic factor sequence; Determine a second characteristic factor boundary range according to the second smallest characteristic factor boundary value and the second largest characteristic factor boundary value; Analyzing the distributed data generation efficiency characteristic factors in the second distributed data generation efficiency characteristic factor sequence, and counting the number of second distributed data generation efficiency characteristic factors falling within a boundary range of the second characteristic factor; Determine a third minimum characteristic factor boundary value of the third distributed data generation efficiency characteristic factor sequence; Determine a third largest characteristic factor boundary value of the third distributed data generation efficiency characteristic factor sequence; Determine a boundary range of a third characteristic factor according to the boundary value of the third smallest characteristic factor and the boundary value of the third largest characteristic factor; Analyzing the distributed data generation efficiency characteristic factors in the third distributed data generation efficiency characteristic factor sequence, and counting the number of the third distributed data generation efficiency characteristic factors falling within the boundary range of the third characteristic factor; A historical distributed data generation efficiency coefficient of the data distribution processing system is calculated based on the first distributed data generation efficiency characteristic factor quantity, the second distributed data generation efficiency characteristic factor quantity and the third distributed data generation efficiency characteristic factor quantity.
7. The event-driven data consistency assurance and transaction management method according to claim 6 is characterized in that: When calculating the historical distributed data generation efficiency coefficient of the data distributed processing system based on the first distributed data generation efficiency characteristic factor quantity, the second distributed data generation efficiency characteristic factor quantity and the third distributed data generation efficiency characteristic factor quantity, it includes: The historical distributed data generation efficiency coefficient of the data distributed processing system is calculated according to the following formula: ; Among them, h is the historical distributed data generation efficiency coefficient of the data distributed processing system, k1 is the number of the first distributed data generation efficiency characteristic factors, k2 is the number of the second distributed data generation efficiency characteristic factors, k3 is the number of the third distributed data generation efficiency characteristic factors, j1 is the first calculation coefficient, j2 is the second calculation coefficient, j3 is the third calculation coefficient, and j1<j2<j3, j1>0, j2>0, j3>0.
8. The event-driven data consistency assurance and transaction management method according to claim 1 is characterized in that: When all the data distributed processing systems are grouped based on the historical distributed data generation efficiency coefficient to obtain a high-efficiency data distributed processing system group and a low-efficiency data distributed processing system group, it includes: Calculate the mean of the distributed data generation efficiency coefficients of all historical distributed data generation efficiency coefficients; Grouping all data distributed processing systems according to the mean value of the distributed data generation efficiency coefficient; When the historical distributed data generation efficiency coefficient is less than the distributed data generation efficiency coefficient mean, the corresponding data distributed processing system is classified into the low-efficiency data distributed processing system group; When the historical distributed data generation efficiency coefficient is greater than or equal to the distributed data generation efficiency coefficient mean, the corresponding data distributed processing system is assigned to the high-efficiency data distributed processing system group.
9. The event-driven data consistency assurance and transaction management method according to claim 1, characterized in that: When calculating the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group based on the high-efficiency data distributed processing system group and the low-efficiency data distributed processing system group, it includes: The high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group is calculated according to the following formula; ; Among them, c is the high-efficiency data distributed processing constraint coefficient of the high-efficiency data distributed processing system group, v1 is the first adjustment coefficient, b1 x Generate the efficiency coefficient for the xth historical distributed data in the high-efficiency data distributed processing system group, b2 z Generate an efficiency coefficient for the zth historical distributed data in the low-efficiency data distributed processing system group, For all The minimum value of For all , v2 is the second adjustment coefficient, n1 is the number of historical distributed data generation efficiency coefficients in the high-efficiency data distributed processing system group, and n2 is the number of historical distributed data generation efficiency coefficients in the low-efficiency data distributed processing system group.
10. The event-driven data consistency assurance and transaction management method according to claim 1, characterized in that: When constraining the current data update time interval based on the high-efficiency data distributed processing constraint coefficient to obtain the constrained data update time interval, the method includes: Preset multiple preset high-efficiency data distributed processing constraint coefficients; Presetting a plurality of preset update time interval constraint factors; According to the relationship between the high-efficiency data distributed processing constraint coefficient and each preset high-efficiency data distributed processing constraint coefficient, selecting a corresponding preset update time interval constraint factor; The product value of the selected preset update time interval constraint factor and the current data update time interval is calculated as the constrained data update time interval.
Citation Information
Patent Citations
Data processing method and system for thermodynamic system monitoring
CN118900257A
Rendering method and system for generating air conditioner host monitoring event queue
CN119474117A
