File synchronization method, electronic equipment, readable medium and program product

By dynamically evaluating network status and file priorities and adaptively adjusting file synchronization strategies, the problem of inefficient file synchronization in existing technology in complex network environments is solved, and efficient and reliable file synchronization is achieved.

CN119892852AActive Publication Date: 2025-04-25BEIJING TOPSEC NETWORK SECURITY TECH +2

Patent Information

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

AI Technical Summary

Technical Problem

Existing file synchronization technology is difficult to effectively synchronize files in complex network environments, especially when the network bandwidth is low or the network fluctuates greatly, resulting in inefficient synchronization or failure, and it is also impossible to perform differentiated processing according to the importance of the file.

Method used

By obtaining network environment parameters, dynamically assessing the current network status, and determining file priority based on file value evaluation factors, adaptively adjusting the file synchronization strategy, including adopting multi-threaded concurrent synchronization in a high-bandwidth stable state, adopting dynamic rate adjustment synchronization strategy in a medium-bandwidth fluctuation state, and adopting incremental synchronization strategy in a low-bandwidth congestion state.

Benefits of technology

It significantly improves the efficiency and reliability of file synchronization, and can dynamically adjust synchronization strategies according to the network environment and file priority, optimize resource allocation, ensure timely synchronization of key files, reduce excessive synchronization of non-critical files, and reduce waste of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892852A_ABST
    Figure CN119892852A_ABST
Patent Text Reader

Abstract

The invention provides a file synchronization method. The method comprises the following steps: acquiring network environment parameters; dynamically evaluating the current network state according to the network environment parameters; carrying out value evaluation on the files based on the file value evaluation factors so as to determine priorities of the files; based on the current network state and the priority of the file, adaptively adjusting a synchronization strategy of the file; and executing the synchronization of the file according to the adjusted synchronization strategy of the file. The disclosure also provides an electronic device, a computer readable medium, and a computer program product. According to the file synchronization method and device, the network environment parameters are obtained, the current network state is dynamically evaluated, the file value evaluation result is combined, and the file synchronization strategy is adaptively adjusted based on the priority, so that the file synchronization efficiency and reliability are remarkably improved. Through differentiated synchronization rules and dynamic adjustment mechanisms, resource allocation can be optimized in different network states, synchronization of key data is guaranteed preferentially, and flexible expansion and multi-scene application are supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of file synchronization 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 Art

[0002] In the current information technology environment, file synchronization plays a vital role in a variety of application scenarios. For example, in a distributed office environment, employees need to access and modify files through multiple devices in different locations; in a cloud computing environment, multiple virtual machines need to maintain data consistency. However, existing file synchronization technologies have some obvious defects. Traditional file synchronization methods usually adopt fixed synchronization strategies and do not consider the dynamic changes of the network environment, such as synchronizing files at fixed time intervals. In the case of low network bandwidth or large network fluctuations, this fixed strategy may lead to low synchronization efficiency and may even fail due to network congestion. In addition, existing file synchronization systems are usually unable to perform differentiated processing based on the importance of files. For files of different priorities, the synchronization method is relatively single and cannot effectively utilize network resources to meet actual needs. The above problems limit the efficiency and reliability of file synchronization technology in complex application scenarios. Summary of the invention

[0003] The embodiments of the present disclosure provide a file synchronization method, an electronic device, a computer-readable medium, and a computer program product.

[0004] In a first aspect, an embodiment of the present disclosure provides a file synchronization method, comprising: obtaining network environment parameters; dynamically evaluating the current network status according to the network environment parameters; performing a value evaluation on the file based on a file value evaluation factor to determine the priority of the file; adaptively adjusting the synchronization strategy of the file based on the current network status and the priority of the file; and executing synchronization of the file according to the adjusted file synchronization strategy.

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

[0006] In some embodiments, the current network status is dynamically evaluated based on the network environment parameters, including: dynamically setting the threshold range of the network environment parameters and the network status classification standards 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 file is valued based on a file value assessment factor to determine a priority of the file, including: determining a file value assessment factor of the file according to actual needs; calculating a priority score of the file using a set assessment method based on the determined file value assessment factor; and determining the priority of the file using a priority classification rule based on the priority score of the file.

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

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

