A local data synchronization method and system based on cloud system
By dynamically selecting synchronization points and using synchronization words with the largest minimum Hamming distance, the problems of low efficiency and poor flexibility of local data synchronization in the prior art are solved, and efficient and reliable data synchronization in an unstable network environment are achieved.
Patent Information
- Application Number
- CN202411083767.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-08-08
AI Technical Summary
In the process of local data synchronization to cloud systems, fixed-point-time synchronization results in the inability to make full use of bandwidth when the network is idle, and may not be synchronized when the network is busy, and data corruption is prone to occur in high bit error rate and high noise environments, which has low synchronization efficiency and poor flexibility.
By obtaining the network status between the cloud system and the local terminal, combining the L-K functional, establishing a synchronization point selection function with stable synchronization conditions, dynamically selecting synchronization points, and creating synchronization words using an arrangement with the largest minimum Hamming distance before synchronization, ensuring the stability of data synchronization in an unstable network environment.
It improves the flexibility and real-time nature of data synchronization, can make full use of network resources when the network is unstable, ensures the stability and reliability of data synchronization, avoids the retransmission mechanism occupying too much network resources, and improves data synchronization efficiency.
Smart Images

Figure CN119094070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a local data synchronization method and system based on a cloud system. Background Art
[0002] Cloud system refers to a cloud computing-based environment in which resources (such as servers, storage, applications, and services) are provided to users via the Internet. Cloud systems enable data and computing tasks to be processed remotely in data centers without the need to maintain hardware and software resources locally. Such systems can provide a high degree of scalability, reliability, and efficiency.
[0003] The local data synchronization method based on cloud system involves synchronizing data in local systems (such as the company's internal network or personal computers) to cloud systems for the purpose of data backup, disaster recovery, data sharing or load balancing. The local data synchronization method based on cloud system enables organizations and individuals to take advantage of the high availability and scalability of cloud computing while ensuring the security and consistency of data. This method is particularly important for supporting remote work, cross-regional business operations, and high data security requirements.
[0004] However, in the process of synchronizing local data to the cloud system, the existing technology often synchronizes at fixed time points. This method cannot fully utilize the network bandwidth when the network is idle, and cannot even complete data synchronization at fixed time points when the network is busy. In addition, data corruption is prone to occur during the synchronization process in a high bit error rate and high noise network environment, and the data cannot be accurately received by the cloud system. The retransmission mechanism needs to be repeatedly enabled, wasting a lot of network bandwidth, resulting in low efficiency and poor flexibility in local data synchronization. Summary of the invention
[0005] In order to solve the technical problems that the existing technology often synchronizes data at fixed time points during local data synchronization, which cannot fully utilize the network bandwidth when the network is idle and cannot even complete the data synchronization at fixed time points when the network is busy, and data is prone to corruption during the synchronization process in a high bit error rate and high noise network environment, and cannot be accurately received by the cloud system, and requires repeated activation of the retransmission mechanism, which wastes a lot of network bandwidth, and has low local data synchronization efficiency and poor flexibility, the present invention provides a local data synchronization method and system based on a cloud system.
[0006] The technical solution provided by the embodiment of the present invention is as follows:
[0007] First aspect
[0008] An embodiment of the present invention provides a local data synchronization method based on a cloud system, comprising:
[0009] S1: Obtain the network status between the cloud system and the local terminal;
[0010] S2: Combined with LK functional, a synchronization point selection function with stability synchronization conditions is established based on the network status;
[0011] S3: collect real-time network status;
[0012] S4: input the real-time network state and the time corresponding to the real-time network state into the synchronization point selection function, and output the target synchronization point;
[0013] S5: creating a synchronization word for marking a starting position of local data based on the arrangement with the largest minimum Hamming distance;
[0014] S6: Use the synchronization word to mark the local data;
[0015] S7: At the target synchronization point, synchronize the marked local data to the cloud system.
[0016] Second aspect
[0017] An embodiment of the present invention provides a local data synchronization system based on a cloud system, comprising:
[0018] processor;
[0019] A memory having computer-readable instructions stored therein, wherein when the computer-readable instructions are executed by the processor, the local data synchronization method based on the cloud system as described in the first aspect is implemented.
[0020] The third aspect
[0021] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the local data synchronization method based on a cloud system as described in the first aspect is implemented.
[0022] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0023] In the present invention, based on the network status between the cloud system and the local terminal, a synchronization point selection function with stability synchronization conditions is established, that is, the synchronization point is dynamically selected according to the network status instead of a fixed time point, which greatly improves the flexibility of the synchronization process and can fully cope with the instability of the network status. In combination with the LK functional, a stability synchronization condition is introduced to ensure the stability of the synchronization process under the current network status. While ensuring the synchronization stability, the target synchronization point is selected according to the real-time network status. Whether the network is idle or busy, the network resources can be fully utilized to synchronize local data, which greatly improves the real-time and reliability of synchronization. In addition, before synchronization, an arrangement with the largest minimum Hamming distance is used to create a synchronization word for marking the starting position of local data. Even when the signal is subject to certain interference or changes, the synchronization word can be accurately recognized by the receiving device, namely the cloud system, further ensuring the stability of data synchronization in an unstable network environment, avoiding the synchronization process from repeatedly enabling the retransmission mechanism to occupy too many network resources, improving the data synchronization efficiency, and further improving the real-time and reliability of data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A flowchart of a local data synchronization method based on a cloud system provided by an embodiment of the present invention;
[0026] Figure 2 A schematic diagram of the structure of a local data synchronization system based on a cloud system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0028] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0029] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0030] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0031] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0032] Reference Manual Attached Figure 1 , showing a flow chart of a local data synchronization method based on a cloud system provided in an embodiment of the present invention.
[0033] The embodiment of the present invention provides a local data synchronization method based on a cloud system, which can be implemented by a local data synchronization device based on a cloud system, and the local data synchronization device based on a cloud system can be a terminal or a server. The processing flow of the local data synchronization method based on a cloud system may include the following steps:
[0034] S1: Get the network status between the cloud system and the local terminal.
[0035] It should be noted that data synchronization between the cloud system and the local terminal is closely related to the network status. The network status is obtained in order to analyze its status to formulate a synchronization strategy and ensure stable data synchronization under unstable network conditions. The network status is the data basis for the subsequent formulation of data synchronization strategies.
[0036] In a possible implementation, the network status includes a network delay rate, a network bandwidth utilization rate, and a network packet loss rate.
[0037] Among them, network bandwidth utilization can help us understand the use of network resources. By monitoring bandwidth utilization, system administrators can determine whether the network's carrying capacity is fully utilized, which helps identify bottlenecks and overloads in the network, so that corresponding adjustments can be made to optimize performance. Network latency rate, also known as network delay, refers to the time required for data to travel from the source to the destination. High latency can affect the efficiency of real-time data synchronization, especially for systems that require fast responses. Network packet loss rate: Data packet loss may occur during data transmission. A high packet loss rate can seriously affect data integrity and synchronization reliability.
[0038] S2: Combined with the LK functional, a synchronization point selection function with stability synchronization conditions is established based on the network status.
[0039] Among them, the LK functional (Lyapunov-Krasovskii functional) is a tool for analyzing the stability of time-delay systems. In control theory, especially when it comes to systems with time delays, the Lyapunov-Krasovskii functional has become an important analysis method. This method expands the traditional Lyapunov method and makes it suitable for dealing with time-delay problems. When using the Lyapunov-Krasovskii functional to analyze the stability of a system, the equilibrium state of the system is non-increasing and satisfies some positive definiteness conditions. If such a functional can be proved to exist, then the system is usually considered stable. This method is particularly important in network systems, where the impact of time delay is significant and cannot be ignored.
[0040] The synchronization point selection function can be adjusted according to the current network status to optimize synchronization performance without overloading the network. This function should be able to determine the next data synchronization point based on network latency, bandwidth utilization, and packet loss rate, while ensuring that the data synchronization system can remain stable under given network conditions, and dynamically adjust the synchronization frequency according to the network status to cope with network fluctuations and data transmission errors. These conditions are used to ensure that the system can achieve synchronization under a given controller configuration.
[0041] In a possible implementation, S2 specifically includes:
[0042] S201: Take the data update timestamp of the cloud system as the system state vector, the data update request as the control input vector, and the network delay caused by the network state change as the historical state to establish a data synchronization control model:
[0043]
[0044] in, represents the derivative of the system state vector x(t) at time t, A represents the main dynamic matrix of the system, τ(t) represents the time-varying delay caused by the network state at time t, that is, the transmission delay from the local terminal to the cloud, Ad represents the system dynamic matrix related to the delay τ(t) at time t, x(t-τ(t)) represents the system state vector of the system at time t-τ(t), u(t) represents the control input vector at time t, and B represents the control input matrix indicating how the control input vector affects the timestamp update.
[0045] Among them, x(t) records the last modification time of the file in the cloud system. When the file is edited in different locations, the system must track these changes to avoid version conflicts. Through the dynamic expression of the model, it can calculate when to update the timestamp in the system and decide when to synchronize the data accordingly. This method directly incorporates the concept of updating timestamps into the mathematical expression and logical processing of the system, making the timestamp management and data synchronization process more efficient and automated. Among them, In data synchronization or control systems, it reflects the instantaneous change of the system state. A describes the natural evolution or change of the system state in the absence of external input (such as state changes caused by control input or network delay). A is a zero matrix because the timestamp will not change spontaneously without an update or synchronization request. Ad is a diagonal matrix, in which each element corresponds to the update frequency of the respective data item, reflecting the impact of network delay. The system state vector x(t) represents the update timestamp, that is, the timestamp of the last update. τ(t) changes dynamically according to the actual network conditions, affecting the transmission time of data from one node to another. x(t-τ(t)) represents the state of the system at time t-τ(t), and its impact is only apparent at time t due to delay. B It defines how the control input u(t) affects the system state. B is the unit matrix, representing the update request of each data item.
[0046] S202: Establishing LK functional of data synchronization control model:
[0047]
[0048] Wherein, V(x(t)) represents the stability measurement function of the system state vector x(t), x(s) represents the system state vector at the historical time s, the subscript T represents the transpose, P represents the positive definite matrix used to represent the contribution of the current system state vector to the system stability, and Q represents the positive definite matrix used to represent the contribution of the historical system state vector to the system stability.
[0049] Among them, a functional is a mapping or function that takes a function as input and returns a scalar as output. In simple terms, a functional can be considered a "function of a function". Just like a normal function takes a numerical input and produces a numerical output, a functional takes a whole function as input and produces a numerical value. This means that a functional is a function defined on the space of functions. This functional is used to evaluate the stability of dynamic systems that contain time delays. The LK functional is a special type of functional that is used to evaluate whether a system tends to stabilize over time under given initial conditions. When dealing with systems with time delays, the LK functional takes into account the changes in the system state caused by the time delay, helping to analyze whether the system can remain stable in the presence of delays.
[0050] S203: Establish the stability criterion of LK functional, i.e., the stability synchronization condition:
[0051]
[0052] PA+A T P+Q-Ad T PAd<0
[0053] in, represents the derivative of the stability metric function, the subscript T represents the transpose, PA+A T P+Q-Ad T PAd<0 means the matrix PA+A T P+Q-Ad T PAd is a negative definite matrix.
[0054] It should be noted that PA+A T P+Q-Ad T The introduction of PAd<0 ensures When the derivative of the stability metric function is non-positive, it indicates that the system is stable.
[0055] S204: Under the constraint of the stability criterion, the synchronization interval is optimized with the minimum synchronization interval as the goal:
[0056]
[0057] Where Δt represents the synchronization interval, β represents the adjustment coefficient, c represents the time scale adjustment constant, L represents the network delay rate, U represents the network bandwidth utilization, ε=0.01 represents a small positive number to avoid the denominator being zero, D represents the network packet loss rate, and min represents the minimum value;
[0058] S205: Based on the optimized synchronization interval, a synchronization point selection function is established:
[0059] t * =t+Δt
[0060] Among them, t represents the current synchronization point time, t * Indicates the next synchronization point time.
[0061] Specifically, the last update timestamps of files in the cloud system and the update requests for these files are first integrated into a data synchronization control model, combined with network status parameters such as network delay. The model uses the Lyapunov-Krasovskii (LK) functional to evaluate and ensure the stability of the system, considering how data update requests and network status affect the timeliness and accuracy of data synchronization. By establishing stability synchronization conditions and finding the optimal synchronization interval, the model dynamically adjusts the synchronization time point, that is, according to the real-time changes in network conditions such as network delay, bandwidth utilization and packet loss rate, the frequency and timing of data synchronization are adjusted, aiming to minimize the synchronization interval to ensure the real-time synchronization to the greatest extent, while maintaining the stability of the system in an unstable network environment, thereby improving the efficiency and reliability of data synchronization. In this way, the system can adapt to these changes in a timely manner when network conditions change, ensuring the continuity and consistency of the data synchronization process.
[0062] S3: Collect real-time network status.
[0063] S4: Input the real-time network state and the time corresponding to the real-time network state into the synchronization point selection function, and output the target synchronization point.
[0064] Among them, the target synchronization point is the next synchronization point calculated in step S205. The target synchronization point is a key time point determined in the process of data transmission or processing. These points are the moments when the system state or data needs to be consistent between multiple systems or components. Network delay and processing time determine the time delay between data synchronization. Reasonable setting of synchronization points can help alleviate the impact of network delays and ensure the real-time and accuracy of data synchronization. In the case of unstable network or low data transmission quality, the policy adjustment of the synchronization controller and synchronization points can enhance the fault tolerance of the system. For example, the synchronization rate of data can be increased at critical moments, or the synchronization point can be adjusted when poor network conditions are detected to avoid data loss and synchronization errors, which helps to minimize delays and errors in data transmission and processing. For example, the frequency and quantization level of data synchronization can be dynamically adjusted between data synchronization points to adapt to changes in network conditions.
[0065] S5: Based on the arrangement with the largest minimum Hamming distance, create a synchronization word for marking the start position of the local data.
[0066] It should be noted that in data communication, a synchronization word (also called a synchronization sequence or synchronization code) is a specific bit sequence used to identify the beginning of a data frame and help the receiver identify and synchronize to the data stream of the sender. Using a permutation as a synchronization word, this permutation satisfies the following conditions: the Hamming distance to all its cyclic shifts must be the largest, and the frame synchronization method uses correlation processing and majority processing of data fragments, which are transmitted through a communication channel, where the length of the fragment is equal to the length of the synchronization word. Therefore, the proposed frame synchronization method can achieve frame synchronization of a data transmission system under adverse noise conditions, and effectively achieves frame synchronization under high bit error rate and high noise environments by using a permutation with the maximum and minimum Hamming distance as the synchronization word.
[0067] Among them, the minimum Hamming distance is the largest, which means that a permutation is selected from all possible permutations so that the minimum value of the Hamming distance between this permutation and any of its cyclic shifted versions (that is, the number of different characters in the same position of the two) is as large as possible. The purpose of this is to ensure that the synchronization word can be accurately recognized by the receiving device even when the signal is subject to certain interference or changes.
[0068] For example, suppose we have three possible sync words: "1010", "1100", and "1001". Calculate the Hamming distance between each sync word and all its cyclic shifts, and find the minimum Hamming distance in each group: For "1010", the cyclic shifts are "0101", "1010", and "0101", and the Hamming distances are 2, 0, and 2 respectively, and the minimum Hamming distance is 0. For "1100", the cyclic shifts are "0110", "0011", and "1001", and the Hamming distances are 2, 4, and 2 respectively, and the minimum Hamming distance is 2. For "1001", the cyclic shifts are "1100", "0110", and "0011", and the Hamming distances are 2, 2, and 2 respectively, and the minimum Hamming distance is 2. In this example, the minimum Hamming distance between "1100" and "1001" is 2, which is the largest minimum Hamming distance. Therefore, choosing either "1100" or "1001" as the sync word is better than choosing "1010" because they maintain greater discrimination even under the most unfavorable cyclic shift.
[0069] In a possible implementation, S5 specifically includes:
[0070] S501: Generate a plurality of initial arrangements of preset lengths, wherein the initial arrangements are binary strings of preset lengths.
[0071] It should be noted that those skilled in the art can set the size of the preset length according to actual needs, and the present invention is not limited here. Generally speaking, the length of the synchronization word is usually set between tens of bits and hundreds of bits. Commonly used lengths include 32 bits, 64 bits or 128 bits of initial arrangement.
[0072] S502: Perform cyclic shift on the initial arrangement to generate a set of candidate arrangements.
[0073] S503: Calculate the minimum Hamming distance between the initial permutation and each permutation in the candidate permutation set.
[0074] Among them, the minimum Hamming distance represents the distance between the initial permutation and the most similar permutation in the set of candidate permutations. For a given synchronization word, the Hamming distance between it and all possible cyclic shift versions is calculated, and then the minimum value of these Hamming distances is found. This minimum value represents the minimum distinction between the synchronization word and its cyclic shift in the worst case (i.e., the most similar cyclic shift).
[0075] In a possible implementation, the calculation formula of the minimum Hamming distance is specifically:
[0076]
[0077] Among them, d H (r,o) represents the minimum Hamming distance between the initial permutation r and the permutation o in the candidate permutation set, r i , o i They represent the characters at position i in the initial arrangement r and the arrangement o in the alternative arrangement set, respectively. represents XOR operation, n represents the length of the arrangement, and min represents the minimum value.
[0078] S504: Use the initial arrangement corresponding to the largest minimum Hamming distance as the synchronization word.
[0079] It should be noted that among all possible initial arrangements, i.e., synchronization words, a synchronization word is selected that maximizes the above-mentioned minimum Hamming distance. This means that among all considered synchronization words, the selected one has the greatest discrimination even in the most unfavorable case (compared with the most similar cyclic shift).
[0080] Specifically, a plurality of binary strings of preset lengths are first generated as candidates for the initial synchronization word. These lengths are usually set as needed, such as 32 bits, 64 bits or 128 bits. Next, a cyclic shift operation is performed on each initial arrangement to generate a series of candidate arrangements. Subsequently, the system calculates the Hamming distance between each initial arrangement and all possible cyclic shift arrangements thereof, and finds the minimum Hamming distance value, which represents the minimum discrimination of the synchronization word in the worst case (i.e., comparison with the most similar cyclic shift). Finally, a arrangement with the maximum and minimum Hamming distance is selected from all candidates as the final synchronization word to ensure that the synchronization word can maintain the highest recognition even under cyclic shift conditions, thereby effectively improving the reliability and accuracy of synchronization during data transmission. This method significantly enhances the stability and robustness of the system under complex or interfering conditions.
[0081] S6: Use the synchronization word to mark the local data.
[0082] In a possible implementation manner, after S6, the method further includes:
[0083] The marked local data is interleaved and rearranged.
[0084] Among them, interleaving is a data processing technology used to rearrange the order of data elements in a data block. This rearrangement usually increases data redundancy and dislocation by dividing the data into multiple blocks or segments and then reallocating these blocks to different locations according to a predetermined pattern. In this way, continuous blocks of original data are broken up, forming a non-continuous distribution in a data packet or data stream. Interleaving can improve the reliability and robustness of data transmission in an unstable network environment.
[0085] In a possible implementation, interleaving and rearranging the marked local data specifically includes:
[0086] Divide the local data into blocks to obtain a preset number of data blocks:
[0087]
[0088] Wherein, τ represents the data block size, E represents the total amount of local data, and m represents the preset number.
[0089] It should be noted that those skilled in the art can set the size of the preset number according to actual needs, and the present invention is not limited thereto.
[0090] Interleave the obtained data blocks into different data packets:
[0091] Index(j)=(j×λ)modm
[0092] Wherein, Index(j) represents the position of the new data packet after the j-th data block is interleaved and rearranged, λ represents the interleaving step length which is a prime number, and mod represents the modulo operation.
[0093] For example, if there are 10 data blocks and the step size is 3 (choose a number that is relatively prime to n to ensure that all possible positions are covered), then the new positions of the first data block, the second data block, and the third data block are:
[0094] The first data block: Index(0)=(0×3)mod10=0.
[0095] The second data block: Index(1)=(1×3)mod10=3.
[0096] And so on, each data block will be reallocated to a different location according to this pattern. With this strategy, even if some data blocks are lost or damaged during transmission, it will not affect the integrity of the entire data structure, because the lost data blocks are non-continuous in the original data sequence.
[0097] S7: At the target synchronization point, synchronize the marked local data to the cloud system.
[0098] In a possible implementation manner, after S7, the method further includes:
[0099] Issue an early warning when the real-time network status is abnormal.
[0100] Among them, real-time network status anomalies include abnormal network delay rate, abnormal network bandwidth utilization and abnormal network packet loss rate. Among them, abnormal network delay rate means that the delay time caused by network congestion, routing problems or hardware failure exceeds the normal operating range or expected threshold. Abnormal bandwidth utilization usually manifests as excessive or low bandwidth utilization. Excessive bandwidth utilization means that network resources are close to or have reached their capacity limit, which may cause network speed reduction and data transmission delay. Too low bandwidth utilization means that network resources are not fully utilized. Abnormal network packet loss rate means that the packet loss rate exceeds the normal range or threshold. Packet loss may be caused by network congestion, unstable network connection, hardware failure or poor network configuration. In the network management system, thresholds are usually set to define when the network status is considered abnormal. When the monitored delay, bandwidth utilization or packet loss rate exceeds these thresholds, the system will automatically issue an early warning to notify the network administrator or automatically trigger certain mitigation measures. These early warnings help to timely discover and solve network problems and ensure the stability and reliability of data synchronization.
[0101] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0102] In the present invention, based on the network status between the cloud system and the local terminal, a synchronization point selection function with stability synchronization conditions is established, that is, the synchronization point is dynamically selected according to the network status instead of a fixed time point, which greatly improves the flexibility of the synchronization process and can fully cope with the instability of the network status. In combination with the LK functional, a stability synchronization condition is introduced to ensure the stability of the synchronization process under the current network status. While ensuring the synchronization stability, the target synchronization point is selected according to the real-time network status. Whether the network is idle or busy, the network resources can be fully utilized to synchronize local data, which greatly improves the real-time and reliability of synchronization. In addition, before synchronization, an arrangement with the largest minimum Hamming distance is used to create a synchronization word for marking the starting position of local data. Even when the signal is subject to certain interference or changes, the synchronization word can be accurately recognized by the receiving device, namely the cloud system, further ensuring the stability of data synchronization in an unstable network environment, avoiding the synchronization process from repeatedly enabling the retransmission mechanism to occupy too many network resources, improving the data synchronization efficiency, and further improving the real-time and reliability of data synchronization.
[0103] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a local data synchronization system based on a cloud system provided by the present invention.
[0104] The present invention further provides a cloud-based local data synchronization system 20, which is applied to the above-mentioned cloud-based local data synchronization method, comprising:
[0105] Processor 201.
[0106] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201 , a local data synchronization method based on a cloud system as in the method embodiment is implemented.
[0107] The cloud-based local data synchronization system 20 provided by the present invention can execute the above-mentioned cloud-based local data synchronization method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0108] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0109] In the present invention, based on the network status between the cloud system and the local terminal, a synchronization point selection function with stability synchronization conditions is established, that is, the synchronization point is dynamically selected according to the network status instead of a fixed time point, which greatly improves the flexibility of the synchronization process and can fully cope with the instability of the network status. In combination with the LK functional, a stability synchronization condition is introduced to ensure the stability of the synchronization process under the current network status. While ensuring the synchronization stability, the target synchronization point is selected according to the real-time network status. Whether the network is idle or busy, the network resources can be fully utilized to synchronize local data, which greatly improves the real-time and reliability of synchronization. In addition, before synchronization, an arrangement with the largest minimum Hamming distance is used to create a synchronization word for marking the starting position of local data. Even when the signal is subject to certain interference or changes, the synchronization word can be accurately recognized by the receiving device, namely the cloud system, further ensuring the stability of data synchronization in an unstable network environment, avoiding the synchronization process from repeatedly enabling the retransmission mechanism to occupy too many network resources, improving the data synchronization efficiency, and further improving the real-time and reliability of data synchronization.
[0110] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0111] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0112] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0113] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0114] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0115] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0116] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0118] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0122] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a local data synchronization method based on a cloud system as described in the method embodiment.
[0123] A computer-readable storage medium provided by the present invention can implement the steps and effects of the local data synchronization method based on the cloud system of the above method embodiment. To avoid repetition, the present invention will not go into details.
[0124] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0125] In the present invention, based on the network status between the cloud system and the local terminal, a synchronization point selection function with stability synchronization conditions is established, that is, the synchronization point is dynamically selected according to the network status instead of a fixed time point, which greatly improves the flexibility of the synchronization process and can fully cope with the instability of the network status. In combination with the LK functional, a stability synchronization condition is introduced to ensure the stability of the synchronization process under the current network status. While ensuring the synchronization stability, the target synchronization point is selected according to the real-time network status. Whether the network is idle or busy, the network resources can be fully utilized to synchronize local data, which greatly improves the real-time and reliability of synchronization. In addition, before synchronization, an arrangement with the largest minimum Hamming distance is used to create a synchronization word for marking the starting position of local data. Even when the signal is subject to certain interference or changes, the synchronization word can be accurately recognized by the receiving device, namely the cloud system, further ensuring the stability of data synchronization in an unstable network environment, avoiding the synchronization process from repeatedly enabling the retransmission mechanism to occupy too many network resources, improving the data synchronization efficiency, and further improving the real-time and reliability of data synchronization.
[0126] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0127] There are a few points to note:
[0128] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0129] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0130] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0131] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A local data synchronization method based on a cloud system, characterized in that: include: S1: Obtain the network status between the cloud system and the local terminal; S2: combining the LK functional, establishing a synchronization point selection function with stability synchronization conditions based on the network state; S3: collect real-time network status; S4: inputting the real-time network state and the time corresponding to the real-time network state into the synchronization point selection function, and outputting a target synchronization point; S5: creating a synchronization word for marking a starting position of local data based on the arrangement with the largest minimum Hamming distance; S6: Mark the local data using the synchronization word; S7: synchronizing the marked local data to the cloud system at the target synchronization point; Wherein, the network status includes network delay rate, network bandwidth utilization rate and network packet loss rate; Wherein, the S2 specifically includes: S201: Using the data update timestamp of the cloud system as the system state vector, the data update request as the control input vector, and the network delay caused by the network state change as the historical state, a data synchronization control model is established: in, represents the derivative of the system state vector x(t) at time t, A represents the main dynamic matrix of the system, τ(t) represents the time-varying delay caused by the network state at time t, that is, the transmission delay from the local terminal to the cloud, Ad represents the system dynamic matrix related to the delay τ(t) at time t, x(t-τ(t)) represents the system state vector of the system at time t-τ(t), u(t) represents the control input vector at time t, and B represents the control input matrix indicating how the control input vector affects the timestamp update; S202: Establishing the LK functional of the data synchronization control model: Wherein, V(x(t)) represents the stability measurement function of the system state vector x(t), x(s) represents the system state vector at the historical time s, the subscript T represents the transpose, P represents the positive definite matrix used to represent the contribution of the current system state vector to the system stability, and Q represents the positive definite matrix used to represent the contribution of the historical system state vector to the system stability; S203: Establish the stability criterion of the LK functional, i.e., the stability synchronization condition: in, represents the derivative of the stability metric function, the subscript T represents the transpose, PA+A T P+Q-Ad T PAd<0 means the matrix PA+A T P+Q-Ad T PAd is a negative definite matrix; S204: Under the constraint of the stability criterion, the synchronization interval is optimized with the minimum synchronization interval as the goal: Wherein, Δt represents the synchronization interval, β represents the adjustment coefficient, c represents the time scale adjustment constant, L represents the network delay rate, U represents the network bandwidth utilization, ε=0.01 represents a small positive number to avoid the denominator being zero, D represents the network packet loss rate, and min represents taking the minimum value; S205: Based on the optimized synchronization interval, establish the synchronization point selection function: t * =t+Δt Among them, t represents the current synchronization point time, t * Indicates the next synchronization point time.
2. The local data synchronization method based on the cloud system according to claim 1, characterized in that: The S5 specifically includes: S501: Generate a plurality of initial arrangements of preset lengths, wherein the initial arrangements are binary strings of preset lengths; S502: performing cyclic shift on the initial arrangement to generate a set of candidate arrangements; S503: Calculating the minimum Hamming distance between the initial arrangement and each arrangement in the candidate arrangement set; S504: Using the initial arrangement corresponding to the largest minimum Hamming distance as the synchronization word.
3. The local data synchronization method based on the cloud system according to claim 2, characterized in that: The calculation formula of the minimum Hamming distance is specifically: Among them, d H (r,o) represents the minimum Hamming distance between the initial arrangement r and the arrangement o in the candidate arrangement set, r i , o i They represent the characters at position i in the initial arrangement r and the arrangement o in the alternative arrangement set, respectively. represents XOR operation, n represents the length of the arrangement, and min represents the minimum value.
4. The local data synchronization method based on the cloud system according to claim 1, characterized in that: After S6, the method further includes: The marked local data is interleaved and rearranged.
5. The local data synchronization method based on the cloud system according to claim 4, characterized in that: The interleaving and rearranging of the marked local data specifically includes: The local data is divided into blocks to obtain a preset number of data blocks: Wherein, τ represents the data block size, E represents the total amount of the local data, and m represents the preset number; Interleave the obtained data blocks into different data packets: Index(j)=(j×λ)modm Wherein, Index(j) represents the position of the new data packet after the j-th data block is interleaved and rearranged, λ represents the interleaving step length which is a prime number, and mod represents the modulo operation.
6. The local data synchronization method based on the cloud system according to claim 1, characterized in that: After S7, the method further includes: When the real-time network status is abnormal, an early warning is issued.
7. A local data synchronization system based on a cloud system, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the cloud system-based local data synchronization method according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the local data synchronization method based on a cloud system as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for processing event-triggered network T-S fuzzy system packet loss
CN109243165A
Network attack intrusion detection method and system based on hidden Markov model
CN118199942A