A file synchronization method, an electronic device, a readable medium, and a program product.

By dynamically assessing network status and file value and adaptively adjusting synchronization strategies, the problem of low efficiency in file synchronization technology in complex network environments is solved, achieving efficient and reliable file synchronization.

CN119892852BActive Publication Date: 2025-11-14BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411968594.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-14
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing file synchronization technologies are inefficient when the network environment changes dynamically and cannot differentiate files based on their importance, resulting in insufficient synchronization efficiency and reliability.

Method used

By dynamically assessing network status and file value, the synchronization strategy is adaptively adjusted, including multi-threaded concurrent synchronization, time-sharing synchronization, and incremental synchronization. High-priority files are prioritized, while low-priority file synchronization is delayed or paused. The synchronization strategy is dynamically adjusted based on network and file priorities.

Benefits of technology

It improves the efficiency and reliability of file synchronization, optimizes resource utilization, adapts to complex network environments, ensures timely synchronization of critical files, and reduces excessive synchronization of non-critical files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892852B_ABST
    Figure CN119892852B_ABST
Patent Text Reader

Abstract

This disclosure provides a file synchronization method, comprising: acquiring network environment parameters; dynamically evaluating the current network status based on the network environment parameters; evaluating the value of a file based on file value evaluation factors to determine the file's priority; adaptively adjusting the file's synchronization strategy based on the current network status and the file's priority; and executing file synchronization according to the adjusted file synchronization strategy. This disclosure also provides an electronic device, a computer-readable medium, and a computer program product. By acquiring network environment parameters, dynamically evaluating the current network status, and combining the file value evaluation results with adaptive adjustment of the file synchronization strategy based on priority, this disclosure significantly improves the efficiency and reliability of file synchronization. Through differentiated synchronization rules and a dynamic adjustment mechanism, it can optimize resource allocation under different network conditions, prioritize the synchronization of critical data, and support flexible expansion and applicability to multiple scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of file synchronization technology for complex network environments, and in particular to a file synchronization method, an electronic device, a computer-readable medium, and a computer program product. Background Technology

[0002] In today's information technology environment, file synchronization plays a crucial role in various application scenarios. For example, in a distributed office environment, employees need to access and modify files from different locations using multiple devices; in a cloud computing environment, multiple virtual machines need to maintain data consistency. However, existing file synchronization technologies have some significant drawbacks. Traditional file synchronization methods typically employ fixed synchronization strategies, neglecting dynamic changes in the network environment, such as synchronizing files at fixed time intervals. In situations with low network bandwidth or significant network fluctuations, this fixed strategy can lead to low synchronization efficiency or even failure due to network congestion. Furthermore, existing file synchronization systems often fail to differentiate based on file importance. For files of different priorities, the synchronization method is relatively simplistic, failing to effectively utilize network resources to meet actual needs. These issues limit the efficiency and reliability of file synchronization technology in complex application scenarios. Summary of the Invention

[0003] This disclosure provides a file synchronization method, an electronic device, a computer-readable medium, and a computer program product.

[0004] In a first aspect, embodiments of this disclosure provide a file synchronization method, comprising: acquiring network environment parameters; dynamically evaluating the current network status based on the network environment parameters; evaluating the value of a file based on file value evaluation factors to determine the priority of the file; adaptively adjusting the file synchronization strategy based on the current network status and the file priority; and executing the file synchronization according to the adjusted file synchronization strategy.

[0005] In some embodiments, obtaining network environment parameters includes: adjusting the types of network environment parameters according to actual needs; and obtaining network environment parameters corresponding to the adjusted types.

[0006] In some embodiments, dynamically evaluating the current network status based on the network environment parameters includes: dynamically setting the threshold range of the network environment parameters and network status classification criteria according to actual needs to establish network status evaluation rules; analyzing the network status parameters using the network status evaluation rules; and determining the current network status based on the analysis results.

[0007] In some embodiments, a document is valued based on document value assessment factors to determine its priority, including: determining document value assessment factors according to actual needs; calculating a priority score for the document using a set assessment method based on the determined document value assessment factors; and determining the priority of the document using priority classification rules based on the priority score.

[0008] In some embodiments, the priority score of a document is calculated using a set evaluation method based on determined document value assessment factors, including: setting the weight of each determined document value assessment factor according to preset standards or actual business needs; and using the determined document value assessment factors and the weights, calculating the priority score of the document using a weighted algorithm.

[0009] In some embodiments, the file synchronization strategy is adaptively adjusted based on the current network status and the file priority, including: formulating different synchronization strategies for different combinations of network status and priority based on set synchronization rules, wherein the synchronization rules support dynamic adjustment according to actual needs; and selecting the corresponding synchronization strategy based on the current network status and the file priority.

[0010] In some embodiments, the synchronization rules include: high-priority files are synchronized first under different network conditions and a dynamic synchronization strategy that adapts to the network conditions is adopted; medium-priority files adopt a strategy that adaptively adjusts the synchronization rate and frequency according to the network conditions; low-priority files are delayed or paused in synchronization when resources are limited or the network is congested, and are synchronized in the background when network conditions are good.

[0011] In some embodiments, a corresponding synchronization strategy is selected based on the current network status and the priority of the file, including: dynamically determining the data to be synchronized for the file based on the current network status and the priority of the file; and dynamically selecting the synchronization execution method for the data to be synchronized based on the current network status and the priority of the file.

[0012] In some embodiments, the network state includes: a high bandwidth stable state, a medium bandwidth fluctuating state, and a low bandwidth congestion state.

[0013] In some embodiments, the synchronization strategy includes: under high bandwidth stability, the high-priority files adopt an efficient synchronization strategy, the medium-priority files adopt a large data block synchronization strategy, and the low-priority files adopt background synchronization; under medium bandwidth fluctuation, the high-priority files adopt a dynamic rate adjustment synchronization strategy, the medium-priority files adopt a time-sharing synchronization strategy, and the low-priority files delay or pause synchronization; under low bandwidth congestion, the high-priority files adopt an incremental synchronization strategy, the medium-priority files adopt a partial data synchronization strategy, and the low-priority files delay or pause synchronization.

[0014] In some embodiments, synchronizing the file according to the adjusted file synchronization strategy includes: determining the data to be synchronized and the synchronization execution method of the file according to the adjusted file synchronization strategy; compressing the data to be synchronized to generate a compressed block; encrypting the compressed block to generate an encrypted compressed block; and synchronizing the encrypted compressed block to the destination according to the synchronization execution method.

