Distributed data consistency control method and system

By constructing an enhanced vector clock and a dynamic fuzzy inference engine, the problem of data sorting under network latency and clock skew in traditional vector clocks is solved, achieving efficient data consistency control in distributed systems and improving the accuracy and adaptability of conflict event handling.

CN120910160AInactive Publication Date: 2025-11-07SHANGHAI HUACHEN YUEXI INFORMATION TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511086616.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-11-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing distributed systems based on traditional vector clocks cannot effectively sort data update conflicts when faced with factors such as network latency jitter and node clock skew. They lack dynamic adjustment mechanisms and are difficult to adapt to network conditions and node characteristics, resulting in insufficient data consistency control.

Method used

An enhanced vector clock is constructed, introducing fuzzy membership parameters and time window deviation. Combined with network latency jitter, node clock offset, and historical decision confidence, a dynamic fuzzy inference engine is used to calculate the probability distribution of the logical sequence of conflict events. A three-level conflict handling mechanism is set up, and the confidence threshold is dynamically adjusted to ensure data consistency.

Benefits of technology

It enables precise sorting of conflicting events, improves the adaptability and accuracy of distributed systems, reduces data inconsistency issues, and ensures on-demand allocation and consistency of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910160A_ABST
    Figure CN120910160A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of data processing, and provides a distributed data consistency control method and system, and the method comprises the steps: constructing an enhanced vector clock containing a fuzzy membership parameter and a time window deviation value; a dynamic fuzzy inference engine is built in combination with factors such as network delay jitter; calculating conflict event logic precedence relation probability distribution by utilizing an engine; generating an execution sequence hypothesis by integrating the multi-dimensional information; selecting an optimal scheme based on a dynamic confidence threshold; and resources and consistency are balanced through a three-level conflict processing mechanism. According to the method, the problem that a traditional vector clock cannot process conflict event sorting is solved, the accuracy and adaptability of distributed data consistency control are improved, and efficient collaboration of the system is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of data processing, and particularly relates to a distributed data consistency control method and system. BACKGROUND

[0002] With the development of computer technology and mobile communication technology, distributed systems are widely used in the fields of finance, Internet of Things, cloud computing, etc. Distributed systems improve processing capacity and fault tolerance through the cooperative work of multiple nodes, but the synchronization and consistency control of data between nodes are always the core challenges. With the expansion of node scale and the complexity of network environment, event conflicts occur frequently. How to accurately determine the logical sequence of events and ensure data consistency has become an industry research focus.

[0003] The existing scheme based on traditional vector clock has obvious technical problems: only relying on logical counting to determine the sequence of events, it cannot quantify the influence of network delay jitter, node clock offset and other environmental factors on the timestamp; when facing conflict events with very small timestamp difference, it cannot effectively sort, which easily leads to data update conflicts; lacking dynamic adjustment mechanism, it is difficult to adapt to real-time changes of network state and node characteristics; without combining context information such as business semantics and node physical characteristics, the sorting result may be disconnected from the actual business needs or system running environment. SUMMARY

[0004] The purpose of the present application is to provide a distributed data consistency control method and system, aiming to solve the technical problems existing in the prior art determined in the background art.

[0005] The present application is implemented as follows: a distributed data consistency control method, the method comprising:

[0006] When an event is generated by a participating node, an enhanced vector clock is constructed based on the extension of the traditional vector clock structure, the enhanced vector clock containing fuzzy membership parameters and time window deviation;

[0007] Using the fuzzy membership parameters and time window deviation in the enhanced vector clock, combining network delay jitter, node clock offset and historical decision confidence, a dynamic fuzzy reasoning engine is constructed;

[0008] When a conflict event that cannot be sorted by the traditional vector clock is detected, the dynamic fuzzy reasoning engine is used to calculate the logical sequence probability distribution between the conflict events;

[0009] Based on the logical sequence probability distribution, a number of sets of execution order assumptions are generated by comprehensively considering the geographical location of the node, signal strength attenuation and operation semantic relevance;

[0010] According to the dynamically adjusted confidence threshold, confidence scores of several sets of execution sequence hypotheses are calculated respectively, when there is a scheme whose confidence score exceeds the confidence threshold, the scheme is defined as the optimal scheme, and the corresponding execution sequence hypothesis is selected; when there is no scheme whose confidence score exceeds the threshold, an asynchronous coordination channel is started to make conflict arbitration;

[0011] A three-level conflict processing mechanism is set and implemented, and the dynamic balance of the on-demand allocation and consistency guarantee of system resources is controlled.

[0012] As a further scheme of the present application, the enhanced vector clock is constructed, specifically comprising:

[0013] A fuzzy membership parameter field and a time window deviation field are added under each node entry of the traditional vector clock;

[0014] The fuzzy membership parameter is calculated through the local timestamp at the time of event generation and the preset network delay distribution model, and the time window deviation is obtained based on the periodic calibration result of the node and the reference clock source;

