Cross-platform incremental file synchronization methods, computer devices, media, and products

By monitoring file changes and network conditions in real time, and dynamically selecting encoding algorithms, compression ratios, and transmission paths, the problem of low stability and efficiency in cross-platform file transfer is solved, achieving efficient and reliable file synchronization.

CN119254769BActive Publication Date: 2025-12-02BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411529691.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-12-02
Estimated Expiration
2044-10-30

Smart Images

  • Figure CN119254769B_ABST
    Figure CN119254769B_ABST
Patent Text Reader

Abstract

This application discloses a cross-platform incremental file synchronization method, computer device, medium, and product. The method includes: real-time monitoring of a identified file to be monitored, obtaining file change information, dynamically obtaining a target encoding algorithm and a target compression ratio, processing the file change information to obtain intermediate file information, assigning a unique identifier and unique verification information to the intermediate file information, and obtaining target file data; detecting and obtaining multiple target network paths; determining the optimal transmission path among the multiple target network paths based on network latency, bandwidth, and reliability information, and then transmitting the target file data on that path. This method is applicable to different operating systems and platforms, can detect and select the optimal network path for file transfer, and ensures efficient, stable, and secure cross-platform file synchronization under different network conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of file transfer technology, and in particular to a cross-platform file incremental synchronization method, computer device, medium, and product. Background Technology

[0002] In today's digital age, file synchronization and transfer are critical requirements for cross-platform collaboration, remote work, and multi-device synchronization. With the widespread adoption of cloud computing and mobile devices, users need to efficiently and stably synchronize and transfer files across different operating systems and devices. However, existing file synchronization and transfer technologies face a series of challenges, including: 1) Platform compatibility issues: Different operating systems and devices may use different file systems and encoding standards, leading to compatibility problems during cross-platform file transfer; 2) Diverse network environments: Users transfer files through different network environments (such as Wi-Fi, mobile data, VPN, etc.), which vary in bandwidth, latency, and stability, posing challenges to the efficiency and reliability of file transfer; 3) Data volume and transfer speed: As file size increases, traditional file transfer methods often become inefficient, especially under poor network conditions, where transfer speed is severely affected.

[0003] Existing solutions, such as FTP, HTTP / HTTPS, and cloud storage services, while meeting the needs of file transfer to some extent, cannot dynamically adapt to different network environments, resulting in poor stability and low efficiency when transferring files across platforms. Summary of the Invention

[0004] In view of this, the present disclosure provides a cross-platform file incremental synchronization method, computer device, medium, and product, which can solve the problems of poor transmission stability and low transmission efficiency caused by the inability of existing cross-platform transmission methods to dynamically adapt to different network environments.

[0005] In a first aspect, embodiments of this disclosure provide a cross-platform incremental file synchronization method, including:

[0006] Real-time monitoring of identified files to be monitored to obtain file change information;

[0007] Based on the file change information, the target encoding algorithm and target compression ratio are dynamically obtained;

[0008] Based on the target encoding algorithm and target compression ratio, the file change information is processed to obtain intermediate file information. A unique identifier and unique verification information are assigned to the intermediate file information to obtain the target file data.

[0009] Detect and acquire multiple target network paths;

[0010] Based on network latency information, bandwidth information, and reliability information, the optimal transmission path is determined among multiple target network paths;

[0011] The target file data is transmitted along the optimal transmission path.

[0012] Optionally, the real-time monitoring of the identified file to be monitored, and the acquisition of file change information, includes:

[0013] Identify the files to be monitored;

[0014] Perform semantic analysis on the file to be monitored to obtain the file's logical structure;

[0015] The file's logical structure is analyzed based on a difference comparison algorithm to obtain file change information.

[0016] Optionally, the step of performing semantic analysis on the file to be monitored to obtain the file's logical structure includes:

[0017] When the file to be monitored is a text file, common words or phrases are identified through word frequency statistics, or the file content is repetitive sequence detection is performed using a sequence matching algorithm to obtain the file's logical structure.

[0018] When the file to be monitored is code, repeating code blocks are identified through sequence matching, or feature extraction technology is used to identify feature patterns in the file content to obtain the file's logical structure.

[0019] When the file to be monitored is an image, the repeated texture regions in the file content are identified through feature extraction to obtain the file's logical structure.

[0020] Optionally, dynamically obtaining the target encoding algorithm and target compression ratio based on the file change information includes:

[0021] Based on the file change information, the file content type, frequently changing content, and stable content are determined; the frequently changing content is content whose change frequency is greater than a preset frequency threshold, and the stable content is content whose change frequency is not greater than the preset frequency threshold.

[0022] Based on the file content type and algorithm repository, dynamically obtain the adjusted target encoding algorithm;

[0023] The compression ratio of the frequently changing content is dynamically adjusted to a first compression ratio;

[0024] The compression ratio of the stable content is dynamically adjusted to a second compression ratio, and the second compression ratio is greater than the first compression ratio.

[0025] Optionally, when the file content type is a text file, the target encoding algorithm is a dictionary-based compression algorithm;

[0026] When the file content type is an image file, the target encoding algorithm is a transformation-based compression algorithm.

[0027] Optionally, determining the optimal transmission path among multiple target network paths based on network latency information, bandwidth information, and reliability information includes:

[0028] Based on the application scenario, determine the network latency weight, bandwidth weight, and reliability weight;

[0029] Obtain the actual bandwidth, actual latency, and actual packet loss rate of multiple target network paths;

[0030] Based on the actual bandwidth, the actual latency, and the actual packet loss rate, obtain the bandwidth score, latency score, and packet loss rate score corresponding to the target network path;

[0031] Based on the network latency weight, bandwidth weight, reliability weight, bandwidth score, latency score, and packet loss rate score, a total score is obtained for each target network path, and the target network path with the highest total score is selected as the optimal transmission path.

[0032] Optionally, transmitting the target file data along the optimal transmission path further includes:

[0033] The system monitors the current network information in real time. When the current network information changes, it dynamically adjusts the transmission path and transmission rate, and uses the dynamically adjusted transmission path and transmission rate to perform cross-platform file synchronization.

[0034] Optionally, the method for obtaining the bandwidth score includes:

[0035] Obtain the maximum actual bandwidth among all the target network paths;

[0036] Obtain the ratio of the actual bandwidth of a single target network path to the maximum actual bandwidth;

[0037] The bandwidth score is obtained based on the ratio and the bandwidth full score threshold.

[0038] The bandwidth rating is A. i , Among them, K i K represents the actual bandwidth of the i-th target network path. max K represents the maximum actual bandwidth among all the target network paths, and K is the bandwidth full score threshold.