[0015] In some embodiments, performing file synchronization according to the adjusted file synchronization strategy further includes: receiving an encrypted compressed block at the destination end according to the synchronization execution method; decrypting the received encrypted compressed block to generate a compressed block; verifying the integrity of the compressed block; requesting resending synchronization data when the integrity verification fails; decompressing the compressed block and restoring it to the data to be synchronized when the integrity verification passes; and writing the decompressed data to be synchronized into the storage system of the destination end.

[0016] In a second aspect, embodiments of this disclosure provide an electronic device, including: one or more processors; and a memory storing one or more programs thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the file synchronization method described in the first aspect of this disclosure.

[0017] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the file synchronization method described in the first aspect of embodiments of this disclosure.

[0018] Fourthly, embodiments of this disclosure provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the file synchronization method described in the first aspect of this disclosure.

[0019] This disclosure provides an efficient, secure, and flexible file synchronization method that combines multi-threaded concurrent synchronization, time-sharing synchronization, and incremental synchronization technologies to effectively improve file synchronization efficiency, reduce network bandwidth consumption, ensure the security and integrity of data transmission, and meet diverse synchronization needs through dynamic strategy adjustments. It also has good cross-platform scalability and maintainability, adapts to different operating systems and application scenarios, and comprehensively optimizes the performance and reliability of file synchronization.

[0020] This disclosure combines network dynamic awareness, file priority classification, and adaptive synchronization strategy adjustment to improve file synchronization efficiency and reliability, and is applicable to scenarios such as distributed office, cloud computing, and personal multi-device file management. Attached Figure Description

[0021] Figure 1 This is a flowchart of a file synchronization method according to an embodiment of the present disclosure;

[0022] Figure 2 This is a detailed sequence diagram of a file synchronization process according to an embodiment of the present disclosure;

[0023] Figure 3 This is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure;

[0024] Figure 4 This is a block diagram of a file synchronization system according to an embodiment of the present disclosure. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions of this disclosure will be described in detail below with reference to the accompanying drawings.

[0026] Exemplary embodiments will be described more fully below with reference to the accompanying drawings; however, these exemplary embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.

[0027] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0028] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.

[0030] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0031] Unless otherwise specified in this disclosure, the following technical terms shall be interpreted as follows:

[0032] File synchronization refers to the operation of ensuring the consistency of file content across multiple devices or systems, ensuring that copies of files in different locations remain up-to-date.

[0033] A file listener is a program or module that monitors changes to the file system in real time. It is used to detect events such as the addition, modification, and deletion of files and trigger corresponding operations.

[0034] Incremental synchronization refers to a synchronization technique that only transmits the changed parts of a file, avoiding the repeated transmission of unchanged data and thus improving synchronization efficiency.

[0035] Time-sharing synchronization refers to file synchronization within a specific time window, which is typically suitable for network environments with fluctuating bandwidth.

[0036] Network bandwidth refers to the maximum amount of data that can be transmitted in a network per unit of time, usually measured in Mbps or Gbps.

[0037] Network latency is the time interval between sending a data packet and receiving a response, usually measured in milliseconds (ms).

[0038] Packet loss rate is the ratio of the number of packets lost during data transmission to the total number of packets sent, and is used to measure the stability of network transmission.

[0039] Multithreaded concurrency synchronization refers to the technique of using multiple threads to process different parts of a file simultaneously to speed up file transfer.

[0040] File timeliness refers to the validity period or applicable time period of the file content. After this period, the file may no longer need to be synchronized.

[0041] System load is an indicator that describes the current resource usage of a system, and typically includes CPU utilization, memory utilization, disk I / O, network utilization, etc.

[0042] File writing to disk refers to the process of writing file data in memory to disk and saving it to the file system, ensuring that the data is persisted in the storage device.

[0043] A compressed block is a compressed data unit generated by dividing a file into blocks and processing it using a compression algorithm.

[0044] This disclosure aims to solve the following technical problems:

[0045] Implement a differentiated synchronization mechanism based on file importance and value to ensure that critical files are synchronized in a timely manner, while avoiding excessive synchronization of non-critical files and reducing unnecessary waste of network resources;

[0046] Optimize file synchronization efficiency and improve its reliability in different network environments (such as low bandwidth or high latency);

[0047] During file transfer, the synchronization strategy can be adjusted in real time according to the dynamic changes in the network environment to adapt to complex and ever-changing network conditions and ensure the stability and efficiency of the synchronization task.

[0048] Through the above-mentioned technical improvements, this disclosure can significantly enhance the adaptability of file synchronization and the efficiency of resource utilization, meeting the needs of diverse application scenarios.

[0049] Figure 1 This is a flowchart of a file synchronization method according to an embodiment of the present disclosure.

[0050] Firstly, referring to Figure 1 This disclosure provides a file synchronization method, including:

[0051] S11. Obtain network environment parameters;

[0052] S12. Dynamically assess the current network status based on the network environment parameters;

[0053] S13. Evaluate the value of the document based on document value assessment factors to determine the priority of the document;

[0054] S14. Based on the current network status and the priority of the file, adaptively adjust the file synchronization strategy;

[0055] S15. Perform file synchronization according to the adjusted file synchronization strategy.

[0056] In some embodiments, obtaining network environment parameters includes:

[0057] Adjust the types of network environment parameters according to actual needs;

[0058] Obtain the network environment parameters corresponding to the adjusted type.

[0059] In some embodiments, the network environment parameters include: network transmission capability parameters, network stability parameters, network usage status parameters, and network security parameters.

[0060] In this embodiment, a network monitoring module is used to achieve dynamic network environment perception. This module is deployed at various nodes in the network and has network parameter acquisition capabilities, aiming to obtain key information about the network environment to support dynamic network perception. The collected parameters include network bandwidth, latency, packet loss rate, throughput, jitter, network load, and other important parameters reflecting network performance, status, and health. The types of parameters to be collected are dynamically adjusted according to network performance evaluation, fault diagnosis, security monitoring, or resource optimization needs.

[0061] Network bandwidth reflects the amount of data a network can transmit per unit of time. Network bandwidth can be calculated flexibly using various methods. One approach is to utilize network interface functions provided by the operating system to obtain real-time network status information, thereby obtaining bandwidth data. For example, based on the operating system interface, the total number of bytes sent and received by the network interface can be read periodically (e.g., per second) (e.g., in Linux systems, data can be read from the ` / proc / net / dev` file); the change in the total number of bytes per unit of time can then be calculated to determine the bandwidth. Alternatively, the Simple Network Management Protocol (SNMP) can be used to obtain traffic counter data from network devices (such as routers and switches), and the bandwidth can be calculated by statistically analyzing changes over a time window. Another approach is to actively measure bandwidth by sending data packets of a certain size to the target node and recording the transmission time, then estimating the bandwidth using the formula: Bandwidth = Data Packet Size / Transmission Time. The methods for calculating network bandwidth can be flexibly chosen to meet different application requirements.