[0015] A synchronization protocol of the enhanced vector clock is defined, and when events are transmitted between nodes, the fuzzy membership parameter and the time window deviation are carried and updated synchronously, and the enhanced vector clock recording the fuzzy attributes and time deviations of events is constructed.

[0016] As a further scheme of the present application, the dynamic fuzzy reasoning engine is constructed, specifically comprising:

[0017] The fuzzy membership parameter and the time window deviation in the enhanced vector clock, the network delay jitter collected in real time, the node clock offset and the historical decision confidence are taken as input variables;

[0018] A rule base containing several fuzzy rules is established, each rule covers the fuzzy subset division of the input variables and the probability distribution mapping of the logical precedence relationship of the output, the input variables are subjected to fuzzy reasoning according to the rule base, and a reasoning result is generated;

[0019] The reasoning result is subjected to defuzzification processing by using the barycenter method, the probability distribution of the logical precedence relationship between the conflict events is output, and the dynamic fuzzy reasoning engine for dynamically evaluating the logical relationship of events is constructed.

[0020] As a further scheme of the present application, the calculation of the probability distribution of the logical precedence relationship between the conflict events comprises:

[0021] When the event timestamp difference recorded by the enhanced vector clock is less than a preset indistinguishable threshold, the conflict events that cannot be sorted by the traditional vector clock are determined;

[0022] The rules in the rule base matched with the current environment characteristics are called by a dynamic fuzzy inference engine, fuzzy membership parameters and time window deviation are taken as core weight factors, conflict events are fuzzy inferred and probability values of three events are calculated, probability distribution results are output, logical precedence probability distribution between conflict events is obtained, the three events include: event A precedes event B, event B precedes event A, and it is unable to distinguish the precedence.

[0023] As a further scheme of the present application, the generating of the several sets of execution sequence assumptions comprises:

[0024] Based on the logical precedence probability distribution, the top 5 possible sequences with the highest probability values are selected as initial assumptions;

[0025] For specific business operations corresponding to the conflict events, the semantic association between different business operations is evaluated through a predefined operation type association matrix, and operation semantic association is obtained.

[0026] Combined with the geographic location of the node, the signal strength attenuation and the operation semantic association, the initial assumptions are modified.

[0027] Finally, five sets of execution sequence assumptions containing event execution priority order are generated, and each set of assumption is attached with a modification basis description.

[0028] As a further scheme of the present application, the calculating of the confidence score of each set of execution sequence assumption comprises:

[0029] An initial confidence threshold is set, and the initial confidence threshold is adjusted according to the historical decision success rate every hour.

[0030] The time window deviation weight of the enhanced vector clock, the logical precedence probability weight and the context information weight are set respectively, and the confidence score of each set of execution sequence assumption is calculated.

[0031] When there is a scheme with a confidence score exceeding the initial confidence threshold, the scheme with the highest score is selected as the optimal scheme and executed.

[0032] Otherwise, an asynchronous coordination channel is started, a coordination request containing all execution sequence assumptions and scores is sent to the nodes involved in the conflict events, and a decision is made after receiving feedback from the majority of the nodes.

[0033] As a further scheme of the present application, the three-level conflict processing mechanism comprises:

[0034] First-level processing: for the optimal scheme with a confidence score greater than or equal to 0.8, priority execution resources are directly allocated, the enhanced vector clock is updated synchronously, and the execution result is broadcasted.

[0035] Secondary processing: for the scheme with confidence score between 0.6-0.8, enter the buffer queue, wait for 100 ms, and then call the dynamic fuzzy inference engine again for verification, and execute after verification;

[0036] Tertiary processing: for the scheme with confidence score <0.6, freeze the related resources, start the cross-node state consistency check, and execute according to the coordination result after the check is passed.

[0037] Another object of the present application is to provide a distributed data consistency control system, which comprises:

[0038] An enhanced vector clock construction module is used to expand the traditional vector clock structure based on the generation of events in the participating nodes, and to construct an enhanced vector clock containing fuzzy membership parameters and time window deviation amounts.

[0039] An engine building module is used to use the fuzzy membership parameters and time window deviation amounts in the enhanced vector clock, combined with network delay jitter, node clock offset and historical decision confidence, to build a dynamic fuzzy inference engine.

[0040] A logical relationship probability calculation module is used to calculate the logical relationship probability distribution between the conflict events when detecting that the traditional vector clock cannot sort the conflict events.

[0041] An execution sequence assumption generation module is used to generate a number of execution sequence assumptions based on the logical relationship probability distribution, the geographical location of the nodes, the signal strength attenuation and the operation semantic correlation.

[0042] An optimal scheme selection module is used to calculate the confidence score of a number of execution sequence assumptions according to the dynamically adjusted confidence threshold, and when there is a scheme with confidence score exceeding the confidence threshold, it is defined as the optimal scheme, and the corresponding execution sequence assumption is selected; when there is no scheme with confidence score exceeding the threshold, an asynchronous coordination channel is started for conflict arbitration.

[0043] A tertiary conflict processing module is used to set and implement a tertiary conflict processing mechanism to control the dynamic balance of on-demand allocation and consistency guarantee of system resources.