[0039] Optionally, the method for obtaining the delay score includes:

[0040] Obtain the maximum and minimum actual latency among all the target network paths;

[0041] The latency score is obtained based on the actual latency of a single target network path, the maximum actual latency, the minimum actual latency, and the latency full score threshold.

[0042] The delay score is B. i , Among them, Y i Y represents the actual delay of the i-th target network path. min Y is the minimum actual delay among all the target network paths. max Y represents the maximum actual latency among all the target network paths, and Y is the latency full score threshold.

[0043] Optionally, the method for obtaining the packet loss rate score includes:

[0044] Obtain the maximum actual packet loss rate among all the target network paths;

[0045] The packet loss rate score is obtained based on the actual packet loss rate of a single target network path, the maximum actual packet loss rate, and the packet loss rate full score threshold.

[0046] The packet loss rate score is C. i , Among them, D i Let D be the actual packet loss rate of the i-th target network path. max The maximum actual packet loss rate among all the target network paths is given by D, where D is the maximum packet loss rate threshold.

[0047] Optionally, the total score of the i-th target network path is Q. i :

[0048] Q i =A i ×P1+B i ×P2+C i ×P3;

[0049] P1+P2+P3=1;

[0050] Wherein, P1 is the bandwidth weight, P2 is the network latency weight, and P3 is the reliability weight.

[0051] Optionally, the dynamic adjustment of the transmission path includes:

[0052] Real-time monitoring of network performance metrics of the optimal transmission path, including at least one of bandwidth, latency, and packet loss rate;

[0053] When the network performance index is lower than the preset index threshold, the path corresponding to the network performance index is removed from the multiple target network paths, and the remaining target network paths are recorded as the update path set;

[0054] Based on the current network performance data, the total score of all paths in the updated path set is recalculated, and the path with the highest total score is taken as the updated optimal transmission path.

[0055] Transfer file data based on the updated optimal transfer path.

[0056] Optionally, the dynamic adjustment of the transmission rate includes:

[0057] Real-time acquisition of network monitoring data, including one or more of queue length and packet loss rate;

[0058] Determine whether the monitored data exceeds a preset indicator; if so, reduce the transmission rate of the sending end.

[0059] If not, increase the size of the sending window using an exponential growth strategy, and determine whether the size of the sending window has reached a preset threshold. If so, increase the size of the sending window using a linear growth strategy.

[0060] Optionally, the cross-platform file incremental synchronization method further includes:

[0061] The integrity of the corresponding file is verified at the target receiving end based on the unique verification information.

[0062] The location information of all compressed blocks in the received file is determined based on all the aforementioned unique identifiers;

[0063] Based on the location information, all compressed blocks in the file are decompressed to obtain the complete file, and the file index and metadata of the target receiving end are updated.

[0064] Secondly, this disclosure also provides a cross-platform file incremental synchronization system, including:

[0065] The monitoring module is used to monitor the identified files in real time and obtain file change information.

[0066] The dynamic adjustment module is used to dynamically adjust the encoding algorithm and compression ratio based on the file change information to obtain the target encoding algorithm and target compression ratio.

[0067] The processing module is used to process the changed file based on the target encoding algorithm and target compression ratio, assign a unique identifier and unique verification information to the processed file, and obtain the target file data;

[0068] The detection module is used to detect and acquire multiple target network paths;

[0069] The path determination module is used to determine the optimal transmission path among multiple target network paths based on network latency information, bandwidth information, and reliability information;

[0070] A synchronization module is used to transmit the target file data on the optimal transmission path.

[0071] Thirdly, this disclosure also provides a computer device, which adopts the following technical solution:

[0072] The computer device includes:

[0073] At least one processor; and,

[0074] A memory communicatively connected to the at least one processor; wherein,

[0075] The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform any of the cross-platform file incremental synchronization methods described above.

[0076] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing computer instructions for causing a computer to execute any of the cross-platform file incremental synchronization methods described above.

[0077] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the methods described above.

[0078] The cross-platform incremental file synchronization method disclosed in this application synchronizes only the changed parts of the file, rather than the entire file, significantly reducing data transmission volume, improving synchronization efficiency, and saving bandwidth and time. It dynamically selects the optimal encoding algorithm and compression ratio based on file change information, further reducing the amount of transmitted data and improving synchronization efficiency. Selecting the optimal transmission path based on network latency, bandwidth, and reliability information maximizes the use of available bandwidth and reduces network resource waste. Dynamic encoding and compression reduce the server and client resources required for processing and transmission, lowering overall energy consumption and hardware costs. Assigning a unique identifier and verification information to the processed file ensures file integrity and accuracy, preventing errors or damage during data transmission. The method disclosed in this embodiment, through automatic selection of the optimal transmission path and dynamic adjustment of the encoding algorithm, provides a seamless file synchronization experience without manual intervention. It can adapt to different network environments and conditions, and is applicable to different operating systems and platforms, achieving cross-platform file synchronization to meet diverse application scenarios and ensuring the real-time and efficient nature of file synchronization.

[0079] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0080] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0081] Figure 1 This is a flowchart illustrating the cross-platform file incremental synchronization method provided in this embodiment of the disclosure.

[0082] Figure 2 A flowchart illustrating the method for obtaining file change information provided in this embodiment of the disclosure.

[0083] Figure 3 A flowchart illustrating the encoding algorithm and dynamic adjustment method for compression ratio provided in embodiments of this disclosure.

[0084] Figure 4 A flowchart illustrating the method for determining the optimal transmission path provided in this embodiment of the disclosure.

[0085] Figure 5 This is a flowchart illustrating the method for obtaining bandwidth scores provided in an embodiment of this disclosure.

[0086] Figure 6 This is a flowchart illustrating the method for obtaining a delayed score provided in an embodiment of this disclosure.

[0087] Figure 7 This is a flowchart illustrating the method for obtaining packet loss rate scores provided in an embodiment of this disclosure.

[0088] Figure 8 A flowchart illustrating the dynamic adjustment method for the transmission path provided in this embodiment of the disclosure.

[0089] Figure 9 A flowchart illustrating the dynamic adjustment method for transmission rate provided in this embodiment of the disclosure.

[0090] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. Detailed Implementation

[0091] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0092] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0093] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0094] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0095] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0096] Reference Figure 1 This application discloses a cross-platform file incremental synchronization method, including:

[0097] S100 monitors identified files in real time and obtains information on file changes.

[0098] One approach is to determine the directories that need to be monitored for file changes by issuing source-side policies. Typically, the monitored directories can be flexibly configured according to user needs. Specifically, a file listener (Apache Commons-io) is created based on the source-side policies to monitor file changes. Here, obtaining file change information means extracting only the changed parts.