[0062] Network latency and packet loss rate are obtained through network probe packet technology. Specifically, ICMP (Internet Control Message Protocol) probe packets, UDP probe packets, or TCP probe packets are sent to the target node periodically (e.g., every 5 seconds). The timestamps of sent probe packets and received response packets are recorded to calculate network latency. The module can select the appropriate probe packet type according to requirements, flexibly adapting to different network environments. The packet loss rate is calculated by counting the number of probe packets sent and the number of probe packets that did not receive a response. The module supports different technical means, as long as the packet loss rate can be accurately obtained.

[0063] Throughput is an indicator of actual network transmission efficiency. It is calculated by counting the total number of valid data bytes passing through the network interface per unit time (e.g., 10 seconds). Jitter reflects the volatility of network latency and is an important indicator for real-time applications. It is obtained by collecting multiple latency samples within a certain time window and calculating the standard deviation of latency variation. Network load reflects the current network utilization rate. It can be calculated by collecting the length of the send or receive queues on switches or routers and combining this with the maximum queue length to calculate the load ratio; or by estimating the network load using the proportion of current bandwidth to the maximum available bandwidth.

[0064] The network monitoring module is designed with the needs of different application scenarios in mind. Through flexible parameter acquisition and expansion capabilities, it supports various network requirements such as network performance evaluation, fault diagnosis, security monitoring, and planning optimization, providing reliable data support for dynamic network awareness. Network performance evaluation reflects the network's adaptability to specific application scenarios by monitoring key indicators, supporting performance optimization; for example, video streaming focuses on network bandwidth, jitter, and latency, while file transfer focuses on throughput and packet loss rate. Network faults are often closely related to specific parameter anomalies. Key parameters can be selected based on common fault types, and collecting these parameters can quickly locate problems and improve fault diagnosis efficiency; for example, in network congestion scenarios, monitoring network load and queue length can determine if there is traffic overload; in data loss or retransmission scenarios, focusing on indicators such as retransmission rate and packet loss rate can locate problems on the transmission link. Ensuring network security requires real-time monitoring of parameters related to abnormal behavior to promptly identify potential threats and take measures; for example, monitoring abnormal traffic behavior, collecting abnormal connection numbers, frequent port scanning behavior, etc., can detect potential attack threats; defending against traffic abuse involves analyzing traffic patterns to identify abnormal behaviors such as denial-of-service attacks (DDoS). To support the rational planning and long-term optimization of network resources, it is necessary to collect trend parameters reflecting the overall network status. For example, network planning collects network capacity and utilization data to analyze whether expansion is needed; resource optimization optimizes traffic allocation and link settings by statistically analyzing long-term network performance data. The network monitoring module can cover various scenario requirements and can add new parameter collection logic as needed, providing reliable data support for dynamic network awareness, while also possessing high scalability to meet future needs.

[0065] In some embodiments, dynamically assessing the current network status based on the network environment parameters includes:

[0066] Based on actual needs, the threshold range of the network environment parameters and the network status classification criteria are dynamically set to establish network status assessment rules.

[0067] The network state parameters are analyzed using the network state assessment rules.

[0068] Based on the analysis results, the current network state is determined.

[0069] In some embodiments, the network state includes: a high bandwidth stable state, a medium bandwidth fluctuating state, and a low bandwidth congestion state.

[0070] In this embodiment, the network environment assessment mechanism uses a central assessment module to comprehensively analyze the parameters collected by the network monitoring module, dynamically assess the current network status, and support adjustments to the file synchronization strategy. The network monitoring module collects parameters including bandwidth, latency, and packet loss rate, and transmits the data to the central assessment module through timed transmission, real-time transmission, or flexible configuration. The collection frequency and transmission interval are dynamically set by the central assessment module according to the strategy adjustment requirements.

[0071] The central evaluation module analyzes the collected network parameters using predefined algorithms, focusing on core indicators such as bandwidth, latency, and packet loss rate, and classifies them according to dynamically set classification criteria. For example, classification can be based on the following rules: a bandwidth threshold of 50Mbps, a latency threshold of 20ms, and a packet loss rate threshold of 0.3%. When network bandwidth is below 50Mbps, latency is above 20ms, and packet loss rate is above 0.3%, the central evaluation module classifies it as a low-bandwidth congestion state; when network bandwidth is between 50Mbps and 100Mbps, latency is between 10ms and 20ms, and packet loss rate is between 0.1% and 0.3%, it is classified as a medium-bandwidth fluctuation state; when network bandwidth is above 100Mbps, latency is below 10ms, and packet loss rate is below 0.1%, it is classified as a high-bandwidth stable state. The classification criteria can be flexibly adjusted according to the actual scenario, and classification parameters and thresholds can be customized. For example, different application scenarios (such as video streaming or file transfer) can flexibly set classification criteria for bandwidth, latency, and packet loss rate; the system supports expanding more network parameters (such as jitter, throughput, etc.) into the evaluation model, and the algorithm of the central evaluation module can dynamically load the calculation results of these parameter configurations according to the configuration. When the collected parameters do not fully meet a certain classification condition, the central evaluation module determines the optimal approximate category of the network state based on the weighted score of multiple parameters and updates the strategy.

[0072] The classification results from the central evaluation module are used to support the adjustment of file synchronization strategies, rationally allocate bandwidth resources according to the current network status to avoid network congestion, adjust the priority and frequency of file synchronization, prioritize the synchronization of critical data when the network is congested, and process large files when the bandwidth is high and stable, and optimize file synchronization strategies in real time to improve synchronization efficiency and network resource utilization.

[0073] Both the central assessment module and the network monitoring module support flexible configuration, allowing users to adjust the acquisition parameters, acquisition frequency, and transmission mode according to their needs. The modules support the introduction of more network parameters (such as jitter, number of abnormal connections, throughput, etc.) and new classification logic, enabling customized assessments through dynamically loading configuration files.

[0074] In some embodiments, the document is valued based on document valuation factors to determine its priority, including:

[0075] Determine the factors for assessing the value of the document based on actual needs;

[0076] Based on the determined document value assessment factors, the priority score of the document is calculated using the established assessment method;

[0077] The priority of a file is determined based on its priority score using priority classification rules.

[0078] In some embodiments, the factors for assessing the value of a document include the importance of the document, the frequency of document updates, and the timeliness of the document.

[0079] In this embodiment of the disclosure, the value assessment of a document comprehensively considers multi-dimensional information. The factors for assessing the value of a document may include factors such as the importance of the document, the timeliness of the document, and the frequency of document updates.