[0044] The present application has the following beneficial effects:

[0045] The application provides a distributed data consistency control method and system, which expands the time description capability of the traditional vector clock by constructing an enhanced vector clock, introduces fuzzy membership parameters and time window deviation, effectively quantifies the time uncertainty caused by network delay and clock offset, and provides a more accurate time basis for conflict event ordering. The dynamic fuzzy reasoning engine integrates multi-dimensional environmental variables and historical decision experience, realizes probabilistic evaluation of the logical sequence of conflict events, and breaks through the absolute judgment limitation of the traditional method. The generation of execution sequence assumptions integrates node geographical location, signal strength and operation semantic correlation, so that the ordering result is more suitable for the actual running environment and business requirements. The dynamically adjusted confidence threshold and the three-level conflict processing mechanism balance the decision efficiency and reliability while ensuring data consistency. The overall scheme significantly improves the accuracy and adaptability of the distributed system in processing conflict events, reduces the problem of data inconsistency, and provides an efficient solution for distributed data consistency control in complex dynamic environments. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 A flowchart of a distributed data consistency control method provided by an embodiment of the application is provided.

[0047] Figure 2 A flowchart of constructing an enhanced vector clock provided by an embodiment of the application is provided.

[0048] Figure 3 A flowchart of constructing a dynamic fuzzy reasoning engine provided by an embodiment of the application is provided.

[0049] Figure 4 A flowchart of calculating the logical sequence probability distribution between conflict events provided by an embodiment of the application is provided.

[0050] Figure 5 A flowchart of generating several sets of execution sequence assumptions provided by an embodiment of the application is provided.

[0051] Figure 6 A flowchart of calculating the confidence score of several sets of execution sequence assumptions provided by an embodiment of the application is provided.

[0052] Figure 7 A structural block diagram of a distributed data consistency control system provided by an embodiment of the application is provided. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the application clearer, the application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.

[0054] Figure 1 A flowchart of a distributed data consistency control method provided by an embodiment of the present application is shown in Figure 1 The method comprises the following steps.

[0055] S100, when an event is generated at a participating node, an enhanced vector clock is constructed based on an extension of a traditional vector clock structure, the enhanced vector clock containing a fuzzy membership parameter and a time window deviation amount;

[0056] Although the traditional vector clock can record the logical order of node events, in an actual distributed environment, factors such as network delay jitter and node clock offset can cause uncertainty of event timestamps, making it difficult to accurately reflect the real sequence of events.

[0057] A fuzzy membership parameter field and a time window deviation amount field are added under each node entry of the traditional vector clock, and through this structural extension, the vector clock can not only record the logical count of events, but also carry the fuzzy properties of event time and node clock deviation information.

[0058] The fuzzy membership parameter is calculated by the local timestamp when the event is generated and a preset network delay distribution model, and its core function is to quantify the fuzzy degree of the event timestamp affected by the network delay. In a distributed system, the network delay is not a fixed value during the transmission of an event from the generating node to other nodes, and will jitter due to bandwidth fluctuations, routing changes, etc. This jitter will cause the receiving node to have a deviation in judging the event occurrence time, and the fuzzy membership parameter can describe this deviation in a probabilistic way, allowing the system to understand the "credibility" of the timestamp.

[0059] The time window deviation amount is obtained based on the periodic calibration results of the node and the reference clock source, and is used to quantify the offset amount of the node local clock and the global reference clock. Since the hardware clocks of nodes in a distributed system have a drift characteristic, the clocks between nodes will gradually deviate after long-term operation, and this parameter can reflect the degree of this deviation in real time, providing a correction basis for cross-node time comparison.

[0060] A synchronization protocol for the enhanced vector clock is defined to ensure that the fuzzy membership parameter and the time window deviation amount can be synchronized and carried during the transmission of events between nodes, so that all nodes in the entire distributed system can understand the time characteristics of events based on the unified enhanced vector clock, avoiding time cognition deviation caused by inconsistent parameters.

[0061] As shown in Figure 2 The construction of the enhanced vector clock specifically comprises the following steps.

[0062] S110, a fuzzy membership parameter field and a time window deviation amount field are added under each node entry of the traditional vector clock.

[0063] S120, calculate the fuzzy membership parameter by the local timestamp when the event is generated and the preset network delay distribution model, and derive the time window deviation amount based on the periodic calibration result of the node and the reference clock source:

[0064] The fuzzy membership parameter is used to describe the fuzzy degree of the event timestamp affected by the network delay, and is calculated based on the preset network delay distribution model (assuming normal distribution):

[0065] ;

[0066] Wherein:

[0067] represents the fuzzy membership parameter of event A (value range [0, 1]);

[0068] represents the local timestamp when event A is generated;

[0069] represents the estimated arrival timestamp of event A after network transmission (calculated by the sending node according to historical delay, , wherein is the average network delay from the node to the target node);

[0070] represents the variance of the preset network delay distribution model (derived based on historical network delay data statistics, reflecting the delay jitter degree).

[0071] The time window deviation amount is used to quantify the offset of the node clock and the reference clock, based on the periodic calibration result:

[0072] ;

[0073] Wherein:

[0074] represents the time window deviation amount when the event is generated;

[0075] represents the sample amount of the last calibration;

[0076] represents the local clock value of the node at the calibration;

[0077] represents the clock value of the reference clock source at the calibration;

[0078] is the clock drift coefficient (determined by the node hardware characteristics);

[0079] represents the time interval since the last calibration.

[0080] S130, define the synchronization protocol of the enhanced vector clock, when transmitting events between nodes, synchronize and update the fuzzy membership parameter and time window deviation, and construct the enhanced vector clock that can record the fuzzy attributes and time deviation of events.

[0081] S200, using the fuzzy membership parameter and time window deviation in the enhanced vector clock, combining network delay jitter, node clock offset and historical decision confidence, constructing a dynamic fuzzy reasoning engine;

[0082] The fuzzy membership parameter and time window deviation contained in the enhanced vector clock are used as input variables together with the real-time collected network delay jitter, node clock offset and historical decision confidence. This choice is because these variables correspond to the key factors that affect time judgment in the distributed system: the fuzzy membership parameter describes the fuzzy influence of network delay on event timestamp, the time window deviation reflects the systematic offset of node clock and reference clock, the network delay jitter captures the dynamic fluctuations of real-time network state, the node clock offset reflects the persistent deviation caused by hardware characteristics, and the historical decision confidence introduces experience feedback to optimize reasoning accuracy. By considering these variables, the engine can fully perceive the complex dynamics of the distributed environment.

[0083] On this basis, a rule base containing a number of fuzzy rules is established, each rule associates a fuzzy subset of input variables with a probability distribution of logical precedence of output. Because many states in the distributed system are difficult to describe with precise numerical values, the division of fuzzy subsets can more naturally express fuzzy concepts such as "high", "low", "medium", etc., and the rule base is equivalent to converting operation and maintenance experience and system characteristics into executable reasoning logic.

[0084] The reasoning process adopts the Mamdani model, which calculates the triggering strength of a single rule (i.e. the minimum value of input variable membership) and aggregates the contributions of all rules (taking the maximum value), to avoid the one-sidedness of a single rule and generate a more realistic fuzzy reasoning result. Finally, the centroid method is used to defuzzify the reasoning result, converting the fuzzy membership distribution into a clear probability distribution of logical precedence (event A precedes B, B precedes A, specific probability of being indistinguishable), so that the abstract reasoning result is converted into a quantitative basis that can be directly used for subsequent decision-making.

[0085] As shown in Figure 3 , the method for constructing a dynamic fuzzy reasoning engine comprises:

[0086] S210, the fuzzy membership parameters in the enhanced vector clock and the time window deviation amount are taken as input variables together with the real-time collected network delay jitter, node clock offset and historical decision confidence;

[0087] S220, a rule base containing a plurality of fuzzy rules is established, each rule covering fuzzy subset division of input variables and probability distribution mapping of logical precedence of output, fuzzy reasoning is performed on input variables according to the rule base to generate a reasoning result;

[0088] The fuzzy reasoning is based on the Mamdani model, and the reasoning result is generated by rule trigger strength aggregation, the formula being:

[0089] Trigger strength calculation of a single rule:

[0090] ;

[0091] Reasoning result aggregation:

[0092] ;

[0093] Wherein:

[0094] represents the trigger strength (value range [0, 1]) of the i-th rule;

[0095] represents the membership function value of the input variable , , ;

[0096] represents the comprehensive membership of the output variable (logical precedence);

[0097] represents the membership contribution of the 1st to i-th rule to the output variable ; The output variable

[0098] contains three fuzzy sets representing (A precedes B), (B precedes A), (cannot be distinguished).

[0099] S230, the reasoning result is de-fuzzled by using the barycenter method to output the probability distribution of the logical precedence between the conflict events, and a dynamic fuzzy reasoning engine for dynamically evaluating the logical relationship of events is constructed.

[0100] ​​The fuzzy reasoning results are converted into a probability distribution using the centroid method (defuzzification), with the following formula:

[0101] ;

[0102] in:

[0103] Indicates the first The probability of a logical relationship ( =1, 2, 3, corresponding to A preceding B, B preceding A, and indistinguishable respectively);

[0104] Indicates output variable The comprehensive membership function (determined by the fuzzy inference results);

[0105] The integration interval is The domain of discourse (the larger the value, the higher the certainty of the relation).

[0106] S300: When a conflict event that cannot be sorted by a traditional vector clock is detected, the dynamic fuzzy inference engine is used to calculate the probability distribution of the logical sequence relationship between the conflict events.

[0107] When the difference between the event timestamps recorded by the enhanced vector clock is less than a preset indistinguishable threshold, it is considered a conflict event that traditional vector clocks cannot handle. This determination method, through the finer time deviation information in the enhanced vector clock, can more sensitively identify "sequence ambiguity" scenarios caused by network latency and clock skew. This determination is necessary because in distributed systems, subtle differences in event timestamps often contain complex environmental interferences. Simple "greater than / less than" judgments may obscure the true sequence, and setting an indistinguishable threshold is precisely to filter out these edge cases that require in-depth analysis.