[0099] This step allows for real-time responses to file changes, avoiding periodic polling of the file system and reducing unnecessary system resource consumption.

[0100] S200 dynamically obtains the target encoding algorithm and target compression ratio based on file change information.

[0101] Dynamically adjusting encoding and compression methods can minimize data volume while ensuring transmission efficiency, and select the most suitable processing method for different types of files, thereby improving overall transmission and processing efficiency.

[0102] S300 processes file change information based on the target encoding algorithm and target compression ratio to obtain intermediate file information, assigns a unique identifier and unique verification information to the intermediate file information, and obtains the target file data.

[0103] Specifically, unique identifiers and verification information are assigned to the data processed by the dynamically adjusted encoding algorithm to ensure the integrity and consistency of the compressed blocks. This includes: assigning a unique identifier to each compressed block so that the file can be correctly reassembled at the destination; and calculating the verification information (such as a hash value) for each compressed block to verify that the compressed block has not been tampered with or corrupted during transmission.

[0104] Compression significantly reduces file size, saving storage space and transmission bandwidth; assigning unique identifiers and verification information ensures data accuracy and allows for convenient verification at the receiving end, improving the security and reliability of data transmission.

[0105] S400 detects and acquires multiple target network paths.

[0106] Specifically, before transmitting data, the system will detect and select multiple available network paths (i.e. target network paths) according to the policy configuration, including wired and wireless networks, to ensure the flexibility and reliability of transmission.

[0107] Furthermore, network probing tools (such as ping, traceroute, or professional network performance monitoring tools) can be used to assess available network paths. Multiple available network interfaces or VPN connections can be detected to obtain information such as latency, bandwidth, and reliability of each network path. Several available network paths can be obtained through these probing results.

[0108] The S500 determines the optimal transmission path among multiple target network paths based on network latency, bandwidth, and reliability information.

[0109] This step ensures that files are transmitted under optimal network conditions, reducing data transmission time, improving file synchronization speed, and dynamically selecting paths based on changes in network conditions, making it highly adaptable and improving the reliability of file synchronization.

[0110] S600 transmits target file data along the optimal transmission path.

[0111] This step ensures that files are transmitted under optimal conditions, greatly reducing the chance of transmission errors or delays, effectively improving the efficiency and reliability of cross-platform file synchronization, and enabling files to be synchronized quickly and seamlessly in various environments.

[0112] The cross-platform incremental file synchronization method disclosed in this application synchronizes only the changed parts of the file, rather than the entire file, significantly reducing data transmission volume, improving synchronization efficiency, and saving bandwidth and time. It dynamically adjusts the encoding algorithm and compression ratio based on file changes, further optimizing transmission efficiency and storage space. It can detect and select the optimal network path for file transmission, ensuring efficient and reliable file synchronization under different network conditions. It monitors network conditions in real time and dynamically adjusts the transmission path and rate according to network changes, ensuring the continuity and stability of file synchronization. It assigns a unique identifier and verification information to the processed file, ensuring file integrity and accuracy, preventing errors or damage during data transmission. By selecting a highly reliable, low-latency, and high-bandwidth network path, it improves the reliability and stability of file transmission. It is applicable to different operating systems and platforms, achieving cross-platform file synchronization, meeting diverse application scenarios, and ensuring the real-time and efficient nature of file synchronization.

[0113] In summary, this cross-platform incremental file synchronization method not only improves the efficiency and reliability of file synchronization, but also enhances the system's flexibility and wide applicability, providing users with an efficient, reliable, and real-time file synchronization solution.

[0114] Reference Figure 2 The method for obtaining file change information specifically includes the following steps:

[0115] S110, Identify the file to be monitored.

[0116] Specifically, the system needs to identify which files need to be monitored. This can be done through configuration files, database records, or command-line arguments. For example, if a user wants to monitor all files in a project directory, the system can recursively traverse the directory, list all subdirectories and files, and mark these files as files to be monitored.

[0117] This step accurately identifies the files that need to be monitored, avoiding unnecessary consumption of system resources. By configuring and flexibly selecting monitoring targets, it can adapt to different business needs.

[0118] S120 performs semantic analysis on the file to be monitored to obtain the file's logical structure.

[0119] Specifically, semantic analysis is performed on the file content to identify its logical structure, such as paragraphs and chapters in text files, and functions and classes in code files. For different file types, pattern recognition technology is used to detect recurring patterns or common structures in the file content. For example, statistical methods are used to analyze the frequency distribution of characters, words, or pixels in the file content to identify frequently occurring patterns.

[0120] Furthermore, when the file to be monitored is a text file, common words or phrases can be identified through word frequency statistics, or sequence matching algorithms, such as Longest Common Subsequence (LCS) or dynamic programming, can be used to detect repeated sequences in the changed file content and obtain the changed file logical structure.

[0121] When the file to be monitored is code, repeating code blocks can be identified through sequence matching, or feature extraction techniques can be used to identify feature patterns in the changed file content to obtain the changed file logical structure. For example, edge detection or texture analysis in image processing can be used to identify feature patterns in the file content.

[0122] When the file to be monitored is an image, feature extraction can be used to identify recurring texture regions in the changed file content and obtain the changed file logical structure.

[0123] In this step, semantic analysis is used to extract the logical structure of the file, rather than focusing solely on physical changes. This better reflects the actual changes in the file content, providing richer contextual information for subsequent comparisons and improving the accuracy and intelligence of the comparison.

[0124] S130: Use a difference comparison algorithm to analyze the logical structure of the file and obtain file change information.

[0125] Among them, the difference comparison algorithm can be preferred to the Diff algorithm to detect subtle modifications to the file content and identify which parts have changed.

[0126] By comparing differences, substantial changes to files can be accurately identified, avoiding the transmission of useless information. At the same time, clear change reports can be provided, making it easier for users and the system to understand and process subsequent file synchronization operations.

[0127] Furthermore, by analyzing and judging at different time intervals, the changed files can be identified. Then, during the analysis of the logical structure of the files before and after the change, instead of simply comparing line by line, the file content is divided into several blocks, and then the same or similar blocks are found in the files before and after the change. This method is more efficient when processing large files or files with certain regularities in their structure. For example, in an HTML file, there may be multiple similar code blocks, such as multiple... The content within the tags. Block-based Diff algorithms can identify these similar blocks and more accurately detect which blocks have undergone changes internally, rather than simply matching each one. The content within the tag is compared line by line.