[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 status is adopted; medium-priority files adopt a strategy of adaptively adjusting the synchronization rate and frequency according to the network status; low-priority files delay or suspend synchronization when resources are limited or the network is congested, and synchronize in the background when network conditions are good.

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

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

[0013] In some embodiments, the synchronization strategy includes: in a high-bandwidth stable state, the high-priority file adopts an efficient synchronization strategy, the medium-priority file adopts a large data block synchronization strategy, and the low-priority file is synchronized in the background; in a medium-bandwidth fluctuation state, the high-priority file adopts a dynamic rate adjustment synchronization strategy, the medium-priority file adopts a time-sharing synchronization strategy, and the low-priority file delays or suspends synchronization; in a low-bandwidth congestion state, the high-priority file adopts an incremental synchronization strategy, the medium-priority file adopts a partial data synchronization strategy, and the low-priority file delays or suspends synchronization.

[0014] In some embodiments, synchronization of the file is performed according to the adjusted file synchronization strategy, including: 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, synchronization of the file is performed according to the adjusted file synchronization strategy, and further includes: according to the synchronization execution method, the destination end receives the encrypted compressed block; decrypts the received encrypted compressed block to generate a compressed block; verifies the integrity of the compressed block; when the integrity verification fails, requests to resend the synchronization data; when the integrity verification passes, decompresses the compressed block and restores it to the data to be synchronized; and writes the decompressed data to be synchronized to the storage system of the destination end.

[0016] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a memory on which one or more programs are stored, and 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 the embodiment of the present disclosure.

[0017] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the file synchronization method described in the first aspect of the embodiment of the present disclosure is implemented.

[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the file synchronization method described in the first aspect of the embodiment of the present disclosure.

[0019] The present invention provides an efficient, secure and flexible file synchronization method, which combines multi-threaded concurrent synchronization, time-sharing synchronization and incremental synchronization technology to effectively improve file synchronization efficiency, reduce network bandwidth occupancy, ensure the security and integrity of data transmission, and meet diverse synchronization needs through dynamic policy adjustment. 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] The present disclosure combines network dynamic perception, file priority classification and adaptive synchronization strategy adjustment to improve file synchronization efficiency and reliability, and is suitable for scenarios such as distributed office, cloud computing, and personal multi-device file management. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

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

[0024] Figure 4 It is a block diagram of a file synchronization system according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the technical solution of the present disclosure is described in detail below with reference to the accompanying drawings.

[0026] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.

[0027] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0028] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0029] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" 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 features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.

[0030] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those 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 the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0031] In this disclosure, unless otherwise specified, the following technical terms should be understood as follows:

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

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

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

[0035] Time-sharing synchronization refers to file synchronization within a specific time window, which is usually 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 time, usually measured in Mbps or Gbps.

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

[0038] Packet loss rate refers to 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] Multi-threaded concurrent synchronization refers to a technology that uses 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 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 the system, usually including CPU usage, memory usage, disk I / O, network utilization, etc.

[0042] File flushing refers to the process of writing file data in memory to disk and saving it to the file system to ensure data persistence in the storage device.

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

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

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

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

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

[0048] Through the above technical improvements, the present disclosure can significantly improve the adaptability and resource utilization efficiency of file synchronization and meet the needs of diverse application scenarios.

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

[0050] First, refer to Figure 1 , the present disclosure provides a file synchronization method, including:

[0051] S11, obtaining network environment parameters;

[0052] S12. Dynamically evaluate the current network status according to the network environment parameters;

[0053] S13, performing a value assessment on the file based on the file value assessment factor to determine the priority of the file;

[0054] S14, adaptively adjusting the synchronization strategy of the file based on the current network status and the priority of the file;

[0055] S15. Execute synchronization of the file 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] The network environment parameters corresponding to the adjusted category are obtained.

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

[0060] In the disclosed embodiment, dynamic perception of the network environment is achieved through a network monitoring module, which is deployed at each node in the network and has a network parameter collection function, aiming to obtain key information of the network environment to support dynamic network perception. The collected parameters include network bandwidth, delay, packet loss rate, throughput, jitter, network load, etc., and may include other important parameters that reflect the performance, status and health of the network. According to the needs of network performance evaluation, fault diagnosis, security monitoring or resource optimization, the types of parameters to be collected are dynamically adjusted.

[0061] Network bandwidth reflects the amount of data that can be transmitted by the network per unit time. Network bandwidth can be flexibly calculated through a variety of methods. The network interface function provided by the operating system can be used to obtain real-time network status information to obtain network bandwidth data. For example, the network bandwidth can be obtained based on the operating system interface, and the total number of bytes sent and received by the network interface can be read regularly (such as every second) (for example, in the Linux system, the data in the / proc / net / dev file can be read); the change in the total number of bytes per unit time can be calculated to obtain the bandwidth. In addition, 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 counting the change in the time window; or it can be based on active measurement, by sending a certain size of data packet to the target node and recording the transmission time, and the bandwidth can be estimated using the formula: bandwidth = data packet size / transmission time. The calculation method of network bandwidth can be flexibly selected to meet different application requirements.

[0062] The network delay and packet loss rate are obtained through network detection packet technology. Specifically, ICMP (Internet Control Message Protocol) detection packets, UDP detection packets or TCP detection packets are sent to the target node regularly (such as every 5 seconds); the timestamp of sending the detection packet and the timestamp of receiving the response packet are recorded to calculate the network delay. The module can select the appropriate detection packet type according to the needs and flexibly adapt to different network environments. The packet loss rate is calculated by counting the number of detection packets sent and the number of detection packets that have not received a response. The module supports the use of different technical means as long as the packet loss rate can be accurately obtained.

[0063] Throughput is an indicator of the actual transmission efficiency of the network. Throughput is calculated by counting the total number of valid data bytes passing through the network interface in a unit of time (such as 10 seconds). Jitter reflects the volatility of network delay and is an important indicator for real-time applications. Multiple delay samples are collected within a certain time window, and the standard deviation of delay variation is calculated to obtain jitter. Network load reflects the current network utilization rate. The load ratio can be calculated by collecting the length of the send or receive queue on the switch or router and combining it with the maximum queue length; or the network load can be estimated by using the ratio of the current bandwidth to the maximum available bandwidth.

