Cross-platform file incremental synchronization method, computer device, medium and product
By monitoring file changes and network conditions in real time, and dynamically selecting encoding algorithms and network paths, cross-platform file incremental synchronization is achieved, solving the problems of transmission stability and low efficiency, and improving the efficiency and reliability of file transfer.
Patent Information
- Application Number
- CN202411529691.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing cross-platform file transfer methods cannot dynamically adapt to different network environments, resulting in poor transmission stability and low efficiency.
By monitoring file change information in real time, dynamically obtaining the target encoding algorithm and compression ratio, detecting and selecting the optimal network path, realizing incremental synchronization of file.
It significantly reduces the amount of data transmission, improves synchronization efficiency, saves bandwidth and time, ensures the integrity and reliability of file transfers, adapts to different network environments and operating systems, and achieves seamless file synchronization.
Smart Images

Figure CN119254769A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of file transmission technology, and in particular to a cross-platform file incremental synchronization method, computer device, medium, and product. Background Art
[0002] In the current digital age, file synchronization and transfer are key requirements for cross-platform collaboration, remote work, and multi-device synchronization. With the popularity of cloud computing and mobile devices, users need to synchronize and transfer files efficiently and stably between 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, resulting in compatibility issues when files are transferred across platforms; 2) Network environment diversity: Users transfer files through different network environments (such as Wi-Fi, mobile data, VPN, etc.), and the bandwidth, latency, and stability of these network environments vary, posing challenges to the efficiency and reliability of file transfer; 3) Data volume and transfer speed: As file size increases, traditional file transfer methods are often inefficient, especially under poor network conditions, the transfer speed will be seriously affected.
[0003] Existing solutions, such as FTP, HTTP / HTTPS, and cloud storage services, although they meet the needs of file transfer to a certain extent, are unable to dynamically adapt to different network environments, resulting in poor stability and low efficiency during cross-platform transmission. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide 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 the cross-platform transmission method disclosed in the prior art to dynamically adapt to different network environments.
[0005] In a first aspect, an embodiment of the present disclosure provides a cross-platform file incremental synchronization method, including:
[0006] Monitor the files to be monitored in real time and obtain file change information;
[0007] Based on the file change information, dynamically obtain a target encoding algorithm and a target compression ratio;
[0008] Processing the file change information based on the target encoding algorithm and the target compression ratio to obtain intermediate file information, assigning a unique identifier and unique verification information to the intermediate file information, and obtaining target file data;
[0009] Detect and obtain multiple target network paths;
[0010] Determining an optimal transmission path among a plurality of target network paths according to the network delay information, the bandwidth information and the reliability information;
[0011] The target file data is transmitted on the optimal transmission path.
[0012] Optionally, the real-time monitoring of the determined files to be monitored and obtaining file change information includes:
[0013] Identify the files to be monitored;
[0014] Performing semantic analysis on the file to be monitored to obtain the logical structure of the file;
[0015] The file logical structure is analyzed based on a difference comparison algorithm to obtain file change information.
[0016] Optionally, performing semantic analysis on the file to be monitored to obtain a file 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 a sequence matching algorithm is used to perform repeated sequence detection on the file content to obtain the file logical structure;
[0018] When the file to be monitored is a code, repeated code blocks are identified through sequence matching, or feature extraction technology is used to identify feature patterns of the file content to obtain the file logical structure;
[0019] When the file to be monitored is an image, repeated texture areas in the file content are identified through feature extraction to obtain the file logical structure.
[0020] Optionally, dynamically obtaining a target encoding algorithm and a target compression ratio based on the file change information includes:
[0021] Based on the file change information, determine the file content type, frequently changing content, and stable content; 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] Dynamically obtain an adjusted target encoding algorithm according to the file content type and the algorithm repository;
[0023] Dynamically adjusting the compression ratio of the frequently changing content 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 the plurality of target network paths according to the network delay information, the bandwidth information and the reliability information includes:
[0028] Based on the application scenario, determine the network delay weight, bandwidth weight, and reliability weight;
[0029] Obtaining actual bandwidth, actual delay, and actual packet loss rate of multiple target network paths;
[0030] Based on the actual bandwidth, the actual delay, and the actual packet loss rate, obtain a bandwidth score, a delay score, and a packet loss rate score corresponding to the target network path;
[0031] Based on the network delay weight, the bandwidth weight, the reliability weight, the bandwidth score, the delay score, and the packet loss rate score, a total score of each target network path is obtained, and the target network path with the highest total score is used as the optimal transmission path.
[0032] Optionally, transmitting the target file data on the optimal transmission path further includes:
[0033] The current network information is monitored in real time, and when the current network information changes, the transmission path and the transmission rate are dynamically adjusted, and the files are synchronized across platforms with the dynamically adjusted transmission path and transmission rate.
[0034] Optionally, the method for obtaining the bandwidth score includes:
[0035] Obtaining the maximum actual bandwidth of all the target network paths;
[0036] Obtaining a ratio of an actual bandwidth of a single target network path to a maximum actual bandwidth;
[0037] Based on the ratio and the bandwidth full score threshold, obtaining the bandwidth score;
[0038] The bandwidth score is A i , Among them, K i is the actual bandwidth of the i-th target network path, K max is 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 delayed score includes:
[0040] Obtaining the maximum actual delay and the minimum actual delay among all the target network paths;
[0041] Obtaining the delay score based on the actual delay of a single target network path, the maximum actual delay, the minimum actual delay, and the delay full score threshold;
[0042] The delay score is B i , Among them, Y i is the actual delay of the ith target network path, Y min is the minimum actual delay among all the target network paths, Y max is the maximum actual delay among all the target network paths, and Y is the delay full score threshold.
[0043] Optionally, the method for obtaining the packet loss rate score includes:
[0044] Obtaining the maximum actual packet loss rate among all the target network paths;
[0045] Obtaining the 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 packet loss rate full score threshold;
[0046] The packet loss rate score is C i , Among them, D i is the actual packet loss rate of the i-th target network path, D max is the maximum actual packet loss rate among all the target network paths, and D is the full score threshold of the packet loss rate.
[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] Among them, P1 is the bandwidth weight, P2 is the network delay weight, and P3 is the reliability weight.
[0051] Optionally, the dynamically adjusting the transmission path includes:
[0052] Monitoring network performance indicators of the optimal transmission path in real time, wherein the network performance indicators include at least one of bandwidth, delay, and packet loss rate;
[0053] When the network performance indicator is lower than a preset indicator threshold, the path corresponding to the network performance indicator is removed from the plurality of target network paths, and the remaining target network paths are recorded as an updated path set;
[0054] Recalculate the total scores of all paths in the updated path set according to the current network performance data, and use the path with the highest total score as the updated optimal transmission path;
[0055] The file data is transmitted based on the updated optimal transmission path.
[0056] Optionally, the dynamically adjusting the transmission rate includes:
[0057] Acquire network monitoring data in real time, wherein the monitoring data includes one or more of queue length and packet loss rate;
[0058] Determine whether the monitoring data exceeds a preset index, and 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 reaches 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] Verifying the integrity of the corresponding file at the target receiving end based on the unique verification information;
[0062] Determine location information of all compressed blocks in the received file based on all the unique identifiers;
[0063] All compressed blocks in the file are decompressed based on the position information to obtain the complete file, and the file index and metadata of the target receiving end are updated.
[0064] In a second aspect, the embodiment of the present disclosure further provides a cross-platform file incremental synchronization system, including:
[0065] The monitoring module is used to monitor the files to be monitored in real time and obtain file change information;
[0066] A dynamic adjustment module, used to dynamically adjust the encoding algorithm and the compression ratio based on the file change information to obtain a target encoding algorithm and a target compression ratio;
[0067] A processing module, used to process the changed file based on the target encoding algorithm and the target compression ratio, assign a unique identifier and unique verification information to the processed file, and obtain target file data;
[0068] A detection module, used to detect and obtain multiple target network paths;
[0069] A path determination module, used to determine an optimal transmission path among a plurality of target network paths according to network delay information, bandwidth information and reliability information;
[0070] A synchronization module is used to transmit the target file data on the optimal transmission path.
[0071] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:
[0072] YY+242267P
[0073] The computer device comprises:
[0074] at least one processor; and,
[0075] a memory communicatively connected to the at least one processor; wherein,
[0076] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above-mentioned cross-platform file incremental synchronization methods.
[0077] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned cross-platform file incremental synchronization methods.
[0078] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0079] The cross-platform file incremental synchronization method disclosed in the present application only synchronizes the changed part of the file instead of the entire file, which significantly reduces the data transmission volume, improves the synchronization efficiency, and saves bandwidth and time; dynamically selects the optimal encoding algorithm and compression ratio according to the file change information, further reduces the amount of transmitted data and improves the synchronization efficiency; selects the optimal transmission path based on network delay, bandwidth and reliability information, which can maximize the use of available bandwidth and reduce the waste of network resources. Dynamic encoding and compression reduce the server and client resources required for processing and transmission, reduce overall energy consumption and hardware costs, and assign unique identifiers and verification information to processed files to ensure the integrity and accuracy of the file and prevent errors or damage during data transmission. The method disclosed in this embodiment provides a seamless file synchronization experience by automatically selecting the optimal transmission path and dynamically adjusting the encoding algorithm without manual intervention. It can adapt to different network environments and conditions, is suitable for different operating systems and platforms, realizes cross-platform file synchronization, meets diverse application scenarios, and ensures the real-time and high efficiency of file synchronization.
[0080] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0082] Figure 1 A flowchart of a cross-platform file incremental synchronization method provided in an embodiment of the present disclosure.
[0083] Figure 2 A flowchart of a method for obtaining file change information provided in an embodiment of the present disclosure.
[0084] Figure 3 A flowchart of a coding algorithm and a method for dynamically adjusting a compression ratio provided in an embodiment of the present disclosure.
[0085] Figure 4 A flowchart of a method for determining an optimal transmission path provided in an embodiment of the present disclosure.
[0086] Figure 5 A schematic diagram of a flow chart of a method for obtaining a bandwidth score provided in an embodiment of the present disclosure.
[0087] Figure 6 A flowchart of a method for obtaining a delayed score provided in an embodiment of the present disclosure.
[0088] Figure 7 A flowchart of a method for obtaining a packet loss rate score provided in an embodiment of the present disclosure.
[0089] Figure 8 A schematic flow chart of a method for dynamically adjusting a transmission path provided in an embodiment of the present disclosure.
[0090] Fig. 9 A schematic diagram of a flow chart of a method for dynamically adjusting a transmission rate provided in an embodiment of the present disclosure.
[0091] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0092] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0093] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0094] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0095] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0096] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0097] Reference Figure 1 , the present application discloses a cross-platform file incremental synchronization method, comprising:
[0098] S100, monitoring the determined files to be monitored in real time, and obtaining file change information.
[0099] Among them, the directory that needs to monitor file changes can be determined by issuing source-side policies. Usually, the set monitoring directory can be flexibly configured according to user needs; specifically, a file listener (Apache commons-io) is created according to the source-side policy to monitor file changes. Here, obtaining file change information refers to extracting only the changed part.
[0100] This step allows real-time response to file changes, avoids periodic polling of the file system, and reduces unnecessary consumption of system resources.
[0101] S200, dynamically obtaining a target encoding algorithm and a target compression ratio based on the file change information.
[0102] Dynamically adjusting the encoding and compression methods can minimize the amount of data while ensuring transmission efficiency, select the most appropriate processing method for different types of files, and improve the overall transmission and processing efficiency.
[0103] S300, processing the file change information based on the target encoding algorithm and the target compression ratio, obtaining the intermediate file information, allocating a unique identifier and unique verification information to the intermediate file information, and obtaining the target file data.
[0104] 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 target end; calculating the verification information (such as a hash value) of each compressed block to verify that the compressed block has not been tampered with or damaged during transmission.
[0105] Through compression processing, the size of file data can be significantly reduced, thereby saving storage space and transmission bandwidth; assigning unique identifiers and verification information ensures the accuracy of the data and can be easily verified at the receiving end, improving the security and reliability of data transmission.
[0106] S400, detecting and acquiring multiple target network paths.
[0107] 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.
[0108] Furthermore, network detection tools (such as ping, traceroute or professional network performance monitoring tools) can be used to evaluate available network paths. Multiple available network interfaces or VPN connections can be detected to obtain information such as the delay, bandwidth and reliability of each network path, and several available network paths can be obtained through these detection results.
[0109] S500, determining an optimal transmission path among multiple target network paths according to network delay information, bandwidth information and reliability information.
[0110] This step ensures that files are transmitted under optimal network conditions, reduces data transmission time, increases file synchronization speed, and dynamically selects paths based on changes in network conditions, which has strong adaptability and improves the reliability of file synchronization.
[0111] S600: Transmit target file data on the optimal transmission path.
[0112] Through this step, files can be guaranteed to be 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 multiple environments.
[0113] The cross-platform file incremental synchronization method disclosed in the present application only synchronizes the changed parts of the file instead of the entire file, which significantly reduces the data transmission volume, improves the synchronization efficiency, and saves bandwidth and time; dynamically adjusts the encoding algorithm and compression ratio according to the file change information, further optimizes the transmission efficiency and storage space, can detect and select the optimal network path for file transfer, and ensures efficient and reliable file synchronization under different network conditions; monitors the network status in real time, and dynamically adjusts the transmission path and rate according to network changes to ensure the continuity and stability of file synchronization, assigns unique identifiers and verification information to the processed files, ensures the integrity and accuracy of the files, and prevents errors or damage during data transmission. By selecting a high-reliability, low-latency and broadband network path, the reliability and stability of file transmission are improved, and it is suitable for different operating systems and platforms, realizing cross-platform file synchronization, meeting a variety of application scenarios, and ensuring the real-time and high-efficiency of file synchronization.
[0114] In summary, this cross-platform file incremental synchronization method not only improves the efficiency and reliability of file synchronization, but also enhances the flexibility and wide applicability of the system, providing users with an efficient, reliable and real-time file synchronization solution.
[0115] Reference Figure 2 , a method for obtaining file change information, specifically comprising the following steps:
[0116] S110, determining the file to be monitored.
[0117] Specifically, the system needs to identify which files need to be monitored, and can specify the files or directories to be monitored through configuration files, database records, or command line parameters; for example, if the user wants to monitor all files under a project directory, the system can recursively traverse the directory, list all subdirectories and files, and mark these files as files to be monitored.
[0118] In this step, the files that need to be monitored are accurately determined to avoid meaningless consumption of system resources. The monitoring targets can be flexibly selected through configuration to meet different business needs.
[0119] S120, performing semantic analysis on the file to be monitored to obtain the logical structure of the file.
[0120] Specifically, semantic analysis is performed on the file content to identify the logical structure of the file, such as paragraphs and chapters in text files, functions and classes in code files, etc. Pattern recognition technology is used for different types of files to detect repeated patterns or common structures in the file content, such as using statistical methods to analyze the frequency distribution of characters, words or pixels in the file content to identify high-frequency patterns.
[0121] Furthermore, when the file to be monitored is a text file, common words or phrases can be identified through word frequency statistics, or a sequence matching algorithm, such as the longest common subsequence (LCS) or dynamic programming, can be used to perform repeated sequence detection on the changed file content to obtain the changed file logical structure.
[0122] When the file to be monitored is code, repeated code blocks are identified through sequence matching, or feature extraction technology is used to identify feature patterns of the changed file content to obtain the changed file logical structure, such as edge detection or texture analysis in image processing, to identify feature patterns in the file content.
[0123] When the file to be monitored is an image, repeated texture areas in the changed file content can be identified through feature extraction to obtain the changed file logical structure.
[0124] In this step, the logical structure of the file is extracted through semantic analysis, rather than focusing only on physical changes, which better reflects the actual changes in the file content, provides richer contextual information for subsequent difference comparisons, and improves the accuracy and intelligence of the comparison.
[0125] S130, using a difference comparison algorithm to analyze the file logical structure to obtain file change information.
[0126] Among them, the difference comparison algorithm can preferably use the Diff algorithm to detect slight modifications of the file content and identify which parts have changed.
[0127] Through differential comparison, substantial changes in files can be accurately identified to avoid the transmission of useless information. At the same time, clear change reports can be provided to facilitate users and systems to understand and process subsequent file synchronization operations.
[0128] Furthermore, the changed files can be determined by analyzing and judging at different time intervals. Then, in the process of analyzing the logical structure of the file 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 file before and after the change. This method is more efficient when processing large files or when the file structure has certain regularities. For example, in an HTML file, there are multiple similar code blocks, such as multiple The block-based Diff algorithm identifies these similar blocks and more accurately detects which blocks have changed, rather than simply adding each The content within the tags is compared row by row.
[0129] In this embodiment, the method for obtaining file change information disclosed in S110-S130 can accurately capture substantial changes in files through real-time monitoring and semantic analysis, 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, improve the intelligence level of file synchronization, and enhance the adaptability and flexibility of the system; through detailed difference reports, the system can provide detailed information on file changes, ensure the accuracy and reliability of synchronization operations, and avoid potential errors and conflicts; real-time monitoring of file changes and real-time analysis and processing ensure rapid response and timely updating of the file synchronization process, and improve the real-time performance of the system; detailed difference reports and intelligent processing enable users to easily understand and track file changes, and improve the ease of use and friendliness of the system.
[0130] Reference Figure 3 , the method for dynamically adjusting the encoding algorithm and the compression ratio specifically includes:
[0131] S210, based on the file change information, determine the file content type, frequently changing content, and stable content; wherein 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.
[0132] Through classification analysis, we can more accurately identify the different content types and change patterns of files, provide a basis for subsequent encoding and compression adjustments, distinguish between frequently changing content and stable content in files, and help optimize compression strategies. While ensuring compression efficiency, we can minimize the impact on frequently changing content.
[0133] S220, dynamically acquiring an adjusted target encoding algorithm according to the file content type and the algorithm repository.
[0134] 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.
[0135] Specifically, the dictionary-based compression algorithm may be LZ77 or LZ78; the transformation-based compression algorithm may be JPEG or PNG.
[0136] Dynamically select encoding algorithms to ensure that each file part or content type uses the most suitable algorithm, improving compression efficiency and transmission effects. Through the flexible configuration of the algorithm repository, it can quickly adjust and adapt to different types of files and needs.
[0137] S230, dynamically adjusting the actual compression ratio of the frequently changing content to a first compression ratio, wherein the first compression ratio is smaller than the actual compression ratio of the frequently changing content;
[0138] The actual compression ratio of the stable content is dynamically adjusted to a second compression ratio, the second compression ratio is greater than the actual compression ratio of the stable content, and the second compression ratio is greater than the first compression ratio, wherein the actual compression ratio is the compression ratio used before the dynamic adjustment.
[0139] Specifically, for a frequently changing portion, a lower compression ratio may be used to reduce compression and decompression time; for a stable portion, a higher compression ratio may be used to reduce the amount of data transmission.
[0140] By lowering the compression ratio of frequently changing content, we can reduce the impact of frequent updates while ensuring transmission efficiency, thereby improving synchronization efficiency and system response speed; by increasing the compression ratio of stable content, we can significantly reduce the amount of data transmission, save bandwidth and storage space, and stable content with a high compression ratio can ensure long-term storage efficiency and space utilization, reducing long-term storage costs.
[0141] In this embodiment, the dynamic adjustment method of the encoding algorithm and compression ratio disclosed in S210-S230, by dynamically adjusting the encoding algorithm and compression ratio, the system can optimize the compression strategy according to the actual changes in the file content, which not only ensures the transmission efficiency but also reduces the amount of data; 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, thereby improving the overall reliability and stability of file synchronization; the system can dynamically adjust the compression method and ratio according to the specific file content and requirements, adapt to different types of files and different scenarios, and enhance 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 the effect of resource optimization.
[0142] Reference Figure 4 , the method for determining the optimal transmission path specifically includes the following contents:
[0143] S510, determining a network delay weight, a bandwidth weight, and a reliability weight based on an application scenario.
[0144] Specifically, the weights of various performance indicators (network latency, bandwidth, and reliability) can be determined based on the actual application scenario. For example, for real-time audio and video transmission, the weight of network latency may be larger because low latency is critical to user experience; while for large file transmission, the weight of bandwidth may be larger because fast transmission speed is more important. The system can set these weights through configuration files or user input.
[0145] Flexibly set weights according to different application scenarios to ensure that the selection of transmission paths is more in line with actual needs. Through weight configuration, it can adapt to different business needs and improve the intelligence and pertinence of path selection.
[0146] S520, obtaining actual bandwidth, actual delay, and actual packet loss rate of multiple target network paths.
[0147] Specifically, you can use specialized network performance detection tools (such as ping, iperf, etc.) to measure the actual bandwidth, latency, and packet loss rate of multiple target network paths. For example, you can use the ping command to obtain the path latency, use the iperf test to obtain the bandwidth limit, and use continuous data packet sending and receiving to measure the path packet loss rate.
[0148] Through actual measurement, the real performance data of the path is obtained, avoiding the errors caused by relying on theoretical values or estimated values. The performance of multiple paths is detected in real time to ensure that the data obtained is accurate and timely, providing a reliable basis for path selection.
[0149] S530, based on the actual bandwidth, the actual delay, and the actual packet loss rate, a bandwidth score, a delay score, and a packet loss rate score of the corresponding target network path are obtained.
[0150] Standardized scoring facilitates subsequent comprehensive evaluation and comparison, avoids direct calculation problems of different dimensions, provides a unified framework to compare the performance of different paths, and increases the objectivity and accuracy of the analysis.
[0151] S540, based on the network delay weight, bandwidth weight, reliability weight, bandwidth score, delay score, and packet loss rate score, obtain a total score for each target network path, and use the target network path with the highest total score as the optimal transmission path.
[0152] Selecting the optimal path based on the comprehensive score ensures the optimal balance of path selection in multi-dimensional performance indicators. Through weighted scoring, the importance of different performance indicators can be effectively combined to select the path that best meets the current application needs.
[0153] In this embodiment, the method for determining the optimal transmission path disclosed in S510-S540 can efficiently select the optimal transmission path through actual performance data and weighted scoring, thereby ensuring the efficiency and timeliness of file transmission; weights can be dynamically set according to different application scenarios to ensure that the selection of the transmission path is more in line with actual needs, thereby enhancing the adaptability and flexibility of the system; by comprehensively considering multiple performance indicators such as delay, bandwidth, and packet loss rate, the selected transmission path is optimal in multiple dimensions, thereby improving the reliability and stability of transmission; through dynamic performance detection and scoring calculation, the best path can be intelligently selected, thereby 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, thereby improving the transparency and explainability of the system.
[0154] Reference Figure 5 , a method for obtaining a bandwidth score includes:
[0155] A100, obtains the maximum actual bandwidth among all target network paths;
[0156] A200, obtains the ratio of the actual bandwidth of a single target network path to the maximum actual bandwidth;
[0157] A300, based on the ratio and bandwidth full score threshold, obtains bandwidth score.
[0158] Bandwidth rating is A i , Among them, K i is the actual bandwidth of the i-th target network path, K max is the maximum actual bandwidth among all target network paths, and K is the bandwidth full score threshold.
[0159] In this embodiment, the method for obtaining the bandwidth score disclosed by A100-A300 ensures that the bandwidth score is objective and repeatable through actual measurement and numerical value-based proportional calculation, avoiding subjective assumptions; the set full score threshold allows adjustment according to different application scenarios, enhancing the flexibility of the bandwidth score and being able to adapt to different types of network requirements; the bandwidth performance of each network path is evaluated based on the scoring system to help the system select the best network path, thereby improving the efficiency and quality of data transmission; each step of the scoring calculation is clear and transparent, easy to understand, convenient for system users or managers to evaluate and make decisions, and improves the maintainability of the system; re-measurement and scoring can be performed in different time periods or network conditions to achieve dynamic path optimization, ensuring that the best transmission path is always selected under changing network conditions.
[0160] Assume that there are three paths: path A, path B, and path C, with bandwidths of 100 Mbps, 80 Mbps, and 120 Mbps respectively. Assume that the bandwidth score threshold is 10 points. Then, the bandwidth score of path A is A1, the bandwidth score of path B is A2, and the bandwidth score of path C is A3:
[0161] A1=(100 / max(100,80,120))*10=(100 / 120)*10≈8.33(points);
[0162] A2=(80 / max(100,80,120))*10=(80 / 120)*10≈6.67(points);
[0163] A3=(120 / max(100,80,120))*10=(120 / 120)*10=10(minutes).
[0164] Reference Figure 6 , the delayed scoring acquisition method includes:
[0165] B100, obtains the maximum actual delay and the minimum actual delay among all target network paths;
[0166] B200,obtains 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 full score threshold.
[0167] Latency Rating: B i , Among them, Y i is the actual delay of the ith target network path, Y min is the minimum actual delay among all target network paths, Y max is the maximum actual delay among all target network paths, and Y is the delay full score threshold.
[0168] The delay scoring acquisition method disclosed in this embodiment ensures that the delay scoring is objective and repeatable through actual measurement and formulaic calculation, avoiding subjective assumptions; the delay scoring is based on the relative comparison of the maximum and minimum delay values, providing an intuitive comparative reference, which is convenient for understanding the relative performance of each path; the set full score threshold allows adjustment according to different application scenarios, enhancing the flexibility of the delay scoring and being able to adapt to different types of network requirements; the delay performance of each network path is evaluated based on the scoring system, helping the system to select the best network path, thereby improving the efficiency and quality of data transmission; each step of the scoring calculation is clear and transparent, easy to understand, convenient for system users or managers to evaluate and make decisions, and improves the maintainability of the system; re-measurement and scoring can be performed in different time periods or network conditions to achieve dynamic path optimization, ensuring that the best transmission path is always selected under changing network conditions.
[0169] Assume that there are three paths: path A, path B, and path C, with delays of 20ms, 15ms, and 30ms respectively, and the full delay score threshold is 10 points. Then, the delay score B1 of path A, the delay score B2 of path B, and the delay score B3 of path C can be obtained:
[0170]
[0171] Reference Figure 7 , a method for obtaining a packet loss rate score includes:
[0172] C100, obtains the maximum actual packet loss rate among all target network paths;
[0173] C200,obtains 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 packet loss rate full score threshold.
[0174] Packet loss rate score is C i , Among them, D i is the actual packet loss rate of the i-th target network path, D max is the maximum actual packet loss rate among all target network paths, and D is the full score threshold of packet loss rate.
[0175] The method for obtaining the packet loss rate score disclosed in this embodiment ensures that the packet loss rate score is objective and repeatable through actual measurement and formulaic calculation, avoiding subjective assumptions; the packet loss rate score is based on the relative comparison of the maximum packet loss rate, providing an intuitive comparison reference, which is convenient for understanding the relative performance of each path; the set full score threshold allows adjustment according to different application scenarios, enhancing the flexibility of the packet loss rate score, and being able to adapt to different types of network requirements; the packet loss rate performance of each network path is evaluated based on the scoring system, helping the system to select the best network path, thereby improving the efficiency and quality of data transmission; each step of the score calculation is clear and transparent, easy to understand, convenient for system users or managers to evaluate and make decisions, and improves the maintainability of the system; re-measurement and scoring can be performed in different time periods or network conditions to achieve dynamic path optimization, ensuring that the best transmission path is always selected under changing network conditions.
[0176] Assume that there are three paths: path A, path B, and path C, with packet loss rates of 0.1%, 0.2%, and 0.05% respectively, and the packet loss rate full score threshold is 10 points. We can obtain the delay score C1 of path A, the delay score C2 of path B, and the delay score C3 of path C:
[0177]
[0178] In this embodiment, the total score of the i-th target network path is Q i :
[0179] Q i =A i ×P1+B i ×P2+C i ×P3;
[0180] P1+P2+P3=1;
[0181] Among them, P1 is the bandwidth weight, P2 is the network delay weight, and P3 is the reliability weight.
[0182] Assume that there are three paths: path A, path B, and path C, with a bandwidth weight of 0.3, a network delay weight of 0.5, and a reliability weight of 0.2. The total score Q of path A is A 、The total score Q of path B B 、The total score Q of path C C They are as follows:
[0183] Q A =8.33×0.3+8.33×0.5+5×0.2=7.5 (points);
[0184] Q B =6.67×0.3+10×0.5+0×0.2=7.0 (points);
[0185] Q C =10×0.3+5×0.5+7.5×0.2=7(mins).
[0186] Because path A has the highest total score, the target network path is taken as the optimal transmission path.
[0187] Furthermore, the cross-platform incremental file synchronization method disclosed in the present 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 synchronization of files with the dynamically adjusted transmission path and transmission rate.
[0188] By real-time monitoring of changes in network information and selecting the best transmission path, packet delay and loss can be reduced, and synchronization speed and stability can be improved; the transmission rate can be adjusted according to network conditions to avoid network congestion and optimize bandwidth utilization; by dynamically adjusting the transmission path and rate, network resources can be used more effectively and unnecessary bandwidth consumption can be reduced; optimizing the transmission path and rate can reduce the energy consumption of the device during data transmission and extend the service life of the device.
[0189] 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 adjust the transmission path and rate to help reduce packet loss and transmission errors, and improve the reliability of data synchronization; the user does not need to intervene manually, the system automatically adjusts according to network conditions to provide a seamless file synchronization experience; through real-time monitoring and dynamic adjustment, the quality and speed of cross-platform file synchronization are ensured to enhance the user experience; whether in Wi-Fi, 4G, 5G or other network environments, it can be optimized according to actual conditions 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.
[0190] This cross-platform incremental file synchronization method significantly improves the efficiency and reliability of file synchronization, saves resources, and enhances user experience by real-time monitoring and dynamic adjustment of transmission paths and rates. It can automatically optimize in complex network environments to ensure high quality and low latency of file synchronization, and is an efficient and intelligent solution.
[0191] Reference Figure 8 , a method for dynamically adjusting a transmission path, specifically comprising the following steps:
[0192] S611, monitor the network performance indicators of the optimal transmission path in real time, where the network performance indicators include at least one of bandwidth, delay, and packet loss rate.
[0193] 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 network performance indicators of the current optimal transmission path. For example, data can be collected once per second.
[0194] Through this step, network performance data can be collected in real time to ensure that the system can quickly respond to changes in the network environment. Multiple performance indicators can be monitored at the same time to provide comprehensive network status information for comprehensive evaluation.
[0195] S612, when the network performance indicator is lower than a preset indicator threshold, the path corresponding to the network performance indicator is removed from the multiple target network paths, and the remaining target network paths are recorded as an updated path set.
[0196] Specifically, the network performance indicators monitored in real time are compared with the preset thresholds. If a certain indicator is lower than the preset threshold, the path is removed from the current transmission path set. For example, assuming that the preset bandwidth threshold is 100Mbps, the delay threshold is 50ms, and the packet loss rate threshold is 1%, and assuming that the bandwidth utilization of the original optimal transmission path suddenly drops from 50% to 20%, it may be due to network congestion or link failure on the path, so the path is re-evaluated and switched.
[0197] Assume that there are three potential transmission paths: path A, path B, and path C. Path A is initially selected as the optimal transmission path, but during the transmission process, the performance of path A degrades. The total scores of path B and path C are recalculated based on the current network performance data (calculated based on the weights of pre-set indicators such as bandwidth, latency, and packet loss rate). If the total score of path B is higher than that of path A, the transmission of some or all file data will be switched to path B.
[0198] By eliminating paths that do not meet performance standards, the stability and reliability of the transmission path are ensured, and the transmission path is dynamically adjusted according to real-time network conditions to improve transmission efficiency.
[0199] S613, recalculate the total scores of all paths in the updated path set according to the current network performance data, and use the path with the highest total score as the updated optimal transmission path.
[0200] Specifically, the previously mentioned scoring methods for bandwidth, delay, and packet loss rate are used to calculate the score of each path in the updated path set, and the path with the highest total score is selected as the new optimal transmission path.
[0201] Through comprehensive scoring, we can comprehensively consider various network performance indicators and select the optimal path. We can also select the path with the best performance in real time according to changes in network conditions to improve transmission efficiency.
[0202] S614: Transmit the file data based on the updated optimal transmission path.
[0203] Specifically, the task of file data transmission is switched to the updated optimal transmission path to ensure the stability and efficiency of the transmission.
[0204] Through this step, when the network conditions change, it is possible to quickly switch to a path with better performance, reduce the risk of transmission interruption, ensure the consistency and integrity of file data transmission, and avoid data loss or damage due to path switching.
[0205] The dynamic adjustment method of the transmission path disclosed in this embodiment can monitor and adjust the transmission path in real time, adapt to the ever-changing network environment, and ensure the stability and efficiency of transmission; dynamically select the optimal path by continuously evaluating network performance to maximize transmission efficiency and quality; respond quickly when network performance degrades to eliminate paths with poor performance and reduce the possibility of transmission interruption; comprehensively consider multiple performance indicators such as bandwidth, delay and packet loss rate to provide more comprehensive transmission path selection; the logic of scoring and path selection is clear, which is convenient for managers to monitor and adjust strategies, and enhances the maintainability and controllability of the system.
[0206] This multi-parameter-based evaluation mechanism can more comprehensively and accurately reflect the real state of the network environment, providing a reliable basis for subsequent file synchronization strategy adjustments. After the evaluation, the path selection algorithm based on the total score can be used to select the best path according to the network performance indicators, and the file data can be transmitted concurrently on the selected network path, while dynamically adjusting the transmission path and transmission rate.
[0207] To adapt to different network environments.
[0208] Reference Fig. 9 , the dynamic adjustment method of the transmission rate specifically includes the following schemes:
[0209] S621, acquiring network monitoring data in real time, where the monitoring data includes one or more of queue length and packet loss rate.
[0210] Specifically, network monitoring tools (such as netstat or SNMP) can be used to obtain network performance indicator data in real time. The monitored data may include queue length, packet loss rate, bandwidth utilization, etc.
[0211] Through this step, the latest network status can be quickly obtained, ensuring instant feedback to facilitate subsequent decision-making. The monitored data allows the system to adjust dynamically to improve the efficiency and stability of network transmission.
[0212] S622, determining whether the monitoring data exceeds a preset indicator, and if so, reducing the transmission rate of the sending end;
[0213] If not, increase the size of the sending window with an exponential growth strategy, and determine whether the size of the sending window reaches a preset threshold. If so, increase the size of the sending window with a linear growth strategy; if not, increase the size of the sending window with an exponential growth strategy.
[0214] Specifically, the network congestion can be determined by monitoring indicators such as queue length and packet loss rate in the network. For example, at the output port of the router, if the queue length continues to increase and exceeds a preset threshold, or the packet loss rate suddenly increases, this indicates that the network is congested.
[0215] When network congestion is detected, the sender will reduce the transmission rate. A common method is to use TCP (Transmission Control Protocol) congestion control mechanisms, such as slow start, congestion avoidance, fast retransmit, and fast recovery algorithms. In the slow start phase, the sender will start sending data with a smaller window size. As the confirmation messages from the receiver continue to return, if no congestion is detected, the window size will gradually increase (exponential growth) until it reaches the congestion avoidance phase, and the window size will change to linear growth. Once congestion is detected (such as packet loss), the sender will quickly retransmit the lost data packets according to the specific situation, and adjust the window size to reduce the transmission rate.
[0216] By real-time monitoring and judging the network status, the transmission rate can be reduced in time, network congestion or data loss can be reduced, and data can be sent at a high speed when the network performance is poor, ensuring the overall stability of the network. When the network status is good, the sending window can be quickly increased exponentially to increase the data transmission rate, ensure that network resources are fully utilized, and improve network efficiency. If the sending window size reaches the preset threshold, a linear growth strategy is used to gradually increase the sending window size to prevent network overload. Linear growth avoids the network burden caused by rapid increase, helps maintain traffic stability, and facilitates the planning and management of network performance while achieving a stable data transmission rate.
[0217] The dynamic adjustment method of the transmission rate disclosed in this embodiment can adapt to the changes in the network status in real time to optimize the efficiency and speed of data transmission. By dynamically adjusting the packet sending rate and the sending window, the bandwidth resources can be used to the maximum extent, and the delay of data transmission can be reduced. When the network performance decreases, the sending rate can be quickly reduced to reduce the packet loss phenomenon. By optimizing the transmission rate, the stable and fast data transmission is ensured, the user's satisfaction with the network service is improved, the traffic is effectively controlled, the network congestion is alleviated, the pressure on the network equipment is reduced, and the overall network performance is improved. Through the above mechanism, the system can maintain high efficiency and stability during the transmission process, ensure the integrity and reliability of the data, and enhance the dynamic adjustment ability of the network.
[0218] Furthermore, the cross-platform file incremental synchronization method disclosed in the present application also includes:
[0219] Verify the integrity of the corresponding file at the target receiving end based on the unique verification information;
[0220] Determining location information of all compressed blocks in the received file based on all unique identifiers;
[0221] Decompress all compressed blocks in the file based on the location information to obtain the complete file, and update the file index and metadata of the target receiving end.
[0222] Specifically, the integrity of the compressed block is verified using the checksum information, and the consistency of the compressed block is ensured through the unique identifier. The compressed block is decompressed into a complete file according to the order and position of the compressed block, and the file index and metadata on the target end are updated to ensure the consistency of the file status.
[0223] The scheme disclosed in this embodiment can ensure that the file received by the receiving end is completely consistent with the file of the sending end through unique verification information (such as hash values such as MD5, SHA256, etc.), effectively preventing data damage or loss; it can quickly identify errors that may occur during the transmission process, reject damaged files, and ensure that users always enjoy high-quality file content; only after the file integrity check is passed, subsequent operations are performed to avoid unnecessary additional processing and optimize the use of resources; through the unique identifier, the location information can be quickly determined to simplify the subsequent data processing and reconstruction process and improve efficiency; for the changed part, only the corresponding compressed block needs to be synchronized to avoid the transmission of the entire file, thereby saving bandwidth and time; allowing the system to flexibly select the file blocks that need to be synchronized according to specific needs, thereby improving the flexibility and adaptability of file management; decompressing and reconstructing files one by one through location information, avoiding traditional full file decompression, and significantly reducing processing time and memory consumption; updating file indexes and metadata in a timely manner at the receiving end to ensure that the system status is always accurate and reliable and support any subsequent operations (such as search, retrieval, etc.); only the changed part and valid indexes need to be updated to avoid the generation of redundant data and improve storage efficiency.
[0224] The solution further disclosed in this embodiment only transmits changed file blocks, significantly reducing the use of network bandwidth and improving synchronization efficiency; through efficient processing of steps such as verification and decompression, the time required for file synchronization is shortened and the user experience is enhanced; through integrity verification and metadata update, the stability and reliability of the entire synchronization process are improved, and the problems caused by erroneous transmission are reduced; refined synchronization strategies make file management more efficient, support flexible file recovery and version control, and facilitate user file management and maintenance; the solution can adapt to different operating system platforms, making file synchronization work more universally adaptable and expanding the potential user base.
[0225] The second aspect of the present application discloses a cross-platform file incremental synchronization system, comprising:
[0226] The monitoring module is used to monitor the files to be monitored in real time and obtain file change information;
[0227] A dynamic adjustment module is used to dynamically adjust the encoding algorithm and compression ratio based on file change information to obtain a target encoding algorithm and a target compression ratio;
[0228] A processing module, used to process the changed file based on the target encoding algorithm and the target compression ratio, assign a unique identifier and unique verification information to the processed file, and obtain the target file data;
[0229] A detection module, used to detect and obtain multiple target network paths;
[0230] A path determination module, used to determine an optimal transmission path among multiple target network paths according to network delay information, bandwidth information and reliability information;
[0231] The synchronization module is used to transmit the target file data on the optimal transmission path.
[0232] It should be noted that the solution in the cross-platform file incremental synchronization method disclosed in the first aspect of the present application is also applicable to the cross-platform file incremental synchronization system disclosed in the second aspect of the present application, so it will not be repeated here.
[0233] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product 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 a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.
[0234] The processor may be a central processing unit (CPU) or other forms of processing units 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 the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device performs all or part of the steps of the cross-platform file incremental synchronization method of each embodiment of the present disclosure.
[0235] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.
[0236] like Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Fig.10 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0237] like Fig.10 As shown, the 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 according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0238] 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 display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Fig.10 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0239] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through 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 the embodiment of the present disclosure are executed.
[0240] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0241] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the above-mentioned cross-platform file incremental synchronization method of each embodiment of the present disclosure are executed.
[0242] The above-mentioned 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 mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).
[0243] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0244] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0245] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be recognized by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, meaning "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0246] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a disjunctive list, so that, for example, a list of "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 mean that the example described is preferred or better than other examples.
[0247] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0248] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0249] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present 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 the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0250] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A cross-platform file incremental synchronization method, characterized in that: include: Monitor the files to be monitored in real time and obtain file change information; Based on the file change information, dynamically obtain a target encoding algorithm and a target compression ratio; Processing the file change information based on the target encoding algorithm and the target compression ratio to obtain intermediate file information, assigning a unique identifier and unique verification information to the intermediate file information, and obtaining target file data; Detect and obtain multiple target network paths; Determining an optimal transmission path among a plurality of target network paths according to the network delay information, the bandwidth information and the reliability information; The target file data is transmitted on the optimal transmission path.
2. The cross-platform file incremental synchronization method according to claim 1, characterized in that: The real-time monitoring of the determined files to be monitored and obtaining file change information includes: Identify the files to be monitored; Performing semantic analysis on the file to be monitored to obtain the file logical structure; The file 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 performing semantic analysis on the file to be monitored to obtain the file logical structure includes: When the file to be monitored is a text file, common words or phrases are identified through word frequency statistics, or a sequence matching algorithm is used to perform repeated sequence detection on the file content to obtain the file logical structure; When the file to be monitored is a code, repeated code blocks are identified through sequence matching, or feature extraction technology is used to identify feature patterns of the file content to obtain the file logical structure; When the file to be monitored is an image, repeated texture areas in the file content are identified through feature extraction to obtain the file logical structure.
4. The cross-platform file incremental synchronization method according to claim 1, characterized in that: The dynamically obtaining a target encoding algorithm and a target compression ratio based on the file change information includes: Based on the file change information, determine the file content type, frequently changing content, and stable content; 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; Dynamically obtain an adjusted target encoding algorithm according to the file content type and the algorithm repository; Dynamically adjusting the compression ratio of the frequently changing content 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 determining of the optimal transmission path among the plurality of target network paths according to the network delay information, the bandwidth information and the reliability information comprises: Based on the application scenario, determine the network delay weight, bandwidth weight, and reliability weight; Obtaining actual bandwidth, actual delay, and actual packet loss rate of multiple target network paths; Based on the actual bandwidth, the actual delay, and the actual packet loss rate, obtain a bandwidth score, a delay score, and a packet loss rate score corresponding to the target network path; Based on the network delay weight, the bandwidth weight, the reliability weight, the bandwidth score, the delay score, and the packet loss rate score, a total score of each target network path is obtained, and the target network path with the highest total score is used as the optimal transmission path.
7. The cross-platform file incremental synchronization method according to claim 6, characterized in that: The transmitting the target file data on the optimal transmission path further comprises: The current network information is monitored in real time, and when the current network information changes, the transmission path and the transmission rate are dynamically adjusted, and the files are synchronized across platforms with the dynamically adjusted transmission path and transmission rate.
8. The cross-platform file incremental synchronization method according to claim 6, characterized in that: The method for obtaining the bandwidth score includes: Obtaining the maximum actual bandwidth of all the target network paths; Obtaining a ratio of an actual bandwidth of a single target network path to a maximum actual bandwidth; Based on the ratio and the bandwidth full score threshold, obtaining the bandwidth score; The bandwidth score is A i , Among them, K i is the actual bandwidth of the i-th target network path, K max is 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 delayed score includes: Obtaining the maximum actual delay and the minimum actual delay among all the target network paths; Obtaining the delay score based on the actual delay of a single target network path, the maximum actual delay, the minimum actual delay, and the delay full score threshold; The delay score is B i , Among them, Y i is the actual delay of the ith target network path, Y min is the minimum actual delay among all the target network paths, Y max is the maximum actual delay among all the target network paths, and Y is the delay 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: Obtaining the maximum actual packet loss rate among all the target network paths; Obtaining the 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 packet loss rate full score threshold; The packet loss rate score is C i , Among them, D i is the actual packet loss rate of the i-th target network path, D max is the maximum actual packet loss rate among all the target network paths, and D is the full score threshold of the packet loss rate.
11. The method for cross-platform file incremental synchronization 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; Among them, P1 is the bandwidth weight, P2 is the network delay weight, and P3 is the reliability weight.
12. The cross-platform file incremental synchronization method according to claim 7, characterized in that: The dynamically adjusting the transmission path includes: Monitoring network performance indicators of the optimal transmission path in real time, wherein the network performance indicators include at least one of bandwidth, delay, and packet loss rate; When the network performance indicator is lower than a preset indicator threshold, the path corresponding to the network performance indicator is removed from the plurality of target network paths, and the remaining target network paths are recorded as an updated path set; Recalculate the total scores of all paths in the updated path set according to the current network performance data, and use the path with the highest total score as the updated optimal transmission path; The file data is transmitted based on the updated optimal transmission path.
13. The cross-platform file incremental synchronization method according to claim 7, characterized in that: The dynamically adjusting the transmission rate comprises: Acquire network monitoring data in real time, wherein the monitoring data includes one or more of queue length and packet loss rate; Determine whether the monitoring data exceeds a preset index, and 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 reaches 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 file incremental synchronization method also includes: Verifying the integrity of the corresponding file at the target receiving end based on the unique verification information; Determine the position of all compressed blocks in the received file based on all the unique identifiers YY+242267P information; All compressed blocks in the file are decompressed based on the position information 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 comprises: 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the cross-platform file incremental synchronization method described in any one of claims 1-14.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the cross-platform file incremental synchronization method described in any one of claims 1-14.
17. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
Citation Information
Patent Citations
Equipment updating method, device and system, storage medium and computer equipment
CN110233904A
Cross-machine-room transmission link optimization method, apparatus and device, and storage medium
CN115460124A
Bluetooth earphone low-delay transmission method
CN117440440A
Asynchronous file transmission system based on message middleware
CN118509429A
Data processing method and device and electronic equipment
CN118733374A
Cited By
Message transmission method and device, electronic equipment and storage medium
CN120301821A
Self-adaptive network switching method and device for mobile phone Internet of Things equipment
CN120321728A
Network resource allocation method and network control device
CN120956686A