[0128] In this embodiment, the file change information acquisition method disclosed in S110-S130, through real-time monitoring and semantic analysis, can accurately capture substantial changes in files, reduce data processing volume and transmission bandwidth consumption, and improve synchronization efficiency. Through semantic analysis and difference comparison, the system can deeply understand the logical structure and semantic information of file content, improving the intelligence level of file synchronization and enhancing the system's adaptability and flexibility. Through detailed difference reports, the system can provide detailed information on file changes, ensuring the accuracy and reliability of synchronization operations and avoiding potential errors and conflicts. Real-time monitoring and analysis of file changes ensure rapid response and timely updates in the file synchronization process, improving the system's real-time performance. Detailed difference reports and intelligent processing enable users to easily understand and track file changes, improving the system's usability and user-friendliness.

[0129] Reference Figure 3 The methods for dynamically adjusting the encoding algorithm and compression ratio specifically include:

[0130] S210, based on file change information, determine the file content type, frequently changing content, and stable content; among which, frequently changing content is content whose change frequency is greater than a preset frequency threshold, and stable content is content whose change frequency is not greater than the preset frequency threshold.

[0131] By classifying and analyzing data, we can more accurately identify different content types and change patterns of files, providing a basis for subsequent encoding and compression adjustments. Distinguishing between frequently changing and stable content helps optimize compression strategies, minimizing the impact on frequently changing content while ensuring compression efficiency.

[0132] S220 dynamically obtains the adjusted target encoding algorithm based on the file content type and algorithm repository.

[0133] When the file content type is a text file, the target encoding algorithm is a dictionary-based compression algorithm; when the file content type is an image file, the target encoding algorithm is a transform-based compression algorithm.

[0134] Specifically, dictionary-based compression algorithms can be LZ77 or LZ78; transform-based compression algorithms can be JPEG or PNG.

[0135] Dynamically selecting encoding algorithms ensures that the most suitable algorithm is used for each file section or content type, improving compression efficiency and transmission quality. Through the flexible configuration of the algorithm repository, it can be quickly adjusted and adapted to different types of files and needs.

[0136] S230, dynamically adjust the actual compression ratio of frequently changing content to the first compression ratio, the first compression ratio being less than the actual compression ratio of frequently changing content;

[0137] The actual compression ratio of the dynamically adjusted stable content is the second compression ratio, which is greater than the actual compression ratio of the stable content and greater than the first compression ratio. The actual compression ratio is the compression ratio used before the dynamic adjustment.

[0138] Specifically, for frequently changing parts, a lower compression ratio can be used to reduce compression and decompression time; for stable parts, a higher compression ratio can be used to reduce data transmission volume.

[0139] By reducing the compression ratio of frequently changing content, the impact on frequent updates can be reduced while ensuring transmission efficiency, thereby improving synchronization efficiency and system response speed. By increasing the compression ratio of stable content, the amount of data transmitted can be significantly reduced, saving bandwidth and storage space. Stable content with a high compression ratio can ensure the efficiency and space utilization of long-term storage, thereby reducing long-term storage costs.

[0140] In this embodiment, the encoding algorithm and compression ratio dynamic adjustment method disclosed in S210-S230, by dynamically adjusting the encoding algorithm and compression ratio, allows the system to optimize the compression strategy according to the actual changes in the file content, ensuring transmission efficiency while reducing data volume. Based on the classification of file content type and change pattern, the system can intelligently select the best encoding algorithm and compression strategy, improving the intelligence level of compression and transmission. Through targeted processing of different content types, efficient transmission of frequently changing parts and high compression of stable content are ensured, improving the overall reliability and stability of file synchronization. The system can dynamically adjust the compression method and ratio according to specific file content and needs, adapting to the needs of different types of files and different scenarios, enhancing the flexibility and adaptability of the system. By adopting different compression strategies for different content types, the system can more effectively utilize bandwidth, storage space, and processing resources, achieving resource optimization.

[0141] Reference Figure 4 The method for determining the optimal transmission path specifically includes the following:

[0142] S510 determines network latency weight, bandwidth weight, and reliability weight based on the application scenario.

[0143] Specifically, the weights of each performance metric (network latency, bandwidth, and reliability) can be determined based on the actual application scenario. For example, for real-time audio and video transmission, network latency may have a higher weight because low latency is crucial for user experience; while for large file transmission, bandwidth may have a higher weight because fast transmission speed is more important. The system can set these weights through configuration files or user input.

[0144] By flexibly setting weights according to different application scenarios, the selection of transmission paths can be more in line with actual needs. Through weight configuration, it can adapt to different business requirements and improve the intelligence and targeting of path selection.

[0145] The S520 obtains the actual bandwidth, actual latency, and actual packet loss rate of multiple target network paths.

[0146] Specifically, specialized network performance testing tools (such as ping, iperf, etc.) can be used to measure the actual bandwidth, latency, and packet loss rate of multiple target network paths. For example, the latency of a path can be obtained through the ping command, the bandwidth limit can be obtained through the iperf test, and the packet loss rate of a path can be determined by continuously sending and receiving data packets.

[0147] By conducting actual measurements, we can obtain real performance data of the paths, avoiding errors caused by relying on theoretical or estimated values. We can also detect the performance of multiple paths in real time, ensuring that the data obtained is accurate and timely, and providing a reliable basis for path selection.

[0148] The S530 obtains bandwidth score, latency score, and packet loss rate score for the corresponding target network path based on actual bandwidth, actual latency, and actual packet loss rate.

[0149] Standardized scoring facilitates subsequent comprehensive evaluation and comparison, avoids the problems of direct calculation of different units, provides a unified framework for comparing the performance of different paths, and increases the objectivity and accuracy of the analysis.

[0150] S540 obtains a total score for each target network path based on network latency weight, bandwidth weight, reliability weight, bandwidth score, latency score, and packet loss rate score, and selects the target network path with the highest total score as the optimal transmission path.

[0151] The optimal path is selected based on the comprehensive score, ensuring the best balance of path selection across multiple performance metrics. By using weighted scoring, the importance of different performance metrics can be effectively combined to select the path that best meets the current application requirements.

[0152] In this embodiment, the optimal transmission path determination method disclosed in S510-S540 can efficiently select the optimal transmission path through actual performance data and weighted scoring, ensuring the efficiency and timeliness of file transmission. It can dynamically set weights according to different application scenarios, ensuring that the selection of the transmission path better meets actual needs, thus enhancing the system's adaptability and flexibility. By comprehensively considering multiple performance indicators such as latency, bandwidth, and packet loss rate, the selected transmission path achieves optimality in multiple dimensions, improving the reliability and stability of transmission. Through dynamic performance detection and scoring calculation, it can intelligently select the best path, improving the intelligence and automation level of path selection. Through a clear scoring system and weighted calculation, users can intuitively understand the basis for path selection, improving the system's transparency and explainability.