[0064] The design of the network monitoring module fully considers the needs of different application scenarios. Through flexible parameter collection and expansion capabilities, it supports a variety of network needs such as network performance evaluation, troubleshooting, security monitoring, and planning optimization, providing reliable data support for dynamic network perception. Network performance evaluation reflects the adaptability of the network to specific application scenarios by monitoring key indicators, and supports performance optimization; for example, video streaming pays more attention to network bandwidth, jitter, and latency, while file transfer pays more attention to throughput and packet loss rate. Network failures are often closely related to specific parameter anomalies. Key parameters can be selected according to common fault types. By collecting these parameters, problems can be quickly located and fault diagnosis efficiency can be improved; for example, in network congestion scenarios, network load and queue length are monitored to determine whether there is traffic overload; in data loss or retransmission scenarios, indicators such as retransmission rate and packet loss rate are focused on to locate problems on the transmission link. Ensuring network security requires real-time monitoring of abnormal behavior-related parameters, timely detection of potential threats and taking measures; for example, monitoring abnormal traffic behavior, collecting abnormal connection numbers, frequent port scanning behaviors, etc., to detect potential attack threats; defending against traffic abuse and analyzing traffic patterns to identify abnormal behaviors such as denial of service attacks (DDoS). In order to support the rational planning and long-term optimization of network resources, it is necessary to collect trend parameters that reflect the overall status of the network; for example, network planning collects network capacity and utilization data to analyze whether capacity expansion is needed; resource optimization optimizes traffic distribution and link settings by statistically analyzing long-term network performance data. The network monitoring module can cover a variety of scenario requirements, and new parameter collection logic can be added according to requirements to provide reliable data support for dynamic network perception, while having high scalability to cope with future needs.

[0065] In some embodiments, dynamically evaluating the current network status according to the network environment parameters includes:

[0066] According to actual needs, dynamically set the threshold range of the network environment parameters and the network status classification standard to establish network status evaluation rules;

[0067] Analyzing the network status parameters using the network status evaluation rule;

[0068] The current network status is determined according to the analysis result.

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

[0070] In the disclosed embodiment, the network environment assessment mechanism comprehensively analyzes the parameters collected by the network monitoring module through the central assessment module, dynamically assesses the current network status and supports the adjustment of the file synchronization policy. The network monitoring module collects parameters including bandwidth, delay, packet loss rate, etc., 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 policy adjustment requirements.

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

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

[0073] Both the central evaluation module and the network monitoring module support flexible configuration, and users can adjust the collection parameters, collection frequency and transmission mode according to their needs. The module supports the introduction of more network parameters (such as jitter, number of abnormal connections, throughput, etc.) and new classification logic, and realizes customized evaluation by dynamically loading configuration files.

[0074] In some embodiments, the value of the file is evaluated based on the file value evaluation factors to determine the priority of the file, including:

[0075] Determine the document value assessment factors of the document according to actual needs;

[0076] Based on the determined file value assessment factors, a priority score of the file is calculated using a set assessment method;

[0077] The priority of the file is determined according to the priority score of the file using a priority classification rule.

[0078] In some embodiments, the file value assessment factors include the importance of the file, the update frequency of the file, and the timeliness of the file.

[0079] In the disclosed embodiment, the value assessment of a file comprehensively considers multi-dimensional information, and factors for the file value assessment may include factors such as the importance of the file, the timeliness of the file, and the update frequency of the file.

[0080] The importance of files is assessed based on the directory location, content characteristics, and extension of the file. The directory location reflects the business module or security level. For example, files in the security directory are of higher importance. Content characteristics can be used to assess importance through key business data analysis (such as financial data) or the degree of association. In addition, files with extensions such as ".conf" represent system configuration files and usually have a higher priority.

[0081] The importance of file content supports dynamic adjustment and pre-setting to meet the diverse needs of business scenarios. Dynamic adjustment relies on data analysis and business changes, and can flexibly evaluate the importance of files according to actual needs and environmental changes, including: (1) Based on data analysis and machine learning, using data analysis technology and machine learning algorithms, dynamically adjust the importance classification of file content to adapt to changes brought about by business development and data accumulation. For example, the importance of a file is determined by analyzing data features such as the frequency of file access, modification frequency, and degree of association with other important files. If a file is frequently accessed and modified within a period of time and is closely related to multiple key business files, its importance level is dynamically adjusted to increase its priority. (2) User feedback and business changes, adjust the importance classification of file 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 file content related to the new product will be upgraded to a high importance level.