[0108] After determining a conflict, the system invokes rules from the dynamic fuzzy inference engine that match the characteristics of the current environment, using fuzzy membership parameters and time window deviation as core weighting factors for inference. This is because fuzzy membership parameters directly reflect the degree of fuzziness caused by network latency in event timestamps, while time window deviation reflects the systematic offset between the node clock and the reference clock; both are crucial in determining the accuracy of time judgment. During inference, the engine calculates the probability values ​​of three events: event A precedes event B, event B precedes event A, and the order cannot be clearly distinguished, ultimately outputting a probability distribution. This probabilistic output is not a compromise, but an objective reflection of the uncertainty of distributed systems. Compared to the absolute, either-or judgments of traditional methods, the probability distribution retains more comprehensive information, providing richer evidence for subsequent decisions.

[0109] This step provides a dynamic and quantitative solution for the most difficult conflict event ordering problem in distributed systems, fundamentally improving the robustness of data consistency control. On the one hand, through the precise conflict judgment mechanism, it ensures that all edge cases that traditional methods cannot handle are included in the analysis, avoiding consistency vulnerabilities caused by missed judgments. On the other hand, the logical relationship is output in the form of probability distribution, which respects the uncertainty of time in distributed environments and leaves flexibility for subsequent decisions. The system does not have to accept a single possible error order, but can further optimize based on probability.

[0110] At the same time, the introduction of the core weight factor deeply binds the reasoning result to the actual state of the system. When the network fluctuates or the clock offset changes, the reasoning result can be dynamically adjusted, avoiding the failure of static rules in complex environments. This dynamic adaptability enables the distributed system to maintain accurate judgment of event order when facing changing network environments and hardware differences, reducing data inconsistency problems caused by order errors and providing reliable intermediate results for the entire consistency control process.

[0111] As shown in Figure 4 The calculation of the logical precedence probability distribution between the conflict events includes:

[0112] S310, when the event timestamp difference recorded by the enhanced vector clock is less than the preset indistinguishable threshold, it is determined that the conflict event cannot be sorted by the traditional vector clock;

[0113] S320, through the dynamic fuzzy reasoning engine, call the rules in the rule library that match the current environmental characteristics, take the fuzzy membership degree parameter and time window deviation as the core weight factor, perform fuzzy reasoning on the conflict event and calculate the probability values of the three events, output the probability distribution result, get the logical precedence probability distribution between the conflict events, the three events include: event A precedes event B, event B precedes event A, and cannot be distinguished.

[0114] S400, based on the logical precedence probability distribution, generate a number of execution order assumptions by integrating node geographical location, signal strength attenuation, and operation semantic relevance;

[0115] Based on the logical sequence probability distribution obtained in step S300, the top 5 possible sequences with the highest probability values are selected as the initial hypotheses. The purpose of this approach is to start from the most likely sequence and ensure that the initial hypotheses have high logical rationality, providing a reliable basis for subsequent modifications. However, the consistency control of distributed systems not only depends on the logical order of events, but also is deeply influenced by the physical environment and business logic. Therefore, further modifications are needed: for specific business operations corresponding to conflicting events, the semantic association degree is evaluated through a predefined operation type association matrix. This association degree determines the dependency relationship of operation execution. At the same time, the initial hypotheses are adjusted by considering the node geographical location (data synchronization between nodes with close distance is more efficient, and the sequence priority is higher) and signal strength attenuation (nodes with strong signals have more stable connections, and their operation execution is easier to ensure consistency). Finally, 5 sets of hypotheses containing event execution priority sequences are generated, each set accompanied by modification basis, which makes the rationality of each hypothesis traceable and provides a transparent judgment basis for subsequent decision-making.

[0116] The logical sequence probability distribution provides the logical rationality of event order, while the node geographical location and signal strength attenuation supplement the physical feasibility, and the operation semantic association ensures the business necessity. The combination of the three makes the execution sequence hypothesis not only logically sound, but also consistent in actual system operation and business demand.

[0117] In a distributed Internet of Things system, multiple sensor nodes simultaneously send data update requests to the central control node. The logical probability may give the order of the requests from each node, but combined with the node geographical location (nodes close to the central control node execute first to reduce data transmission delay), signal strength (nodes with stable signals have more reliable data, and are processed first), and operation semantics (temperature and humidity sensor data are closely related to device control instructions in terms of semantics, and the order consistency needs to be ensured), the modified execution sequence can more accurately ensure that the data received by the central control node is consistent with the state of each sensor, avoiding control errors caused by chaotic order.

[0118] This step integrates multi-dimensional context information to make the execution sequence hypothesis more consistent with the actual running environment and business demand of the distributed system, thereby providing a more reliable decision basis for data consistency control.