[0153] Reference Figure 5 Methods for obtaining bandwidth scores include:

[0154] A100, obtains the maximum actual bandwidth among all target network paths;

[0155] A200, obtains the ratio of the actual bandwidth of a single target network path to the maximum actual bandwidth;

[0156] A300 obtains a bandwidth score based on the ratio and the maximum bandwidth threshold.

[0157] Bandwidth rating: A i , Among them, K i K represents the actual bandwidth of the i-th target network path. max K represents the maximum actual bandwidth among all target network paths, and K is the bandwidth full score threshold.

[0158] In this embodiment, the bandwidth scoring method disclosed in A100-A300 ensures that the bandwidth score is objective and repeatable through actual measurement and numerical proportional calculation, avoiding subjective judgment. The set full score threshold can be adjusted according to different application scenarios, enhancing the flexibility of the bandwidth score and adapting to different types of network needs. The scoring system evaluates the bandwidth performance of each network path, helping the system select the optimal network path, thereby improving the efficiency and quality of data transmission. Each step of the scoring calculation is clear, transparent, and easy to understand, facilitating evaluation and decision-making by system users or administrators, and improving the maintainability of the system. Measurement and scoring can be re-measured and re-scored under different time periods or network conditions to achieve dynamic path optimization, ensuring that the optimal transmission path is always selected under changing network conditions.

[0159] Assuming there are three paths: path A, path B, and path C, with bandwidths of 100Mbps, 80Mbps, and 120Mbps respectively, and assuming a maximum bandwidth score of 10 points, then the bandwidth score for path A is A1, the bandwidth score for path B is A2, and the bandwidth score for path C is A3.

[0160] A1 = (100 / max(100,80,120))*10 = (100 / 120)*10 ≈ 8.33 (points);

[0161] A2 = (80 / max(100,80,120))*10 = (80 / 120)*10 ≈ 6.67 (points);

[0162] A3 = (120 / max(100,80,120))*10 = (120 / 120)*10 = 10 (points).

[0163] Reference Figure 6 Methods for obtaining delayed scores include:

[0164] B100, obtains the maximum and minimum actual latency among all target network paths;

[0165] B200 calculates a latency score based on the actual latency of a single target network path, the maximum actual latency, the minimum actual latency, and the latency maximum threshold.

[0166] Delay rating: B i , Among them, Y i Y represents the actual delay of the i-th target network path. min Y is the minimum actual delay among all target network paths. max Y represents the maximum actual latency across all target network paths, and Y is the latency threshold.

[0167] The latency score acquisition method disclosed in this embodiment ensures that the latency score is objective and repeatable through actual measurement and formulaic calculation, avoiding subjective judgment. The latency score is based on a relative comparison of the maximum and minimum latency values, providing an intuitive comparative reference and facilitating the understanding of the relative performance of each path. The set full score threshold can be adjusted according to different application scenarios, enhancing the flexibility of the latency score and adapting to different types of network requirements. The latency performance of each network path is evaluated based on the scoring system, helping the system select the optimal network path, thereby improving the efficiency and quality of data transmission. Each step of the scoring calculation is clear, transparent, and easy to understand, facilitating evaluation and decision-making by system users or administrators, and improving the maintainability of the system. Measurement and scoring can be re-measured and re-scored under different time periods or network conditions to achieve dynamic path optimization, ensuring that the optimal transmission path is always selected under changing network conditions.

[0168] Assuming there are three paths: path A, path B, and path C, with delays of 20ms, 15ms, and 30ms respectively, and a maximum delay score threshold of 10 points, then the delay score B1 for path A, the delay score B2 for path B, and the delay score B3 for path C can be obtained as follows:

[0169]

[0170] Reference Figure 7 Methods for obtaining packet loss rate scores include:

[0171] C100, obtains the maximum actual packet loss rate among all target network paths;

[0172] C200 calculates a packet loss rate score based on the actual packet loss rate of a single target network path, the maximum actual packet loss rate, and the maximum packet loss rate threshold.

[0173] Packet loss rate score: C i , Among them, D i Let D be the actual packet loss rate of the i-th target network path. max The maximum actual packet loss rate among all target network paths is represented by D, where D is the maximum packet loss rate threshold.

[0174] The packet loss rate scoring method disclosed in this embodiment ensures that the packet loss rate score is objective and repeatable through actual measurement and formulaic calculation, avoiding subjective judgment. The packet loss rate score is based on a relative comparison of the maximum packet loss rate, providing an intuitive comparative reference and facilitating the understanding of the relative performance of each path. The set full score threshold allows for adjustment according to different application scenarios, enhancing the flexibility of the packet loss rate score and adapting to different types of network requirements. The scoring system evaluates the packet loss rate performance of each network path, helping the system select the optimal network path, thereby improving the efficiency and quality of data transmission. Each step of the scoring calculation is clear, transparent, and easy to understand, facilitating evaluation and decision-making by system users or administrators, and improving system maintainability. Measurements and scores can be re-measured and re-scored under different time periods or network conditions, achieving dynamic path optimization and ensuring that the optimal transmission path is always selected under changing network conditions.

[0175] Suppose there are three paths: path A, path B, and path C, with packet loss rates of 0.1%, 0.2%, and 0.05%, respectively. The maximum packet loss rate score is 10 points. We can obtain the latency score C1 for path A, the latency score C2 for path B, and the latency score C3 for path C.

[0176]

[0177] In this embodiment, the total score of the i-th target network path is Q. i :

[0178] Q i =A i ×P1+B i ×P2+C i ×P3;

[0179] P1+P2+P3=1;

[0180] Where P1 is the bandwidth weight, P2 is the network latency weight, and P3 is the reliability weight.

[0181] Assuming there are three paths: path A, path B, and path C, with bandwidth weighted at 0.3, network latency weighted at 0.5, and reliability weighted at 0.2, then the total score Q for path A is... A The total score of path B, Q B The total score of path C, Q C They are as follows:

[0182] Q A =8.33×0.3+8.33×0.5+5×0.2=7.5 (points);

[0183] Q B =6.67×0.3+10×0.5+0×0.2=7.0 (points);

[0184] Q C =10×0.3+5×0.5+7.5×0.2=7 (points).

[0185] Since path A has the highest total score, this target network path is selected as the optimal transmission path.

[0186] Furthermore, the cross-platform file incremental synchronization method disclosed in this application also includes: real-time monitoring of current network information, dynamically adjusting the transmission path and transmission rate when the current network information changes, and performing cross-platform file synchronization with the dynamically adjusted transmission path and transmission rate.