[0082] Pre-setting: Through business rules and industry standards, an initial importance level is provided for specific types of files, including: (1) Based on business rules and experience, enterprises or organizations formulate rules for classifying the importance of file content based on their own business processes and long-term experience. For example, in e-commerce companies, based on business experience, files such as user order data, product inventory data, and payment transaction records are crucial to the normal operation of the business, so files containing these contents can be pre-set to a high importance level; in R&D companies, technical documents, test reports, and project plan files related to product design are usually pre-marked as important. (2) With reference to industry standards and regulations, the regulations and standards of certain industries clearly define which data is important and sensitive. For example, in the medical industry, according to regulatory requirements, patient personal health information and medical diagnosis results must be strictly confidential, and the importance level of such files is preset to the highest level; in the financial industry, files 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 the creation time of the file with the predefined validity period. For example, the value of a temporary project file decreases after the project ends, and its priority is reduced accordingly. For files with unclear validity periods, a default priority can be set or dynamically adjusted based on other factors.

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

[0085] The file value assessment factors support dynamic expansion, for example, factors such as security-related parameters, business process-related parameters, and data quality-related parameters may also be included.

[0086] Security-related parameters can include encryption status and access permission settings. Encrypted files usually contain sensitive information, such as financial statements or user data, and can be given higher scores; in a financial institution's file system, for files storing customer account passwords, if the file is encrypted, it can be given a higher score in the importance assessment. Check whether the file access permission settings are reasonable. For example, files that are only accessible to a specific user group are usually of higher importance; conversely, too loose permissions may be risky and have a lower priority.

[0087] Parameters related to business processes can include key business process participation and business relevance. Determine whether the file 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 progress of transactions, and is a key business process file, and its importance level should be set to high. Measure the degree of relevance of the file to other important business files or system modules. For example, the requirements document of a project is closely related to the design documents, test reports and other files of the project. Together, they constitute the complete information of the project, so the importance of these files is relatively high.

[0088] Parameters related to data quality can include data completeness and data accuracy. Check whether the data in the file is complete and whether there is missing or erroneous data; for example, if a sales report has a lot of missing or erroneous data, its reference value for business decision-making will be reduced, and the importance assessment score will be reduced accordingly. Evaluate the accuracy and reliability of the data in the file. For example, for a market research report, if the data source is unreliable or the analysis method is problematic, the importance of the report will be questioned and the priority will be reduced.

[0089] In some embodiments, based on the determined file value assessment factors, the priority score of the file is calculated using a set assessment method, including:

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

[0091] The priority score of the file is calculated using a weighted algorithm using the determined file value assessment factors and the weights.

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

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

[0094] (1) Different evaluation factors have different degrees of importance, and these differences are accurately reflected through weight settings. Specifically, the importance of file content may have a greater impact on priority than timeliness, so it is assigned a higher weight. For example, in an enterprise file management system, the importance weight of file content is set to w1=0.5, the weight of file timeliness is set to w2=0.3, and the weight of file update frequency is set to w3=0.2; when calculating the priority score, the importance of file content will occupy a larger proportion.

[0095] (2) As business needs and environments 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 of an enterprise develops and the requirements for the timeliness of documents increase, the timeliness weight can be adjusted from w2 = 0.3 to w2 = 0.4.

[0096] (3) The linear weighted algorithm is simple and easy to understand, and is convenient for development and maintenance. For example, the linear weighted algorithm is used to multiply the scores of each evaluation factor by the corresponding weight and add them together. The calculation formula is: P = w1×s1+w2×s2+w3×s3, where s1, s2, and s3 are the scores of the file in terms of importance, update frequency, and timeliness, respectively.

[0097] Specifically, according to preset standards or actual business needs, set the weights of file importance, update frequency and timeliness. For example, the weight of file content importance is set to w1=0.4, the update frequency is w2=0.3, and the timeliness is w3=0.3. The priority score is calculated by the formula P=w1×s1+w2×s2+w3×s3, where s1 is the importance score of the file, for example, 3 points for very important, 2 points for important, and 1 point for general; s2 is the file update frequency score, for example, 3 points for the number of modifications >5 times, 2 points for 2-4 times, and 1 point for <2 times; s3 is the file timeliness score, for example, 3 points for the remaining time <1 day, 2 points for 1-3 days, and 1 point for >3 days. If the score of a file is s1=3, s2=2, and s3=1, the calculated score is P=0.4×3+0.3×2+0.3×1=2.1.

[0098] Files can be divided into high priority, medium priority, and low priority according to the range of priority score P. For example, P ≥ 2.5 is high priority, 1.5 ≤ P < 2.5 is medium priority, and P < 1.5 is low priority. The weights and scoring rules can be adjusted according to actual needs. For example, update the weight configuration as the business changes; introduce new evaluation factors (such as the access frequency of the file or the relevance to the core business) to optimize the classification criteria. The priority algorithm is applicable to a variety of scenarios and supports users to modify attribute weights and scoring criteria through simple configuration. Through the above-mentioned priority classification algorithm, the system can flexibly adapt to diverse business needs and provide reliable decision-making basis in file management, resource allocation, and data backup.

[0099] In some embodiments, based on the current network status and the priority of the file, adaptively adjusting the synchronization strategy of the file includes:

[0100] Based on the set synchronization rules, different synchronization strategies are formulated for different combinations of network status and priority. The synchronization rules support dynamic adjustment according to actual needs.

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