[0080] For file importance assessment, the importance is evaluated based on the file's directory location, content characteristics, and file extension. Directory location reflects the business module or security level; for example, files in a secure directory are more important. Content characteristics can be assessed for importance through analysis of key business data (such as financial data) or correlation with other data. Furthermore, files with extensions such as ".conf" represent system configuration files and typically have higher priority.

[0081] The importance of document content can be dynamically adjusted and pre-defined to meet the diverse needs of business scenarios. Dynamic adjustment relies on data analysis and business changes, and can flexibly assess the importance of documents according to actual needs and environmental changes, including: (1) Based on data analysis and machine learning, using data analysis techniques and machine learning algorithms, dynamically adjusting the importance classification of document content to adapt to changes brought about by business development and data accumulation. For example, the importance of a document can be determined by analyzing data characteristics such as the access frequency, modification frequency, and correlation with other important documents. If a document is frequently accessed and modified within a period of time and is closely related to multiple key business documents, its importance level will be dynamically adjusted to increase its priority. (2) User feedback and business changes, adjusting the importance classification of document content according to user feedback and business needs to ensure that the system can respond to business changes in real time; for example, when a new product is launched, the document content related to the new product will be upgraded to a high importance level.

[0082] Pre-setting: Based on business rules and industry standards, initial importance levels are provided for specific types of documents, including: (1) According to business rules and experience, enterprises or organizations formulate rules for classifying the importance of document content based on their own business processes and long-term experience. For example, in e-commerce companies, based on business experience, documents such as user order data, product inventory data, and payment transaction records are crucial to the normal operation of the business, so documents containing these contents can be pre-set as high importance; in R&D companies, technical documents, test reports, and project plan documents involving product design are usually pre-marked as important. (2) Referring to industry standards and regulations, some industry regulations and standards clearly stipulate which data is important and sensitive. For example, in the medical industry, according to regulations, patient personal health information and medical diagnosis results must be kept strictly confidential, and the importance level of such documents is preset to the highest level; in the financial industry, documents involving customer account information, transaction records, and financial statements are set to high priority by default due to their sensitivity.

[0083] The timeliness of a file is determined by comparing its creation time with a predefined validity period. For example, the value of a temporary project file decreases after the project ends, and its priority decreases accordingly. For files with an unclear validity period, a default priority can be set, or it can be dynamically adjusted based on other factors.

[0084] By recording file modification timestamps, you can track the number of times a file has been modified within a certain timeframe (such as the past day, week, or month). Files that are updated frequently have higher priority. For example, a company's sales data file, which is updated multiple times daily, can be set to high synchronization priority.

[0085] The factors for evaluating document value can be dynamically expanded; for example, they can include parameters related to security, business processes, and data quality.

[0086] Security-related parameters may include encryption status and access permission settings. Encrypted files typically contain sensitive information, such as financial statements or user data, and are assigned a higher score. In a financial institution's file system, files storing customer account passwords, if encrypted, may receive a higher score in importance assessments. Check whether the file access permission settings are reasonable. For example, files accessible only to specific user groups are generally more important; conversely, overly lenient permissions may pose a risk and lower priority.

[0087] Parameters related to business processes can include critical business process participation and business relevance. Determine if a document is directly related to the core business process; for example, in an e-commerce platform, the configuration file used to process order payments is directly related to the smooth operation of transactions and is therefore a critical business process document, with its importance level set to high. Also, measure the degree of relevance of the document to other important business documents or system modules. For example, a project's requirements document may be closely related to its design documents, test reports, and other documents, collectively forming the complete information of the project; therefore, these documents are relatively important.

[0088] Parameters related to data quality include data completeness and data accuracy. Checking the completeness of data in a document, and identifying any missing or incorrect data, is crucial. For example, a sales report with significant data gaps or errors will have reduced value for business decisions, and its importance assessment score will decrease accordingly. Assessing the accuracy and reliability of data in a document is also important. For instance, in a market research report, if the data sources are unreliable or the analytical methods are flawed, the report's importance will be questioned, and its priority will be lowered.

[0089] In some embodiments, based on determined document value assessment factors, a priority score for the document is calculated using a defined assessment method, including:

[0090] Set the weight of each determined document value assessment factor according to preset standards or actual business needs;

[0091] Using the determined file value assessment factors and the weights, a weighted algorithm is used to calculate the priority score of the file.

[0092] In some embodiments, the priority classification rules are dynamically adjusted according to actual business needs.

[0093] In this embodiment of the disclosure, a weighted algorithm is used to calculate the priority score P of the file based on the value assessment result, and the file is classified into high, medium, and low priorities according to the score. The selection principle of the weighted algorithm has the characteristics of reflecting the importance of factors, flexibility and adjustability, and ease of understanding and implementation.

[0094] (1) Different evaluation factors have different levels of importance, and these differences are accurately reflected by setting weights. Specifically, the importance of document content may have a greater impact on priority than timeliness, and therefore should be assigned a higher weight. For example, in an enterprise document management system, the weight of document content importance is set to w1 = 0.5, document timeliness is set to w2 = 0.3, and document update frequency is set to w3 = 0.2; when calculating priority scores, the importance of document content will account for a larger proportion.

[0095] (2) As business needs and the environment may change, the weights should be adjusted flexibly according to the actual situation to adapt to new scenarios and needs. For example, as the business develops and the requirements for document timeliness increase, the timeliness weight can be adjusted from w2=0.3 to w2=0.4.

[0096] (3) The linear weighting algorithm is simple and easy to understand, and easy to develop and maintain. For example, the linear weighting algorithm multiplies the scores of each evaluation factor by their corresponding weights and adds them together. The calculation formula is: P = w1 × s1 + w2 × s2 + w3 × s3, where s1, s2, and s3 are the scores of the document in terms of importance, update frequency, and timeliness, respectively.

[0097] Specifically, based on preset standards or actual business needs, the weights for file importance, update frequency, and timeliness are set. For example, the weight for file content importance is set to w1 = 0.4, update frequency to w2 = 0.3, and timeliness to w3 = 0.3. The priority score is calculated using the formula P = w1 × s1 + w2 × s2 + w3 × s3, where s1 is the file importance score (e.g., very important 3 points, important 2 points, average 1 point); s2 is the file update frequency score (e.g., more than 5 modifications 3 points, 2-4 modifications 2 points, less than 2 modifications 1 point); and s3 is the file timeliness score (e.g., less than 1 day remaining 3 points, 1-3 days remaining 2 points, more than 3 days remaining 1 point). If a file's score is s1 = 3, s2 = 2, and s3 = 1, then the calculated score P = 0.4 × 3 + 0.3 × 2 + 0.3 × 1 = 2.1.