[0187] By monitoring network information changes in real time and selecting the optimal transmission path, we can reduce data packet delay and loss, and improve synchronization speed and stability. Adjusting the transmission rate according to network conditions can avoid network congestion and optimize bandwidth utilization. By dynamically adjusting the transmission path and rate, we can utilize network resources more effectively and reduce unnecessary bandwidth consumption. Optimizing the transmission path and rate can reduce the energy consumption of equipment during data transmission and extend the service life of equipment.

[0188] When the network environment is unstable or changes, it can quickly adjust the transmission strategy to ensure the continuity and integrity of data transmission; dynamically adjusting the transmission path and rate helps reduce packet loss and transmission errors, improving the reliability of data synchronization; users do not need to manually intervene, the system automatically adjusts according to network conditions, providing a seamless file synchronization experience; through real-time monitoring and dynamic adjustment, it ensures the quality and speed of cross-platform file synchronization, enhancing the user experience; whether in Wi-Fi, 4G, 5G or other network environments, it can optimize according to the actual situation to adapt to the needs of different network conditions; it can handle complex network topologies, dynamically select the best transmission path, and improve synchronization efficiency.

[0189] This cross-platform incremental file synchronization method significantly improves the efficiency and reliability of file synchronization, saves resources, and enhances the user experience by monitoring and dynamically adjusting the transmission path and rate in real time. It can automatically optimize in complex network environments, ensuring high-quality and low-latency file synchronization, making it an efficient and intelligent solution.

[0190] Reference Figure 8 The method for dynamically adjusting the transmission path specifically includes the following steps:

[0191] S611 monitors network performance metrics of the optimal transmission path in real time. These network performance metrics include at least one of bandwidth, latency, and packet loss rate.

[0192] Specifically, real-time network monitoring tools (such as iperf for bandwidth, ping for latency, and mtr for packet loss rate) can be used to continuously monitor the network performance metrics of the current optimal transmission path. For example, data can be collected once per second.

[0193] This step allows for real-time collection of network performance data, ensuring the system can quickly respond to changes in the network environment. It also monitors multiple performance indicators, providing comprehensive network status information for easy evaluation.

[0194] S612, when the network performance index is lower than the preset index threshold, remove the path corresponding to the network performance index from multiple target network paths, and record the remaining target network paths as the update path set.

[0195] Specifically, the real-time monitored network performance metrics are compared with preset thresholds. If a metric falls below the preset threshold, the path is removed from the current transmission path set. For example, assuming the preset bandwidth threshold is 100Mbps, the latency threshold is 50ms, and the packet loss rate threshold is 1%, if the bandwidth utilization of the originally optimal transmission path suddenly drops from 50% to 20%, it may be due to network congestion or link failure on that path, in which case the path will be reassessed and switched.

[0196] Suppose there are three potential transmission paths: path A, path B, and path C. Initially, path A is selected as the optimal transmission path, but its performance degrades during transmission. The overall score for paths B and C is recalculated based on current network performance data (calculated according to pre-defined weights for metrics such as bandwidth, latency, and packet loss rate). If the overall score for path B is higher than that for path A, the transmission of some or all file data will be switched to path B.

[0197] By eliminating substandard paths, the stability and reliability of transmission paths are ensured, and transmission paths are dynamically adjusted based on real-time network conditions to improve transmission efficiency.

[0198] S613: Recalculate the total score of all paths in the updated path set based on the current network performance data, and take the path with the highest total score as the updated optimal transmission path.

[0199] Specifically, using the previously mentioned scoring methods of bandwidth, latency, and packet loss rate, the score of each path in the updated path set is calculated, and the path with the highest total score is selected as the new optimal transmission path.

[0200] By comprehensively evaluating various network performance indicators, the system can select the optimal path and choose the best-performing path in real time based on changes in network conditions, thereby improving transmission efficiency.

[0201] S614, transfers file data based on the updated optimal transfer path.

[0202] Specifically, the task of transferring file data is switched to the updated optimal transfer path to ensure the stability and efficiency of the transfer.

[0203] This step enables a rapid switch to a higher-performing path when network conditions change, reducing the risk of transmission interruption, ensuring the consistency and integrity of file data transmission, and preventing data loss or corruption due to path switching.

[0204] The dynamic adjustment method for transmission paths disclosed in this embodiment can monitor and adjust transmission paths in real time to adapt to the ever-changing network environment and ensure the stability and efficiency of transmission. By continuously evaluating network performance, it dynamically selects the optimal path to maximize transmission efficiency and quality. It can react quickly when network performance deteriorates, eliminating poorly performing paths and reducing the possibility of transmission interruption. It comprehensively considers multiple performance indicators such as bandwidth, latency, and packet loss rate to provide a more comprehensive selection of transmission paths. The scoring and path selection logic is clear, which facilitates monitoring and adjustment of strategies by administrators, enhancing the maintainability and controllability of the system.

[0205] This multi-parameter-based evaluation mechanism can more comprehensively and accurately reflect the true state of the network environment, providing a reliable basis for subsequent adjustments to file synchronization strategies. After evaluation, a path selection algorithm based on the overall score can be used to select the optimal path according to network performance indicators, concurrently transmitting file data on the selected network path while dynamically adjusting the transmission path and transmission rate.

[0206] To adapt to different network environments.

[0207] Reference Figure 9 The dynamic adjustment method for transmission rate specifically includes the following schemes:

[0208] S621 acquires network monitoring data in real time, including one or more of the following: queue length and packet loss rate.

[0209] Specifically, network monitoring tools (such as netstat or SNMP) can be used to obtain network performance metrics data in real time. The monitored data may include queue length, packet loss rate, bandwidth utilization, etc.

[0210] This step allows for quick access to the latest network status, ensuring timely feedback for subsequent decision-making. The monitored data enables the system to dynamically adjust, improving the efficiency and stability of network transmission.

[0211] S622, determine whether the monitoring data exceeds the preset index; if so, reduce the transmission rate of the sending end.

[0212] If not, increase the size of the sending window using an exponential growth strategy, and determine whether the size of the sending window has reached a preset threshold. If yes, increase the size of the sending window using a linear growth strategy; otherwise, increase the size of the sending window using an exponential growth strategy.

[0213] Specifically, network congestion can be determined by monitoring metrics such as queue length and packet loss rate. For example, at a router's output port, if the queue length keeps increasing and exceeds a preset threshold, or if the packet loss rate suddenly rises, this indicates that network congestion has occurred.