[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 status is adopted;

[0104] For medium priority files, the synchronization rate and frequency are adjusted adaptively according to the network status;

[0105] Low-priority files will be delayed or paused from syncing 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, based on the current network status and the priority of the file, selecting a corresponding synchronization strategy includes:

[0107] Dynamically determine the to-be-synchronized data of the file based on the current network status and the priority of the file;

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

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

[0110] In a high-bandwidth stable state, the high-priority file adopts an efficient synchronization strategy, the medium-priority file adopts a large data block synchronization strategy, and the low-priority file adopts a background synchronization strategy;

[0111] In the medium bandwidth fluctuation state, the high priority file adopts a dynamic rate adjustment synchronization strategy, the medium priority file adopts a time-sharing synchronization strategy, and the low priority file delays or pauses synchronization;

[0112] In a low bandwidth congestion state, the high priority file adopts an incremental synchronization strategy, the medium priority file adopts a partial data synchronization strategy, and the low priority file delays or suspends synchronization.

[0113] In the disclosed embodiments, by dynamically adjusting the file synchronization strategy to adapt to different network states and file priorities, the synchronization efficiency is improved and resource allocation is optimized. The synchronization rules can be set as follows: high-priority files are synchronized first under any network state, and strategies such as dynamic rate adjustment and incremental synchronization are adopted to ensure the timely transmission of critical data. Medium-priority files dynamically adjust the synchronization rate and frequency according to the network status, such as using large block data synchronization at high bandwidth, time-sharing synchronization at medium bandwidth, and partial data synchronization at low bandwidth. Low-priority files delay or suspend synchronization when resources are limited or the network is congested, and use background synchronization 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 and stable network environment, for high-priority files, multi-threaded concurrent synchronization is used to maximize bandwidth utilization. Specifically, the number of threads is dynamically determined based on the file size and network bandwidth. For example, a simple proportional calculation method is used to determine the number of threads based on the proportional relationship between the file size and the network bandwidth. Assuming that the network bandwidth = 100Mbps and the file size = 1GB, the system can open 8 threads for synchronization. This is because multi-threaded concurrent synchronization can make full use of the network bandwidth, and multiple threads transmit different parts of the file at the same time, greatly improving the synchronization speed. For medium-priority files, in a high-bandwidth and stable environment, a larger synchronization block size (such as 1MB) is used to reduce additional overhead during the synchronization process. For example, 1MB of data blocks are synchronized each time. For low-priority files, the background is synchronized at a lower priority to avoid affecting the transmission of high- and medium-priority files.

[0116] In a medium bandwidth fluctuation network environment, for high priority files, you can use adaptive transmission rate control to adjust the synchronization speed according to the real-time changes in network bandwidth. For medium priority files, use a time-sharing synchronization strategy. The system will analyze the law of network bandwidth fluctuations and choose to synchronize during the period when the network bandwidth is relatively high. For example, by analyzing the historical network data, it is found that the network bandwidth is relatively high from 10 am to 1 pm and 3 pm to 4 pm every day, so the medium priority files are synchronized during these periods. For low priority files, you can pause the synchronization and wait until the network conditions improve or the synchronization of high and medium priority files is completed.

[0117] In a low-bandwidth congested network environment, for high-priority files, incremental synchronization is used to synchronize only the changed parts of the file. For example, the changed parts of the file are determined and synchronized through the file version control system (such as Git's differential algorithm). Assuming that a file is updated from version 1 to version 2, by analyzing the differences between the two versions, only the changed parts are synchronized, rather than the entire file. This can greatly reduce the amount of data to be synchronized and improve the synchronization success rate in a low-bandwidth environment. Different file comparison algorithms can be used according to file type, performance requirements, and synchronization scenarios, such as: simple text comparison algorithm, line-by-line comparison algorithm (applicable to text files, by comparing newly added or modified lines to achieve efficient synchronization), hash value-based comparison algorithm (quickly detect file differences), differential algorithm (by finding the longest common subsequence (LCS) between two files to determine the difference between files). For medium-priority files, you can wait for the network to improve or use a very low rate (such as synchronizing 100KB every 10 minutes) to synchronize some data; partial data synchronization means synchronization at fixed time intervals and data volumes when the network conditions are poor, without considering the specific changes in the file content. Synchronization of low-priority files is suspended to avoid aggravating network congestion.

[0118] Synchronization strategies can be flexibly adjusted according to application scenarios and actual needs. For example, in enterprise file management, financial data (high priority) is synchronized first, daily reports are synchronized on demand (medium priority), and archived data is synchronized in a delayed or background manner (low priority). In cloud storage environments, dynamic synchronization strategies can be used to 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 can further adjust synchronization strategies.

[0119] 1) Dynamically adjust the synchronization rate according to the network bandwidth

[0120] Monitor network bandwidth in real time and dynamically adjust the synchronization rate according to bandwidth conditions to ensure efficient use of network resources. When the network bandwidth is good, increase the synchronization rate appropriately; when the bandwidth is poor, reduce the rate to reduce network burden.

[0121] For example,

[0122] When the network bandwidth is >1Mbps, 200KB of data will be synchronized every 5 minutes;

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

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

[0125] 2) Adjust synchronization strategy according to file importance

