Disclosure of Invention
The invention aims to solve the defects in the prior art, and provides a cross-platform communication sharing synchronization method and system.
In order to achieve the purpose, the invention adopts the following technical scheme that the cross-platform communication sharing synchronization method comprises the following steps:
S1, based on a cross-platform communication sharing synchronization request timestamp sequence, extracting a cross-equipment state change event stream, comparing a timestamp difference value of a time window, applying synchronization buffer adjustment, adjusting the size of the time window, and obtaining a state change conflict detection result;
S2, according to the state change conflict detection result, identifying the state change frequency, comparing the state change threshold, screening states exceeding the threshold, adjusting the synchronization priority, applying the synchronization buffer, and obtaining the state change conflict optimization parameters;
S3, based on the state change conflict optimization parameters, extracting data initial position identification, matching synchronous path information, merging similar path data, optimizing a data transmission mode, reducing redundant synchronization and obtaining a synchronous path processing result;
S4, invoking the synchronous path processing result, calculating the data survival time, screening short survival requirement data, adjusting the synchronous priority, adjusting the low priority data to synchronize, and obtaining the synchronous data survival time scheduling parameter;
S5, based on the synchronous data survival time scheduling parameters, counting the ratio of the data survival time to the synchronous time consumption, extracting resource scheduling parameters to adjust synchronous scheduling rules, optimizing the synchronous priority of the short survival data, and outputting the adjusted cross-platform synchronous resources.
As a further scheme of the present invention, the state change conflict detection result includes a timestamp difference of a time window, a multiple change request screening result of the same state in a short period, a sorting effective state, a synchronization buffer adjustment parameter and a time window size adjustment parameter, the state change conflict optimization parameter includes a state change frequency, a state change threshold, an exceeding threshold state, a synchronization priority adjustment parameter and a synchronization buffer parameter, the synchronization path processing result includes a data start position identifier, synchronization path information, data hop count information, a critical path node, a similar path data merging result, a non-optimal path data screening result, a synchronization path adjustment parameter, a data transmission mode optimization parameter and a redundancy synchronization reduction parameter, the synchronization data survival time scheduling parameter includes a data survival time, a synchronization time consumption ratio, a resource scheduling parameter, a synchronization scheduling rule adjustment parameter and a short survival high priority data synchronization parameter, and the cross-platform synchronization resource after adjustment includes a synchronization resource optimization mode, a synchronization priority adjustment parameter, a low priority data synchronization adjustment parameter and a synchronization data survival time optimization parameter.
As a further aspect of the present invention, the step of obtaining the state change conflict detection result specifically includes:
S111, extracting a cross-equipment state change event stream based on a cross-platform communication sharing synchronization request timestamp sequence, calculating adjacent timestamp time difference values, and screening multiple change requests of the same state in a short period to obtain a short period state change screening result;
S112, sorting the screened state change requests according to the time stamp sequence based on the short-period state change screening result, calculating the time difference value of adjacent state change, and sorting the effective states to obtain a state change sorting result;
s113, based on the state change sequencing result, applying synchronous buffer adjustment, adjusting the size of a time window, analyzing the state change conflict situation, and adopting the formula:
;
calculating a state change conflict detection value, and obtaining a state change conflict detection result;
Wherein, A representative state change conflict detection value,An effective state value representing the ith state change,An effective status value representing the i-1 st status change,A time stamp interval representing the ith state change,Representing the total number of state changes.
As a further aspect of the present invention, the step of obtaining the state change conflict optimization parameter specifically includes:
s211, counting the occurrence times of state change according to the state change conflict detection result, analyzing the change amplitude, and screening items exceeding a state change threshold value to obtain a state exceeding the threshold value;
S212, calling the state exceeding the threshold value, analyzing the synchronous priority among the differentiated devices, and adjusting the priority according to the conflict degree to obtain the adjusted synchronous priority;
s213, analyzing synchronous time delay based on the adjusted synchronous priority, introducing synchronous buffer parameters, and adopting the formula:
;
Calculating and obtaining state change conflict optimization parameters;
Wherein, Representing the state change conflict optimization parameters,Representing the frequency of the state change,Representing a state change threshold value,Representing the amount of delay for the jth state change,The synchronization weight representing the jth state change,Representing the total number of states exceeding the threshold,Representing the time of the synchronization buffer and,Representing the synchronization priority adjustment amount.
As a further aspect of the present invention, the step of obtaining the synchronous path processing result specifically includes:
S311, based on the state change conflict optimization parameters, extracting a data initial position identifier, calling matching synchronous path information, identifying hop count information, screening critical path nodes and obtaining synchronous path offset;
s312, combining path data according to the synchronous path offset, screening non-optimal path data, calculating redundancy ratio, adjusting synchronous paths and obtaining optimized synchronous path data;
s313, optimizing a data transmission mode based on the optimized synchronous path data, reducing redundancy, adjusting a path and adopting a formula:
;
Calculating the optimization rate of the synchronous path, and obtaining the synchronous path processing result;
Wherein, Representing the optimal rate of the synchronous path,Represents the firstThe data synchronization rate of the strip path,Representing the reference rate of the synchronous path,Represents the firstThe amount of data redundancy of the strip path,Represents the firstThe data transmission errors of the one path,Represents the firstThe transmission time of the path of the strip,Representing the total number of paths.
As a further aspect of the present invention, the step of obtaining the synchronized data survival time scheduling parameter specifically includes:
S411, calling the synchronous path processing result, extracting the data synchronous starting time, the current time and the data updating frequency, analyzing the time attenuation rate, the life cycle duty ratio and the data retention ratio, and adopting the formula:
;
Calculating to obtain data survival time;
Wherein, Representing the time to live of the data,Representing the start time of the data synchronization,Representing the current time of day and,Representing the frequency of the data update,Representing a data retention ratio;
s412, invoking the data survival time, screening data with short survival time and high data request frequency, identifying a demand intensity factor, and obtaining a short survival high demand data set;
S413, based on the short-survival high-demand data set, adjusting the synchronous priority according to the request frequency and the survival time sequence, and obtaining the synchronous data survival time scheduling parameter.
As a further scheme of the present invention, the step of acquiring the adjusted cross-platform synchronization resource specifically includes:
S511, based on the synchronous data survival time scheduling parameters, counting the ratio of the data survival time to the synchronous time consumption, screening a data set with the survival time lower than a target threshold value, extracting a synchronous scheduling criterion, and acquiring a short-time data synchronous optimization criterion;
s512, calling the short-time data synchronization optimization criterion, extracting a resource scheduling parameter, and adopting a formula according to the ratio of the survival time to the synchronization time consumption:
;
Calculating a resource allocation adjustment value, and adjusting synchronous scheduling data to obtain synchronous resource scheduling optimization parameters;
Wherein, Representing the resource allocation adjustment value(s),Representing the time-to-live of the synchronized data,Representing a time-to-live threshold value,Representing the time-consuming time of the current synchronization task,Representing the average time-consuming of the sync task,Representing the synchronous schedule adjustment factor(s),Representing the maximum amount of allocable resources,Representing the amount of currently available resources;
s513, based on the synchronous resource scheduling optimization parameters, optimizing the synchronous parameters of the short-survival high-priority data, adjusting synchronous execution priority, and outputting the adjusted cross-platform synchronous resources.
The cross-platform communication sharing synchronization system is used for executing the cross-platform communication sharing synchronization method, and the system comprises the following steps:
The cross-equipment state conflict detection module extracts a multi-terminal equipment state change event stream based on a cross-platform communication sharing synchronization request timestamp sequence, calculates timestamp difference in a time window, screens repeated changes in a short period, adjusts the time window, applies synchronization buffering and generates a state change conflict detection result;
the change frequency regulation and control module calculates the change frequency of the state of the multi-terminal equipment based on the state change conflict detection result, compares the threshold value, screens the state of the super threshold value, adjusts the synchronous priority, applies synchronous buffering and obtains the state change conflict optimization parameter;
the synchronous path dynamic optimization module extracts a starting position mark of a cross-platform data exchange path based on the state change conflict optimization parameters, matches synchronous path information, records data hops, screens high-delay paths, optimizes data hopping rules among nodes, adjusts synchronous paths and generates synchronous path processing results;
The data survival time scheduling module identifies the survival time of the cross-platform data packet based on the synchronous path processing result, screens short survival demand data, adjusts the synchronous priority, rearranges the low-priority data synchronous queue and acquires synchronous data survival time scheduling parameters;
and the synchronous resource optimization configuration module calculates the ratio of the data survival time to the synchronous time consumption based on the synchronous data survival time scheduling parameter, optimizes the synchronous process of the short-survival high-priority data, and obtains the adjusted cross-platform synchronous resource.
Compared with the prior art, the invention has the advantages and positive effects that:
According to the invention, through establishing a state change event stream extraction mode based on a time stamp sequence, the accurate comparison of cross-equipment state change data is realized, the adjustment of a time window and the screening of multiple change requests in a short period are combined, the detection precision of state conflict in the data synchronization process is optimized, the synchronization error caused by repeated change is reduced, quantitative analysis is carried out on the state change frequency, and the priority adjustment is carried out on the state change exceeding the threshold value by combining a threshold value judging method, so that the high-frequency state change obtains faster synchronization response, the conflict accumulation caused by frequent change is reduced, the optimization of a synchronization path reduces the data transmission of a non-optimal path through means of data initial position identification, path matching, key node screening and the like, the transmission efficiency of the synchronization data is improved, the data redundancy is reduced through a path optimization mode, the stability of the data synchronization is improved, the priority adjustment is carried out on the short-survival high-demand data on the basis of analysis of the data survival time, the data synchronization timeliness is optimized, the data period management is enabled to be realized, the ratio of the data survival time and the synchronization time is calculated, the synchronization time consumption is reduced, the data life cycle is adjusted, the data survival time is prolonged, the data is not is matched with the priority resource under the condition that the optimization of the high-priority scheduling policy is optimized, and the life cycle is not matched with the data resource, and the life cycle is not optimized.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the description of the present invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate orientations or positional relationships based on the orientation or positional relationships shown in the drawings, merely to facilitate describing the present invention and simplify the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the present invention. Furthermore, in the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Referring to fig. 1, the present invention provides a method for cross-platform communication sharing synchronization, comprising the following steps:
S1, based on a cross-platform communication shared synchronization request timestamp sequence, extracting a cross-equipment state change event stream, comparing timestamp difference values of time windows, screening multiple change requests of the same state in a short period, ordering effective states, applying synchronization buffer adjustment, adjusting the size of the time windows, and obtaining a state change conflict detection result;
S2, according to the state change conflict detection result, identifying the state change frequency, comparing the state change threshold, screening states exceeding the threshold, adjusting the synchronization priority, applying the synchronization buffer, and obtaining the state change conflict optimization parameters;
S3, based on the state change conflict optimization parameters, extracting data initial position identification, matching synchronous path information, recording data hop count information, extracting key path nodes, merging similar path data, screening non-optimal path data to adjust synchronous paths, optimizing data transmission modes, reducing redundant synchronization and obtaining synchronous path processing results;
S4, invoking a synchronous path processing result, calculating data survival time, screening short survival requirement data, adjusting synchronous priority, adjusting low-priority data synchronization, and obtaining synchronous data survival time scheduling parameters;
S5, based on the synchronous data survival time scheduling parameters, counting the ratio of the data survival time to the synchronous time consumption, extracting the resource scheduling parameters to adjust the synchronous scheduling rule, optimizing the synchronous priority of the short survival data, and outputting the adjusted cross-platform synchronous resource.
The state change conflict detection result comprises a time stamp difference value of a time window, a multi-time change request screening result of the same state in a short period, a sequencing effective state, a synchronous buffer adjustment parameter and a time window size adjustment parameter, the state change conflict optimization parameter comprises a state change frequency, a state change threshold value, an exceeding threshold value state, a synchronous priority adjustment parameter and a synchronous buffer parameter, the synchronous path processing result comprises a data starting position identifier, synchronous path information, data hop count information, a critical path node, a similar path data merging result, a non-optimal path data screening result, a synchronous path adjustment parameter, a data transmission mode optimization parameter and a redundancy synchronous reduction parameter, the synchronous data survival time scheduling parameter comprises a data survival time, a synchronous time consumption ratio, a resource scheduling parameter, a synchronous scheduling rule adjustment parameter and a short-survival high priority data synchronization parameter, and the cross-platform synchronous resource after adjustment comprises a synchronous resource optimization mode, a synchronous priority adjustment parameter, a low-priority data synchronous adjustment parameter and a synchronous data survival time optimization parameter.
Referring to fig. 2, the step of obtaining the state change conflict detection result specifically includes:
S111, extracting a cross-equipment state change event stream based on a cross-platform communication sharing synchronization request timestamp sequence, calculating adjacent timestamp time difference values, and screening multiple change requests of the same state in a short period to obtain a short period state change screening result;
First a synchronization request timestamp sequence generated by each device is obtained, for example, device a sends a request at 10:00:00, device B sends a request at 10:00:01, device C sends a request at 10:00:02, the timestamps are arranged in time order to form a complete timestamp sequence, a cross-device state change event stream is extracted, which requires monitoring the state change of each device, for example, device a changes from state 0 to state 1 at 10:00:05, device B changes from state 1 to state 0 at 10:00:06, device C changes from state 0 to state 1 at 10:00:07, the state change event is matched with the previous timestamp sequence to form an event stream comprising a timestamp and a state change, the time difference between adjacent timestamps is calculated, for example, the time difference between device a and device B is 1 second, the time difference between the device B and the device C is 1 second, the time difference is recorded and used for subsequent analysis, the shortest time interval in the time window is determined, a time window is set, for example, 5 seconds, the shortest time interval of state change of each device in the time window is calculated, for example, the device a is changed at 10:00:05, the device B is changed at 10:00:06, the shortest time interval is 1 second, frequent state change is facilitated to be identified, multiple change requests of the same state in a short period are screened, for example, in the time window of 5 seconds, the device a is changed to be in a state 1 at 10:00:05 and 10:00:08 twice, the device B is changed to be in a state 0 at 10:00:06 and 10:00:09 twice, repeated state change requests in a short period are screened out, and a short period state change screening result is obtained.
S112, sorting the screened state change requests according to the time stamp sequence based on the short-period state change screening result, calculating the time difference value of adjacent state change, and sorting the effective states to obtain a state change sorting result;
sorting the selected state change requests according to the time stamp sequence, for example, the state change of the device a at 10:00:05 and 10:00:08 is performed, the state change of the device B at 10:00:06 and 10:00:09 is performed, the changes are arranged according to the time sequence to be 10:00:05 (device a), 10:00:06 (device B), 10:00:08 (device a), 10:00:09 (device B), the time difference of adjacent state changes is calculated, for example, the time difference of 10:00:05 to 10:00:06 is 1 second, the time difference of 10:00:06 to 10:00:08 is 2 seconds, the time difference of 10:00:08 to 10:00:09 is 1 second, the time difference is recorded, the frequency and rule of the state changes are used for analysis, the effective states are sorted, the device states corresponding to each time point are determined, for example, the state of the device a at 10:00:05 is 1, the state of the device B at 10:00:06 is 0, the state of the device a at 10:00:08 is 1, the state of the device B is 10:00:09 is the state of the device B is 1, the state of the device B is the state at 10:00:09 is the time point, the state of the device a 0:09 is the state of the device B is the state of the device B is the state according to be the time sequence, the sequence of the state change results are ordered, and the state change results are formed according to the sequence.
S113, based on the state change sequencing result, applying synchronous buffer adjustment, adjusting the size of a time window, analyzing the state change conflict situation, and adopting the formula:
;
calculating a state change conflict detection value, and obtaining a state change conflict detection result;
Wherein, A representative state change conflict detection value,An effective state value representing the ith state change,An effective status value representing the i-1 st status change,A time stamp interval representing the ith state change,Representing the total state change times;
applying a synchronous buffer adjustment, setting a buffer time, for example 2 seconds, for smoothing state changes, avoiding system instability caused by frequent state switching, adjusting the size of a time window, determining a proper time window according to a time difference value calculated before, for example, adjusting the time window from 5 seconds to 3 seconds to capture details of the state changes more finely, calculating a state change conflict situation, counting the number of times of state conflicts occurring in the adjusted time window, for example, in a time window of 3 seconds, the device A and the device B try to change to opposite states at the same time and consider as a conflict;
Assuming that the state change sequence of the device a and the device B is 1 (device a), 0 (device B), 1 (device a), 0 (device B) and the corresponding time stamp interval is 1 second, 2 seconds and 1 second in a time window, the calculated conflict detection value is:
;
and obtaining a state change conflict detection result.
Referring to fig. 3, the step of obtaining the state change conflict optimization parameters specifically includes:
S211, counting the occurrence times of state change according to a state change conflict detection result, analyzing change amplitude, and screening items exceeding a state change threshold value to obtain a state exceeding the threshold value;
In a communication network, each time a state is changed by a device, a state change log is recorded, the log is used for analyzing the activity degree and the potential synchronization conflict problem of the device, the frequency of each state change can be obtained by counting log data in one month, for each state change, the change amplitude of the state change in a specific time window needs to be calculated, for example, the change frequency of the state change in the peak period and the off-peak period has a significant difference, the timestamp in the log needs to be analyzed, the occurrence frequency of each state change in the peak period and the off-peak period is calculated, the calculation can be completed through simple time classification statistics, the state change item exceeding a preset threshold value is screened out, the threshold value is obtained based on the design standard of the device and the analysis of historical data, the allowed maximum state change frequency is considered based on the bearing capacity of the device and the network load, the state exceeding the threshold value is considered to be an abnormal state, and further analysis or adjustment is needed to obtain the state exceeding the threshold value.
S212, calling a state exceeding a threshold value, analyzing the synchronous priority among the differentiated devices, and adjusting the priority according to the conflict degree to obtain the adjusted synchronous priority;
The actual application scenario may be in a large data center, where the data synchronization requirements between multiple servers are different, for example, the servers with heavier loads need to synchronize data more frequently to ensure the consistency of information, so that priority ranking needs to be performed on the status change records of each server, and adjustment is performed based on the importance of the status change records and the influence degree of the synchronization conflict, where the adjustment of the priority is implemented by comparing the data processing capability of each server with the current network condition, the data processing capability of the server may be determined by the specification and the actual running data, the network condition may be evaluated by monitoring the network traffic in real time, and the summarization and analysis of the data may help the decision maker to make a more reasonable synchronization policy, so as to obtain the adjusted synchronization priority.
S213, analyzing synchronous time delay based on the adjusted synchronous priority, introducing synchronous buffer parameters, and adopting the formula:
;
Calculating and obtaining state change conflict optimization parameters;
Wherein, Representing the state change conflict optimization parameters,Representing the frequency of the state change,Representing a state change threshold value,Representing the amount of delay for the jth state change,The synchronization weight representing the jth state change,Representing the total number of states exceeding the threshold,Representing the time of the synchronization buffer and,Representing a synchronization priority adjustment amount;
For the time delay condition in the synchronization process, a synchronization buffer parameter is introduced, and in the practical application scene, such as a data synchronization task in a group of server clusters, the state change frequency of each server is different, so that the synchronization priority is adjusted, for example, the state change frequency of one server is adjusted 120 Times/hr and 80 times/hr, if the state changes thresholdIf the time is set to 100 times/hour, the state change of the first server exceeds the threshold value, which indicates that the synchronization requirement of the server is higher, and when the comprehensive regulation parameters of the synchronous data transmission are calculated, the time delay condition needs to be considered, for example, the transmission time delay between different servers in a certain data centerFor the time delay of the servers A to BTime delay of servers B through CTime delay of servers C to DSynchronization weight corresponding to each state changeSet as weights of servers A to BWeights of servers B to CWeights of servers C to DSynchronizing buffering timeDepending on the current network conditions, for example, 50ms is set when the network load is low, and 100ms is required to be adjusted when the network load is high, the priority adjustment amount is setThe comprehensive regulation and control parameters of synchronous data transmission can be calculated according to the processing capacity of the server and the network flow setting, for example, the current value is assumed to be 0.5;
the state change conflict optimization parameter is used for measuring the degree of the synchronous conflict, and the larger the numerical value is, the more serious the conflict is;
The state change frequency is obtained through server log statistics;
a state change threshold is set to 100 times/hour and is used for identifying abnormal state change conditions;
The j-th state is changed in time delay amount, and the transmission time delay between the servers is in ms;
The j-th state is changed to be synchronous weight, and the synchronous weight is set according to the importance of the data and the load condition of the server;
the total number of states exceeding the threshold value represents the number of servers currently needing to adjust the synchronization strategy;
the synchronous buffer time is determined by the network load condition and is currently set to be 50ms;
the adjustment amount of the synchronous priority is used for adjusting the synchronous strategy and is currently set to 0.5;
substituting specific numerical values for calculation:
;
;
;
the method comprises the steps of calculating and obtaining state change conflict optimization parameters, and establishing a final optimization strategy based on a calculation result to obtain the state change conflict optimization parameters, wherein the value can be used for dynamically adjusting the synchronization strategy to enable a high-frequency state change server to synchronize preferentially, and simultaneously, the network delay and load conditions are combined to optimize a data transmission path so as to reduce unnecessary resource occupation and improve overall synchronization efficiency, the current synchronous state change conflict optimization parameters are 6.47, the value is higher, the data synchronization conflicts among the servers are severe, and a stricter synchronization management strategy, such as increasing the synchronization priority of the high-frequency state change server or adjusting the synchronization buffer time, is adopted to relieve the synchronization pressure.
Referring to fig. 4, the step of obtaining the synchronous path processing result specifically includes:
s311, based on the state change conflict optimization parameters, extracting a data initial position identifier, calling matching synchronous path information, identifying hop count information, screening critical path nodes and obtaining synchronous path offset;
In the actual synchronization of the distributed databases, the data modification on different nodes causes synchronization conflict, the final state of the data can be more reasonably determined by introducing conflict optimization parameters, for example, assuming that two users modify the stock quantity of the same commodity almost simultaneously in one shopping website, the state change conflict optimization parameters help the system to determine which modification is preferential, a specific calculation mode depends on factors such as time stamps, user authority and the like to set weights and priorities, match synchronization path information is called, hop count information is calculated, critical path nodes are screened, series of operations are all to ensure the efficiency and accuracy of the data in the transmission process, the best path is selected to ensure the fastest arrival of the data through the evaluation and optimization of each data transmission path, the conflict and error are reduced, and the result reflects the overall efficiency and accuracy of the synchronization after the data processing and optimization through the steps.
S312, combining path data according to the synchronous path offset, screening non-optimal path data, calculating redundancy ratio, adjusting synchronous paths and obtaining optimized synchronous path data;
The method comprises the steps of effectively integrating data acquired from different data sources or different nodes, ensuring the consistency and the integrity of the data, for example, in the case of multi-source data integration, different data sources provide different information fragments related to the same entity, determining which data are new or more accurate by calling synchronous path offset, further selecting proper data to combine, screening non-optimal path data, eliminating data items affecting synchronous precision, identifying and eliminating paths or data fragments which cause data quality to be reduced, adjusting paths for data synchronization, optimizing data flow and processing procedures, thereby improving overall performance and data accuracy, acquiring optimized synchronous path data, and displaying how to more efficiently and accurately the paths for data synchronization after screening and optimization.
S313, optimizing a data transmission mode based on optimized synchronous path data, reducing redundancy, adjusting paths, and adopting the formula:
;
Calculating the optimization rate of the synchronous path, and obtaining the synchronous path processing result;
Wherein, Representing the optimal rate of the synchronous path,Represents the firstThe data synchronization rate of the strip path,Representing the reference rate of the synchronous path,Represents the firstThe amount of data redundancy of the strip path,Represents the firstThe data transmission errors of the one path,Represents the firstThe transmission time of the paths represents the total number of paths;
firstly, the optimized data synchronous paths need to be monitored, and the data transmission rate of each path is recorded, for example, in a global distributed storage, a plurality of data centers need to synchronize data, each data center has different network bandwidths and load conditions, and it is assumed that in a certain synchronization task, the paths To the point ofThe synchronization rates of (a) are 120MB/s, 100MB/s, 80MB/s, 130MB/s, and 90MB/s, respectively, so that the deviation of the synchronization rates from the reference synchronization rate can be calculated, the data transmission mode is optimized, the redundancy amount of the synchronous data is reduced, the operation involves the statistical data redundancy ratio, for example, the data has repeated packets when transmitted between different paths, the synchronization efficiency is reduced, and the redundancy data amount of the assumed paths is reducedThe method comprises the steps of sequentially 5MB, 7MB, 6MB, 4MB and 8MB, evaluating the influence of redundant data, and performing path adjustment according to the synchronous rate offset rate, wherein the key of the operation is to calculate a synchronous rate relative offset value and adjust the path to optimize the synchronous efficiency;
substituting specific numerical values for calculation, assuming a reference rate MB/s, error of transmission of each pathRespectively 2MB, 3MB, 1MB, 2MB, 3MB, the transmission time of each path10S, 12s, 11s, 9s, 13s, respectively, are calculated as follows:
Calculating an offset molecular moiety:
;
calculating denominator first part (square root term):
;
;
summation of denominator first part: ;
calculating denominator second part (time term):
;
Final calculation :;
The synchronous path processing result is obtained, the adjustment strategy of the synchronous rate can be optimized based on the synchronous condition of the current path, the overall efficiency of data transmission is improved, and an administrator can perform the following stepsFurther adjustments to the synchronization path are made, for example, ifBelow a set reference value (e.g., 1.5), it is desirable to reduce the use of certain low speed paths or adjust the data load distribution to improve overall synchronization performance.
Referring to fig. 5, the step of acquiring the synchronized data survival time scheduling parameter specifically includes:
S411, invoking a synchronous path processing result, extracting data synchronous starting time, current time and data updating frequency, analyzing time attenuation rate, life cycle duty ratio and data retention ratio, and adopting a formula:
;
Calculating to obtain data survival time;
Wherein, Representing the time to live of the data,Representing the start time of the data synchronization,Representing the current time of day and,Representing the frequency of the data update,Representing a data retention ratio;
First extracting data synchronization start time And the current timeAnd data update frequencyTaking an actual application scenario as an example, in a banking transaction, a certain transaction record is synchronously stored in a database when the transaction record is in 2024, 1 month, 1 day, 00:00:00, the current time is 2024, 2 months, 1 day, 00:00, the data updating frequency of the transaction record is once every 6 hours, and the updating time interval is 6 hours, so as to calculate the survival time of the data;
Wherein, (I.e. 2024 1, 00: 00),Hours (i.e. 2024 month 21 day 00: 00),(Update frequency 6 hours),(Data retention ratio, typically set according to data type and importance, in the financial industry, for high security data, the value can be set to 0.05-0.1);
Substituting the numerical value into calculation: ;
The data survival time of the transaction record is 297.72 hours, namely about 12.4 days, the numerical value shows that the data still has higher value after being stored, the data can be used for subsequent analysis, inquiry and adjustment of a synchronization strategy, if the value is lower than a survival time threshold value set by a system (for example, 10 days), the synchronization frequency is required to be adjusted or the data storage strategy is required to be optimized so as to ensure that the data is processed in an effective time, by adopting the calculation mode, the data synchronization flow can be dynamically optimized, the storage and bandwidth resources can be reasonably distributed, the timeliness and the usability of the data are improved, and particularly in the fields of finance, medical treatment, online transaction and the like, the accuracy and the usability of the data are ensured, the data survival time is finally obtained for 297.72 hours, and the result is used for screening short survival requirement data in the subsequent step so as to optimize the synchronization priority.
S412, calling the data survival time, screening the data with short survival time and high data request frequency, identifying the demand intensity factor, and obtaining a short survival high demand data set;
The data which need to be preferentially synchronized is identified by setting a threshold value of data request frequency and survival time, taking practical application of the telecommunication industry as an example, if the set request frequency threshold value is once every minute and the survival time threshold value is not more than 24 hours, then the data which meets the conditions is regarded as high priority, the data comprises user information of real-time communication record or high-frequency update, the screening mechanism ensures that the most urgent and critical data needs can be preferentially processed, thereby improving the real-time performance and user satisfaction of the service, generating a short-survival high-demand data set, and the data is used for subsequent synchronous priority adjustment to ensure the rapid processing and updating of the critical data.
S413, based on the short survival high-demand data set, adjusting the synchronous priority according to the request frequency and the survival time sequence, and acquiring a synchronous data survival time scheduling parameter;
The priority of data synchronization is adjusted, and the data synchronization sequence is reordered according to the request frequency and survival time of the data, for example, in a large online retail platform, commodity price information and inventory data are given higher synchronization priority due to frequent change and great influence on user decision, resources can be more effectively allocated through the priority adjustment, the user is ensured to acquire the latest information when shopping decision is made, the data flow efficiency is optimized, the user experience of the platform is enhanced, the synchronous data survival time scheduling parameters are obtained, and the parameters are used for further optimizing the whole data synchronization so as to adapt to real-time requirements of different data types, and therefore the aim of improving the overall performance is achieved.
Referring to fig. 6, the steps for acquiring the adjusted cross-platform synchronization resource specifically include:
S511, based on the synchronous data survival time scheduling parameters, counting the ratio of the data survival time to the synchronous time consumption, screening a data set with the survival time lower than a target threshold value, extracting a synchronous scheduling criterion, and acquiring a short-time data synchronous optimization criterion;
The process of counting the ratio of the survival time to the time consumption of the synchronization starts from collecting the historical execution data of the synchronization tasks, including the start time and the end time of each task, so as to calculate the survival time and the time consumption of each task, the process is typically applied to the synchronization task management of a data center, the ratio of the time consumption of the synchronization to the time consumption of the data with extremely short survival time, such as temporary files or log information, is particularly concerned, if the ratio is lower than a certain set threshold, such as 0.5, the ratio means that the data is hardly effectively utilized before the data is consumed, so that the synchronization strategy needs to be adjusted to optimize the resource utilization efficiency, and through such analysis and calculation, the scheduling rule of the short survival data needing to be preferentially synchronized can be extracted, so as to obtain a short-time data synchronization optimization criterion, and the criterion directly influences the strategy and the resource allocation of the data synchronization, so that the data processing efficiency is improved.
S512, invoking a short-time data synchronization optimization criterion, extracting a resource scheduling parameter, and adopting a formula according to the ratio of the survival time to the synchronization time consumption:
;
Calculating a resource allocation adjustment value, and adjusting synchronous scheduling data to obtain synchronous resource scheduling optimization parameters;
Wherein, Representing the resource allocation adjustment value(s),Representing the time-to-live of the synchronized data,Representing a time-to-live threshold value,Representing the time-consuming time of the current synchronization task,Representing the average time-consuming of the sync task,Representing the synchronous schedule adjustment factor(s),Representing the maximum amount of allocable resources,Representing the amount of currently available resources;
Firstly, key parameters such as survival time, synchronization time consumption, resource availability and the like of synchronous data are required to be defined, the parameters are obtained through monitoring and statistics of historical data, for example, in a cross-platform synchronization scene of a data center, the survival time of certain data can be obtained through log analysis For 10 hours, this value represents the length of time the data has been generated until cleaned or covered, and the time to live thresholdSet to 8 hours, representing a set short lived data criterion, if the data's survival time is below the threshold, it requires a higher priority synchronization policy, which is time consuming to synchronize the dataFor 2 hours, the average synchronization calculated is time-consumingFor 1.5 hours, the value is calculated by historical execution time average value of a plurality of data tasks, and the parameter of the resource management part comprises the maximum resource allocation amountCurrent available resource amount of 1000 units800 Units, simultaneously and synchronously scheduling adjustment coefficientsSetting the resource allocation policy to be 0.3 for adjusting the resource allocation policy under different conditions;
the parameters are substituted into the formula: ;
calculating the results of each part, firstly calculating the difference between the survival time and the threshold value Recalculating the difference between the synchronization time and the average timeTaking the square root of it to obtainThen calculate the first partial result asRe-computing a second partial resource adjustment term;
Finally, calculating a resource allocation adjustment value:;
The value indicates that about 61.414 units of resources are required to be additionally added to optimize the short-lived synchronous task under the current synchronous environment, the data synchronous efficiency is ensured to be maximized, and a synchronous scheduling strategy is adjusted by combining a short-time data synchronous optimization criterion to obtain synchronous resource scheduling optimization parameters which are used for the subsequent cross-platform synchronous resource allocation and synchronous task priority adjustment so as to optimize the whole synchronous process.
S513, optimizing the synchronization parameters of the short-survival high-priority data based on the synchronization resource scheduling optimization parameters, adjusting the synchronization execution priority, and outputting the adjusted cross-platform synchronization resources;
In the process of distributing cross-platform synchronous resources and adjusting synchronous execution priority, high-priority data are particularly concerned, for example, the timely synchronization of the data is important for transaction data in the financial industry, because transaction decision and risk management are influenced, the data can be ensured to be quickly and accurately synchronized in a cross-platform manner by optimizing scheduling parameters, so that the timeliness and the integrity of the data are ensured, meanwhile, the excessive occupation and the waste of resources are avoided, the adjusted cross-platform synchronous resources are output, the efficiency and the response speed of the whole data synchronous architecture are directly influenced, and the overall data processing capacity and the stability are improved.
The cross-platform communication sharing synchronization system is used for executing the cross-platform communication sharing synchronization method, and the system comprises the following steps:
The cross-equipment state conflict detection module extracts a multi-terminal equipment state change event stream based on a cross-platform communication sharing synchronization request timestamp sequence, calculates timestamp difference in a time window, screens repeated changes in a short period, adjusts the time window, applies synchronization buffering and generates a state change conflict detection result;
the change frequency regulation and control module calculates the change frequency of the state of the multi-terminal equipment based on the state change conflict detection result, compares the threshold value, screens the super-threshold state, adjusts the synchronous priority, applies synchronous buffering and obtains the state change conflict optimization parameter;
The synchronous path dynamic optimization module extracts a starting position mark of a cross-platform data exchange path based on state change conflict optimization parameters, matches synchronous path information, records data hops, screens high-delay paths, optimizes data hopping rules among nodes, adjusts synchronous paths and generates synchronous path processing results;
the data survival time scheduling module identifies the survival time of the cross-platform data packet based on the synchronous path processing result, screens short survival demand data, adjusts the synchronous priority, rearranges the low-priority data synchronous queue and acquires the synchronous data survival time scheduling parameter;
And the synchronous resource optimization configuration module calculates the ratio of the data survival time to the synchronous time consumption based on the synchronous data survival time scheduling parameter, optimizes the synchronous process of the short-survival high-priority data, and obtains the adjusted cross-platform synchronous resource.
The present invention is not limited to the above embodiments, and any equivalent embodiments which can be changed or modified by the technical disclosure described above can be applied to other fields, but any simple modification, equivalent changes and modification made to the above embodiments according to the technical matter of the present invention will still fall within the scope of the technical disclosure.