[0119] On the one hand, the initial hypotheses are based on probability screening, ensuring the logical possibility of the sequence. The introduction of node physical characteristics and business semantics in the modification process upgrades the hypothesis from "logically reasonable" to "practically feasible", reducing the execution deviation caused by ignoring system environment or business dependence. On the other hand, multiple hypotheses are generated instead of a single solution, leaving room for error tolerance for subsequent decision-making, avoiding the possible one-sidedness or errors of a single sequence. The modification basis attached to each hypothesis enhances the explainability and traceability of the decision-making process, facilitating subsequent verification and adjustment.

[0120] As Figure 5 shown, the generation of several sets of execution sequence assumptions includes:

[0121] S410, based on the logical precedence probability distribution, the top 5 possible sequences with the highest probability values are selected as initial assumptions;

[0122] S420, for the specific business operation corresponding to the conflict event, the semantic association degree between different business operations is evaluated through the pre-defined operation type association matrix to obtain the operation semantic association;

[0123] S430, the initial assumptions are corrected in combination with the node geographic location, signal strength attenuation and operation semantic association;

[0124] S440, five sets of execution sequence assumptions containing event execution priority ordering are finally generated, and each set of assumption is accompanied by a correction basis explanation.

[0125] S500, according to the dynamically adjusted confidence threshold, the confidence scores of several sets of execution sequence assumptions are calculated, when there is a scheme with a confidence score exceeding the confidence threshold, it is defined as the optimal scheme, and the corresponding execution sequence assumption is selected; when there is no scheme with a confidence score exceeding the threshold, the asynchronous coordination channel is started for conflict resolution;

[0126] The initial threshold is not a fixed value, but is adjusted floatingly every hour according to the historical decision success rate, so that the threshold always matches the current decision accuracy of the system, when the historical decision success rate is high, the threshold can be appropriately relaxed to improve the decision efficiency; when the success rate decreases, the threshold is tightened to reduce the wrong selection, so as to avoid the misjudgment caused by the disconnection between the static threshold and the dynamic changes of the system.

[0127] On this basis, the confidence score of each set of execution sequence assumption is calculated, and the scoring formula integrates the time window deviation amount of the enhanced vector clock, the logical precedence probability and the weight of the context information (node geographic location, signal strength, operation semantic association).

[0128] The time window deviation amount reflects the accuracy of the node clock, the smaller the deviation, the more reliable the time reference; the logical precedence probability reflects the logical rationality of the event sequence; the context information ensures that the scheme adapts to the actual running environment and business demand, and the weighted integration of the three can comprehensively evaluate the comprehensive reliability of the scheme in the "time accuracy-logical rationality-environment adaptability" dimension, avoiding one-sided decision-making caused by single factor dominance.

[0129] After the score is completed, the decision-making link is entered: if there is a scheme whose score exceeds the confidence threshold, the scheme with the highest score is selected as the optimal scheme for execution, which can quickly promote the operation under the premise of ensuring reliability and reduce delay; if the scores of all schemes do not meet the standard, the asynchronous coordination channel is started, a request containing all assumptions and scores is sent to the nodes involved in the conflict, and a decision is made after waiting for the feedback confirmation of the majority of nodes. This mechanism avoids redundant coordination in high certainty scenarios, and ensures consistency through multi-node consensus in low certainty scenarios.

[0130] In a distributed inventory management system, when multiple nodes initiate increase or decrease operations on the inventory of the same commodity, S500 will first filter out the most reliable execution order through dynamic threshold and comprehensive score. If a scheme performs excellently in time accuracy, logical rationality and warehouse geographical location adaptability, it is directly executed to quickly update the inventory; if the scores of all schemes are insufficient, the nodes are coordinated to confirm, ensuring that the final inventory status is consistent throughout the system, avoiding over-selling or inconsistent inventory.

[0131] As shown in Figure 6 , the confidence score of each set of execution order assumptions includes:

[0132] S510, set the initial confidence threshold, and adjust it according to the historical decision success rate every hour;

[0133] S520, set the time window deviation weight of the enhanced vector clock, the logical sequence probability weight and the context information weight, and calculate the confidence score of each set of execution order assumptions:

[0134] ;

[0135] Among them:

[0136] represents the confidence score of a set of execution order assumptions (value range [0, 1]);

[0137] is the weight coefficient;

[0138] represents the time window deviation factor (obtained by normalization, the smaller, the closer to 1);

[0139] represents the optimal logical relationship probability corresponding to the assumption (assuming "A precedes B", take ; assuming "B precedes A", take ; assuming "cannot be distinguished", take );

[0140] Contextual information synthesis factor (obtained by weighted summation of node geographical position weight, signal strength attenuation weight, operation semantic relevance, normalized to [0, 1]).

[0141] S530, when there is a solution whose confidence score exceeds the initial confidence threshold, select the one with the highest score as the optimal solution and execute it;

[0142] Otherwise, start an asynchronous coordination channel, send a coordination request containing all execution order assumptions and scores to the nodes involved in the conflict, and wait for the majority of nodes to feedback confirmation before making a decision.

[0143] S600, set and implement a three-level conflict processing mechanism to control the dynamic balance between system resource allocation and consistency guarantee.