[0126] Medium-priority files are graded according to their importance, for example, they are divided into different levels such as important and generally important, and differentiated strategies are adopted to optimize synchronization resource allocation; important medium-priority files are synchronized first when the network environment permits, and the synchronization rate can be appropriately increased; generally important medium-priority files are synchronized according to the conventional partial data synchronization strategy.

[0127] For example, for an important medium priority file:

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

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

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

[0131] For files of medium priority and of general importance, the previously mentioned policy of synchronizing 100KB of data every 10 minutes is used for synchronization.

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

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

[0134] For example,

[0135] When the load is low, that is, CPU usage < 30% and memory usage < 50%, 120KB of data is synchronized every 8 minutes;

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

[0137] When the load is high, that is, CPU usage > 70% or memory usage > 80%, the synchronization of medium priority files is suspended until the system load drops below the threshold and then the synchronization is resumed.

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

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

[0140] Compressing the data to be synchronized to generate a compressed block;

[0141] Encrypting the compressed block to generate an encrypted compressed block;

[0142] The encrypted compressed block is synchronized to the destination end according to the synchronization execution mode.

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

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

[0145] Decrypting the received encrypted compressed block to generate a compressed block;

[0146] Verify the integrity of compressed blocks;

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

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

[0149] Write the decompressed data to be synchronized to the storage system on the destination end.

[0150] In the disclosed embodiment, synchronization tasks are executed according to the adjusted synchronization strategy, and the synchronization execution mode (such as multi-threaded concurrency, time-sharing synchronization, and incremental synchronization) is dynamically selected to adapt to the requirements of different network states and file priorities.

[0151] Multithreaded concurrent synchronization is suitable for high-bandwidth environments and makes full use of network resources to improve transmission efficiency. It is implemented through multithreaded libraries (such as Windows API, pthread library). In Windows systems, use multithreaded related functions in Windows API, such as calling CreateThread function to create threads and using WaitForMultipleObjects function to wait for multiple threads to complete. In Linux systems, call pthread_create function to create threads and call pthread_join function to wait for threads to complete.

[0152] Time-sharing synchronization is suitable for medium bandwidth fluctuations. The time window for file synchronization is controlled by a timer to perform synchronization tasks during periods of relatively good network bandwidth. In programming implementation, the timer function provided by the operating system can be used. For example, in Java, the java.util.Timer class is used to set a timer task to specify a specific time period for file synchronization. In other programming environments, the timer function of the operating system can be used to implement time management. For example, in high bandwidth periods such as 10-11 am and 3-4 pm every day, medium priority files are synchronized by time-sharing.

[0153] Incremental synchronization is suitable for low-bandwidth states and only transfers the changed parts of the file. The new and modified parts are extracted through the Git differential algorithm to avoid repeated transmission of unchanged data.

[0154] In the disclosed embodiment, the network status and file priority are monitored in real time, and the optimal synchronization execution mode is dynamically selected. In a high-bandwidth stable state, multi-thread synchronization of high-priority files is preferred; in a medium-bandwidth fluctuation state, time-sharing synchronization of medium-priority files is used; in a low-bandwidth congestion state, incremental synchronization of high-priority files is preferred. Through these technical means, the efficiency, flexibility and adaptability of synchronization tasks are ensured to meet diverse business needs, while supporting future technology expansion.

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

[0156] In the embodiments of the present disclosure, refer to Figure 2 , the file synchronization process is as follows:

[0157] The source sends a "create file listener" request to the source file server. After receiving the request, the source file server creates a file listener and returns a "successful" response to the source.

[0158] The source end creates a network environment detector to monitor the current network environment in real time and provide support for adaptive adjustment of synchronization strategies.

[0159] When the file listener detects that a file has changed, the source classifies the changed files according to their priority level 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 sends the encrypted compressed blocks to the receiving end;

[0162] After receiving the encrypted compressed block, the receiving end performs decryption operations and integrity verification on it in turn 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 the complete file data, and written to the storage system (i.e. “written to disk”) by the receiving file server.

[0164] If the data is stored successfully, the receiving file server returns a "successful" response to the receiving end, and the receiving end returns the response to the source end, completing the entire synchronization process.

[0165] In the disclosed embodiment, the file listener is a functional module created by a program, which monitors changes in a folder by periodically recursively scanning a specified folder.

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

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

[0168] Second, refer to Figure 3 , an embodiment of the present disclosure provides an electronic device, comprising:

[0169] One or more processors 301;

[0170] A memory 302, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement the file synchronization method described in the first aspect of the embodiment of the present disclosure;

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

[0172] Among them, the processor 301 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the 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); the I / O interface (read-write interface) 303 is connected between the processor 301 and the memory 302, and can realize information interaction between the processor 301 and the memory 302, including but not limited to a data bus (Bus), etc.

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

[0174] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the file synchronization method described in the first aspect of the embodiment of the present disclosure is implemented.

[0175] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the file synchronization method described in the first aspect of the embodiment of the present disclosure.

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