[0098] Files can be categorized into high, medium, and low priority based on their priority score P. For example, P ≥ 2.5 indicates high priority, 1.5 ≤ P < 2.5 indicates medium priority, and P < 1.5 indicates low priority. Weights and scoring rules can be adjusted according to actual needs. For instance, weight configurations can be updated as business changes occur, and new evaluation factors (such as file access frequency or relevance to core business) can be introduced to optimize classification criteria. The priority algorithm is applicable to various scenarios, and users can easily modify attribute weights and scoring criteria through simple configuration. Through this priority classification algorithm, the system can flexibly adapt to diverse business needs and provide reliable decision-making support in file management, resource allocation, and data backup.

[0099] In some embodiments, the file synchronization strategy is adaptively adjusted based on the current network state and the file priority, including:

[0100] Based on the established synchronization rules, different synchronization strategies are formulated for different combinations of network states and priorities. The synchronization rules can be dynamically adjusted according to actual needs.

[0101] Based on the current network status and the priority of the file, select the corresponding synchronization strategy.

[0102] In some embodiments, the synchronization rules include:

[0103] High-priority files are synchronized first under different network conditions, and a dynamic synchronization strategy that adapts to the network conditions is adopted.

[0104] Medium-priority files employ a strategy of adaptively adjusting synchronization rate and frequency based on network conditions;

[0105] Low-priority files will have their synchronization delayed or paused when resources are limited or the network is congested, and will be synchronized in the background when network conditions are good.

[0106] In some embodiments, a corresponding synchronization strategy is selected based on the current network status and the priority of the file, including:

[0107] Based on the current network status and the priority of the file, the data to be synchronized in the file is dynamically determined;

[0108] Based on the current network status and the priority of the file, the synchronization execution method of the data to be synchronized is dynamically selected.

[0109] In some embodiments, the synchronization strategy includes:

[0110] Under high bandwidth and stable conditions, high-priority files adopt an efficient synchronization strategy, medium-priority files adopt a large data block synchronization strategy, and low-priority files are synchronized in the background.

[0111] Under medium bandwidth fluctuation conditions, the high-priority files adopt a dynamic rate adjustment synchronization strategy, the medium-priority files adopt a time-sharing synchronization strategy, and the low-priority files are delayed or paused in synchronization.

[0112] Under low bandwidth congestion conditions, the high-priority files adopt an incremental synchronization strategy, the medium-priority files adopt a partial data synchronization strategy, and the low-priority files are delayed or suspended from synchronization.

[0113] In this embodiment, by dynamically adjusting the file synchronization strategy, synchronization efficiency is improved and resource allocation is optimized to adapt to different network conditions and file priorities. Synchronization rules can be set as follows: high-priority files are synchronized first under any network condition, using strategies such as dynamic rate adjustment and incremental synchronization to ensure timely transmission of critical data. Medium-priority files have their synchronization rate and frequency dynamically adjusted according to network conditions; for example, large-block data synchronization is used under high bandwidth, time-sharing synchronization is used under medium bandwidth, and partial data synchronization is used under low bandwidth. Low-priority files have their synchronization delayed or paused when resources are limited or the network is congested, and background synchronization is used when network conditions are good to avoid affecting the transmission of high and medium-priority files.

[0114] Develop synchronization strategies for different network environments and file priorities:

[0115] In a high-bandwidth, stable network environment, high-priority files are synchronized using multi-threaded concurrent synchronization to maximize bandwidth utilization. Specifically, the number of threads is dynamically determined based on file size and network bandwidth. For example, a simple proportional calculation method can be used to determine the number of threads based on the ratio of file size to network bandwidth. Assuming a network bandwidth of 100Mbps and a file size of 1GB, the system can run 8 threads for synchronization. This is because multi-threaded concurrent synchronization can fully utilize network bandwidth, with multiple threads simultaneously transmitting different parts of the file, significantly improving synchronization speed. For medium-priority files, in a high-bandwidth, stable environment, a larger synchronization block size (e.g., 1MB) is used to reduce overhead during synchronization. For example, 1MB data blocks are synchronized each time. For low-priority files, background synchronization is performed at a lower priority to avoid affecting the transmission of high- and medium-priority files.

[0116] In a network environment with fluctuating medium bandwidth, adaptive transmission rate control can be used for high-priority files, adjusting the synchronization speed according to real-time changes in network bandwidth. For medium-priority files, a time-sharing synchronization strategy is employed. The system analyzes the patterns of network bandwidth fluctuations and selects periods with relatively high network bandwidth for synchronization. For example, by analyzing historical network data, if it is found that network bandwidth is relatively high between 10:00 AM and 1:00 PM and between 3:00 PM and 4:00 PM each day, medium-priority files will be synchronized during these periods. For low-priority files, synchronization can be paused until network conditions improve or the high- and medium-priority files are synchronized.

[0117] In low-bandwidth, congested network environments, incremental synchronization is used for high-priority files, synchronizing only the changed portions. For example, a file version control system (such as Git's differential algorithm) can be used to identify and synchronize the changed parts. If a file is updated from version 1 to version 2, by analyzing the differences between the two versions, only the changed parts are synchronized, not the entire file. This significantly reduces the amount of data synchronized and improves the success rate in low-bandwidth environments. Different file comparison algorithms can be used depending on the file type, performance requirements, and synchronization scenario, such as: simple text comparison algorithms, line-by-line comparison algorithms (suitable for text files, achieving efficient synchronization by comparing added or modified lines), hash-based comparison algorithms (for quickly detecting file differences), and differential algorithms (determining file differences by finding the longest common subsequence (LCS) between two files). For medium-priority files, synchronization can wait for network improvement or be performed at a very low rate (e.g., synchronizing 100KB every 10 minutes) for partial data. Partial data synchronization refers to synchronizing at fixed time intervals and with fixed data volumes under poor network conditions, regardless of specific changes in file content. Synchronization of low-priority files is paused to avoid exacerbating network congestion.

[0118] Synchronization strategies can be flexibly adjusted based on application scenarios and actual needs. For example, in enterprise file management, financial data can be synchronized first (high priority), daily reports can be synchronized on demand (medium priority), and archived data can be synchronized in the background with a delay (low priority). In cloud storage environments, dynamic synchronization strategies can reduce the impact of low-priority files on the transmission of critical business files. Real-time monitoring of network bandwidth, file priority, and system load allows for further adjustments to the synchronization strategy.

[0119] 1) Dynamically adjust the synchronization rate based on network bandwidth.

[0120] Real-time monitoring of network bandwidth and dynamic adjustment of the synchronization rate based on bandwidth conditions ensure efficient utilization of network resources. When network bandwidth is good, the synchronization rate is appropriately increased; when bandwidth is poor, the rate is reduced to decrease network load.

[0121] For example,

[0122] When the network bandwidth is detected to be greater than 1 Mbps, 200 KB of data will be synchronized every 5 minutes.