[0144] In this step, the three-level conflict processing mechanism includes:

[0145] First-level processing: for optimal solutions with confidence score >= 0.8, such solutions have very high reliability after multi-dimensional evaluation, so they are directly allocated priority execution resources, the enhanced vector clock is updated synchronously, and the execution result is broadcast. The purpose of this processing method is to quickly advance the operation in scenarios with high certainty, reduce the delay caused by waiting or coordination, and synchronize the system state by broadcasting the results to avoid subsequent conflicts.

[0146] Second-level processing: for solutions with confidence score between 0.6 and 0.8, such solutions have certain reliability but have uncertain factors, so they are put into a buffer queue and wait for 100 ms before calling the dynamic fuzzy reasoning engine again for verification. After verification, execute it. This is to balance efficiency and caution, filter out possible misjudgments caused by transient environmental fluctuations through short waiting and secondary verification, and ensure that the executed solution can withstand the test of time.

[0147] Third-level processing: for solutions with confidence score < 0.6, such solutions have low reliability, so related resources are first frozen to prevent error propagation, and then cross-node state consistency verification is started. After verification, execute according to the coordination result. The core of this mechanism is to resolve low certainty conflicts through full node consensus, at the cost of temporary freezing of resources to ensure the bottom line of data consistency.

[0148] Figure 7 The structural diagram of the distributed data consistency control system provided by the embodiment of the application is shown in Figure 7 The system includes:

[0149] The enhanced vector clock construction module 100 is used to expand the traditional vector clock structure based on the fuzzy membership parameter and the time window deviation amount in the enhanced vector clock when the participating nodes generate events.

[0150] The engine building module 200 is used to build a dynamic fuzzy reasoning engine by using the fuzzy membership parameter and the time window deviation amount in the enhanced vector clock, combining network delay jitter, node clock offset and historical decision confidence.

[0151] The logical relationship probability calculation module 300 is used to calculate the logical relationship probability distribution between the conflict events when it is detected that the traditional vector clock cannot sort the conflict events.

[0152] The execution order assumption generation module 400 is used to generate a number of execution order assumptions based on the logical relationship probability distribution, and comprehensively consider the node geographical location, signal strength attenuation and operation semantic correlation.

[0153] The optimal scheme selection module 500 is used to calculate the confidence score of a number of execution order assumptions according to the dynamically adjusted confidence threshold, and when there is a scheme whose confidence score exceeds the confidence threshold, the scheme is defined as the optimal scheme, and the corresponding execution order assumption is selected; when there is no scheme whose confidence score exceeds the threshold, an asynchronous coordination channel is started to resolve the conflict.

[0154] The three-level conflict processing module 600 is used to set and implement a three-level conflict processing mechanism to control the dynamic balance of on-demand allocation and consistency guarantee of system resources.

[0155] The technical features of the above-described embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described, but as long as the combinations of the technical features do not contradict, they should be considered as within the scope of the present disclosure.

[0156] The above-described embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the present patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present patent should be subject to the appended claims.

[0157] The above-described embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the present patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present patent should be subject to the appended claims. The above-described embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the present patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims

1. A method for distributed data consistency control, characterized by, The method comprises: When an event is generated at a participating node, an enhanced vector clock is constructed based on an extension of a traditional vector clock structure, the enhanced vector clock containing a fuzzy membership parameter and a time window deviation amount; Using the fuzzy membership parameter and the time window deviation amount in the enhanced vector clock, a dynamic fuzzy reasoning engine is constructed in combination with network delay jitter, node clock offset and historical decision confidence; When a conflict event that cannot be sorted by the traditional vector clock is detected, the dynamic fuzzy reasoning engine is used to calculate a logical precedence probability distribution between the conflict events; Based on the logical precedence probability distribution, a number of sets of execution order assumptions are generated in combination with node geographical location, signal strength attenuation and operation semantic relevance; According to a dynamically adjusted confidence threshold, confidence scores of the number of sets of execution order assumptions are calculated, when there is a scheme whose confidence score exceeds the confidence threshold, the scheme is defined as an optimal scheme, and the corresponding execution order assumption is selected, when there is no scheme whose confidence score exceeds the threshold, an asynchronous coordination channel is started to resolve the conflict; A three-level conflict processing mechanism is set and implemented to control the dynamic balance between on-demand allocation of system resources and consistency guarantee.

2. The method of claim 1, wherein, The construction of the enhanced vector clock specifically comprises: A fuzzy membership parameter field and a time window deviation amount field are added under each node entry of the traditional vector clock; The fuzzy membership parameter is calculated through a local timestamp at the time of event generation and a preset network delay distribution model, and the time window deviation amount is obtained based on periodic calibration results of the node and a reference clock source; A synchronization protocol of the enhanced vector clock is defined, when events are transmitted between nodes, the fuzzy membership parameter and the time window deviation amount are synchronously carried and updated, and the enhanced vector clock that can record fuzzy attributes and time deviations of events is constructed.