[0214] When network congestion is detected, the sender reduces the transmission rate. A common approach is to use TCP (Transmission Control Protocol) congestion control mechanisms, such as slow start, congestion avoidance, fast retransmission, and fast recovery algorithms. During the slow start phase, the sender begins sending data with a small window size. As acknowledgments from the receiver continue to return, the window size gradually increases (exponentially) if no congestion is detected, until the congestion avoidance phase, where the window size increases linearly. Once congestion is detected (e.g., packet loss), the sender quickly retransmits lost packets and adjusts the window size, reducing the transmission rate.

[0215] By monitoring network status in real time, the transmission rate can be reduced promptly to minimize network congestion or data loss. This prevents continued high-speed data transmission under poor network conditions, ensuring overall network stability. When network conditions are good, the transmission window is increased exponentially to boost the data transmission rate, ensuring full utilization of network resources and improving network efficiency. If the transmission window size reaches a preset threshold, a linear growth strategy is used to gradually increase the window size to prevent network overload. Linear growth avoids the network burden caused by rapid increases, helping to maintain traffic stability. This achieves stable data transmission rates while facilitating network performance planning and management.

[0216] The dynamic adjustment method for transmission rate disclosed in this embodiment can adapt to changes in network conditions in real time to optimize the efficiency and speed of data transmission. By dynamically adjusting the packet sending rate and sending window, it maximizes the utilization of bandwidth resources, reduces data transmission latency, and can quickly reduce the sending rate when network performance degrades, thereby reducing packet loss. By optimizing the transmission rate, it ensures stable and fast data transmission, improves user satisfaction with network services, effectively controls traffic, helps alleviate network congestion, reduces pressure on network equipment, and improves overall network performance. Through the above mechanism, the system can maintain high efficiency and stability during transmission, ensure data integrity and reliability, and enhance the network's dynamic adjustment capabilities.

[0217] Furthermore, the cross-platform incremental file synchronization method disclosed in this application also includes:

[0218] The integrity of the corresponding file is verified at the target receiving end based on the unique verification information.

[0219] The location information of all compressed blocks in the received file is determined based on all unique identifiers;

[0220] Based on the location information, decompress all compressed blocks in the file to obtain the complete file, and update the file index and metadata at the target receiving end.

[0221] Specifically, the integrity of the compressed blocks is verified using verification information, and the consistency of the compressed blocks is ensured by a unique identifier. The compressed blocks are decompressed into complete files according to their order and position, and the file index and metadata on the target end are updated to ensure the consistency of the file status.

[0222] The scheme disclosed in this embodiment ensures that the file received by the receiving end is completely consistent with the file sent by the sending end through unique verification information (such as MD5, SHA256 hash values), effectively preventing data corruption or loss; it can quickly identify errors that may occur during transmission, rejecting corrupted files and ensuring that users always enjoy high-quality file content; subsequent operations are only performed after the file integrity verification passes, avoiding unnecessary additional processing and optimizing resource utilization; a unique identifier can quickly locate position information, simplifying the subsequent data processing and reconstruction process and improving efficiency; for changed parts, only the corresponding compressed blocks need to be synchronized, avoiding the transmission of the entire file, thereby saving bandwidth and time; it allows the system to flexibly select the file blocks to be synchronized according to specific needs, improving the flexibility and adaptability of file management; by decompressing and reconstructing files one by one through position information, it avoids traditional full file decompression, significantly reducing processing time and memory consumption; it updates the file index and metadata in a timely manner at the receiving end, ensuring that the system status is always accurate and reliable, supporting any subsequent operations (such as searching, retrieval, etc.); only the changed parts and valid indexes need to be updated, avoiding the generation of redundant data and improving storage utilization efficiency.

[0223] The scheme further disclosed in this embodiment only transmits changed file blocks, significantly reducing network bandwidth usage and improving synchronization efficiency; through efficient processing of steps such as verification and decompression, the time required for file synchronization is shortened, enhancing the user experience; through integrity verification and metadata updates, the stability and reliability of the entire synchronization process are improved, reducing problems caused by erroneous transmission; the refined synchronization strategy makes file management more efficient, supports flexible file recovery and version control, and facilitates file management and maintenance for users; this scheme can adapt to different operating system platforms, making file synchronization work more universally adaptable and expanding the potential user base.

[0224] The second aspect of this application discloses a cross-platform incremental file synchronization system, comprising:

[0225] The monitoring module is used to monitor the identified files in real time and obtain file change information.

[0226] The dynamic adjustment module is used to dynamically adjust the encoding algorithm and compression ratio based on file change information to obtain the target encoding algorithm and target compression ratio;

[0227] The processing module is used to process the changed file based on the target encoding algorithm and target compression ratio, assign a unique identifier and unique verification information to the processed file, and obtain the target file data.

[0228] The detection module is used to detect and acquire multiple target network paths;

[0229] The path determination module is used to determine the optimal transmission path among multiple target network paths based on network latency information, bandwidth information, and reliability information.

[0230] The synchronization module is used to transfer target file data along the optimal transmission path.

[0231] It should be noted that the scheme in the cross-platform file incremental synchronization method disclosed in the first aspect of this application is also applicable to the cross-platform file incremental synchronization system disclosed in the second aspect of this application, so it will not be described again here.

[0232] A computer device according to an embodiment of this disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.

[0233] The processor may be a central processing unit (CPU) or other processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory, causing the computer device to perform all or part of the steps of the cross-platform file incremental synchronization method described in the foregoing embodiments of this disclosure.

[0234] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.

[0235] like Figure 10 This is a schematic diagram of a computer device provided for an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the computer device in the embodiments of the present disclosure. Figure 10 The computer device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0236] like Figure 10 As shown, a computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) or programs loaded from storage devices into random access memory (RAM). The RAM also stores various programs and data required for the operation of the computer device. The processor, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0237] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow the computer device to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 10 A computer apparatus with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or included alternatively.

[0238] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the cross-platform file incremental synchronization method of embodiments of this disclosure are performed.

[0239] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.

[0240] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When these non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the cross-platform incremental file synchronization methods described in the foregoing embodiments of the present disclosure are performed.

[0241] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).

[0242] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.

[0243] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0244] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.

[0245] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0246] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0247] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0248] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0249] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A cross-platform incremental file synchronization method, characterized in that, include: Real-time monitoring of identified files to be monitored to obtain file change information; Based on the file change information, the target encoding algorithm and target compression ratio are dynamically obtained; Based on the target encoding algorithm and target compression ratio, the file change information is processed to obtain intermediate file information. A unique identifier and unique verification information are assigned to the intermediate file information to obtain the target file data. Detect and acquire multiple target network paths; Based on network latency information, bandwidth information, and reliability information, the optimal transmission path is determined among multiple target network paths; The target file data is transmitted along the optimal transmission path.