[0123] When the network bandwidth is between 500Kbps and 1Mbps, 150KB of data is synchronized every 8 minutes;

[0124] When the network bandwidth is less than 500Kbps, 100KB of data is synchronized every 15 minutes.

[0125] 2) Adjust the synchronization strategy according to the importance of the documents.

[0126] Medium-priority files are classified according to their importance, such as into different levels like important and moderately important, and a differentiated strategy is adopted to optimize the allocation of synchronization resources. For important medium-priority files, synchronization is prioritized when the network environment allows, and the synchronization rate can be appropriately increased. For moderately important medium-priority files, synchronization is performed according to the conventional partial data synchronization strategy.

[0127] For example, for important medium-priority files:

[0128] When the network bandwidth is >800Kbps, 150KB of data is synchronized every 3 minutes;

[0129] When the network bandwidth is between 300Kbps and 800Kbps, 100KB of data is synchronized every 6 minutes;

[0130] When the network bandwidth is less than 300Kbps, 80KB of data is synchronized every 10 minutes.

[0131] For medium-priority files that are generally important, the previously mentioned strategy of synchronizing 100KB of data every 10 minutes is used.

[0132] 3) Adjust the synchronization strategy according to the system load.

[0133] By monitoring system resource usage (such as CPU and memory usage), the synchronization operations can be dynamically adjusted. When the system load is low, the synchronization operations of medium-priority files can be increased appropriately; when the system load is high, the synchronization operations should be reduced to avoid affecting the normal operation of the system.

[0134] For example,

[0135] When under low load, i.e., CPU utilization <30% and memory utilization <50%, 120KB of data is synchronized every 8 minutes;

[0136] Under medium load, i.e., when CPU utilization is between 30% and 70% or memory utilization is between 50% and 80%, 100KB of data is synchronized every 12 minutes;

[0137] When under high load, i.e., CPU utilization > 70% or memory utilization > 80%, pause the synchronization of medium-priority files until the system load drops below the threshold before resuming synchronization.

[0138] In some embodiments, the file synchronization is performed according to the adjusted file synchronization strategy, including:

[0139] According to the adjusted file synchronization strategy, determine the data to be synchronized and the synchronization execution method of the file;

[0140] The data to be synchronized is compressed to generate compressed blocks;

[0141] The compressed block is encrypted to generate an encrypted compressed block;

[0142] The encrypted compressed block is synchronized to the destination according to the synchronous execution method.

[0143] In some embodiments, performing file synchronization according to the adjusted file synchronization strategy further includes:

[0144] According to the synchronous execution method, the destination receives the encrypted compressed block;

[0145] The received encrypted compressed block is decrypted to generate a compressed block;

[0146] Verify the integrity of the compressed block;

[0147] If integrity verification fails, request to resend the synchronization data;

[0148] Once the integrity verification passes, the compressed block is decompressed and restored to the data to be synchronized.

[0149] The decompressed data to be synchronized is written to the storage system of the destination.

[0150] In this embodiment of the disclosure, the synchronization task is executed according to the adjusted synchronization strategy, and the synchronization execution method (such as multi-threaded concurrency, time-sharing synchronization, incremental synchronization) is dynamically selected to adapt to the needs of different network states and file priorities.

[0151] Multithreaded concurrency synchronization is suitable for high-bandwidth environments, fully utilizing network resources to improve transmission efficiency. It is implemented using multithreading libraries (such as the Windows API and the pthread library). In Windows systems, multithreading-related functions in the Windows API are used, such as calling the `CreateThread` function to create threads and using the `WaitForMultipleObjects` function to wait for multiple threads to complete. In Linux systems, the `pthread_create` function is called to create threads, and the `pthread_join` function is called to wait for threads to complete.

[0152] Time-sharing synchronization is suitable for situations with fluctuating bandwidth. It uses a timer to control the time window for file synchronization, executing the task during periods of relatively good network bandwidth. In programming, the operating system's timer functionality can be utilized. For example, in Java, the `java.util.Timer` class can be used to set up timer tasks, specifying a particular time period for file synchronization. In other programming environments, the operating system's timer functionality can be used for time management. For instance, high-bandwidth periods such as 10-11 AM and 3-4 PM can be used to synchronize medium-priority files in a time-sharing manner.

[0153] Incremental synchronization is suitable for low-bandwidth situations, transmitting only the changed parts of a file. It uses Git differential algorithms to extract the newly added and modified portions, avoiding the duplicate transmission of unchanged data.

[0154] In this embodiment, network status and file priorities are monitored in real time to dynamically select the optimal synchronization execution method. Under high-bandwidth stability, multi-threaded synchronization of high-priority files is prioritized; under medium-bandwidth fluctuation, time-sharing synchronization of medium-priority files is used; and under low-bandwidth congestion, incremental synchronization of high-priority files is prioritized. These techniques ensure the efficiency, flexibility, and adaptability of the synchronization task, meeting diverse business needs while supporting future technology expansion.

[0155] Figure 2 This is a detailed sequence diagram of a file synchronization process according to an embodiment of the present disclosure.

[0156] In this embodiment of the disclosure, reference is made to Figure 2 The file synchronization process is as follows:

[0157] The source end sends a "create file listener" request to the source end file server; after receiving the request, the source end file server creates the file listener and returns a "success" response to the source end.

[0158] The source side creates a network environment detector to monitor the current network environment in real time, providing support for adaptive adjustment of the synchronization strategy;

[0159] When the file listener detects a change in a file, the source end prioritizes the changed files based on the file information.

[0160] The source end adaptively adjusts the synchronization strategy based on the priority classification results and network environment detection results, and determines the specific method and parameters of the synchronization process;

[0161] The source end compresses and encrypts the data to be synchronized according to the adjusted synchronization strategy, and then sends the encrypted compressed block to the receiving end.

[0162] After receiving the encrypted compressed block, the receiving end performs decryption and integrity verification on it in sequence to ensure that the data has not been tampered with or lost.

[0163] The compressed blocks that pass the integrity verification are decompressed and restored to complete file data, and then written to the storage system by the receiving file server (i.e., "written to disk").

[0164] If data storage is successful, the receiving file server returns a "success" response to the receiving end, which then returns the response to the source end, completing the entire synchronization process.

[0165] In this embodiment of the disclosure, the file listener is a functional module created by a program that monitors changes in a specified folder by periodically and recursively scanning the folder.

[0166] The above process fully describes the entire flow from the detection of file changes to the completion of file synchronization, ensuring the security, integrity, and efficiency of data transmission.

[0167] Figure 3 This is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure.

[0168] Secondly, referring to Figure 3 This disclosure provides an electronic device, which includes:

[0169] One or more processors 301;

