Data synchronization method and system for communication software
By dynamically adjusting the transmission range and boundary of the data partition, prioritizing high-collision data items, and real-time monitoring of multi-path transmission performance to dynamically switch paths, the problems of data synchronization delay and high conflict frequency in the prior art are solved, and more efficient and stable data synchronization is achieved.
Patent Information
- Application Number
- CN202510293308.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-03-13
AI Technical Summary
The existing technology has shortcomings in data partition adjustment, conflict management, path management and real-time task execution, resulting in high-load partitions occupying too much bandwidth resources, high conflict frequency, long synchronization delay time, and difficult to meet the higher requirements of data consistency and transmission continuity.
By counting the network bandwidth usage, user synchronization request frequency and synchronization request size, dynamically adjust the transmission range and boundaries of the data partition; sort the data items based on the conflict frequency, prioritize high-collision data items; monitor the transmission performance of multipaths in real time, and dynamically switch paths to ensure the continuity of synchronization tasks.
Optimize network resource allocation, reduce the impact of high-load partitioning on the overall transmission capability, reduce synchronization delay, improve the timeliness and consistency of high-sensitive data, and improve the stability and transmission efficiency of data synchronization.
Smart Images

Figure CN119835280A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data synchronization, and in particular to a data synchronization method and system for communication software. Background Art
[0002] Data synchronization technology involves maintaining data consistency and accuracy between multiple computing devices or storage locations. It is often used in multiple environments such as servers, personal computers, and mobile devices to ensure that data can be updated in real time or regularly in multiple locations. Data synchronization technology supports multiple synchronization modes, including real-time synchronization, scheduled synchronization, and manually triggered synchronization to adapt to different application scenarios and network conditions. It also involves the handling of conflict management, data integrity verification, and optimization of data transmission efficiency. Its main applications include cloud storage services, distributed database management, enterprise data backup solutions, and data management and backup of mobile devices.
[0003] Among them, the data synchronization method of communication software refers to the technical means of synchronizing communication data (such as messages, contact information, conversation history, etc.) between multiple devices or systems. The main purpose is to ensure that users can obtain a consistent communication experience when using communication software between different devices. For example, messages sent by users on mobile phones can be displayed in real time on computers or tablets, and vice versa. This not only improves the user's operational convenience, but also ensures the real-time and accuracy of information. In addition, when users change devices, historical communication data can be quickly restored to reduce the risk of data loss.
[0004] The existing technology lacks the ability to dynamically allocate resources based on the real-time network status in data partition adjustment, which easily causes high-load partitions to occupy too much bandwidth resources, affecting the synchronization efficiency of other partitions. Conflict management methods are mostly predefined rules, which make it difficult to accurately identify potential conflict risks for high-frequency updated data, resulting in data items with high conflict frequencies not being given priority, which prolongs the synchronization delay time. In path management, there is a lack of dynamic monitoring mechanism for multi-path performance, and transmission usually relies on a single path. When the path performance fluctuates or is interrupted, it is easy to cause data synchronization interruption or reduced efficiency. In real-time task execution, the lag of the path switching mechanism may cause the synchronization task to be interrupted for a long time, especially in scenarios with high-frequency synchronization or complex network conditions, which makes it difficult to meet higher requirements for data consistency and transmission continuity. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings in the prior art and to propose a data synchronization method for communication software.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: a data synchronization method for communication software, comprising the following steps: S1: Count the network bandwidth usage rate of the communication software, the frequency of user synchronization requests, and the size of synchronization requests, calculate the transmission demand of each data partition, compare the current load of the difference partition with the network transmission capacity, adjust the transmission range and partition boundary of the data partition, and generate the dynamic partition transmission range value; S2: Based on the dynamic partition transmission range value, the update frequency and access mode of the data items in the partition are classified, the data items are sorted according to the conflict frequency, and a partition conflict frequency sorting result is generated; S3: Calculate the synchronization delay caused by each data item group according to the partition conflict frequency sorting result, determine whether the synchronization delay exceeds a set threshold, perform priority classification according to the determination result, set the transmission priority of the difference data items, set the processing order of the synchronization queue according to the priority, and generate a synchronization priority allocation result; S4: Based on the synchronization priority allocation result, the transmission stability, bandwidth and delay of each data synchronization path are monitored, the transmission performance indicators of each path are compared, the data is allocated to the optimal path according to the priority transmission order, and a path transmission allocation plan is generated; S5: According to the path transmission allocation scheme, the real-time status of the transmission path is monitored. If path interruption and performance degradation are detected, the backup path is immediately switched, and the synchronization task is confirmed to be continuously executed, and a path dynamic switching result is generated.
[0007] As a further solution of the present invention, the step of obtaining the dynamic partition transmission range value is: S111: Collect network traffic data of the communication software, record the network bandwidth usage value, user synchronization request frequency and synchronization request size, aggregate the data according to the time series, and generate a communication software network data set; S112: using the communication software network data set, combined with the data partition's transmission capacity and partition boundary information, to calculate the data partition's transmission demand, and by comparing the partition's current load with its network transmission capacity, to generate a data partition load deviation ratio; S113: Based on the data partition load deviation ratio, compare the transmission demand of each partition with the current transmission capacity, using the formula: ; Calculate the average bandwidth usage deviation of the partition , dynamically adjust the partition range and partition boundary, and output the dynamic partition transfer range value, Indicates the total bandwidth. Indicates the actual transmission demand, Indicates the number of partitions.
[0008] As a further solution of the present invention, the step of obtaining the partition conflict frequency sorting result is: S211: According to the dynamic partition transmission range value, the data items in the partition are parsed and extracted, the update frequency and access behavior characteristics of each data item are recorded, the number of accesses, the distribution of access sources and the time interval characteristics of each data item are counted, and the update frequency and access mode classification results of the data items in the partition are generated; S212: Based on the update frequency and access mode classification results of the data items in the partition, the formula is used: ; Calculating conflict frequency , output the frequency of synchronization conflicts for each type of data item, where is the number of synchronization request conflicts, The total number of synchronous requests; S213: Using the synchronization conflict occurrence frequency of each type of data item, sort the data items from high to low according to the conflict frequency, associate the sorting results with the dynamic partition transmission range values, and combine the data item conflict frequency characteristics within each partition range to generate a partition conflict frequency sorting result.
[0009] As a further solution of the present invention, the step of determining whether the synchronization delay exceeds a set threshold is as follows: S311: According to the partition conflict frequency sorting result, collect the access log of each data item group, parse the start time and completion time of the synchronization request, calculate the duration of each synchronization request, and accumulate all synchronization durations in the same data item group to generate the total synchronization duration of each data item group; S312: Based on the total synchronization duration of each data item group, the number of synchronization requests for each group of data items is counted using the formula: ; Calculate the The average synchronization delay of the data item group , generates the average synchronization delay data for each data item group, where Representative The total synchronization duration of all synchronization requests in the data item group, Representative The number of synchronization requests for groups of data items, represents a correction amount that is inversely proportional to the number of requests; S313: Based on the average synchronization delay of each data item group, a judgment is made in combination with a set threshold. The delay is classified and marked by comparing the delay with the set threshold. If it exceeds the threshold, it is marked as exceeded, otherwise it is marked as not exceeded, and a delay judgment result is generated.
[0010] As a further solution of the present invention, the steps of obtaining the synchronization priority allocation result are: S321: According to the delay judgment result, the delay status of each data item group is classified, the data item groups marked as exceeded are sorted from high to low according to the delay amount, and the data item groups marked as not exceeded are sorted from high to low according to the number of synchronization requests, and a classified and sorted data item group list is generated; S322: according to the classified and sorted data item group list, assigning a transmission priority to each data item group, assigning a high priority to the data item group that exceeds the mark in accordance with the principle of high priority of delay amount, and assigning a medium and low priority to the data item group that does not exceed the mark in accordance with the principle of multiple priorities of synchronization request quantity, and generating a transmission priority setting result; S323: In combination with the transmission priority setting result, the data item groups are added to the synchronization queue in order of priority, the synchronization queue is arranged from high priority to low priority, and the data item groups with the same priority are queued in the order in the sorted list to generate the synchronization priority allocation result.
[0011] As a further solution of the present invention, the step of acquiring the path transmission allocation solution is: S411: Based on the synchronization priority allocation result, read the transmission priority and corresponding transmission path of each data item one by one, count the transmission stability fluctuation range, bandwidth utilization and delay of each path, analyze the change trend of each parameter in the monitoring time period, and generate preliminary transmission performance data of each transmission path; S412: Calculate the comprehensive performance of each path according to the preliminary transmission performance data of each path, using the formula: ; Comprehensive performance indicators of calculation paths , combined with the transmission priority information, the path performance index ranking result is obtained, where is the average bandwidth utilization of the path, is the path packet loss rate, and are the maximum delay and minimum delay of the path respectively; S413: Based on the path performance index sorting result, data is allocated to the path with the best performance in descending order of priority, and whether the path capacity of the allocation result meets the data demand is confirmed one by one. For the path exceeding the capacity limit, a suboptimal path is reselected to allocate data, and a path transmission allocation plan is generated.
[0012] As a further solution of the present invention, the step of obtaining the path dynamic switching result is: S511: According to the path transmission allocation scheme, real-time status monitoring data of all paths are collected one by one, the data flow fluctuation range and delay change trend of each path are counted according to time periods, the packet loss rate is accumulated and calculated in each time period, and the status change of each path is recorded in combination with the real-time monitoring data to generate a path real-time status monitoring result; S512: Based on the real-time status monitoring result of the path, analyze the performance change trend of each path, compare the deviation degree of the delay fluctuation range in the current time period with the historical average value one by one, check whether the change of the packet loss rate exceeds the limit threshold, mark the path with degraded performance, and identify the path with interrupted transmission task, correspond the marking result with the task status in the path transmission allocation plan, and generate the real-time status determination result of the path; S513: According to the real-time status determination result of the path, for the path marked as performance degradation and interruption, select the path with the best current status from the backup paths to take over, reallocate the corresponding transmission data to the new path, and record the status information before and after switching the path, confirm the normal operation status of all synchronization tasks after the path switching, and generate the path dynamic switching result.
[0013] A data synchronization system for communication software, comprising: The network traffic analysis module collects network traffic data of the communication software, records the network bandwidth usage value, user synchronization request frequency and synchronization request size, combines the transmission capacity of the data partition and the partition boundary information, calculates the transmission demand of the data partition, calculates the average bandwidth usage deviation value of the partition, and outputs the dynamic partition transmission range value; The partition conflict analysis module parses and extracts the data items in the partition according to the dynamic partition transmission range value, calculates the conflict frequency, sorts the data items from high to low according to the conflict frequency, and associates them with the dynamic partition transmission range value to generate a partition conflict frequency sorting result; The synchronization priority allocation module analyzes the start time and completion time of the synchronization request according to the partition conflict frequency sorting result, calculates the average synchronization delay of the data item group, classifies and marks the delay amount in combination with the preset threshold, and sorts the delay status of each data item group, synchronously assigns a transmission priority to each data item group, adds the data item group to the synchronization queue in sequence according to the priority, and generates a synchronization priority allocation result; The path performance allocation module reads the transmission priority and corresponding transmission path of each data item one by one based on the synchronization priority allocation result, analyzes the change trend of each parameter within the monitoring time period, calculates the comprehensive performance index of the path, allocates the data to the path with the best performance in descending order of priority, and generates a path transmission allocation plan; The dynamic path switching module monitors the data in real time according to the path transmission allocation plan, records the status changes of each path, analyzes the performance change trend of each path, marks the paths with degraded performance, identifies the paths where the transmission tasks are interrupted, reallocates the corresponding transmission data to the new paths, confirms the normal operation status of all synchronization tasks after the path switching, and generates the path dynamic switching results.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are: In the present invention, by comprehensively calculating the network bandwidth utilization rate, user request frequency and request size, the partition transmission range and boundary are dynamically adjusted, the network resource allocation is optimized, and the impact of high-load partitions on the overall transmission capacity is reduced. The data items in the partition are classified and processed based on the update frequency and access mode. Combined with the conflict frequency statistics and sorting, high-conflict data items are resolved first, the synchronization delay is reduced, the synchronization delay amount is evaluated and the threshold is judged, key data is transmitted first, the timeliness and consistency of highly sensitive data are improved, the dynamic monitoring and optimization selection of multi-path transmission performance are improved, the stability and transmission efficiency of data synchronization are improved, the real-time monitoring of path status and the fast switching mechanism are guaranteed, the continuity and reliability of synchronization tasks, and the overall solution significantly improves the efficiency and adaptability of data synchronization through dynamic regulation and intelligent optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a main step flow chart of the present invention; Figure 2 This is a flow chart for obtaining the dynamic partition transmission range value of the present invention; Figure 3 A flowchart for obtaining the partition conflict frequency sorting result of the present invention; Figure 4 A flow chart of determining whether the synchronization delay exceeds a set threshold value according to the present invention; Figure 5 A flowchart for obtaining synchronization priority allocation results of the present invention; Figure 6 A flowchart of obtaining the path transmission allocation scheme of the present invention; Figure 7 This is a flow chart for obtaining the dynamic path switching result of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0017] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0018] See also Figure 1 , a data synchronization method for communication software, comprising the following steps: S1: Count the network bandwidth usage rate of the communication software, the frequency of user synchronization requests, and the size of synchronization requests, calculate the transmission demand of each data partition, compare the current load of the difference partition with the network transmission capacity, adjust the transmission range and partition boundary of the data partition, and generate the dynamic partition transmission range value; S2: Based on the dynamic partition transfer range value, the update frequency and access mode of the data items in the partition are classified, the data items are sorted according to the conflict frequency, and the partition conflict frequency sorting result is generated; S3: According to the partition conflict frequency sorting result, the synchronization delay caused by each data item group is calculated, and it is determined whether the synchronization delay exceeds the set threshold. Priority classification is performed according to the judgment result, and the transmission priority of the difference data items is set. The processing order of the synchronization queue is set according to the priority, and the synchronization priority allocation result is generated; S4: Based on the synchronization priority allocation result, the transmission stability, bandwidth and delay of each data synchronization path are monitored, the transmission performance indicators of each path are compared, the data is allocated to the optimal path according to the priority transmission order, and a path transmission allocation plan is generated; S5: According to the path transmission allocation plan, the real-time status of the transmission path is monitored. If the path is interrupted and the performance is degraded, the backup path is immediately switched, and the synchronization task is confirmed to be continuously executed, and the path dynamic switching result is generated.
[0019] The dynamic partition transmission range value includes the partition boundary adjustment range, the transmission demand within the partition and the partition transmission load ratio. The partition conflict frequency sorting results include the data item update frequency sorting value, the data item access mode classification value and the conflict frequency statistical result. The synchronization priority allocation results include the data item priority classification result, the synchronization queue sorting rules and the delay threshold comparison result. The path transmission allocation plan includes the path transmission performance indicator value, the data allocation path optimization plan and the transmission stability monitoring parameters. The path dynamic switching results include the alternative selection path, the path switching confirmation status record and the synchronization task execution status record.
[0020] See also Figure 2 , the steps to obtain the dynamic partition transfer range value are: S111: Collect network traffic data of the communication software, record the network bandwidth usage value, user synchronization request frequency and synchronization request size, aggregate the data according to the time series, and generate a communication software network data set; Collect network traffic data of communication software, parse the bandwidth usage value, user synchronization request frequency and synchronization request size of each communication software in different time periods from the network traffic log, segment the traffic data using timestamps, group and classify the original data according to the time dimension, calculate the total value, average value and peak value of bandwidth usage in each time period through statistical methods, record the sending interval time of user synchronization requests and the data size involved in each request, count the synchronization request frequency, and obtain the frequency distribution by calculating the number of requests per unit time. Combined with data quantile analysis, group and calculate the synchronization request size to obtain the distribution characteristics of 50%, 75%, 90% and other quantile values, classify them by type according to the statistical results, cross-analyze and summarize their network bandwidth usage and synchronization request behavior characteristics, and form the network bandwidth usage, synchronization request frequency distribution and synchronization request size distribution of each communication software.
[0021] S112: using the communication software network data set, combined with the data partition's transmission capacity and partition boundary information, to calculate the data partition's transmission demand, and by comparing the partition's current load with its network transmission capacity, to generate a data partition load deviation ratio; According to the network bandwidth utilization rate of the communication software, the frequency distribution of synchronization requests and the size distribution of synchronization requests, combined with the physical boundary information and transmission capacity parameters of the data partition, the transmission capacity of the partition is first defined as the maximum bandwidth capacity of each partition multiplied by the transmission efficiency. The maximum bandwidth capacity is obtained by consulting the partition transmission configuration file, and the transmission capacity is calculated in combination with the bandwidth reservation rate. Subsequently, the frequency distribution and size distribution of synchronization requests are compared and analyzed with the partition transmission capacity. The transmission demand of each partition is calculated according to the total data transmission demand of all synchronization requests in the partition. The demand is obtained by accumulating the transmission data size of each synchronization request. At the same time, the partition load formula is used to measure the deviation between the transmission capacity and the demand of each partition. The current load and transmission capacity ratio of each partition is calculated respectively, and the load deviation ratio is generated to characterize the uneven distribution of partition transmission demand.
[0022] S113: Based on the data partition load deviation ratio, the transmission demand of each partition is compared with the current transmission capacity, using the formula: ; Calculate the average bandwidth usage deviation of the partition , dynamically adjust the partition range and partition boundary, and output the dynamic partition transfer range value, Indicates the total bandwidth. Indicates the actual transmission demand, Indicates the number of partitions; There are 3 partitions, with a total bandwidth of ( ) and actual transmission demand ( )as follows: Partition 1: Total bandwidth Mbps, actual demand Mbps Partition 2: Total bandwidth Mbps, actual demand Mbps Partition 3: Total bandwidth Mbps, actual demand Mbps Calculate the squared deviation for each partition: ; Find the sum of squared deviations: ; Calculate the bandwidth usage deviation of the partition : ; The results show that the average bandwidth usage deviation of the three partitions is 1000Mbps, indicating that there is a large deviation between the actual transmission demand of the partitions and their total bandwidth, especially partition 1, which contributes more to the overall deviation. The value reflects the mismatch between the current bandwidth resource allocation and the actual transmission demand. It is necessary to dynamically adjust the transmission range and partition boundaries of each partition to balance bandwidth allocation and improve transmission efficiency. According to the calculation results, it is possible to prioritize the analysis of whether the demand of partition 1 needs to be reallocated with higher bandwidth resources, and at the same time, adjust the smaller load deviation parts of partitions 2 and 3 to optimize the overall transmission performance.
[0023] See also Figure 3 , the steps to obtain the partition conflict frequency sorting results are: S211: according to the dynamic partition transmission range value, the data items in the partition are parsed and extracted, the update frequency and access behavior characteristics of each data item are recorded, the number of accesses, the distribution of access sources and the time interval characteristics of each data item are counted, and the update frequency and access mode classification results of the data items in the partition are generated; The dynamic partition transmission range value is called to extract all data items in the partition one by one, and the access log records of each data item are parsed. The data is sorted by timestamp and the update frequency is counted. The update frequency is quantified by calculating the number of visits in each time period. The access behavior characteristics are classified according to the identification of the access source and the time interval distribution. First, the unique identification of the access source, such as user ID or device ID, is extracted. The accesses from the same source are grouped together and their access proportions in different time periods are calculated. At the same time, the timestamps of each access operation are extracted, and the time intervals between adjacent accesses are calculated. The distribution characteristics of the time intervals are counted. The access source and time interval distribution are combined to establish the access mode classification basis for each data item. Finally, the update frequency and access mode classification results of the data items in the partition are generated by summarizing the number of visits, time interval distribution and source proportion of each data item.
[0024] S212: Based on the update frequency and access pattern classification results of the data items in the partition, the formula is used: ; Calculating conflict frequency , output the frequency of synchronization conflicts for each type of data item, where is the number of synchronization request conflicts, The total number of synchronous requests; The following parameters are obtained from statistics within a partition: Data item 1: Number of synchronization request conflicts , total number of synchronous requests ; Data item 2: Number of synchronization request conflicts , total number of synchronous requests ; Data item 3: Number of synchronization request conflicts , total number of synchronous requests .
[0025] Calculate the conflict frequency: For data item 1: ; For data item 2: ; For data item 3: ; The results show that data item 1 has the highest conflict frequency, reaching 30%, followed by data item 2 at 25%, and data item 3 at 16.7%. This indicates that data item 1 has a higher synchronization conflict risk, and it is necessary to give priority to optimizing the transmission distribution of this data item in the partition boundary adjustment to improve the overall synchronization efficiency.
[0026] S213: using the synchronization conflict occurrence frequency of each type of data item, sorting the data items from high to low according to the conflict frequency, correlating the sorting result with the dynamic partition transmission range value, and combining the conflict frequency characteristics of the data items within each partition range to generate a partition conflict frequency sorting result; Using the synchronization conflict occurrence frequency obtained from the above statistics, each data item is sorted from high to low according to the conflict frequency, and each type of data item partition is classified. First, the dynamic partition transmission range value is associated with the data item set, and the list of data items within each partition range is extracted. Then, the data item list of each partition is sorted according to the calculation results of the above conflict frequency, and the sorted results are used to generate a conflict frequency list in units of partitions. At the same time, the sorted results are sorted according to the dynamic partition transmission range value, and the conflict frequency and partition range of each data item are associated to form a partition conflict frequency table sorted by conflict frequency. The conflict frequency information of each partition in the table is listed in sequence according to the order of the data items, and finally a partition conflict frequency sorting result sorted by conflict frequency is generated.
[0027] See also Figure 4 , the steps to determine whether the synchronization delay exceeds the set threshold are: S311: According to the partition conflict frequency sorting results, collect the access logs of each data item group, parse the start time and completion time of the synchronization request, calculate the duration of each synchronization request, and accumulate all synchronization durations in the same data item group to generate the total synchronization duration of each data item group; Call the partition conflict frequency sorting result, extract the access log of each data item group, parse and sort the log according to the timestamp, extract the start time and completion time of each synchronization request, and use the difference between the start time and the completion time as the duration of each synchronization request. At the same time, record the start and completion time of all synchronization requests for each data item group, add these synchronization durations one by one to calculate the total synchronization duration, count the number of synchronization requests for each data item group, and record the operation time and execution order of each request to ensure that all synchronization requests in the data item group are counted, check and correct the records with abnormal operations or missing timestamps to ensure the integrity and accuracy of the synchronization duration, and finally obtain the total synchronization duration and number of synchronization requests for each data item group to provide basic data for the subsequent calculation of the average synchronization delay.
[0028] S312: Based on the total synchronization time of each data item group, the number of synchronization requests for each group of data items is counted using the formula: ; Calculate the The average synchronization delay of the data item group , generates the average synchronization delay data for each data item group, where Representative The total synchronization duration of all synchronization requests in the data item group, Representative The number of synchronization requests for groups of data items, represents a correction amount that is inversely proportional to the number of requests; Data item group 1: total synchronization time Seconds, number of simultaneous requests ; Data item group 2: total synchronization time Seconds, number of simultaneous requests .
[0029] Calculation for data item group 1: Calculate the correction term: ; Calculate the numerator part: ; Calculate the average synchronization delay: ; Calculation for data item group 2: Calculate the correction term: ; Calculate the numerator part: ; Calculate the average synchronization delay: ; The results show that: The average synchronization delay of data item group 1 is 63 seconds; The average synchronization delay for data item group 2 is 66 seconds.
[0030] This indicates that due to the small number of synchronization requests, the delay of data item group 2 is slightly higher than that of data item group 1 under the effect of the correction item. The time difference of different data item groups in synchronization operations can be clearly seen, which provides an important basis for subsequent judgment of whether the synchronization delay exceeds the threshold and priority classification.
[0031] S313: Based on the average synchronization delay of each data item group, a judgment is made in combination with a set threshold, and the delay is classified and marked by comparing the delay with the set threshold. If it exceeds the threshold, it is marked as exceeded, otherwise it is marked as not exceeded, and a delay judgment result is generated; Combined with the average synchronization delay of each data item group, its value is read one by one and compared with the set delay threshold. For each data item group, if the average synchronization delay is greater than the threshold, it is marked as "exceeded", otherwise it is marked as "not exceeded". At the same time, the delay status information of each data item group is recorded to form a clear classification basis. The operation of comparing the threshold in the judgment process must ensure the accuracy of the numerical calculation. By gradually checking the comparison results of the delay amount and the threshold, it is ensured that the delay judgment covers all data item groups. Finally, a delay judgment result containing classification marks is generated to ensure that data item groups are distinguished according to the status of the synchronization delay, which provides a clear basis for subsequent priority allocation.
[0032] See also Figure 5 , the steps to obtain the synchronization priority allocation result are: S321: According to the delay judgment result, the delay status of each data item group is classified, the data item groups marked as exceeded are sorted from high to low according to the delay amount, and the data item groups marked as not exceeded are sorted from high to low according to the number of synchronization requests, and a classified and sorted data item group list is generated; Call the delay judgment result, extract the delay status information of each data item group one by one, and sort these data item groups from high to low according to the delay amount recorded in the data item group marked as "exceeded". Compare and adjust the delay amount of each data item group one by one to ensure the correctness of the sorting result. At the same time, record the sorting position index of each data item group, and correspond these indexes to the delay amount one by one; for the data item group marked as "not exceeded", extract its synchronization request number, sort these data item groups according to the principle of synchronization request number from high to low, and also compare the synchronization request number one by one and adjust the sorting position to generate a classified sorting list including two types of data item groups, "exceeded" and "not exceeded". The classification status, sorting position and corresponding key parameter values of each data item group are clearly defined in the list to provide a complete data basis for subsequent priority allocation.
[0033] S322: according to the classified and sorted data item group list, a transmission priority is assigned to each data item group, and the data item groups exceeding the mark are assigned high priority in turn according to the principle of high priority of delay amount, and the data item groups not exceeding the mark are assigned medium and low priority in turn according to the principle of multiple priority of synchronization request quantity, and a transmission priority setting result is generated; Using the classified sorting list, read the data item groups marked as "exceeded" one by one, and assign high priority numbers starting from the group with the largest delay, and increase the numbers from small to large one by one, to ensure that the data item groups with larger delays have smaller priority numbers; then read the data item groups marked as "not exceeded", and assign medium and low priority numbers starting from the group with the largest number of synchronization requests, and also assign them in ascending order of numbers, to ensure that the data item groups with larger numbers of synchronization requests have smaller priority numbers; in the priority allocation process, record the priority number and corresponding classification status of each data item group, and check the priority setting results of all data item groups to ensure that the priority numbers are not repeated and cover all data item groups, and finally generate a complete transmission priority setting result to provide a clear basis for the synchronization order of the queue.
[0034] S323: combining the transmission priority setting result, adding the data item groups to the synchronization queue in order of priority, arranging the synchronization queue in order from high priority to low priority, and queuing the data item groups with the same priority in the order in the sorting list, and generating a synchronization priority allocation result; Call the transmission priority setting result, and add the data item groups to the synchronization queue one by one in the order of priority number from small to large. For data item groups with the same priority number, arrange them in the order of the classification sorting list, and put the data item group marked as "exceeded" at the front of the queue first, and complete the arrangement of the high priority category data item groups in the queue in turn; after completing the arrangement of the high priority category, continue to arrange the data item groups marked as "not exceeded" in order from small to large according to the priority number, and place the data item groups with a larger number of synchronization requests in the middle or front position of the queue, and check the data item groups in the same priority category in sequence to ensure that the arrangement conforms to the relative order shown in the classification sorting result, and finally form a synchronization queue containing all data item groups, clarify the arrangement order of high, medium and low priority data item groups in the queue, and provide a complete queue structure for the final generated synchronization priority allocation result.
[0035] See also Figure 6 , the steps to obtain the path transmission allocation plan are: S411: Based on the synchronization priority allocation result, read the transmission priority and corresponding transmission path of each data item one by one, count the transmission stability fluctuation range, bandwidth utilization and delay of each path, analyze the change trend of each parameter in the monitoring time period, and generate preliminary transmission performance data of each transmission path; Call the synchronization priority allocation result, extract the transmission priority of each data item and its corresponding transmission path one by one, record the basic attributes of the path, including the path identifier and data capacity limit, parse the real-time monitoring data of each path, calculate the cumulative value and variation range of the data flow in the path one by one, count the bandwidth utilization fluctuations by time period, classify and organize the flow changes in the form of time series, measure the transmission delay in the path, record the maximum delay and minimum delay values respectively, and calculate the fluctuation range within the delay time period. For the packet loss rate, calculate it by recording the ratio of the number of lost data packets to the total number of transmitted packets, and calculate the average packet loss rate after accumulating the packet loss in all time periods. All data are integrated to form the preliminary performance data of each path, and the time series of transmission stability, bandwidth utilization and delay are used as key parameters to complete the organization of the preliminary performance data of the path, providing a basis for subsequent comprehensive performance calculations.
[0036] S412: Calculate the comprehensive performance of each path based on the preliminary transmission performance data of each path, using the formula: ; Comprehensive performance indicators of calculation paths , combined with the transmission priority information, the path performance index ranking result is obtained, where is the average bandwidth utilization of the path, is the path packet loss rate, and are the maximum delay and minimum delay of the path respectively; Average bandwidth utilization (Average utilization calculated based on the traffic records of the path); Packet loss rate (calculated by the ratio of the cumulative number of lost packets to the total number of transmitted packets); Maximum delay milliseconds, minimum delay milliseconds (derived from path delay measurements).
[0037] Calculate the combination of bandwidth utilization and packet loss rate: ; Calculate the square root of the latency fluctuation range: ; Comprehensive performance indicators of the calculation path: ; The results show that the comprehensive performance index of the path is 0.120, which means that in this formula, the higher the performance value, the better the path, and the path with lower performance needs to be optimized or data redistributed. The comprehensive performance index effectively reflects the impact of the path's bandwidth utilization, packet loss rate, and delay fluctuation range on transmission performance, providing a clear quantitative basis for path sorting and data allocation, and can also guide the optimization of transmission paths during dynamic allocation.
[0038] S413: Based on the path performance index sorting results, data is allocated to the path with the best performance in descending order of priority, and whether the path capacity of the allocation result meets the data demand is confirmed one by one. For the path exceeding the capacity limit, a suboptimal path is reselected to allocate data, and a path transmission allocation plan is generated; Combined with the sorting results of comprehensive performance indicators, starting from the path with the best performance, high-priority data items are allocated to the transmission path with the best performance in the order of priority allocation. For each allocation process, confirm one by one whether the remaining capacity of the path meets the transmission requirements of the current data item. If the current path capacity is insufficient, adjust the remaining data to the suboptimal path for allocation to ensure that all data items can be allocated to a path that meets their needs. At the same time, record the allocated data items and corresponding priorities of each path, check the actual utilization of the path capacity, and avoid capacity overload or allocation redundancy of the path; for the allocated paths, check whether the allocation of all data items is consistent with the priority sorting, and finally form a complete path transmission allocation plan including path sorting, data item allocation and capacity utilization, to ensure that the allocation of transmission tasks is orderly and efficient.
[0039] See also Figure 7 , the steps to obtain the path dynamic switching result are: S511: According to the path transmission allocation plan, the real-time status monitoring data of all paths are collected one by one, the data flow fluctuation range and delay change trend of each path are counted according to the time period, the packet loss rate is accumulated and calculated in each time period, and the status change of each path is recorded in combination with the real-time monitoring data to generate the path real-time status monitoring result; According to the path transmission allocation plan, the real-time status data of all paths are extracted one by one, including the path delay, packet loss rate and data flow change. The transmission performance parameters collected in real time for each path are statistically recorded time by time. The delay fluctuation range in each time period is recorded using real-time monitoring. The highest, lowest and average values of the delay are uniformly sorted out, and the fluctuation range is calculated. The packet loss rate is cumulatively counted time period by time period, and the number of data packet losses in each time period is compared with the total number of data packets to generate the change trend of the packet loss rate. In addition, the data flow change of the path is analyzed, the difference between the peak flow and the lowest flow is recorded, and the data flow stability of the path is sorted out. Finally, a transmission performance status table of the path is established, which includes the delay fluctuation range, packet loss rate change trend and flow stability, providing detailed data support for the next step of path performance determination.
[0040] S512: Based on the real-time status monitoring results of the paths, the performance change trend of each path is analyzed, the degree of deviation between the delay fluctuation range in the current time period and the historical average value is compared one by one, and whether the change in the packet loss rate exceeds the limit threshold is checked. The paths with degraded performance are marked, and the paths with interrupted transmission tasks are identified. The marking results are matched with the task status in the path transmission allocation plan, and the real-time status determination results of the paths are generated; Call the path performance status table to analyze the real-time performance data of all paths, compare the monitoring data of the current time period with the baseline values and fluctuation ranges of delay and packet loss rate recorded in the historical status, and calculate the deviation of the delay fluctuation of the current time period from the historical baseline value; check the changing trend of the packet loss rate, identify whether the packet loss rate exceeds the historical average and the preset standard, mark each path as exceeding the limit threshold, and generate the path performance mark based on the analysis results of the delay and packet loss rate; at the same time, based on the delay fluctuation and packet loss rate status marks, check whether the performance change trend of each path may cause path interruption. If the delay fluctuation exceeds the limit threshold or the packet loss rate is higher than the set range, immediately mark the path as performance degradation or possible interruption state, list these marked paths separately and match them with the transmission task table to generate a performance mark table to provide a basis for subsequent dynamic adjustment of the path.
[0041] S513: According to the real-time status determination result of the path, for the path marked as performance degradation and interruption, select the path with the best current status from the backup paths to take over, reallocate the corresponding transmission data to the new path, and record the status information before and after the path switching, confirm the normal operation status of all synchronization tasks after the path switching, and generate the path dynamic switching result; Combined with the real-time status determination results of the path, the paths marked as performance degradation or possible interruption are removed from the transmission task, and the available paths in the backup paths are screened. According to the real-time performance data of each backup path in the performance status table, the path with the best transmission stability is selected to take over the transmission task of the original path; the reallocation process of the transmission task is operated step by step, including the allocation adjustment of the data volume of the transmission task, the performance monitoring after the path switching, and the traffic redistribution of the transmission task, and the path status information before and after the switching is recorded in detail; the delay, packet loss rate and traffic change after the transmission task switching are checked to ensure that the switched path can meet the task requirements, and the status and performance data after the switching are updated in the path allocation record table. After confirming that all tasks are executed normally, a dynamic path switching plan is formed.
[0042] A data synchronization system for communication software, comprising: The network traffic analysis module collects network traffic data of the communication software, records the network bandwidth usage value, user synchronization request frequency and synchronization request size, combines the transmission capacity of the data partition and the partition boundary information, calculates the transmission demand of the data partition, calculates the average bandwidth usage deviation value of the partition, and outputs the dynamic partition transmission range value; The partition conflict analysis module parses and extracts the data items in the partition according to the dynamic partition transmission range value, calculates the conflict frequency, sorts the data items from high to low according to the conflict frequency, and associates them with the dynamic partition transmission range value to generate the partition conflict frequency sorting result; The synchronization priority allocation module sorts the results according to the partition conflict frequency, analyzes the start time and completion time of the synchronization request, calculates the average synchronization delay of the data item group, classifies and marks the delay amount based on the preset threshold, and sorts the delay status of each data item group, synchronously assigns transmission priority to each data item group, adds the data item group to the synchronization queue in order according to the priority, and generates the synchronization priority allocation result; The path performance allocation module reads the transmission priority and corresponding transmission path of each data item one by one based on the synchronization priority allocation result, analyzes the change trend of each parameter during the monitoring period, calculates the comprehensive performance index of the path, allocates data to the path with the best performance in descending order of priority, and generates a path transmission allocation plan; The dynamic path switching module monitors the data in real time according to the path transmission allocation plan, records the status changes of each path, analyzes the performance change trend of each path, marks the paths with degraded performance, and identifies the paths where the transmission tasks are interrupted. It reallocates the corresponding transmission data to the new path, confirms the normal operation status of all synchronization tasks after the path switching, and generates the path dynamic switching results.
[0043] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A data synchronization method for communication software, characterized in that: The following steps are involved: S1: Count the network bandwidth usage rate of the communication software, the frequency of user synchronization requests, and the size of synchronization requests, calculate the transmission demand of each data partition, compare the current load of the difference partition with the network transmission capacity, adjust the transmission range and partition boundary of the data partition, and generate the dynamic partition transmission range value; S2: Based on the dynamic partition transmission range value, the update frequency and access mode of the data items in the partition are classified, the data items are sorted according to the conflict frequency, and a partition conflict frequency sorting result is generated; S3: Calculate the synchronization delay caused by each data item group according to the partition conflict frequency sorting result, determine whether the synchronization delay exceeds a set threshold, perform priority classification according to the determination result, set the transmission priority of the difference data items, set the processing order of the synchronization queue according to the priority, and generate a synchronization priority allocation result; S4: Based on the synchronization priority allocation result, the transmission stability, bandwidth and delay of each data synchronization path are monitored, the transmission performance indicators of each path are compared, the data is allocated to the optimal path according to the priority transmission order, and a path transmission allocation plan is generated; S5: According to the path transmission allocation scheme, the real-time status of the transmission path is monitored. If path interruption and performance degradation are detected, the backup path is immediately switched, and the synchronization task is confirmed to be continuously executed, and a path dynamic switching result is generated.
2. The data synchronization method of communication software according to claim 1, characterized in that: The steps for obtaining the dynamic partition transmission range value are as follows: S111: Collect network traffic data of the communication software, record the network bandwidth usage value, user synchronization request frequency and synchronization request size, aggregate the data according to the time series, and generate a communication software network data set; S112: using the communication software network data set, combined with the data partition's transmission capacity and partition boundary information, to calculate the data partition's transmission demand, and by comparing the partition's current load with its network transmission capacity, to generate a data partition load deviation ratio; S113: Based on the data partition load deviation ratio, compare the transmission demand of each partition with the current transmission capacity, using the formula: ; Calculate the average bandwidth usage deviation of the partition , dynamically adjust the partition range and partition boundary, and output the dynamic partition transfer range value, Indicates the total bandwidth. Indicates the actual transmission demand, Indicates the number of partitions.
3. The data synchronization method of communication software according to claim 2, characterized in that: The steps for obtaining the partition conflict frequency sorting result are: S211: According to the dynamic partition transmission range value, the data items in the partition are parsed and extracted, the update frequency and access behavior characteristics of each data item are recorded, the number of accesses, the distribution of access sources and the time interval characteristics of each data item are counted, and the update frequency and access mode classification results of the data items in the partition are generated; S212: Based on the update frequency and access mode classification results of the data items in the partition, the formula is used: ; Calculating conflict frequency , output the frequency of synchronization conflicts for each type of data item, where is the number of synchronization request conflicts, The total number of synchronous requests; S213: Using the synchronization conflict occurrence frequency of each type of data item, sort the data items from high to low according to the conflict frequency, associate the sorting results with the dynamic partition transmission range values, and combine the data item conflict frequency characteristics within each partition range to generate a partition conflict frequency sorting result.
4. The data synchronization method of communication software according to claim 3, characterized in that: The steps for determining whether the synchronization delay exceeds the set threshold are as follows: S311: According to the partition conflict frequency sorting result, collect the access log of each data item group, parse the start time and completion time of the synchronization request, calculate the duration of each synchronization request, and accumulate all synchronization durations in the same data item group to generate the total synchronization duration of each data item group; S312: Based on the total synchronization duration of each data item group, the number of synchronization requests for each group of data items is counted using the formula: ; Calculate the The average synchronization delay of the data item group , generates the average synchronization delay data for each data item group, where Representative The total synchronization duration of all synchronization requests in the data item group, Representative The number of synchronization requests for groups of data items, represents a correction amount that is inversely proportional to the number of requests; S313: Based on the average synchronization delay of each data item group, a judgment is made in combination with a set threshold. The delay is classified and marked by comparing the delay with the set threshold. If it exceeds the threshold, it is marked as exceeded, otherwise it is marked as not exceeded, and a delay judgment result is generated.
5. The data synchronization method of communication software according to claim 4, characterized in that: The steps for obtaining the synchronization priority allocation result are: S321: According to the delay judgment result, the delay status of each data item group is classified, the data item groups marked as exceeded are sorted from high to low according to the delay amount, and the data item groups marked as not exceeded are sorted from high to low according to the number of synchronization requests, and a classified and sorted data item group list is generated; S322: according to the classified and sorted data item group list, assigning a transmission priority to each data item group, assigning a high priority to the data item group that exceeds the mark in accordance with the principle of high priority of delay amount, and assigning a medium and low priority to the data item group that does not exceed the mark in accordance with the principle of multiple priorities of synchronization request quantity, and generating a transmission priority setting result; S323: In combination with the transmission priority setting result, the data item groups are added to the synchronization queue in order of priority, the synchronization queue is arranged from high priority to low priority, and the data item groups with the same priority are queued in the order in the sorted list to generate the synchronization priority allocation result.
6. The data synchronization method of communication software according to claim 5, characterized in that: The steps of obtaining the path transmission allocation scheme are as follows: S411: Based on the synchronization priority allocation result, read the transmission priority and corresponding transmission path of each data item one by one, count the transmission stability fluctuation range, bandwidth utilization and delay of each path, analyze the change trend of each parameter in the monitoring time period, and generate preliminary transmission performance data of each path; S412: Calculate the comprehensive performance of each path according to the preliminary transmission performance data of each path, using the formula: ; Comprehensive performance indicators of calculation paths , combined with the transmission priority information, the path performance index ranking result is obtained, where is the average bandwidth utilization of the path, is the path packet loss rate, and are the maximum delay and minimum delay of the path respectively; S413: Based on the path performance index sorting result, data is allocated to the path with the best performance in descending order of priority, and whether the path capacity of the allocation result meets the data demand is confirmed one by one. For the path exceeding the capacity limit, a suboptimal path is reselected to allocate data, and a path transmission allocation plan is generated.
7. The data synchronization method of communication software according to claim 6, characterized in that: The steps for obtaining the path dynamic switching result are: S511: According to the path transmission allocation scheme, real-time status monitoring data of all paths are collected one by one, the data flow fluctuation range and delay change trend of each path are counted according to time periods, the packet loss rate is accumulated and calculated in each time period, and the status change of each path is recorded in combination with the real-time monitoring data to generate a path real-time status monitoring result; S512: Based on the real-time status monitoring result of the path, analyze the performance change trend of each path, compare the deviation degree of the delay fluctuation range in the current time period with the historical average value one by one, check whether the change of the packet loss rate exceeds the limit threshold, mark the path with degraded performance, and identify the path with interrupted transmission task, correspond the marking result with the task status in the path transmission allocation plan, and generate the real-time status determination result of the path; S513: According to the real-time status determination result of the path, for the path marked as performance degradation and interruption, select the path with the best current status from the backup paths to take over, reallocate the corresponding transmission data to the new path, and record the status information before and after switching the path, confirm the normal operation status of all synchronization tasks after the path switching, and generate the path dynamic switching result.
8. A data synchronization system for communication software, characterized in that: The system is used to execute the data synchronization method of the communication software according to any one of claims 1 to 7, comprising: The network traffic analysis module collects network traffic data of the communication software, records the network bandwidth usage value, user synchronization request frequency and synchronization request size, combines the transmission capacity of the data partition and the partition boundary information, calculates the transmission demand of the data partition, calculates the average bandwidth usage deviation value of the partition, and outputs the dynamic partition transmission range value; The partition conflict analysis module parses and extracts the data items in the partition according to the dynamic partition transmission range value, calculates the conflict frequency, sorts the data items from high to low according to the conflict frequency, and associates them with the dynamic partition transmission range value to generate a partition conflict frequency sorting result; The synchronization priority allocation module analyzes the start time and completion time of the synchronization request according to the partition conflict frequency sorting result, calculates the average synchronization delay of the data item group, classifies and marks the delay amount in combination with the preset threshold, and sorts the delay status of each data item group, synchronously assigns a transmission priority to each data item group, adds the data item group to the synchronization queue in sequence according to the priority, and generates a synchronization priority allocation result; The path performance allocation module reads the transmission priority and corresponding transmission path of each data item one by one based on the synchronization priority allocation result, analyzes the change trend of each parameter within the monitoring time period, calculates the comprehensive performance index of the path, allocates the data to the path with the best performance in descending order of priority, and generates a path transmission allocation plan; The dynamic path switching module monitors the data in real time according to the path transmission allocation plan, records the status changes of each path, analyzes the performance change trend of each path, marks the paths with degraded performance, identifies the paths where the transmission tasks are interrupted, reallocates the corresponding transmission data to the new paths, confirms the normal operation status of all synchronization tasks after the path switching, and generates the path dynamic switching results.
Citation Information
Patent Citations
Communication state monitoring management method and system for electric power communication
CN117118853A
Multi-source data synchronous processing system and method
CN118590503A
Network informed policy creation
US20230099626A1
Cited By
Classification model training method based on big data distributed computing
CN120234158A
Data synchronization method, distributed storage cluster system and computer program product
CN120670513A
Multi-terminal data synchronization and secure storage method and device, program product and medium
CN121681488A