[0177] Fifth, refer to Figure 4 The present disclosure provides a file synchronization system, including:

[0178] A network monitoring module 401 is configured to obtain network environment parameters;

[0179] A network evaluation module 402 is configured to dynamically evaluate the current network status according to the network environment parameters;

[0180] A file value assessment module 403, configured to perform a value assessment on a file based on a file value assessment factor to determine a priority of the file;

[0181] A policy adjustment module 404, configured to adaptively adjust the synchronization policy of the file based on the current network status and the priority of the file;

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

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

[0184] A parameter adjustment module, configured to adjust the types of network environment parameters according to actual needs;

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

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

[0187] A rule setting module, configured to dynamically set the threshold range of the network environment parameter and the network status classification standard according to actual needs to establish a network status evaluation rule;

[0188] An analysis module, configured to analyze the network environment parameters using the network status evaluation rule;

[0189] The state determination module is configured to determine the current network state according to the analysis result.

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

[0191] A factor determination module, configured to determine a document value assessment factor of the document according to actual needs;

[0192] A priority calculation module, configured to calculate the priority score of the file based on the determined file value assessment factors and using a set assessment method;

[0193] The priority classification module is configured to determine the priority of the file according to the priority score of the file and using the priority classification rule.

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

[0195] A weight setting module, configured to set the weight of each determined file value assessment factor according to a preset standard 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 policy adjustment module 404 includes:

[0198] A rule setting module, configured to formulate different synchronization strategies for different combinations of network states and priorities based on set synchronization rules, wherein the synchronization rules support dynamic adjustment according to actual needs;

[0199] The strategy selection module is configured to select a 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 status is adopted;

[0202] For medium priority files, the synchronization rate and frequency are adjusted adaptively according to the network status;

[0203] Low-priority files will be delayed or paused from syncing 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, dynamically determine the data to be synchronized of the file;

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

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

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

[0209] In a high-bandwidth stable state, the high-priority file adopts an efficient synchronization strategy, the medium-priority file adopts a large data block synchronization strategy, and the low-priority file adopts background synchronization;

[0210] In the medium bandwidth fluctuation state, the high priority file adopts a dynamic rate adjustment synchronization strategy, the medium priority file adopts a time-sharing synchronization strategy, and the low priority file delays or pauses synchronization;

[0211] In a low bandwidth congestion state, the high priority file adopts an incremental synchronization strategy, the medium priority file adopts a partial data synchronization strategy, and the low priority file delays or suspends synchronization.

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

[0213] A determination module configured to determine the to-be-synchronized data and synchronization execution mode of the file according to the adjusted file synchronization strategy;

[0214] A compression module, configured to compress the data to be synchronized and generate a compressed block;

[0215] An encryption module configured to encrypt the compressed block and generate an encrypted compressed block;

[0216] The synchronization module is configured to synchronize the encrypted compressed blocks to the destination end according to the synchronization execution mode.

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

[0218] A receiving module, configured to receive the encrypted compressed block according to the synchronous execution mode;

[0219] a decryption module configured to decrypt the received encrypted compressed block to generate a compressed block;

[0220] an integrity verification module configured to verify the integrity of the compressed block;

[0221] a retransmission request module configured to request retransmission of synchronization data when integrity verification fails;

[0222] A decompression module, 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 into the storage system of the destination end.

[0224] In order to enable those skilled in the art to more clearly understand the technical solution provided by the embodiment of the present disclosure, the file synchronization method provided by the embodiment of the present disclosure is described in detail below through specific embodiments:

[0225] Embodiment 1

[0226] The application scenarios of the present disclosure are very broad, including the following aspects:

[0227] In an enterprise office environment, the present disclosure can be used for file synchronization between an enterprise's internal file server and employee office equipment (such as computers and notebooks). It is suitable for the distributed office environment of multinational enterprises or multi-department collaboration of local enterprises, and can ensure efficient and reliable synchronization of files to avoid work delays caused by inconsistent data.

[0228] In a cloud computing environment, the present disclosure can achieve efficient data synchronization between multiple virtual machines. With the increasing popularity of cloud computing, data consistency and synchronization efficiency have become particularly important. The dynamic perception and adaptive adjustment strategy of the present disclosure can effectively meet the high standard requirements of cloud computing environments for data synchronization.

[0229] In the individual user scenario, for individual users who have multiple devices (such as computers, mobile phones, tablets, etc.), the present disclosure provides an intelligent file synchronization solution. No matter what device the user uses, the latest file can be obtained at any time, ensuring that the file content is consistent between all devices, thereby improving the user experience.

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

[0231] The key technical points and protection points of this disclosure mainly include the following aspects:

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

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

[0234] (3) The present disclosure is capable of adjusting synchronization strategies in real time for complex and changeable network environments such as wireless networks. 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, the present disclosure provides a more efficient, intelligent and flexible solution for cross-network file synchronization through multiple technological innovations, and is an important technological breakthrough for adapting to complex network environments.

[0236] The present disclosure has the following beneficial effects:

[0237] By introducing the concept of adaptive network environment, the present disclosure implements an innovative file synchronization method that can adapt to multiple operating systems and multiple types of devices. In different network environments, the present disclosure can adaptively adjust the synchronization strategy to ensure the efficiency and stability of file synchronization. The use of adaptive synchronization technology effectively reduces the delay problem in data transmission and provides users with a smoother experience. By real-time monitoring of network status and dynamically optimizing the transmission process, the present disclosure significantly improves the reliability of file synchronization and reduces the risk of synchronization failure due to network fluctuations or resource limitations. The present 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, the present disclosure has significant advantages in efficiency, stability, reliability and user experience, and provides a better solution for cross-platform file synchronization.

[0239] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description 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 by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium 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 technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, 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 a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0240] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A file synchronization method, comprising: Get network environment parameters; Dynamically evaluate the current network status according to the network environment parameters; Performing a value assessment on the documents based on the document value assessment factors to determine the priority of the documents; Adaptively adjusting the synchronization strategy of the file based on the current network status and the priority of the file; The synchronization of the file is performed according to the adjusted synchronization policy of the file.

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

3. The file synchronization method according to claim 2, wherein: Dynamically evaluate the current network status according to the network environment parameters, including: According to actual needs, dynamically set the threshold range of the network environment parameters and the network status classification standard to establish network status evaluation rules; Analyzing the network status parameters using the network status evaluation rule; The current network status is determined according to the analysis result.

4. The file synchronization method according to claim 3, wherein: The documents are assessed based on the document value assessment factors to determine the priority of the documents, including: Determine the document value assessment factors of the document according to actual needs; Based on the determined file value assessment factors, a priority score of the file is calculated using a set assessment method; The priority of the file is determined according to the priority score of the file using a priority classification rule.

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

6. The file synchronization method according to any one of claims 1 to 5, wherein: Adaptively adjusting the synchronization strategy of the file based on the current network status and the priority of the file includes: Based on the set synchronization rules, different synchronization strategies are formulated for different combinations of network status and priority. The synchronization rules support dynamic adjustment according to actual needs. Based on the current network status and the priority of the file, a corresponding synchronization strategy is selected.

7. The file synchronization method according to claim 6, wherein: The synchronization rules include: High-priority files are synchronized first under different network conditions and a dynamic synchronization strategy that adapts to the network status is adopted; For medium priority files, the synchronization rate and frequency are adjusted adaptively according to the network status; Low-priority files will be delayed or paused from syncing when resources are limited or the network is congested, and will be synchronized in the background when network conditions are good.

8. The file synchronization method according to claim 7, wherein: Based on the current network status and the priority of the file, a corresponding synchronization strategy is selected, including: Dynamically determine the to-be-synchronized data of the file based on the current network status and the priority of the file; Based on the current network status and the priority of the file, a synchronization execution mode of the data to be synchronized is dynamically selected.

9. The file synchronization method according to claim 8, wherein: The network status includes: a high-bandwidth stable state, a medium-bandwidth fluctuation state, and a low-bandwidth congestion state.

10. The file synchronization method according to claim 9, wherein: The synchronization strategy includes: In a high-bandwidth stable state, the high-priority file adopts an efficient synchronization strategy, the medium-priority file adopts a large data block synchronization strategy, and the low-priority file adopts a background synchronization strategy; In the medium bandwidth fluctuation state, the high priority file adopts a dynamic rate adjustment synchronization strategy, the medium priority file adopts a time-sharing synchronization strategy, and the low priority file delays or pauses synchronization; In a low bandwidth congestion state, the high priority file adopts an incremental synchronization strategy, the medium priority file adopts a partial data synchronization strategy, and the low priority file delays or suspends synchronization.

11. The file synchronization method according to any one of claims 7 to 10, wherein: Performing synchronization of the file according to the adjusted file synchronization strategy includes: According to the adjusted file synchronization strategy, determine the data to be synchronized and the synchronization execution mode of the file; Compressing the data to be synchronized to generate a compressed block; Encrypting the compressed block to generate an encrypted compressed block; The encrypted compressed block is synchronized to the destination end according to the synchronization execution mode.

12. The file synchronization method according to claim 11, wherein: Executing synchronization of the file according to the adjusted file synchronization strategy also includes: According to the synchronous execution mode, the destination receives the encrypted compressed block; Decrypting the received encrypted compressed block to generate a compressed block; Verify the integrity of compressed blocks; When integrity verification fails, request to resend synchronization data; When the integrity verification passes, the compressed block is decompressed and restored to the data to be synchronized; Write the decompressed data to be synchronized to the storage system on the destination end.

13. An electronic device, comprising: one or more processors; A memory having one or more programs stored 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 according to any one of claims 1 to 12.

14. A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the file synchronization method according to any one of claims 1 to 12.

15. A computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the file synchronization method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Method, device, client side, server side and equipment for file synchronization

    CN103312826A

  • Network disk file synchronization method and device

    CN114706831A

  • Multi-source data synchronous processing system and method

    CN118590503A

  • File synchronization method and device, computer equipment and storage medium

    CN119003244A

  • Predictive file synchronization

    US9749412B1

Cited By

  • File transmission method and device, equipment, storage medium and program product

    CN121173801A