A data multi-directional synchronization method and system based on data analysis
By integrating the local node metrics of data synchronization nodes into a global state dataset in a distributed system, the data synchronization strategy is optimized, solving the problems of latency and unreasonable resource allocation caused by the strategy's reliance on outdated information in existing technologies, and achieving real-time and effective data synchronization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-03-10
AI Technical Summary
In existing distributed systems, data synchronization strategies cannot adapt to the dynamic changes in business load, resulting in delays in critical data synchronization or unreasonable bandwidth usage. Furthermore, AI optimization strategies rely on outdated information, leading to a disconnect between decision-making and execution, which may trigger node avalanches and system oscillations.
By acquiring local node metrics of all data synchronization nodes in the network topology, cleaning the data, and integrating it into a global synchronization status dataset, data synchronization strategy instructions are generated. The synchronization strategy is optimized using real-time execution metrics and context constraint rules, and target nodes are selected by combining business priorities and regularized leadership algorithms.
It realizes the generation of synchronization strategies based on real-time data, ensuring that synchronization tasks are matched with sufficient resources and adapted to business needs, alleviating the problems of latency and unreasonable resource allocation, and reducing the risks of information blind spots and disconnect between decision execution and implementation.
Smart Images

Figure CN121125742B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed computing technology, and in particular to a data multi-directional synchronization method and system based on data analysis. Background Technology
[0002] In distributed systems, such as microservice architectures and geographically dispersed business systems, data needs to be synchronized across multiple nodes or data centers. Traditional multi-directional data synchronization methods mainly rely on preset fixed rules, such as synchronization cycles, data version number conflict resolution strategies, or simple manual strategy configuration. These methods have significant drawbacks: First, they cannot adapt to dynamic changes in business load. In scenarios with sudden traffic surges, fixed synchronization strategies may lead to delays in the synchronization of critical data or excessive bandwidth consumption of non-critical data. Second, strategy adjustments rely on manual experience, resulting in slow response and a lack of quantitative basis.
[0003] Currently, artificial intelligence technology is being introduced to optimize synchronization strategies, but existing AI technologies have the following problems when optimizing synchronization strategies:
[0004] The node state information relied upon for strategy generation, such as load and bandwidth, is typically a historical snapshot from several seconds or even tens of seconds ago, rather than the actual environmental state at the time of execution. The strategy generation process relies heavily on local metrics or historical statistics of a single node, failing to effectively perceive key execution-period indicators such as the instantaneous accumulation of synchronization queues on the target node or the instantaneous congestion of network links. This disconnect between decision-making and execution leads AI models to frequently generate theoretically optimal but practically infeasible strategies. For example, a large number of synchronization tasks might be directed to a node with normal load at the time of strategy generation but nearing overload at the time of actual execution, not only causing synchronization task failures but also potentially triggering a node avalanche, leading to system oscillations. Summary of the Invention
[0005] To address the technical problems existing in the background art, this invention proposes a data multi-directional synchronization method and system based on data analysis.
[0006] This invention proposes a multi-directional data synchronization method based on data analysis, comprising the following steps:
[0007] S1. Obtain all data synchronization nodes in the network topology and generate a set of local node indicators for each data synchronization node;
[0008] S2. Clean the local node indicator set corresponding to each data synchronization node to obtain the cleaned local node indicator set; integrate all the cleaned local node indicator sets into a global synchronization status dataset.
[0009] S3. When a data synchronization node initiates a data synchronization task, it generates a data synchronization strategy instruction based on the global synchronization status dataset.
[0010] Preferably, in S1, a set of local node metrics is generated for each data synchronization node, as follows:
[0011] For each data synchronization node, obtain the real-time execution metrics of each data synchronization node at a fixed period and add a local acquisition flag;
[0012] Obtain the neighboring synchronization nodes that can be reached by one hop for each data synchronization node in the network topology; the data synchronization node obtains the real-time execution metrics of each neighboring synchronization node through point-to-point communication and adds a remote acquisition marker;
[0013] Real-time execution metrics marked as locally acquired and real-time execution metrics marked as remotely acquired are aggregated to form a local node metric set.
[0014] Preferably, in S1, point-to-point communication uses the TCP protocol and sets a timeout retransmission mechanism with a fixed time. When point-to-point communication is interrupted, historical real-time execution indicators marked as remotely acquired and real-time execution indicators marked as locally acquired are aggregated to form a local node indicator set.
[0015] Preferably, in S1, the real-time execution metrics include multiple data items, and each data item is accompanied by a collection timestamp. The multiple data items include the current length of the outbound synchronization queue, the current length of the inbound synchronization queue, the current CPU utilization rate of the node, the current memory utilization rate of the node, and the current output bandwidth utilization rate of the network card.
[0016] Preferably, in S2, the local node indicator set corresponding to each data synchronization node is cleaned to obtain the cleaned local node indicator set, as follows:
[0017] S21. In the local node indicator set, for a certain data item in the same real-time execution indicator, only the data item with the latest collection timestamp is retained;
[0018] S22. According to the preset timestamp deviation tolerance threshold; if the collection timestamp of any data item in the same real-time execution indicator is not within the preset timestamp deviation tolerance threshold, then the real-time execution indicator is marked as invalid and removed.
[0019] S23. In the local node indicator set, if the parameter difference between a certain data item in the real-time execution indicator of the locally acquired marker and the corresponding data item in the real-time execution indicator of the remote acquired marker is greater than a set threshold, then the weighted fusion algorithm is used to sum the data item according to the preset weight to obtain the final value of the data item, and the final value of the data item is used to replace the parameter of a certain data item in the real-time execution indicator of the locally acquired marker and the corresponding data item in the real-time execution indicator of the remote acquired marker.
[0020] The cleaned local node index set is obtained.
[0021] Preferably, in S2, when all cleaned local node indicator sets are integrated into a unified global synchronization state dataset, for real-time execution indicators marked as invalid, the data synchronization node corresponding to the real-time execution indicator marked as invalid is obtained as the target data synchronization node.
[0022] When selecting the target data synchronization node as an adjacent synchronization node, the corresponding data synchronization node is selected as the data synchronization node.
[0023] In the set of all cleaned local node metrics, the real-time execution metrics of the corresponding target data synchronization node uploaded by the selected data synchronization node will be replaced with the real-time execution metrics marked as invalid.
[0024] If, in the set of all cleaned local node metrics, the selected data synchronization node does not have a corresponding real-time execution metric for the target data synchronization node, then a supplementary collection is initiated to the target data synchronization node, and the target data synchronization node re-collects the real-time execution metric to replace the real-time execution metric marked as invalid.
[0025] Preferably, in step S3, a data synchronization strategy instruction is generated based on the global synchronization state dataset, as follows:
[0026] The data synchronization node that initiates the data synchronization task will be used as the source data synchronization node.
[0027] Obtain the data synchronization request message initiated by the source data synchronization node to perform the data synchronization task, and extract the size of the data block to be synchronized and the task type identifier from the data synchronization request message;
[0028] Match the business priority of the task type identifier according to the preset business priority configuration table;
[0029] As an explanation, task type identifiers include, for example, real-time transaction data and offline backup data; a preset business priority configuration table is used to obtain the business priority of the task type identifier. The business priority can be set to three levels: high, medium, and low, and the weight coefficient corresponding to the business priority can be preset.
[0030] From the global synchronization state dataset, extract the local node index set of the source data synchronization node, and extract the local node index set of all data synchronization nodes in the network topology except for the source data synchronization node.
[0031] Based on the context constraint rules, all data synchronization nodes except the source data synchronization node are filtered to obtain a set of candidate data synchronization nodes;
[0032] For candidate data synchronization nodes in the candidate node set, a follow-regularized leadership algorithm is adopted, which takes the real-time execution indicators, the size of the data block to be synchronized, and the business priority of the candidate data synchronization node as input features to obtain the priority score of each candidate data synchronization node.
[0033] Candidate data synchronization nodes are arranged in descending order of priority score, and synchronization strategy instructions are generated sequentially.
[0034] When the candidate data synchronization nodes have completed synchronization, for the candidate data synchronization nodes that were not selected as candidate data synchronization nodes:
[0035] When the real-time execution metrics of the local acquisition markers of the candidate data synchronization nodes meet the context constraint rules, the follow-regularized leadership algorithm is adopted. The real-time execution metrics of the local acquisition markers of the candidate data synchronization nodes that meet the context constraint rules, the size of the data block to be synchronized, and the business priority are used as input features to obtain the priority score of the candidate data synchronization nodes. The candidate data synchronization nodes are arranged from high to low according to the priority score, and synchronization strategy instructions are generated in sequence.
[0036] When the real-time execution metrics of the locally acquired markers corresponding to the candidate data synchronization nodes do not meet the context constraint rules, a candidate data synchronization node that does not meet the context constraint rules is randomly selected within the preset period after both the candidate data synchronization nodes and the candidate data synchronization nodes have completed synchronization, and a synchronization strategy instruction is generated.
[0037] Preferably, in S3, all data synchronization nodes except the source data synchronization node are filtered according to the context constraint rules to obtain a candidate data synchronization node set, as follows:
[0038] All data synchronization nodes, except for the source data synchronization node, are selected as candidate data synchronization nodes.
[0039] As an explanation, the source data synchronization node is the data sender, and the candidate data synchronization node is the data receiver.
[0040] The context constraint rules include: the current length of the outbound synchronization queue of the real-time execution indicator corresponding to the locally acquired mark of the candidate data synchronization node is less than a preset threshold; the current CPU utilization of the node corresponding to the real-time execution indicator of the locally acquired mark of the candidate data synchronization node is less than a preset threshold; and the current output bandwidth utilization of the network card corresponding to the real-time execution indicator of the locally acquired mark of the candidate data synchronization node is less than a preset threshold.
[0041] Select candidate data synchronization nodes that meet the context constraint rules as candidate data synchronization nodes to form a set of candidate data synchronization nodes.
[0042] A data multi-directional synchronization system based on data analysis includes:
[0043] Data acquisition module: Acquires all data synchronization nodes in the network topology and generates a set of local node metrics for each data synchronization node;
[0044] Global synchronization state dataset generation module: Cleans the local node indicator set corresponding to each data synchronization node to obtain a cleaned local node indicator set; integrates all cleaned local node indicator sets into a global synchronization state dataset.
[0045] Data synchronization strategy instruction generation module: When a data synchronization node initiates a data synchronization task, it generates data synchronization strategy instructions based on the global synchronization status dataset.
[0046] The multi-directional data synchronization method and system based on data analysis proposed in this invention have the following beneficial technical effects:
[0047] 1. This application first obtains the local node indicator set of all data synchronization nodes, and after data cleaning, integrates it into a global synchronization state dataset. By constructing the global synchronization state dataset as the only reliable data source, the strategy generation is always based on real-time execution indicators. According to a preset timestamp deviation tolerance threshold, if the collection timestamp of any data item in the same real-time execution indicator is not within the preset timestamp deviation tolerance threshold, the real-time execution indicator is marked as invalid and removed. Based on the filtering of context constraint rules, the synchronization traffic is preferentially distributed to data synchronization nodes that meet the context constraint rules. This alleviates the problem of decision-making and execution disconnect that exists in existing methods of introducing artificial intelligence technology to optimize synchronization strategies.
[0048] 2. When a data synchronization task is initiated at a certain data synchronization node, this application can extract the real-time status of the data synchronization node by combining the global synchronization status dataset, and obtain the priority score of the data synchronization node by combining the business priority and the size of the data block to be synchronized through a regularized leader algorithm. Synchronization strategy instructions are generated according to the score, thereby ensuring that the synchronization task is matched with a data synchronization node with sufficient resources and adapted to business needs, thus alleviating the problem of delay in critical tasks.
[0049] 3. This application obtains the one-hop reachable adjacent synchronization nodes of each data synchronization node in the network topology, and aggregates the real-time execution indicators marked as locally acquired and remotely acquired to form a local node indicator set. This not only covers the node itself and its directly related adjacent nodes by using one-hop reachable adjacent synchronization nodes, eliminating the information blind spot where a single node can only collect its own data, and alleviating the problem of incomplete node status information collection caused by the physical collection range limitation of a single data synchronization node, but also clearly distinguishes the data source by using local acquisition markers and remote acquisition markers, realizing data traceability and providing clear source evidence for subsequent processing; and reducing the invalidity and uncertainty of global data. Attached Figure Description
[0050] Figure 1 This is a flowchart of a data multi-directional synchronization method based on data analysis according to the present invention;
[0051] Figure 2 This is a block diagram illustrating the principle of a multi-directional data synchronization system based on data analysis according to the present invention. Detailed Implementation
[0052] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0053] like Figure 1 The data analysis-based multi-directional data synchronization method shown includes the following steps:
[0054] S1. Obtain all data synchronization nodes in the network topology and generate a set of local node indicators for each data synchronization node;
[0055] In an optional embodiment, in S1, a set of local node metrics for each data synchronization node is generated as follows:
[0056] For each data synchronization node, obtain the real-time execution metrics of each data synchronization node at a fixed period and add a local acquisition flag;
[0057] Obtain the neighboring synchronization nodes that can be reached by one hop for each data synchronization node in the network topology; the data synchronization node obtains the real-time execution metrics of each neighboring synchronization node through point-to-point communication and adds a remote acquisition marker;
[0058] Real-time execution metrics marked as locally acquired and real-time execution metrics marked as remotely acquired are aggregated to form a local node metric set;
[0059] In an optional embodiment, in S1, point-to-point communication uses the TCP protocol and sets a timeout retransmission mechanism with a fixed time; when point-to-point communication is interrupted, historical real-time execution metrics marked as remotely acquired and real-time execution metrics marked as locally acquired are aggregated to form a local node metric set.
[0060] In an optional embodiment, in S1, the real-time execution metrics include multiple data items, and each data item is accompanied by a collection timestamp. The multiple data items include the current length of the outbound synchronization queue, the current length of the inbound synchronization queue, the current CPU utilization of the node, the current memory utilization of the node, and the current output bandwidth utilization of the network interface card.
[0061] This application obtains one-hop reachable neighboring synchronization nodes for each data synchronization node in the network topology, aggregates real-time execution metrics marked as locally acquired and remotely acquired, to form a local node metric set. This not only covers the node itself and its directly related neighboring nodes by using one-hop reachable neighboring synchronization nodes, eliminating the information blind spot where a single node can only collect its own data, and alleviating the problem of incomplete node status information collection caused by the physical limitations of a single data synchronization node, but also clearly distinguishes the data source by using local and remote acquisition tags, enabling data traceability and providing clear source evidence for subsequent processing; and reducing the invalidity and uncertainty of global data.
[0062] S2. Clean the local node indicator set corresponding to each data synchronization node to obtain the cleaned local node indicator set; integrate all the cleaned local node indicator sets into a global synchronization status dataset.
[0063] In an optional embodiment, the global synchronization state dataset is stored in JSON format;
[0064] In an optional embodiment, in S2, the local node indicator set corresponding to each data synchronization node is cleaned to obtain the cleaned local node indicator set, as follows:
[0065] S21. In the local node indicator set, for a certain data item in the same real-time execution indicator, only the data item with the latest collection timestamp is retained;
[0066] S22. According to the preset timestamp deviation tolerance threshold; if the collection timestamp of any data item in the same real-time execution indicator is not within the preset timestamp deviation tolerance threshold, then the real-time execution indicator is marked as invalid and removed.
[0067] S23. In the local node indicator set, if the parameter difference between a certain data item in the real-time execution indicator of the locally acquired marker and the corresponding data item in the real-time execution indicator of the remote acquired marker is greater than a set threshold, then the weighted fusion algorithm is used to sum the data item according to the preset weight to obtain the final value of the data item, and the final value of the data item is used to replace the parameter of a certain data item in the real-time execution indicator of the locally acquired marker and the corresponding data item in the real-time execution indicator of the remote acquired marker.
[0068] The cleaned local node index set is obtained.
[0069] In an optional embodiment, in S2, when all cleaned local node indicator sets are integrated into a unified global synchronization state dataset, for real-time execution indicators marked as invalid, the data synchronization node corresponding to the real-time execution indicator marked as invalid is obtained as the target data synchronization node.
[0070] When selecting the target data synchronization node as an adjacent synchronization node, the corresponding data synchronization node is selected as the data synchronization node.
[0071] In the set of all cleaned local node metrics, the real-time execution metrics of the corresponding target data synchronization node uploaded by the selected data synchronization node will be replaced with the real-time execution metrics marked as invalid.
[0072] If, in the set of all cleaned local node metrics, the selected data synchronization node does not have a corresponding real-time execution metric for the target data synchronization node, then a supplementary collection is initiated to the target data synchronization node, and the target data synchronization node re-collects the real-time execution metric to replace the real-time execution metric marked as invalid.
[0073] S3. When a data synchronization node initiates a data synchronization task, it generates a data synchronization strategy instruction based on the global synchronization status dataset.
[0074] In an optional embodiment, in S3, a data synchronization policy instruction is generated based on the global synchronization state dataset, as follows:
[0075] The data synchronization node that initiates the data synchronization task will be used as the source data synchronization node.
[0076] Obtain the data synchronization request message initiated by the source data synchronization node to perform the data synchronization task, and extract the size of the data block to be synchronized and the task type identifier from the data synchronization request message;
[0077] Match the business priority of the task type identifier according to the preset business priority configuration table;
[0078] As an explanation, task type identifiers include, for example, real-time transaction data and offline backup data; a preset business priority configuration table is used to obtain the business priority of the task type identifier. The business priority can be set to three levels: high, medium, and low, and the weight coefficient corresponding to the business priority can be preset.
[0079] From the global synchronization state dataset, extract the local node index set of the source data synchronization node, and extract the local node index set of all data synchronization nodes in the network topology except for the source data synchronization node.
[0080] Based on the context constraint rules, all data synchronization nodes except the source data synchronization node are filtered to obtain a set of candidate data synchronization nodes;
[0081] Based on the context constraint rules, all data synchronization nodes except the source data synchronization node are filtered to obtain a candidate data synchronization node set, as follows:
[0082] All data synchronization nodes, except for the source data synchronization node, are selected as candidate data synchronization nodes.
[0083] As an explanation, the source data synchronization node is the data sender, and the candidate data synchronization node is the data receiver.
[0084] The context constraint rules include: the current length of the outbound synchronization queue of the real-time execution indicator corresponding to the locally acquired mark of the candidate data synchronization node is less than a preset threshold; the current CPU utilization of the node corresponding to the real-time execution indicator of the locally acquired mark of the candidate data synchronization node is less than a preset threshold; and the current output bandwidth utilization of the network card corresponding to the real-time execution indicator of the locally acquired mark of the candidate data synchronization node is less than a preset threshold.
[0085] Select candidate data synchronization nodes that meet the context constraint rules as candidate data synchronization nodes to form a set of candidate data synchronization nodes;
[0086] For candidate data synchronization nodes in the candidate node set, a follow-regularized leadership algorithm is adopted, which takes the real-time execution indicators, the size of the data block to be synchronized, and the business priority of the candidate data synchronization node as input features to obtain the priority score of each candidate data synchronization node.
[0087] This application first obtains a set of local node metrics for all data synchronization nodes, and after data cleaning, integrates them into a global synchronization status dataset. By constructing the global synchronization status dataset as the only reliable data source, the strategy generation is always based on real-time execution metrics. According to a preset timestamp deviation tolerance threshold, if the collection timestamp of any data item in the same real-time execution metric is not within the preset timestamp deviation tolerance threshold, the real-time execution metric is marked as invalid and removed. Filtering based on context constraint rules ensures that synchronization traffic is preferentially distributed to data synchronization nodes that meet the context constraint rules. This alleviates the problem of latency accumulation caused by making incorrect decisions based on outdated or partial information and dispatching tasks to overloaded nodes. It also alleviates the problems of unreasonable resource allocation and poor business adaptability that may result from the lack of a global node status perspective in traditional data synchronization methods. Thus, it alleviates the problem of decision-making and execution disconnect that exists in existing methods that introduce artificial intelligence technology to optimize synchronization strategies.
[0088] In an optional embodiment, the L1 regularization coefficient of the follow regularized leader algorithm ranges from 0.04 to 0.06, the L2 regularization coefficient ranges from 0.005 to 0.015, and the learning rate ranges from 0.02 to 0.04.
[0089] Specifically, the L1 regularization coefficient is 0.05, the L2 regularization coefficient is 0.01, and the learning rate is 0.03;
[0090] Candidate data synchronization nodes are arranged in descending order of priority score, and synchronization strategy instructions are generated sequentially.
[0091] When the candidate data synchronization nodes have completed synchronization, for the candidate data synchronization nodes that were not selected as candidate data synchronization nodes:
[0092] When the real-time execution metrics of the local acquisition markers of the candidate data synchronization nodes meet the context constraint rules, the follow-regularized leadership algorithm is adopted. The real-time execution metrics of the local acquisition markers of the candidate data synchronization nodes that meet the context constraint rules, the size of the data block to be synchronized, and the business priority are used as input features to obtain the priority score of the candidate data synchronization nodes. The candidate data synchronization nodes are arranged from high to low according to the priority score, and synchronization strategy instructions are generated in sequence.
[0093] When the real-time execution metrics of the locally acquired markers corresponding to the candidate data synchronization nodes do not meet the context constraint rules, a candidate data synchronization node that does not meet the context constraint rules is randomly selected within the preset period after both the candidate data synchronization nodes and the candidate data synchronization nodes have completed synchronization, and a synchronization strategy instruction is generated.
[0094] When a data synchronization task is initiated at a certain data synchronization node, this application can extract the real-time status of the data synchronization node by combining the global synchronization status dataset, and obtain the priority score of the data synchronization node by combining the business priority and the size of the data block to be synchronized through a regularized leader algorithm. Synchronization strategy instructions are then generated according to the score, thereby ensuring that the synchronization task is matched with a data synchronization node with sufficient resources and adapted to business needs, thus alleviating the problem of delay in critical tasks.
[0095] like Figure 2 The data analysis-based multi-directional data synchronization system shown includes:
[0096] Data acquisition module: Acquires all data synchronization nodes in the network topology and generates a set of local node metrics for each data synchronization node;
[0097] Global synchronization state dataset generation module: Cleans the local node indicator set corresponding to each data synchronization node to obtain a cleaned local node indicator set; integrates all cleaned local node indicator sets into a global synchronization state dataset.
[0098] Data synchronization strategy instruction generation module: When a data synchronization node initiates a data synchronization task, it generates data synchronization strategy instructions based on the global synchronization status dataset.
[0099] As an illustration, this application can be applied to clinic management in medical scenarios. The data synchronization nodes in the network topology may include clinic management nodes, pharmacy data nodes, pharmacy terminal nodes, expert consultation nodes, and hospital patient data center nodes in medical scenarios. The local node indicator set may include the real-time operating status of the corresponding nodes, such as the number of patient diagnosis records to be synchronized at the clinic node, the length of the drug inventory synchronization queue at the pharmacy node, the consultation data receiving bandwidth at the expert node, and the drug query response latency at the pharmacy node.
[0100] For each data synchronization node, such as the community hospital clinic data node, real-time execution indicators for each data synchronization node are acquired at a fixed interval, such as 10 seconds / time, which can be adjusted according to medical business needs. For example, in emergency scenarios, it can be shortened to 5 seconds / time. Local acquisition markers are added. The real-time execution indicators include multiple data items, each with an attached collection timestamp. Specifically, they may include: the current length of the outbound synchronization queue, such as the number of patient medical records to be synchronized at the clinic node; the current length of the inbound synchronization queue, such as the number of drug purchase orders to be received at the pharmacy node; the current CPU utilization rate of the node, such as the CPU utilization rate of the expert consultation node when processing patient diagnosis reports; the current memory utilization rate of the node, such as the memory usage of the pharmacy node when storing real-time drug inventory data; and the current output bandwidth utilization rate of the network card, such as the bandwidth usage of the hospital node when transmitting medical data to the expert node.
[0101] The system retrieves one-hop reachable neighboring synchronization nodes for each data synchronization node in the network topology. For example, neighboring nodes for a clinic node may include pharmacy nodes within the hospital area, pharmacy terminals within the jurisdiction, and regional expert consultation sub-nodes. Data synchronization nodes communicate point-to-point using the TCP protocol, with a fixed-time retransmission mechanism (e.g., 3-second timeout) to prevent interruptions in emergency patient data transmission. It also retrieves real-time execution metrics for each neighboring synchronization node and adds remote acquisition markers. If point-to-point communication is interrupted, such as a temporary network disconnection between a pharmacy terminal and a pharmacy node, historical real-time execution metrics marked as remote acquisition (e.g., the most recently successfully acquired pharmacy drug inventory data) and real-time execution metrics marked as local acquisition (e.g., the basic drug information stored locally by the pharmacy node) are aggregated to form a local node metric set, ensuring no medical data is lost.
[0102] Real-time execution metrics marked as locally acquired and real-time execution metrics marked as remotely acquired are aggregated to form a local node metric set, such as the local metric set of the clinic node. This set may include: the current number of patients received locally, the synchronization status of the associated pharmacy's drug inventory remotely acquired, and the idle status of the remotely acquired expert consultation node.
[0103] For clarification, "acquisition" in this application refers to obtaining the required content or data using existing technical means.
[0104] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0105] In the embodiments provided by this invention, it should be understood that the disclosed system or method can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative; for instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation.
[0106] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0107] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.
[0108] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the basic characteristics of the present invention.
[0109] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A data multi-directional synchronization method based on data analysis, characterized in that, The method comprises the following steps: S1, obtaining all data synchronization nodes in a network topology, and generating a local node index set of each data synchronization node; S2, performing data cleaning on the local node index set corresponding to each data synchronization node to obtain a cleaned local node index set; and integrating all cleaned local node index sets into a global synchronization state data set; S3, when a data synchronization node initiates a data synchronization task, generating a data synchronization strategy instruction according to the global synchronization state data set; In S1, the local node index set of each data synchronization node is generated as follows: For each data synchronization node, real-time execution indexes of each data synchronization node are obtained at a fixed period, and a local acquisition mark is added; Each adjacent synchronization node reachable by each data synchronization node in the network topology is obtained; The real-time execution indexes of each adjacent synchronization node are obtained by the data synchronization node through point-to-point communication, and a remote acquisition mark is added; The real-time execution indexes marked with the local acquisition mark and the real-time execution indexes marked with the remote acquisition mark are aggregated to form the local node index set.
2. The data multi-way synchronization method based on data analysis according to claim 1, characterized in that, In S1, the point-to-point communication adopts the TCP protocol, and a fixed-time timeout retransmission mechanism is set; when the point-to-point communication is interrupted, the historical real-time execution indexes marked with the remote acquisition mark and the real-time execution indexes marked with the local acquisition mark are aggregated to form the local node index set.
3. The data multi-way synchronization method based on data analysis according to claim 2, characterized in that, In S1, the real-time execution indexes include multiple data items, and each data item is additionally attached with a collection timestamp; the multiple data items include a current length of an outbound synchronization queue, a current length of an inbound synchronization queue, a current CPU usage of a node, a current memory usage of a node, and a current output bandwidth utilization of a network card.
4. The data multi-way synchronization method based on data analysis according to claim 3, characterized in that, In S2, the local node index set corresponding to each data synchronization node is cleaned to obtain a cleaned local node index set as follows: In S21, in the local node index set, only the data item with the latest collection timestamp is retained for a certain data item in the same real-time execution index; In S22, according to a preset timestamp deviation tolerance threshold; if the collection timestamp of any data item in the same real-time execution index is not within the preset timestamp deviation tolerance threshold, the real-time execution index is marked as invalid and removed; In S23, in the local node index set, if the parameters of a certain data item in the real-time execution index marked with the local acquisition mark and the corresponding data item in the real-time execution index marked with the remote acquisition mark differ by more than a set threshold, a weighted fusion algorithm is used to sum up the final value of the data item according to a preset weight, and the final value of the data item is used to replace the parameters of the certain data item in the real-time execution index marked with the local acquisition mark and the corresponding data item in the real-time execution index marked with the remote acquisition mark; The cleaned local node index set is obtained.
5. The data multi-way synchronization method based on data analysis according to claim 4, characterized in that, In S2, when all cleaned local node index sets are integrated into a unified global synchronization state data set, for the real-time execution index marked as invalid, the data synchronization node corresponding to the real-time execution index marked as invalid is selected as a target data synchronization node; When the target data synchronization node is selected as an adjacent synchronization node, the corresponding data synchronization node is selected as a selected data synchronization node; In the all-cleaning local node indicator set, the real-time execution indicator of the corresponding target data synchronization node uploaded by the selected data synchronization node is replaced with the real-time execution indicator marked as invalid; If the selected data synchronization node does not have the real-time execution indicator of the corresponding target data synchronization node in the all-cleaning local node indicator set, a supplementary collection is initiated to the target data synchronization node, and the target data synchronization node re-collects the real-time execution indicator to replace the real-time execution indicator marked as invalid.
6. The data multi-way synchronization method based on data analysis according to claim 5, characterized in that, In S3, the data synchronization strategy instruction is generated according to the global synchronization state data set, as follows: The data synchronization node initiating the data synchronization task is taken as the source data synchronization node; The data synchronization request message of the source data synchronization node initiating the data synchronization task is obtained, and the size of the to-be-synchronized data block and the task type identifier are extracted from the data synchronization request message; The business priority of the task type identifier is matched according to the preset business priority configuration table; The local node indicator set of the source data synchronization node is extracted from the global synchronization state data set, and the local node indicator set of all data synchronization nodes except the source data synchronization node in the network topology is extracted; All data synchronization nodes except the source data synchronization node are filtered according to the context constraint rule to obtain a candidate data synchronization node set; For the candidate data synchronization nodes in the candidate node set, the follow-up regularization leader algorithm is used, and the local acquisition marked real-time execution indicator of the candidate data synchronization node, the size of the to-be-synchronized data block, and the business priority are taken as input features to obtain the priority score of each candidate data synchronization node; The candidate data synchronization nodes are arranged in descending order of priority score, and the synchronization strategy instruction is generated in turn; When the candidate data synchronization nodes are synchronized, for the to-be-selected data synchronization nodes that are not selected as candidate data synchronization nodes: When the local acquisition marked real-time execution indicator of the to-be-selected data synchronization node meets the context constraint rule, the follow-up regularization leader algorithm is used, and the local acquisition marked real-time execution indicator of the to-be-selected data synchronization node that meets the context constraint rule, the size of the to-be-synchronized data block, and the business priority are taken as input features to obtain the priority score of the to-be-selected data synchronization node; the to-be-selected data synchronization nodes are arranged in descending order of priority score, and the synchronization strategy instruction is generated in turn; When the local acquisition marked real-time execution indicator of the to-be-selected data synchronization node does not meet the context constraint rule, at a preset period, when the candidate data synchronization nodes and the to-be-selected data synchronization nodes are synchronized, a to-be-selected data synchronization node that does not meet the context constraint rule is randomly selected in the preset period, and the synchronization strategy instruction is generated.
7. The data multi-way synchronization method based on data analysis according to claim 6, characterized in that, In S3, all data synchronization nodes except the source data synchronization node are taken as to-be-selected data synchronization nodes, as follows: All data synchronization nodes except the source data synchronization node are taken as to-be-selected data synchronization nodes. The context constraint rules include: an outbound synchronization queue of a real-time execution index marked by local acquisition corresponding to a candidate data synchronization node is currently less than a preset threshold; a node CPU current usage rate of the real-time execution index marked by local acquisition corresponding to the candidate data synchronization node is less than a preset threshold; and a network card current output bandwidth utilization rate of the real-time execution index marked by local acquisition corresponding to the candidate data synchronization node is less than a preset threshold. The candidate data synchronization nodes satisfying the context constraint rules are screened as candidate data synchronization nodes to form a candidate data synchronization node set.
8. A data multi-way synchronization system based on data analysis, for using a data multi-way synchronization method based on data analysis according to any one of claims 1 to 7, characterized in that, The method comprises: a data acquisition module: acquiring all data synchronization nodes in a network topology, and generating a local node index set of each data synchronization node; the local node index set of each data synchronization node is generated as follows: for each data synchronization node, acquiring a real-time execution index of each data synchronization node at a fixed period, and adding a local acquisition mark; acquiring adjacent synchronization nodes reachable at one hop of each data synchronization node in the network topology; the data synchronization node acquires a real-time execution index of each adjacent synchronization node through point-to-point communication, and adds a remote acquisition mark; the real-time execution index marked by the local acquisition mark and the real-time execution index marked by the remote acquisition mark are aggregated to form a local node index set; a global synchronization state data set generation module: performing data cleaning on the local node index set corresponding to each data synchronization node to obtain a cleaned local node index set; and integrating all cleaned local node index sets into a global synchronization state data set; a data synchronization strategy instruction generation module: when a data synchronization node initiates a data synchronization task, generating a data synchronization strategy instruction according to the global synchronization state data set.
Citation Information
Patent Citations
Multi-party set synchronization method and device and electronic equipment
CN111538865A
Improved transverse synchronous federated learning aggregation acceleration method
CN116629350A