2. The cross-platform file incremental synchronization method according to claim 1, characterized in that, The real-time monitoring identifies the files to be monitored and obtains file change information, including: Identify the files to be monitored; Perform semantic analysis on the file to be monitored to obtain the file's logical structure; The file's logical structure is analyzed based on a difference comparison algorithm to obtain file change information.

3. The cross-platform file incremental synchronization method according to claim 2, characterized in that, The step of performing semantic analysis on the file to be monitored to obtain the file's logical structure includes: When the file to be monitored is a text file, common words or phrases are identified through word frequency statistics, or the file content is repetitive sequence detection is performed using a sequence matching algorithm to obtain the file's logical structure. When the file to be monitored is code, repeating code blocks are identified through sequence matching, or feature extraction technology is used to identify feature patterns in the file content to obtain the file's logical structure. When the file to be monitored is an image, the repeated texture regions in the file content are identified through feature extraction to obtain the file's logical structure.

4. The cross-platform file incremental synchronization method according to claim 1, characterized in that, The step of dynamically obtaining the target encoding algorithm and target compression ratio based on the file change information includes: Based on the file change information, the file content type, frequently changing content, and stable content are determined; the frequently changing content is content whose change frequency is greater than a preset frequency threshold, and the stable content is content whose change frequency is not greater than the preset frequency threshold. Based on the file content type and algorithm repository, dynamically obtain the adjusted target encoding algorithm; The compression ratio of the frequently changing content is dynamically adjusted to a first compression ratio; The compression ratio of the stable content is dynamically adjusted to a second compression ratio, and the second compression ratio is greater than the first compression ratio.

5. The cross-platform file incremental synchronization method according to claim 4, characterized in that, When the file content type is a text file, the target encoding algorithm is a dictionary-based compression algorithm; When the file content type is an image file, the target encoding algorithm is a transformation-based compression algorithm.

6. The cross-platform file incremental synchronization method according to claim 1, characterized in that, The step of determining the optimal transmission path among multiple target network paths based on network latency information, bandwidth information, and reliability information includes: Based on the application scenario, determine the network latency weight, bandwidth weight, and reliability weight; Obtain the actual bandwidth, actual latency, and actual packet loss rate of multiple target network paths; Based on the actual bandwidth, the actual latency, and the actual packet loss rate, obtain the bandwidth score, latency score, and packet loss rate score corresponding to the target network path; Based on the network latency weight, bandwidth weight, reliability weight, bandwidth score, latency score, and packet loss rate score, a total score is obtained for each target network path, and the target network path with the highest total score is selected as the optimal transmission path.

7. The cross-platform file incremental synchronization method according to claim 6, characterized in that, The transmission of the target file data along the optimal transmission path further includes: The system monitors the current network information in real time. When the current network information changes, it dynamically adjusts the transmission path and transmission rate, and uses the dynamically adjusted transmission path and transmission rate to perform cross-platform file synchronization.

8. The cross-platform file incremental synchronization method according to claim 6, characterized in that, The method for obtaining the bandwidth score includes: Obtain the maximum actual bandwidth among all the target network paths; Obtain the ratio of the actual bandwidth of a single target network path to the maximum actual bandwidth; The bandwidth score is obtained based on the ratio and the bandwidth full score threshold. The bandwidth rating is A. i , Among them, K i K represents the actual bandwidth of the i-th target network path. max K represents the maximum actual bandwidth among all the target network paths, and K is the bandwidth full score threshold.

9. The cross-platform file incremental synchronization method according to claim 8, characterized in that, The method for obtaining the delay score includes: Obtain the maximum and minimum actual latency among all the target network paths; The latency score is obtained based on the actual latency of a single target network path, the maximum actual latency, the minimum actual latency, and the latency full score threshold. The delay score is B. i , Among them, Y i Y represents the actual delay of the i-th target network path. min Y is the minimum actual delay among all the target network paths. max Y represents the maximum actual latency among all the target network paths, and Y is the latency full score threshold.

10. The cross-platform file incremental synchronization method according to claim 9, characterized in that, The method for obtaining the packet loss rate score includes: Obtain the maximum actual packet loss rate among all the target network paths; The packet loss rate score is obtained based on the actual packet loss rate of a single target network path, the maximum actual packet loss rate, and the packet loss rate full score threshold. The packet loss rate score is C. i , Among them, D i Let D be the actual packet loss rate of the i-th target network path. max The maximum actual packet loss rate among all the target network paths is given by D, where D is the maximum packet loss rate threshold.

11. The cross-platform file incremental synchronization method according to claim 10, characterized in that, The total score of the i-th target network path is Q. i : Q i =A i ×P1+B i ×P2+C i ×P3; P1+P2+P3=1; Wherein, P1 is the bandwidth weight, P2 is the network latency weight, and P3 is the reliability weight.

12. The cross-platform file incremental synchronization method according to claim 7, characterized in that, The dynamic adjustment of the transmission path includes: Real-time monitoring of network performance metrics of the optimal transmission path, including at least one of bandwidth, latency, and packet loss rate; When the network performance index is lower than the preset index threshold, the path corresponding to the network performance index is removed from the multiple target network paths, and the remaining target network paths are recorded as the update path set; Based on the current network performance data, the total score of all paths in the updated path set is recalculated, and the path with the highest total score is taken as the updated optimal transmission path. Transfer file data based on the updated optimal transfer path.

13. The cross-platform file incremental synchronization method according to claim 7, characterized in that, The dynamic adjustment of the transmission rate includes: Real-time acquisition of network monitoring data, including one or more of queue length and packet loss rate; Determine whether the monitored data exceeds a preset indicator; if so, reduce the transmission rate of the sending end. If not, increase the size of the sending window using an exponential growth strategy, and determine whether the size of the sending window has reached a preset threshold. If so, increase the size of the sending window using a linear growth strategy.

14. The cross-platform file incremental synchronization method according to claim 1, characterized in that, The cross-platform incremental file synchronization method also includes: The integrity of the corresponding file is verified at the target receiving end based on the unique verification information. The location information of all compressed blocks in the received file is determined based on all the aforementioned unique identifiers; Based on the location information, all compressed blocks in the file are decompressed to obtain the complete file, and the file index and metadata of the target receiving end are updated.

15. A computer device, characterized in that, The computer device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the cross-platform file incremental synchronization method according to any one of claims 1-14.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the cross-platform file incremental synchronization method as described in any one of claims 1-14.

17. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1-14.

Citation Information

Patent Citations

  • Equipment updating method, device and system, storage medium and computer equipment

    CN110233904A

  • Asynchronous file transmission system based on message middleware

    CN118509429A