3. The method of claim 2, wherein, The construction of the dynamic fuzzy reasoning engine comprises: The fuzzy membership parameter and the time window deviation amount in the enhanced vector clock, network delay jitter, node clock offset and historical decision confidence collected in real time are taken as input variables; A rule base containing a plurality of fuzzy rules is established, each rule covers fuzzy subset division of the input variables and mapping of the logical precedence probability distribution of the output, fuzzy reasoning is performed on the input variables according to the rule base, and a reasoning result is generated; A gravity method is used to defuzzify the reasoning result, a probability distribution of the logical precedence between the conflict events is output, and a dynamic fuzzy reasoning engine for dynamically evaluating the logical relationship of events is constructed.

4. The method of claim 3, wherein, The calculation of the logical precedence probability distribution between the conflict events comprises: When a timestamp difference of events recorded by the enhanced vector clock is less than a preset indistinguishable threshold, the conflict events that cannot be sorted by the traditional vector clock are determined; Through the dynamic fuzzy reasoning engine, a rule in the rule base that matches the current environmental characteristics is called, the fuzzy membership parameter and the time window deviation amount are taken as core weight factors, fuzzy reasoning is performed on the conflict events, and probability values of three kinds of event occurrence are calculated, a probability distribution result is output, a logical precedence probability distribution between the conflict events is obtained, and the three kinds of events include: event A precedes event B, event B precedes event A, and the precedence cannot be clearly distinguished.

5. The method of claim 4, wherein, The generating a plurality of execution sequence assumptions comprises: Based on the logical sequence probability distribution, the possible sequences with top 5 probability values are screened as initial assumptions; For specific business operations corresponding to the conflict events, the semantic association degree between different business operations is evaluated through a predefined operation type association matrix to obtain operation semantic association; The initial assumptions are modified in combination with node geographical location, signal strength attenuation and operation semantic association; Five execution sequence assumptions containing event execution priority ordering are finally generated, and each assumption is accompanied by a modification basis description.

6. The method of claim 5, wherein, The calculating confidence scores of the plurality of execution sequence assumptions comprises: An initial confidence threshold is set, and the initial confidence threshold is adjusted according to the historical decision success rate every hour; The time window deviation weight of the enhanced vector clock, the logical sequence probability weight and the context information weight are respectively set to calculate the confidence scores of the plurality of execution sequence assumptions; When there is a scheme with a confidence score exceeding the initial confidence threshold, the scheme with the highest score is selected as the optimal scheme and is executed; Otherwise, an asynchronous coordination channel is started, a coordination request containing all execution sequence assumptions and scores is sent to the nodes involved in the conflict events, and a decision is made after receiving feedback from the majority of the nodes.

7. The method of claim 6, wherein, The three-level conflict processing mechanism comprises: First-level processing: for the optimal scheme with a confidence score greater than or equal to 0.8, priority execution resources are directly allocated, the enhanced vector clock is updated synchronously, and the execution result is broadcasted; Second-level processing: for the scheme with a confidence score between 0.6 and 0.8, the scheme is put into a buffer queue, and the dynamic fuzzy reasoning engine is called again after 100 ms to verify the scheme, and the scheme is executed after verification; Third-level processing: for the scheme with a confidence score less than 0.6, the related resources are frozen, cross-node state consistency verification is started, and the scheme is executed according to the coordination result after the verification.

8. A distributed data consistency control system, characterized by, The system comprises: An enhanced vector clock construction module is configured to extend a traditional vector clock structure to construct an enhanced vector clock when an event is generated on a participating node, wherein the enhanced vector clock comprises a fuzzy membership parameter and a time window deviation amount; An engine building module is configured to use the fuzzy membership parameter and the time window deviation amount in the enhanced vector clock, in combination with network delay jitter, node clock offset and historical decision confidence, to build a dynamic fuzzy reasoning engine; A logical relationship probability calculation module is configured to use the dynamic fuzzy reasoning engine to calculate a logical sequence probability distribution between conflict events when it is detected that the traditional vector clock cannot sort the conflict events; An execution sequence assumption generation module is configured to generate a plurality of execution sequence assumptions based on the logical sequence probability distribution and in combination with node geographical location, signal strength attenuation and operation semantic association; An optimal scheme selection module is configured to calculate confidence scores of the plurality of execution sequence assumptions according to a dynamically adjusted confidence threshold, and when there is a scheme with a confidence score exceeding the confidence threshold, the scheme is defined as an optimal scheme and the corresponding execution sequence assumption is selected; when there is no scheme with a confidence score exceeding the threshold, an asynchronous coordination channel is started to resolve the conflict. A three-level conflict processing module is configured to set and implement a three-level conflict processing mechanism to control a dynamic balance between on-demand allocation and consistency guarantee of system resources.

Citation Information

Cited By

  • Enterprise service management system and method oriented to multiple service scenes

    CN121501510A

  • Mobile game cross-platform real-time interaction optimization method and device based on cloud data synchronization

    CN121695486A

  • Data consistency control method and system for short wave therapeutic apparatus

    CN122018411A

  • A data consistency control method and system for shortwave therapy devices

    CN122018411B