[0170] The memory 302 stores one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the file synchronization method described in the first aspect of the embodiments of this disclosure.

[0171] One or more I / O interfaces 303 are connected between the processor and the memory and configured to enable information exchange between the processor and the memory.

[0172] Among them, processor 301 is a device with data processing capabilities, including but not limited to central processing unit (CPU); memory 302 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); I / O interface (read-write interface) 303 is connected between processor 301 and memory 302, and can realize information interaction between processor 301 and memory 302, including but not limited to data bus (Bus).

[0173] In some embodiments, the processor 301, memory 302, and I / O interface 303 are interconnected via bus 304, and thus connected to other components of the computing device.

[0174] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the file synchronization method described in the first aspect of embodiments of this disclosure.

[0175] Fourthly, embodiments of this disclosure provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the file synchronization method described in the first aspect of this disclosure.

[0176] Figure 4 This is a block diagram of a file synchronization system according to an embodiment of the present disclosure.

[0177] Fifthly, refer to Figure 4 This disclosure provides a file synchronization system, including:

[0178] Network monitoring module 401 is configured to acquire network environment parameters;

[0179] Network evaluation module 402 is configured to dynamically evaluate the current network status based on the network environment parameters;

[0180] Document valuation module 403 is configured to evaluate the value of a document based on document valuation factors in order to determine the priority of the document.

[0181] The strategy adjustment module 404 is configured to adaptively adjust the file synchronization strategy based on the current network status and the file priority.

[0182] The synchronization execution module 405 is configured to perform file synchronization according to the adjusted file synchronization strategy.

[0183] In some embodiments, the network monitoring module 401 includes:

[0184] The parameter adjustment module is configured to adjust the types of network environment parameters according to actual needs.

[0185] The parameter acquisition module is configured to acquire network environment parameters corresponding to the adjusted types.

[0186] In some embodiments, the network evaluation module 402 includes:

[0187] The rule setting module is configured to dynamically set the threshold range of the network environment parameters and the network status classification criteria according to actual needs, so as to establish network status assessment rules.

[0188] The analysis module is configured to analyze the network environment parameters using the network status assessment rules;

[0189] The state determination module is configured to determine the current network state based on the analysis results.

[0190] In some embodiments, the document value assessment module 403 includes:

[0191] The factor determination module is configured to determine the factors for evaluating the value of the document based on actual needs.

[0192] The priority calculation module is configured to calculate the priority score of the file based on the determined file value assessment factors and using the set assessment method.

[0193] The priority classification module is configured to determine the priority of a file based on its priority score and using priority classification rules.

[0194] In some embodiments, the priority calculation module includes:

[0195] The weight setting module can be configured to set the weight of each determined document value assessment factor according to preset standards or actual business needs.

[0196] The weighted calculation module is configured to use the file value assessment factors and the weights to calculate the priority score of the file using a weighted algorithm.

[0197] In some embodiments, the strategy adjustment module 404 includes:

[0198] The rule setting module is configured to formulate different synchronization strategies based on the set synchronization rules for different combinations of network states and priorities. The synchronization rules can be dynamically adjusted according to actual needs.

[0199] The strategy selection module is configured to select the corresponding synchronization strategy based on the current network status and the priority of the file.

[0200] In some embodiments, the synchronization rules include:

[0201] High-priority files are synchronized first under different network conditions, and a dynamic synchronization strategy that adapts to the network conditions is adopted.

[0202] Medium-priority files employ a strategy of adaptively adjusting synchronization rate and frequency based on network conditions;

[0203] Low-priority files will have their synchronization delayed or paused when resources are limited or the network is congested, and will be synchronized in the background when network conditions are good.

[0204] In some embodiments, the strategy selection module includes:

[0205] Based on the current network status and the priority of the file, the data to be synchronized in the file is dynamically determined;

[0206] Based on the current network status and the priority of the file, the synchronization execution method of the data to be synchronized is dynamically selected.

[0207] In some embodiments, the network state includes: a high bandwidth stable state, a medium bandwidth fluctuating state, and a low bandwidth congestion state.

[0208] In some embodiments, the synchronization strategy includes:

[0209] Under high bandwidth and stable conditions, high-priority files adopt an efficient synchronization strategy, medium-priority files adopt a large data block synchronization strategy, and low-priority files are synchronized in the background.

[0210] Under medium bandwidth fluctuation conditions, the high-priority files adopt a dynamic rate adjustment synchronization strategy, the medium-priority files adopt a time-sharing synchronization strategy, and the low-priority files are delayed or paused in synchronization.

[0211] Under low bandwidth congestion conditions, the high-priority files adopt an incremental synchronization strategy, the medium-priority files adopt a partial data synchronization strategy, and the low-priority files are delayed or suspended from synchronization.

[0212] In some embodiments, the synchronization execution module 405 includes:

[0213] The determination module is configured to determine the data to be synchronized and the synchronization execution method of the file according to the adjusted file synchronization strategy.

[0214] The compression module is configured to compress the data to be synchronized, generating compressed blocks.

[0215] The encryption module is configured to encrypt compressed blocks and generate encrypted compressed blocks.

[0216] The synchronization module is configured to synchronize the encrypted compressed block to the destination according to the synchronization execution method.

[0217] In some embodiments, the synchronization execution module 405 further includes:

[0218] The receiving module is configured to receive the encrypted compressed block according to the synchronous execution method;

[0219] The decryption module is configured to decrypt the received encrypted compressed block and generate a compressed block.

[0220] The integrity verification module is configured to verify the integrity of the compressed blocks;

[0221] The retransmission request module is configured to request a resend of synchronization data when integrity verification fails.

[0222] The decompression module is configured to decompress the compressed block and restore it to the data to be synchronized when the integrity verification passes.

[0223] The storage module is configured to write the data to be synchronized to the storage system at the destination.

[0224] To enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of this disclosure, the file synchronization method provided by the embodiments of this disclosure will be described in detail below through specific examples:

[0225] Example 1

[0226] The application scenarios of this disclosure are very extensive, specifically including the following aspects:

[0227] In a corporate office environment, this disclosure can be used for file synchronization between an enterprise's internal file server and employees' office devices (such as computers and laptops). It is suitable for distributed office environments of multinational corporations or multi-departmental collaboration within local enterprises, ensuring efficient and reliable file synchronization and avoiding work delays caused by data inconsistencies.

[0228] In a cloud computing environment, this disclosure enables efficient data synchronization among multiple virtual machines. With the increasing prevalence of cloud computing, data consistency and synchronization efficiency have become particularly important. The dynamic awareness and adaptive adjustment strategies of this disclosure can effectively meet the high standards of data synchronization required by cloud computing environments.

[0229] In the context of personal users, this disclosure provides an intelligent file synchronization solution for individuals with multiple devices (such as computers, mobile phones, tablets, etc.). Regardless of the device a user uses, they can access the latest files at any time, ensuring file content remains consistent across all devices and enhancing the user experience.

[0230] In summary, this disclosure can adapt to the diverse needs of enterprises, cloud computing, and individual users, providing stable, efficient, and flexible file synchronization functions.

[0231] The key technologies and protection points disclosed herein mainly include the following aspects:

[0232] (1) This disclosure combines dynamic perception of the network environment, classification of file importance, and adjustment of adaptive synchronization strategy, which can significantly improve the efficiency and reliability of file synchronization.

[0233] (2) Design differentiated synchronization mechanisms based on the importance and value of the files. In different network environments, prioritize the synchronization of critical files to ensure their timely transmission, while avoiding the waste of network resources by synchronizing unnecessary files.

[0234] (3) This disclosure is designed for complex and ever-changing network environments such as wireless networks, and has the ability to adjust synchronization strategies in real time. For example, when network bandwidth and stability fluctuate, the synchronization method is dynamically optimized to improve the success rate of file transfer and user experience.

[0235] In summary, this disclosure provides a more efficient, intelligent, and flexible solution for cross-network file synchronization through multiple technological innovations, representing a significant technological breakthrough for adapting to complex network environments.

[0236] This disclosure has the following beneficial effects:

[0237] By introducing the concept of adaptive network environments, this disclosure implements an innovative file synchronization method that is adaptable to multiple operating systems and various types of devices. Under different network environments, this disclosure can adaptively adjust the synchronization strategy, thereby ensuring the efficiency and stability of file synchronization. The use of adaptive synchronization technology effectively reduces latency issues in data transmission, providing users with a smoother experience. By monitoring network status in real time and dynamically optimizing the transmission process, this disclosure significantly improves the reliability of file synchronization and reduces the risk of synchronization failure due to network fluctuations or resource limitations. This disclosure provides seamless data synchronization between different devices and operating systems, ensuring that users can quickly and securely obtain the latest files, thereby improving the overall user experience.

[0238] In summary, this disclosure has significant advantages in terms of efficiency, stability, reliability, and user experience, providing a better solution for cross-platform file synchronization.

[0239] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0240] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A file synchronization method, comprising: Obtain network environment parameters; The current network status is dynamically assessed based on the network environment parameters. The document is valued based on document valuation factors to determine its priority. Based on the current network status and the priority of the file, the file synchronization strategy is adaptively adjusted. The file synchronization is performed according to the adjusted file synchronization strategy; Based on the current network status and the file priority, the file synchronization strategy is adaptively adjusted, including: Based on the established synchronization rules, different synchronization strategies are formulated for different combinations of network states and priorities. The synchronization rules can be dynamically adjusted according to actual needs. Based on the current network status and the priority of the file, select the corresponding synchronization strategy; The synchronization rules include: High-priority files are synchronized first under different network conditions, and a dynamic synchronization strategy that adapts to the network conditions is adopted. Medium-priority files employ a strategy of adaptively adjusting synchronization rate and frequency based on network conditions; Low-priority files will have their synchronization delayed or paused when resources are limited or the network is congested, and will be synchronized in the background when network conditions are good. Among them, the corresponding synchronization strategy is selected based on the current network status and the priority of the file, including: Based on the current network status and the priority of the file, the data to be synchronized in the file is dynamically determined; Based on the current network status and the priority of the file, the synchronization execution method of the data to be synchronized is dynamically selected; The network states include: high bandwidth stable state, medium bandwidth fluctuating state, and low bandwidth congestion state. The synchronization strategy includes: Under high bandwidth and stable conditions, high-priority files adopt an efficient synchronization strategy, medium-priority files adopt a large data block synchronization strategy, and low-priority files are synchronized in the background. Under medium bandwidth fluctuation conditions, the high-priority files adopt a dynamic rate adjustment synchronization strategy, the medium-priority files adopt a time-sharing synchronization strategy, and the low-priority files are delayed or paused in synchronization. Under low bandwidth congestion conditions, the high-priority files adopt an incremental synchronization strategy, the medium-priority files adopt a partial data synchronization strategy, and the low-priority files are delayed or suspended from synchronization.

2. The file synchronization method according to claim 1, wherein, Obtain network environment parameters, including: Adjust the types of network environment parameters according to actual needs; Obtain the network environment parameters corresponding to the adjusted type.

3. The file synchronization method according to claim 2, wherein, Based on the aforementioned network environment parameters, dynamically assess the current network status, including: Based on actual needs, the threshold range of the network environment parameters and the network status classification criteria are dynamically set to establish network status assessment rules. The network state parameters are analyzed using the network state assessment rules. Based on the analysis results, the current network state is determined.

4. The file synchronization method according to claim 3, wherein, The document is valued based on document valuation factors to determine its priority, including: Determine the factors for assessing the value of the document based on actual needs; Based on the determined document value assessment factors, the priority score of the document is calculated using the established assessment method; The priority of a file is determined based on its priority score using priority classification rules.

5. The file synchronization method according to claim 4, wherein, Based on the identified document value assessment factors, the priority score of the document is calculated using the established assessment method, including: Set the weight of each determined document value assessment factor according to preset standards or actual business needs; Using the determined file value assessment factors and the weights, a weighted algorithm is used to calculate the priority score of the file.

6. The file synchronization method according to claim 1, wherein, The file synchronization is performed according to the adjusted file synchronization strategy, including: According to the adjusted file synchronization strategy, determine the data to be synchronized and the synchronization execution method of the file; The data to be synchronized is compressed to generate compressed blocks; The compressed block is encrypted to generate an encrypted compressed block; The encrypted compressed block is synchronized to the destination according to the synchronous execution method.

7. The file synchronization method according to claim 6, wherein, Performing file synchronization according to the adjusted file synchronization strategy also includes: According to the synchronous execution method, the destination receives the encrypted compressed block; The received encrypted compressed block is decrypted to generate a compressed block; Verify the integrity of the compressed block; If integrity verification fails, request to resend the synchronization data; Once the integrity verification passes, the compressed block is decompressed and restored to the data to be synchronized. The decompressed data to be synchronized is written to the storage system of the destination.

8. An electronic device, comprising: One or more processors; A memory having stored one or more programs that, when executed by one or more processors, cause the one or more processors to implement the file synchronization method according to any one of claims 1 to 7.

9. A computer-readable medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the file synchronization method according to any one of claims 1 to 7.

10. A computer program product comprising a computer program or instructions that, when executed by a processor, implement the file synchronization method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Network disk file synchronization method and device

    CN114706831A

  • Predictive file synchronization

    US9749412B1