Data synchronization and backup method and device applied to NAS

Through the data processing strategy of obtaining and executing the data management system, the data in real -time monitoring and synchronous NAS devices solves the problems of data synchronization and backup of data in existing technologies, and improved data security and consistency.

CN119377006APending Publication Date: 2025-01-28SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411332667.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The data management system of existing NAS devices is prone to missing data during data synchronization and backup, and cannot reflect data changes in real time, resulting in data inconsistency and affecting data security and consistency.

Method used

By obtaining the data processing strategy of the data management system, monitoring data changes, and determining the processing control parameters based on the monitoring results and strategies, and the control data management system is synchronized in real time and backup data.

Benefits of technology

Realize the real -time data synchronization and backup of the data management system, improve the timeliness and accuracy of data synchronization and backup, thereby improving data security and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377006A_ABST
    Figure CN119377006A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a data synchronization and backup method and device applied to NAS, and the method comprises the steps: obtaining a data processing strategy configured by a data management system; the data management system comprises NAS equipment and an associated data end associated with the NAS equipment. The data processing strategy comprises a synchronization strategy and / or a backup strategy; monitoring the data stored in the data management system to obtain a monitoring result; when it is monitored that the monitored data has data changes, processing control parameters of the data management system about the monitoring result are determined according to the monitoring result and a data processing strategy; controlling the data management system to execute data processing operation on the target data according to the processing control parameters; the target data is data with data change; the data processing operation comprises a synchronization operation and / or a backup operation. Therefore, the data of the data management system can be synchronized and backed up in real time, so that the timeliness and accuracy of data synchronization and backup are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data synchronization and backup method and device applied to NAS. Background Art

[0002] NAS (Network Attached Storage) is a special dedicated data storage server used for data storage and file sharing. It helps enterprises cope with the problem of rapid data growth in the big data era by separating storage devices from servers and centrally managing data.

[0003] In practical applications, existing data management systems that include NAS devices usually use manual backup or scheduled synchronization to complete data synchronization / backup, but the above methods are prone to missing data and cannot reflect data changes in real time, which can easily lead to data inconsistency. Therefore, it is particularly important to propose a technical solution that can achieve real-time data synchronization and backup of the data management system, thereby improving the timeliness and accuracy of data synchronization and backup, and improving the data security and data consistency of the data management system. Summary of the invention

[0004] The present invention provides a data synchronization and backup method and device applied to NAS, which can realize real-time data synchronization and backup of a data management system, thereby improving the timeliness and accuracy of data synchronization and backup, and further improving the data security and data consistency of the data management system.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a data synchronization and backup method applied to NAS, the method comprising:

[0006] Acquire a data processing strategy configured by a data management system; the data management system includes at least two data storage terminals, and all of the data storage terminals include a NAS device and at least one associated data terminal associated with the NAS device; the data processing strategy includes a synchronization strategy and / or a backup strategy;

[0007] Monitoring the data stored in the data management system to obtain monitoring results;

[0008] When the monitoring result is used to indicate that there is a data change in the monitored data, determining a processing control parameter of the data management system with respect to the monitoring result according to the monitoring result and the data processing strategy;

[0009] According to the processing control parameters, the data management system is controlled to perform a data processing operation on target data; the target data is data on which the data changes exist; and the data processing operation includes a synchronization operation and / or a backup operation.

[0010] As an optional implementation, in the first aspect of the present invention, the monitoring result includes a system scanning result and / or an event monitoring result;

[0011] Wherein, the monitoring of the data stored in the data management system to obtain monitoring results includes:

[0012] Scan the monitoring data path corresponding to the data management system to obtain a system scanning result; and / or,

[0013] Setting a monitoring event for a monitoring data path corresponding to the data management system, and based on the monitoring event, monitoring the monitoring data path to obtain an event monitoring result;

[0014] The monitoring data paths corresponding to the data management system include all paths for storing data in the data management system or paths required to be monitored by the data processing strategy in the data management system.

[0015] As an optional implementation, in the first aspect of the present invention, the synchronization strategy includes at least two synchronization data terminals that need to synchronize data in the data management system, a synchronization data path corresponding to each of the synchronization data terminals, a synchronization frequency, a data synchronization direction, and at least one of a first filtering path list; the backup strategy includes a backup storage data terminal, a backup frequency, a backup source data path, a backup data storage path, a backup mode, a version backup frequency, a number of backup versions, and at least one of a second filtering path list; wherein the backup mode includes an incremental backup mode and / or a full backup mode;

[0016] The data processing strategy is configured in the following way:

[0017] When it is detected that the data management system is not configured with a data processing policy, receiving policy configuration information input by a user, and creating a data processing policy corresponding to the data management system according to the policy configuration information;

[0018] When it is detected that the data management system is configured with a data processing strategy, historical log information corresponding to the data processing strategy is obtained, and the data processing strategy is optimized according to the historical log information.

[0019] As an optional implementation, in the first aspect of the present invention, determining, according to the monitoring result and the data processing strategy, a processing control parameter of the data management system regarding the monitoring result includes:

[0020] Determine, according to the monitoring result, the target data having the data change and the target data terminal storing the target data;

[0021] When the data processing strategy includes the synchronization strategy, determining the synchronization control parameters of the data management system regarding the monitoring results according to the synchronization strategy; the synchronization control parameters at least include the synchronization data end corresponding to the target data end;

[0022] When the data processing strategy includes the backup strategy, judging whether the target data end satisfies the backup condition corresponding to the target data end according to the backup strategy;

[0023] When it is determined that the target data end meets the backup conditions corresponding to the target data end, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy; the backup control parameters at least include the backup storage data end corresponding to the target data end.

[0024] As an optional implementation, in the first aspect of the present invention, controlling the data management system to perform a data processing operation on the target data according to the processing control parameter includes:

[0025] When the processing control parameter includes the synchronization control parameter, according to the synchronization control parameter, controlling the data management system to synchronize the target data to the synchronization data paths of all synchronization data terminals corresponding to the target data terminal;

[0026] When the processing control parameters include the backup control parameters, the data management system is controlled to back up the target backup data to the backup data storage path of the backup storage data end corresponding to the target data end according to the backup control parameters; the target backup data at least includes the target data.

[0027] As an optional implementation, in the first aspect of the present invention, after monitoring the data stored in the data management system to obtain the monitoring results, the method further includes:

[0028] Acquire a verification strategy configured by the data management system, and verify the data stored in the data management system based on the verification strategy to obtain a first verification result;

[0029] According to the monitoring result and / or the first verification result, determining whether the data management system has abnormal data; the abnormal data is data that is damaged / lost / tampered with;

[0030] When it is determined that the data management system has abnormal data, generating alarm information about the abnormal data and a data recovery plan for the abnormal data;

[0031] Based on the data recovery solution, target backup data satisfying the backup condition corresponding to the abnormal data is screened out from all backup data of the data management system;

[0032] Based on the target backup data, a data recovery operation is performed on the abnormal data.

[0033] As an optional implementation manner, in the first aspect of the present invention, the performing a data recovery operation on the abnormal data based on the target backup data includes:

[0034] Extracting file data matching the abnormal data from the target backup data as recovery file data;

[0035] Restoring the restoration metadata corresponding to the abnormal data; the restoration metadata including at least one of attribute information of the abnormal data, permission information of the abnormal data and timestamp information of the abnormal data;

[0036] Verifying the restored data corresponding to the abnormal data to obtain a second verification result; the restored data includes the restored file data and the restored metadata; the second verification result is used to indicate the integrity of the restored data;

[0037] According to the restored data and the second verification result, recovery log information about the data recovery operation corresponding to the abnormal data is recorded.

[0038] A second aspect of the present invention discloses a data synchronization and backup device applied to NAS, the device comprising:

[0039] An acquisition module, used for acquiring a data processing strategy configured by a data management system; the data management system comprises at least two data storage terminals, and all the data storage terminals comprise a NAS device and at least one associated data terminal associated with the NAS device; the data processing strategy comprises a synchronization strategy and / or a backup strategy;

[0040] A monitoring module, used to monitor the data stored in the data management system and obtain monitoring results;

[0041] A determination module, configured to determine, when the monitoring result indicates that the monitored data has a data change, a processing control parameter of the data management system with respect to the monitoring result according to the monitoring result and the data processing strategy;

[0042] A control module is used to control the data management system to perform data processing operations on target data according to the processing control parameters; the target data is the data with the data changes; the data processing operations include synchronization operations and / or backup operations.

[0043] As an optional implementation, in the second aspect of the present invention, the monitoring result includes a system scanning result and / or an event monitoring result;

[0044] The monitoring module monitors the data stored in the data management system, and the specific method of obtaining the monitoring result includes:

[0045] Scan the monitoring data path corresponding to the data management system to obtain a system scanning result; and / or,

[0046] Setting a monitoring event for a monitoring data path corresponding to the data management system, and based on the monitoring event, monitoring the monitoring data path to obtain an event monitoring result;

[0047] The monitoring data paths corresponding to the data management system include all paths for storing data in the data management system or paths required to be monitored by the data processing strategy in the data management system.

[0048] As an optional implementation, in the second aspect of the present invention, the synchronization strategy includes at least two synchronization data terminals in the data management system that need to synchronize data, a synchronization data path corresponding to each of the synchronization data terminals, a synchronization frequency, a data synchronization direction, and at least one of a first filtering path list; the backup strategy includes a backup storage data terminal, a backup frequency, a backup source data path, a backup data storage path, a backup mode, a version backup frequency, a number of backup versions, and at least one of a second filtering path list; wherein the backup mode includes an incremental backup mode and / or a full backup mode;

[0049] The data processing strategy is configured in the following way:

[0050] When it is detected that the data management system is not configured with a data processing policy, receiving policy configuration information input by a user, and creating a data processing policy corresponding to the data management system according to the policy configuration information;

[0051] When it is detected that the data management system is configured with a data processing strategy, historical log information corresponding to the data processing strategy is obtained, and the data processing strategy is optimized according to the historical log information.

[0052] As an optional implementation, in the second aspect of the present invention, the specific manner in which the determination module determines the processing control parameters of the data management system regarding the monitoring results according to the monitoring results and the data processing strategy includes:

[0053] Determine, according to the monitoring result, the target data having the data change and the target data terminal storing the target data;

[0054] When the data processing strategy includes the synchronization strategy, determining the synchronization control parameters of the data management system regarding the monitoring results according to the synchronization strategy; the synchronization control parameters at least include the synchronization data end corresponding to the target data end;

[0055] When the data processing strategy includes the backup strategy, judging whether the target data end satisfies the backup condition corresponding to the target data end according to the backup strategy;

[0056] When it is determined that the target data end meets the backup conditions corresponding to the target data end, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy; the backup control parameters at least include the backup storage data end corresponding to the target data end.

[0057] As an optional implementation, in the second aspect of the present invention, the specific manner in which the control module controls the data management system to perform the data processing operation on the target data according to the processing control parameter includes:

[0058] When the processing control parameter includes the synchronization control parameter, according to the synchronization control parameter, controlling the data management system to synchronize the target data to the synchronization data paths of all synchronization data terminals corresponding to the target data terminal;

[0059] When the processing control parameters include the backup control parameters, the data management system is controlled to back up the target backup data to the backup data storage path of the backup storage data end corresponding to the target data end according to the backup control parameters; the target backup data at least includes the target data.

[0060] As an optional implementation, in the second aspect of the present invention, the acquisition module is further used to monitor the data stored in the data management system in the monitoring module, and after obtaining the monitoring result, acquire the verification strategy configured by the data management system;

[0061] And, the device further comprises:

[0062] A verification module, configured to verify the data stored in the data management system based on the verification strategy to obtain a first verification result;

[0063] A judgment module, used for judging whether there is abnormal data in the data management system according to the monitoring result and / or the first verification result; the abnormal data is data that is damaged / lost / tampered with;

[0064] A generating module, configured to generate warning information about the abnormal data and a data recovery solution for the abnormal data when the judging module judges that the data management system has abnormal data;

[0065] A screening module, configured to screen target backup data that meets the backup condition corresponding to the abnormal data from all backup data of the data management system based on the data recovery solution;

[0066] A data recovery module is used to perform a data recovery operation on the abnormal data based on the target backup data.

[0067] As an optional implementation, in the second aspect of the present invention, the specific manner in which the data recovery module performs the data recovery operation on the abnormal data based on the target backup data includes:

[0068] Extracting file data matching the abnormal data from the target backup data as recovery file data;

[0069] Restoring the restoration metadata corresponding to the abnormal data; the restoration metadata including at least one of attribute information of the abnormal data, permission information of the abnormal data and timestamp information of the abnormal data;

[0070] Verifying the restored data corresponding to the abnormal data to obtain a second verification result; the restored data includes the restored file data and the restored metadata; the second verification result is used to indicate the integrity of the restored data;

[0071] According to the restored data and the second verification result, recovery log information about the data recovery operation corresponding to the abnormal data is recorded.

[0072] The third aspect of the present invention discloses another data synchronization and backup device applied to NAS, the device comprising:

[0073] A memory storing executable program code;

[0074] a processor coupled to the memory;

[0075] The processor calls the executable program code stored in the memory to execute part or all of the steps of the data synchronization and backup method applied to NAS disclosed in the first aspect of the present invention.

[0076] A fourth aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute part or all of the steps of the data synchronization and backup method applied to NAS disclosed in the first aspect of the present invention.

[0077] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0078] The present invention can obtain the data processing strategy configured by the data management system and monitor the data stored in the data management system. When changes in the data are detected, the processing control parameters corresponding to the detection results are determined according to the monitoring results and the data processing strategy, and the data management system is controlled based on the processing control parameters to perform synchronization operations and / or backup operations on the changed data. Real-time data synchronization and backup can be achieved based on the data processing strategy configured by the data management system, thereby improving the timeliness of analyzing and processing real-time data changes at the data storage end (such as NAS equipment) in the data management system, thereby improving the timeliness, efficiency and accuracy of data synchronization and backup, thereby improving the data security and data consistency of the data management system, and thus facilitating improving the data reliability of the data management system. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0080] Figure 1 It is a flow chart of a data synchronization and backup method applied to NAS disclosed in an embodiment of the present invention;

[0081] Figure 2 It is a flow chart of another data synchronization and backup method applied to NAS disclosed in an embodiment of the present invention;

[0082] Figure 3 It is a structural diagram of a data synchronization and backup device applied to NAS disclosed in an embodiment of the present invention;

[0083] Figure 4 It is a structural diagram of another data synchronization and backup device applied to NAS disclosed in an embodiment of the present invention;

[0084] Figure 5 It is a structural diagram of another data synchronization and backup device applied to NAS disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0085] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0086] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.

[0087] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0088] The present invention discloses a data synchronization and backup method and device applied to NAS, which can obtain the data processing strategy configured by the data management system and monitor the data stored in the data management system. When the data is monitored to have a change, the processing control parameters corresponding to the detection result are determined according to the monitoring result and the data processing strategy, and the data management system is controlled to perform synchronization operations and / or backup operations on the changed data based on the processing control parameters. Real-time data synchronization and backup can be achieved based on the data processing strategy configured by the data management system, thereby improving the timeliness of analyzing and processing the real-time data changes of the data management system, thereby improving the timeliness, efficiency and accuracy of data synchronization and backup of the data management system, thereby improving the data security and data consistency of the data management system, and thereby facilitating the improvement of the data reliability of the data management system. The following are detailed descriptions respectively.

[0089] Embodiment 1

[0090] See also Figure 1 , Figure 1 1 is a flow chart of a data synchronization and backup method applied to NAS disclosed in an embodiment of the present invention. Figure 1The data synchronization and backup method applied to NAS described above can be applied to a data synchronization and backup device, which may include a data synchronization and backup terminal, a data synchronization and backup device, a data synchronization and backup system, and a server, wherein the server may include a local server or a cloud server, which is not limited in the embodiments of the present invention. Figure 1 As shown, the data synchronization and backup method applied to NAS may include the following operations:

[0091] 101. Obtain the data processing strategy configured by the data management system.

[0092] In an embodiment of the present invention, a data management system includes at least two data storage terminals, and all data storage terminals include a NAS device and at least one associated data terminal associated with the NAS device; wherein, exemplarily, the associated data terminal associated with the NAS device may include one or more of another NAS device, a computer, a mobile terminal, a cloud storage, and other devices capable of storing data, which is not limited in the embodiment of the present invention; wherein, the data processing strategy configured by the data management system includes a synchronization strategy and / or a backup strategy; optionally, there may be one or more synchronization strategies and / or backup strategies, which is not limited in the embodiment of the present invention.

[0093] 102. Monitor the data stored in the data management system and obtain the monitoring results.

[0094] In the embodiment of the present invention, the data stored in the data management system may include the data stored in each data storage terminal; further, the data stored in each data storage terminal may include multiple files, which is not limited in the embodiment of the present invention.

[0095] 103. When the monitoring results are used to indicate that there are data changes in the monitored data, the processing control parameters of the data management system regarding the monitoring results are determined based on the monitoring results and the data processing strategy.

[0096] 104. According to the processing control parameters, control the data management system to perform data processing operations on the target data.

[0097] In an embodiment of the present invention, the target data may be data with data changes; wherein the data processing operation includes a synchronization operation and / or a backup operation; wherein the synchronization operation is used to automatically update the corresponding data in other data storage terminals when there are data changes to maintain data consistency in the data management system; the backup operation is used to copy the target data / data related to the target data (for example: all data in the folder where the target data is located, all data stored in the source data terminal where the target data is located) from the source data terminal to the backup storage data terminal (for example: NAS device), which is not limited in the embodiment of the present invention.

[0098] It can be seen that the method described in the embodiment of the present invention can be implemented by obtaining the data processing strategy configured by the data management system and monitoring the data stored in the data management system. When changes in the data are detected, the processing control parameters corresponding to the detection results are determined according to the monitoring results and the data processing strategy, and the data management system is controlled based on the processing control parameters to perform synchronization operations and / or backup operations on the changed data. Real-time data synchronization and backup can be achieved based on the data processing strategy configured by the data management system, thereby improving the timeliness of analyzing and processing real-time data changes in the data management system, and further improving the timeliness, efficiency and accuracy of data synchronization and backup of the data management system, thereby improving the data security and data consistency of the data management system, and further facilitating improving the data reliability of the data management system.

[0099] In an optional embodiment, the monitoring results may include system scanning results and / or event monitoring results;

[0100] Among them, monitoring the data stored in the data management system and obtaining the monitoring results may include the following operations:

[0101] Scan the monitoring data path corresponding to the data management system to obtain the system scanning result; and / or,

[0102] Set a monitoring event for the monitoring data path corresponding to the data management system, and based on the monitoring event, monitor the monitoring data path to obtain the event monitoring result;

[0103] The monitoring data paths corresponding to the data management system include all paths used to store data in the data management system or paths required to be monitored by the data processing strategy in the data management system.

[0104] Among them, the monitoring event can be used to capture whether there is currently any data-based operation on the data stored in any monitoring data path (for example: file), wherein the data-based operation includes at least one of a new operation, a modification operation and a deletion operation; further, when the event monitoring result is used to indicate the existence of a data-based operation on the data stored in at least one monitoring data path, or the system scanning result is used to indicate that there is a change in the data stored in at least one monitoring data path, the monitoring result is used to indicate that there is a data change in the monitored data.

[0105] Further optionally, based on the built-in functions of the Syncthing framework (for example, file system scanning and event monitoring functions), the data stored in the data management system can be monitored to obtain monitoring results, which is not limited to the embodiments of the present invention. This can simplify the configuration, maintenance and monitoring process based on the Syncthing open source framework.

[0106] It can be seen that this optional embodiment can obtain monitoring results by scanning and / or monitoring all paths used to store data in the data management system or the paths required to be monitored by the data processing strategy, which can improve the flexibility of selecting data monitoring methods in the data management system, thereby facilitating the improvement of data monitoring flexibility, comprehensiveness and accuracy, and further facilitating timely monitoring of data changes in the data management system, and further facilitating the improvement of the timeliness of data synchronization and backup of the data management system.

[0107] In another optional embodiment, the synchronization strategy may include at least two synchronization data terminals that need to synchronize data in the data management system, a synchronization data path corresponding to each synchronization data terminal, a synchronization frequency, a data synchronization direction, and at least one of a first filtering path list.

[0108] Among them, since the data stored in the synchronization data path corresponding to each synchronization data end needs to maintain data consistency, the detection data path corresponding to the data management system may include the synchronization data path corresponding to each synchronization data end; exemplarily, the synchronization frequency may include at least one frequency of real-time synchronization, hourly synchronization, and daily synchronization, or it may be other synchronization frequencies, which is not limited by the embodiments of the present invention; wherein, the data synchronization direction is used to define whether the synchronization operation performed between the synchronization data ends is unidirectional, bidirectional or multidirectional, so the data synchronization direction includes the synchronization direction corresponding to each synchronization data end, and the synchronization direction may include at least one of unidirectional, bidirectional and multidirectional, which is not limited by the embodiments of the present invention; wherein, the first filtering path list may include multiple first filtering paths that do not require synchronization of data, which is not limited by the embodiments of the present invention.

[0109] Optionally, the backup strategy may include at least one of a backup storage data end, a backup frequency, a backup source data path, a backup data storage path, a backup mode, a version backup frequency, a number of backup versions, and a second filter path list; wherein the backup mode includes an incremental backup mode and / or a full backup mode.

[0110] Wherein, the backup storage data end is a data end for storing backup data in a data management system, such as a NAS device; exemplarily, the backup frequency may include at least one of hourly backup, daily backup, and weekly backup, and may also include other backup frequencies, which are not limited in the embodiment of the present invention; wherein, the backup source data path stores data that need to be backed up (e.g., folders and / or files), which are not limited in the embodiment of the present invention; wherein, the backup data storage path is a path for storing backup data in the backup storage data end (e.g., a personal folder of a user in a NAS device), which is not limited in the embodiment of the present invention; wherein, the incremental backup mode is a backup mode for backing up only data that has changed since the last backup, and the full backup mode is a backup mode for backing up all data in the data storage end that needs data backup; wherein, the number of backup versions may be the number of versions retained for each type of backup data in the data management system, so as to restore to a certain historical version when needed; the version backup frequency may be the backup frequency for each type of backup data in the data management system; exemplarily, regarding the number of backup versions and the version backup frequency, it may be set to retain the most recent N versions of backup data and retain one version per month, which are not limited in the embodiment of the present invention.

[0111] It can be seen that this optional embodiment can improve the scalability of the data management system and improve the configuration flexibility and accuracy of the data processing strategy by flexibly configuring the specific policy content in the synchronization strategy and / or backup strategy, thereby improving the execution flexibility and execution accuracy of data synchronization and backup operations, which in turn is beneficial to improving the accuracy and reliability of synchronized data and backup data.

[0112] In this optional embodiment, the data processing strategy may optionally be configured in the following manner:

[0113] When it is detected that the data management system is not configured with a data processing policy, receiving policy configuration information input by a user, and creating a data processing policy corresponding to the data management system according to the policy configuration information;

[0114] When it is detected that the data management system is configured with a data processing strategy, historical log information corresponding to the data processing strategy is obtained, and the data processing strategy is optimized according to the historical log information.

[0115] Optionally, when it is detected that the data management system is configured with a data processing strategy, adjustment configuration information input by the user may also be received, and the data processing strategy may be adjusted according to the adjustment configuration information, which is not limited in the embodiment of the present invention.

[0116] Exemplarily, the creation process of the data processing strategy can be specifically as follows: the user logs in to the data management system (for example: the UGREEN cloud system), clicks "Synchronize and Backup Application", enters the policy configuration page for creating the synchronization / backup task, and then specifically enters the configuration information corresponding to the data processing strategy, for example: defining the synchronization strategy can configure: synchronization frequency (the frequency of data synchronization can be set), synchronization data end (the device or node to be synchronized can be selected), synchronization rules (which folders or files need to be synchronized can be defined, and whether to perform two-way and / or one-way and / or multi-way synchronization), filter list (optional, files or folders that do not need to be synchronized can be set) and other information to create the synchronization strategy corresponding to the data management system; and defining the backup strategy can configure: backup frequency (the frequency of backup can be set), backup content (data folders or files that need to be backed up can be selected), backup target location (the location where the backup data is stored can be selected), version management (the backup version retention policy can be set), filter list (optional, files or folders that do not need to be backed up can be set) and other information, and then after completing the policy setting, click the "Save" button to save the configured policy to the system, the system automatically applies the created data processing strategy, and performs data synchronization and backup operations according to the configuration.

[0117] Exemplarily, the adjustment process of the data processing strategy can be specifically as follows: the user can enter the configuration / editing page at any time to adjust the strategy, such as changing the synchronization or backup frequency, modifying the backup target location, etc. The adjusted strategy will take effect immediately after saving, and the system will perform data synchronization and backup operations according to the adjusted strategy; or this, obtain the historical operation status and corresponding historical log information of the historical processing operations corresponding to the data processing strategy, and determine the operation status of the historical processing operations (for example: operation success or failure, number of files synchronized or backed up) based on the historical operation status and historical log information, and then optimize the data processing strategy based on the operation status, which is conducive to ensuring data security and efficient system operation.

[0118] It can be seen that this optional embodiment can also create a data processing strategy corresponding to the data management system according to the policy configuration information input by the user when the data management system is not configured with a data processing strategy. When the data management system is configured with a data processing strategy, the data processing strategy can be optimized according to the historical log information corresponding to the data processing strategy. The method of configuring the data processing strategy can be flexibly selected, thereby improving the configuration flexibility of the data processing strategy and improving the optimization flexibility of the data processing strategy, which is beneficial to improving the adaptability of data synchronization and backup operations to user needs and the data management system, and is beneficial to further improving the reliability of data synchronization and backup operations.

[0119] In yet another optional embodiment, determining the processing control parameters of the data management system regarding the monitoring results according to the monitoring results and the data processing strategy may include the following operations:

[0120] According to the monitoring results, determine the target data with data changes and the target data end storing the target data;

[0121] When the data processing strategy includes a synchronization strategy, determining synchronization control parameters of the data management system regarding the monitoring results according to the synchronization strategy; the synchronization control parameters at least include a synchronization data end corresponding to the target data end;

[0122] When the data processing strategy includes a backup strategy, judging whether the target data end meets the backup condition corresponding to the target data end according to the backup strategy;

[0123] When it is determined that the target data end meets the backup conditions corresponding to the target data end, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy; the backup control parameters at least include the backup storage data end corresponding to the target data end.

[0124] The synchronization control parameters may further include at least one of a synchronization data path, a synchronization start time, and a synchronization data volume of the synchronization data terminal, which is not limited in the embodiment of the present invention.

[0125] Among them, the backup control parameters may also include at least one of the backup data storage path, backup start time, backup data volume, backup data range, and target backup mode of the backup storage data end, which is not limited in the embodiment of the present invention.

[0126] Among them, optionally, the backup storage data end may include at least one of a NAS device, other data storage ends in the data management system, an external storage data end corresponding to the data management system, and an external cloud storage, which is not limited in the embodiment of the present invention.

[0127] Optionally, judging whether the target data end meets the backup condition corresponding to the target data end according to the backup policy may include the following operations:

[0128] Determine whether the current time matches the backup frequency of the target data in the backup strategy;

[0129] When it is determined that the current time matches the backup frequency of the target data in the backup strategy, the current system performance corresponding to the data management system is evaluated, and based on the current system performance, a target backup mode of the data management system regarding the monitoring results is determined;

[0130] Based on the target backup mode and backup strategy, determine other backup control parameters of the data management system regarding the monitoring results.

[0131] Further optionally, if the current system performance is lower than the preset system performance, the target backup mode can be determined to be the incremental backup mode; if the current system performance is higher than or equal to the preset system performance, the target backup mode can be determined to be the full backup mode, or the target backup mode can be selected in combination with the current system performance and the backup strategy regarding the backup mode of the target data, which is not limited in the embodiments of the present invention.

[0132] This allows for flexible selection of backup modes. When using efficient incremental backup technology, it can reduce backup storage and time costs and improve data backup efficiency. When using full backup technology, it can ensure the data integrity of the backup.

[0133] It can be seen that this optional embodiment can first determine the target data with data changes and the target data end storing the target data based on the monitoring results. If the data processing strategy includes a synchronization strategy, the synchronization control parameters of the data management system regarding the monitoring results are determined according to the synchronization strategy. If the data processing strategy includes a backup strategy, whether the target data end meets the backup conditions is judged according to the backup strategy. When it is judged that the conditions are met, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy. The accuracy of determining the synchronization control parameters and / or backup control parameters can be improved, which is beneficial to improving the execution accuracy of the synchronization operation / backup operation, and further beneficial to further improving the timeliness and accuracy of data synchronization and backup of the data management system.

[0134] In this optional embodiment, optionally, according to the processing control parameter, controlling the data management system to perform the data processing operation on the target data may include the following operations:

[0135] When the processing control parameter includes a synchronization control parameter, the data management system is controlled to synchronize the target data to the synchronization data paths of all synchronization data terminals corresponding to the target data terminal according to the synchronization control parameter;

[0136] When the processing control parameters include backup control parameters, the data management system is controlled to back up the target backup data to the backup data storage path of the backup storage data end corresponding to the target data end according to the backup control parameters; the target backup data at least includes the target data.

[0137] Among them, exemplarily, when the backup mode is the incremental backup mode, the target backup data may also include data that has changed at other times but has not been backed up; when the backup mode is the full backup mode, the target backup data may also include all data stored in the target data end or all data stored in multiple specified paths of the target data end, which is not limited in the embodiments of the present invention.

[0138] It can be seen that this optional embodiment can also control the data management system to synchronize the target data to the synchronization data path of all synchronization data terminals according to the synchronization control parameters, and / or, according to the backup control parameters, control the data management system to back up the data that needs to be backed up corresponding to the target data to the backup data storage path of the backup storage data terminal, so as to synchronize / back up the data to a precise storage location and improve the accuracy of determining the data that needs to be synchronized / backed up, thereby improving the execution accuracy of the synchronization operation and / or backup operation, which is beneficial to maintaining the data security and data consistency of the data management system.

[0139] In this optional embodiment, optionally, in the process of controlling the data management system to perform a data processing operation on the target data according to the processing control parameter, the method may further include the following operations:

[0140] Detect whether there are operational errors in data processing operations;

[0141] When an operation error is detected in a data processing operation, error information corresponding to the operation error is recorded, and the data management system is controlled to re-execute the data processing operation; wherein the error information includes at least one of the error type, error time, and error-affected data range.

[0142] Controlling the data management system to re-execute data processing operations may be used to correct temporary errors, wherein, exemplarily, the temporary errors may include synchronization / backup failures caused by network interruptions.

[0143] Further optionally, the method may also include the following operations:

[0144] The number of failures of the statistical data management system in executing data processing operations due to operational errors;

[0145] When the number of failures is greater than or equal to the preset number of failures, an error log report for the error information is generated based on the error information, and error intervention measures corresponding to the data processing operation are generated.

[0146] Exemplarily, the error intervention measures may include checking network connections, repairing damaged files, etc., which are not limited in the embodiments of the present invention.

[0147] It can be seen that this optional embodiment can also take measures such as recording error information, re-executing operations, and generating intervention measures if an operation execution error is detected during the data synchronization / backup process, thereby improving the real-time monitoring of the data synchronization / backup operation process, and improving the timeliness of operation error detection and error handling, which is beneficial to maintaining the operational stability and reliability of the data management system, and further beneficial to further improving the data security of the data management system.

[0148] In this optional embodiment, optionally, after controlling the data management system to perform the data processing operation on the target data according to the processing control parameter, the method may further include the following operations:

[0149] Record the processing status corresponding to the data processing operation, and record the log information corresponding to the data processing operation; wherein the log information includes detailed processing information of the data processing operation.

[0150] It can be seen that this optional embodiment can also record the processing status corresponding to the data processing operation and the log information corresponding to the data processing operation during the data synchronization / backup process, so as to facilitate the subsequent review of the operation status and serve as a basis for processing when operation errors or data anomalies occur subsequently.

[0151] Embodiment 2

[0152] See also Figure 2 , Figure 2 1 is a flow chart of a data synchronization and backup method applied to NAS disclosed in an embodiment of the present invention. Figure 2 The data synchronization and backup method applied to NAS described above can be applied to a data synchronization and backup device, which may include a data synchronization and backup terminal, a data synchronization and backup device, a data synchronization and backup system, and a server, wherein the server may include a local server or a cloud server, which is not limited in the embodiments of the present invention. Figure 2 As shown, the data synchronization and backup method applied to NAS may include the following operations:

[0153] 201. Obtain the data processing strategy configured by the data management system.

[0154] In an embodiment of the present invention, the data management system includes at least two data storage terminals, and all data storage terminals include a NAS device and at least one associated data terminal associated with the NAS device; the data processing strategy includes a synchronization strategy and / or a backup strategy.

[0155] 202. Monitor the data stored in the data management system and obtain monitoring results.

[0156] In an embodiment of the present invention, the monitoring results may include system scanning results and / or event monitoring results; optionally, abnormal monitoring results may be determined based on the system scanning results and / or event monitoring results, which is not limited in the embodiment of the present invention.

[0157] 203. Obtain the verification strategy configured by the data management system.

[0158] In an embodiment of the present invention, the verification strategy may include an integrity verification algorithm and may also include a verification frequency, which is not limited in the embodiment of the present invention; wherein the integrity verification algorithm is used to verify whether the data stored in the data management system has been tampered with and / or damaged; optionally, the integrity verification algorithm may include a hash algorithm, and exemplarily, the hash algorithm may include MD5 and / or SHA-256, which is not limited in the embodiment of the present invention.

[0159] 204. Based on the verification strategy, verify the data stored in the data management system to obtain a first verification result.

[0160] In the embodiment of the present invention, optionally, step 204 may include the following specific operations:

[0161] At the verification frequency, a checksum corresponding to each data item stored in the data management system is regularly generated based on the integrity verification algorithm, and for each data item, a previous checksum of the data is compared with a current checksum of the data to obtain a first verification result.

[0162] 205. Determine whether there is abnormal data in the data management system according to the monitoring result and / or the first verification result.

[0163] In the embodiment of the present invention, abnormal data refers to data that is damaged / lost / tampered with.

[0164] In the embodiment of the present invention, optionally, step 205 may include the following specific operations:

[0165] Determine whether there is an abnormal event in the monitoring result or the abnormal monitoring result; when it is determined that there is an abnormal event in the monitoring result or the abnormal monitoring result, determine that there is abnormal data in the data management system; and / or,

[0166] For each item of data, determine whether the first verification result of the data is used to indicate that the previous verification sum of the data matches the current verification sum of the data; when it is determined that the first verification result of the data is used to indicate that the previous verification sum of the data does not match the current verification sum of the data, it is determined that abnormal data exists in the data management system.

[0167] Exemplarily, the abnormal event may be an inability to access a file, an abnormal file size, etc., which is not limited in the embodiment of the present invention.

[0168] In an embodiment of the present invention, when step 205 determines that there is abnormal data in the data management system, the operation of step 206 is executed; optionally, when step 205 determines that there is no abnormal data in the data management system, the operation of step 209 can be executed, or the operation of step 202 can be re-executed, which is not limited in the embodiment of the present invention.

[0169] 206. Generate warning information about abnormal data and a data recovery plan for the abnormal data.

[0170] In an embodiment of the present invention, the alarm information about abnormal data may include the abnormal data, and optionally, may also include at least one of a storage path corresponding to the abnormal data, an abnormal type corresponding to the abnormal data, and an abnormal cause corresponding to the abnormal data, which is not limited in the embodiment of the present invention.

[0171] In an embodiment of the present invention, optionally, the data recovery plan may include at least one version of alternative backup data corresponding to the abnormal data that can be used to recover the abnormal data, a recovery start time corresponding to the abnormal data, and at least one of a recovery verification method corresponding to the abnormal data, which is not limited in the embodiment of the present invention.

[0172] 207. Based on the data recovery solution, target backup data that meets the backup conditions corresponding to the abnormal data is screened out from all backup data of the data management system.

[0173] In the embodiment of the present invention, optionally, step 207 may include the following operations:

[0174] Selecting, from all candidate backup data corresponding to the abnormal data, candidate backup data having a similarity greater than or equal to a preset similarity with the original data before the abnormal data becomes abnormal, as first backup data;

[0175] Selecting the candidate backup data whose backup time is closest to the current time from all the candidate backup data corresponding to the abnormal data as the second backup data;

[0176] Selecting candidate backup data having a data integrity greater than or equal to a preset integrity from all candidate backup data corresponding to the abnormal data as the third backup data;

[0177] Selecting candidate backup data whose data availability is greater than or equal to a preset availability from all candidate backup data corresponding to the abnormal data as fourth backup data;

[0178] Target backup data corresponding to the abnormal data is determined according to the first backup data, the second backup data, the third backup data, and the fourth backup data.

[0179] Among them, the target backup data can be used as the data recovery point corresponding to the abnormal data; illustratively, the latest backup version with data content closest to that before the data was damaged or lost and with higher data integrity and data availability can be selected as the target backup data, or one of the versions of the first backup data, the second backup data, the third backup data and the fourth backup data can be arbitrarily selected as the target backup data, and the embodiments of the present invention are not limited to this.

[0180] 208. Based on the target backup data, perform a data recovery operation for the abnormal data.

[0181] 209. When the monitoring results are used to indicate that there are data changes in the monitored data, the processing control parameters of the data management system regarding the monitoring results are determined based on the monitoring results and the data processing strategy.

[0182] 210. According to the processing control parameters, control the data management system to perform data processing operations on the target data.

[0183] In the embodiment of the present invention, the target data is data with data changes; the data processing operation includes a synchronization operation and / or a backup operation.

[0184] In the embodiment of the present invention, optionally, after the operation of step 210 is completed, the operation of step 205 may be re-executed to detect whether there is abnormal data in the synchronized and / or backed up data, which is not limited in the embodiment of the present invention.

[0185] In the embodiment of the present invention, for other detailed descriptions of step 201-step 202 and step 209-step 210, please refer to the detailed description of step 101-step 104 in the first embodiment, and the embodiment of the present invention will not be repeated here.

[0186] It can be seen that the method described in the embodiment of the present invention can be implemented by obtaining the data processing strategy configured by the data management system and monitoring the data stored in the data management system. When changes in the data are detected, the processing control parameters corresponding to the detection results are determined according to the monitoring results and the data processing strategy, and the data management system is controlled based on the processing control parameters to perform synchronization operations and / or backup operations on the changed data. Real-time data synchronization and backup can be achieved based on the data processing strategy configured by the data management system, thereby improving the timeliness of analyzing and processing real-time data changes in the data management system, and further improving the timeliness, efficiency and accuracy of data synchronization and backup of the data management system, thereby improving the data security and data consistency of the data management system, and further facilitating improving the data reliability of the data management system. In addition, based on the acquired verification strategy, the data stored in the verification data management system can be verified to obtain a first verification result, and whether there is abnormal data can be determined based on the monitoring results and / or the first verification results. If there is abnormal data, an alarm message and a corresponding data recovery plan are generated to filter out target backup data that meets the conditions from all backup data to recover the abnormal data. This can improve the flexibility, timeliness and accuracy of data anomaly detection, thereby improving the timeliness and accuracy of generating data anomaly processing plans, and further improving the accuracy and timeliness of abnormal data recovery, which is conducive to further improving the data security and data reliability of the data management system.

[0187] In an optional embodiment, performing a data recovery operation on abnormal data based on target backup data may include the following operations:

[0188] Extracting file data matching the abnormal data from the target backup data as recovery file data;

[0189] Restoring the recovery metadata corresponding to the abnormal data; the recovery metadata includes at least one of attribute information of the abnormal data, permission information of the abnormal data, and timestamp information of the abnormal data;

[0190] Verifying the restored data corresponding to the abnormal data to obtain a second verification result; the restored data includes restored file data and restored metadata; the second verification result is used to indicate the integrity of the restored data;

[0191] According to the restored data and the second verification result, recovery log information about the data recovery operation corresponding to the abnormal data is recorded.

[0192] Among them, the second verification result can be used to verify whether the recovered data is complete and available; among them, exemplarily, the recovery log information may include at least one of the data to be recovered, the operator, the recovery time, the recovery result, and the operation conditions corresponding to the recovery steps, which is not limited in the embodiment of the present invention.

[0193] Optionally, after completing the data recovery operation, you can also: generate a recovery completion report, and feedback the recovery completion report to relevant personnel (for example, users, administrators) through a preset method (for example, email, text message or system notification), which is not limited in the embodiment of the present invention; further optionally, when recovery exception feedback information sent by relevant personnel is received, based on the recovery exception feedback information, re-execute the operation of step 207, that is, re-select the target backup data, and re-execute the data recovery operation of step 208.

[0194] It can be seen that this optional embodiment can extract file data matching the abnormal data from the target backup data as recovery file data and restore the recovery metadata corresponding to the abnormal data, and then verify the above recovery data to obtain a second verification result, and based on the recovery data and the second verification result, record the recovery log information about the data recovery operation corresponding to the abnormal data, which can improve the accuracy of data recovery and the verification accuracy of recovery data, thereby helping to improve the processing accuracy of abnormal data, and further help to further improve the operating stability and data reliability of the data management system; and, recording the recovery log information can serve as a basis for processing subsequent operation errors or data anomalies, which is conducive to improving the processing accuracy and processing efficiency of subsequent processing of data anomalies.

[0195] In an embodiment of the present invention, an exemplary process of detecting abnormal data and performing data recovery operations on abnormal data can be specifically as follows: real-time monitoring of files and folders in a data management system, capturing file addition, modification and deletion operations through file system scanning and event monitoring functions, monitoring abnormal events of the file system (such as inaccessible files, abnormal file size, etc.) or generating an alarm when a file is detected to be damaged or lost, or periodically generating and checking the checksum of the file (such as MD5 or SHA-256). If the checksum does not match, it means that the file may be damaged and marked as damaged data (i.e., abnormal data); when data damage or loss is found, the corresponding problem is reported, and a detailed recovery report is generated, listing all detected damaged or lost files and corresponding recovery plans; then, by checking the backup log, the time point and content of the backup are understood, and according to the backup log and the recovery report, Select a backup version that is closest to the most recent backup before data damage or loss and has higher integrity and availability as the recovery point; after that, start the recovery operation: first extract the damaged or lost files from the selected backup version, then restore the file's attributes, permissions, timestamp and other metadata, then verify the recovered data to ensure that the recovered files are complete and available, and then after the recovery operation is completed, generate a recovery completion report and notify the administrator or user through email, SMS or system notification, and then the administrator or user checks the recovered data to confirm whether the files and folders have been restored normally. If some files cannot be restored, the administrator / user selects or the system automatically selects other backup versions for further recovery; and during the recovery process, record detailed logs of the recovery operation, including information such as the recovered files, time, operator and recovery results, for future review and analysis.

[0196] In an embodiment of the present invention, the data synchronization and backup method applied to NAS can be applied to a NAS data synchronization and backup system, and the NAS data synchronization and backup system can include a monitoring module, a synchronization and backup strategy module, an execution module, and a fault recovery module, wherein:

[0197] The monitoring module can be used to monitor the changes of files and folders in the data management system in real time, such as scanning the file system and listening to file system events through Syncthing to capture the addition, modification and deletion of data;

[0198] The synchronization and backup policy module can be used to define data synchronization and backup policies, including synchronization frequency, backup version management, backup target location (such as external storage device or cloud), etc. The policy module sets the policy through the configuration file or user interface, and flexibly adjusts the synchronization and backup rules;

[0199] The execution module can be used to automatically perform data synchronization and backup operations using the synchronization function of Syncthing based on the data changes captured by the monitoring module and the rules defined by the policy module. The execution module supports both incremental backup and full backup modes to ensure that the backup process is efficient and does not affect system performance.

[0200] The fault recovery module can be used to quickly restore the system to a normal state using backup data in the event of data damage or loss; the fault recovery module is tightly integrated with the execution module to provide simple and easy-to-use recovery operations.

[0201] Embodiment 3

[0202] See also Figure 3 , Figure 3 1 is a schematic diagram of a data synchronization and backup device for NAS disclosed in an embodiment of the present invention. Figure 3 The data synchronization and backup device applied to NAS described may include a data synchronization and backup terminal, a data synchronization and backup device, a data synchronization and backup system, and a server, wherein the server may include a local server or a cloud server, which is not limited in the embodiment of the present invention. Figure 3 As shown, the data synchronization and backup device applied to NAS may include:

[0203] The acquisition module 301 is used to acquire the data processing strategy configured by the data management system; the data management system includes at least two data storage terminals, and all data storage terminals include a NAS device and at least one associated data terminal associated with the NAS device; the data processing strategy includes a synchronization strategy and / or a backup strategy;

[0204] Monitoring module 302, used to monitor the data stored in the data management system and obtain monitoring results;

[0205] A determination module 303, for determining, when the monitoring result indicates that the monitored data has a data change, a processing control parameter of the data management system regarding the monitoring result according to the monitoring result and the data processing strategy;

[0206] The control module 304 is used to control the data management system to perform data processing operations on target data according to the processing control parameters; the target data is data with data changes; the data processing operations include synchronization operations and / or backup operations.

[0207] It can be seen that the device described in the embodiment of the present invention can obtain the data processing strategy configured by the data management system and monitor the data stored in the data management system. When changes in the data are detected, the processing control parameters corresponding to the detection results are determined according to the monitoring results and the data processing strategy, and the data management system is controlled based on the processing control parameters to perform synchronization operations and / or backup operations on the changed data. Real-time data synchronization and backup can be achieved based on the data processing strategy configured by the data management system, thereby improving the timeliness of analyzing and processing real-time data changes in the data management system, and then improving the timeliness, efficiency and accuracy of data synchronization and backup of the data management system, thereby improving the data security and data consistency of the data management system, and then helping to improve the data reliability of the data management system.

[0208] In an optional embodiment, the monitoring result includes a system scanning result and / or an event monitoring result;

[0209] The monitoring module 302 monitors the data stored in the data management system, and the specific method of obtaining the monitoring result may include:

[0210] Scan the monitoring data path corresponding to the data management system to obtain the system scanning result; and / or,

[0211] Set a monitoring event for the monitoring data path corresponding to the data management system, and based on the monitoring event, monitor the monitoring data path to obtain the event monitoring result;

[0212] The monitoring data paths corresponding to the data management system include all paths used to store data in the data management system or paths required to be monitored by the data processing strategy in the data management system.

[0213] It can be seen that the device described in the implementation of this optional embodiment can obtain monitoring results by scanning and / or monitoring all paths used to store data in the data management system or the paths required to be monitored by the data processing strategy, which can improve the flexibility of selecting data monitoring methods in the data management system, thereby facilitating the improvement of data monitoring flexibility, comprehensiveness and accuracy, and further facilitating the timely monitoring of data changes in the data management system, and further facilitating the improvement of the timeliness of data synchronization and backup of the data management system.

[0214] In another optional embodiment, the synchronization strategy includes at least two synchronization data terminals that need to synchronize data in the data management system, a synchronization data path corresponding to each synchronization data terminal, a synchronization frequency, a data synchronization direction, and at least one of a first filtering path list; the backup strategy includes a backup storage data terminal, a backup frequency, a backup source data path, a backup data storage path, a backup mode, a version backup frequency, a number of backup versions, and at least one of a second filtering path list; wherein the backup mode includes an incremental backup mode and / or a full backup mode;

[0215] Among them, the data processing strategy can be configured in the following ways:

[0216] When it is detected that the data management system is not configured with a data processing policy, receiving policy configuration information input by a user, and creating a data processing policy corresponding to the data management system according to the policy configuration information;

[0217] When it is detected that the data management system is configured with a data processing strategy, historical log information corresponding to the data processing strategy is obtained, and the data processing strategy is optimized according to the historical log information.

[0218] It can be seen that the device described in the implementation of this optional embodiment can improve the scalability of the data management system and improve the configuration flexibility and accuracy of the data processing strategy by flexibly configuring the specific policy content in the synchronization strategy and / or backup strategy, thereby improving the execution flexibility and execution accuracy of data synchronization and backup operations, which is beneficial to improving the accuracy and reliability of synchronized data and backup data; and, when the data management system is not configured with a data processing strategy, a data processing strategy corresponding to the data management system can be created according to the policy configuration information input by the user, and when the data management system is configured with a data processing strategy, the data processing strategy can be optimized according to the historical log information corresponding to the data processing strategy, and the method of configuring the data processing strategy can be flexibly selected, thereby improving the configuration flexibility of the data processing strategy and improving the optimization flexibility of the data processing strategy, which is beneficial to improving the adaptability of data synchronization and backup operations to user needs and the data management system, and is beneficial to further improving the reliability of data synchronization and backup operations.

[0219] In this optional embodiment, optionally, the specific manner in which the determination module 303 determines the processing control parameters of the data management system regarding the monitoring results according to the monitoring results and the data processing strategy may include:

[0220] According to the monitoring results, determine the target data with data changes and the target data end storing the target data;

[0221] When the data processing strategy includes a synchronization strategy, determining synchronization control parameters of the data management system regarding the monitoring results according to the synchronization strategy; the synchronization control parameters at least include a synchronization data end corresponding to the target data end;

[0222] When the data processing strategy includes a backup strategy, judging whether the target data end meets the backup condition corresponding to the target data end according to the backup strategy;

[0223] When it is determined that the target data end meets the backup conditions corresponding to the target data end, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy; the backup control parameters at least include the backup storage data end corresponding to the target data end.

[0224] It can be seen that the device described in the implementation of this optional embodiment can also first determine the target data with data changes and the target data end storing the target data based on the monitoring results. If the data processing strategy includes a synchronization strategy, the synchronization control parameters of the data management system regarding the monitoring results are determined according to the synchronization strategy. If the data processing strategy includes a backup strategy, it is judged whether the target data end meets the backup conditions according to the backup strategy. When it is judged that the conditions are met, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy. The accuracy of determining the synchronization control parameters and / or backup control parameters can be improved, which is beneficial to improving the execution accuracy of the synchronization operation / backup operation, and further beneficial to further improving the timeliness and accuracy of data synchronization and backup of the data management system.

[0225] In this optional embodiment, the specific manner in which the control module 304 controls the data management system to perform the data processing operation on the target data according to the processing control parameter may include:

[0226] When the processing control parameter includes a synchronization control parameter, the data management system is controlled to synchronize the target data to the synchronization data paths of all synchronization data terminals corresponding to the target data terminal according to the synchronization control parameter;

[0227] When the processing control parameters include backup control parameters, the data management system is controlled to back up the target backup data to the backup data storage path of the backup storage data end corresponding to the target data end according to the backup control parameters; the target backup data at least includes the target data.

[0228] It can be seen that the device described in the implementation of this optional embodiment can also control the data management system to synchronize the target data to the synchronization data path of all synchronization data terminals according to the synchronization control parameters, and / or, according to the backup control parameters, control the data management system to back up the data that needs to be backed up corresponding to the target data to the backup data storage path of the backup storage data terminal, and can synchronize / back up the data to a precise storage location, and improve the accuracy of determining the data that needs to be synchronized / backed up, thereby improving the execution accuracy of the synchronization operation and / or backup operation, which is beneficial to maintaining the data security and data consistency of the data management system.

[0229] In an optional embodiment, the acquisition module 301 is further used to monitor the data stored in the data management system in the monitoring module 302, and after obtaining the monitoring result, obtain the verification strategy configured by the data management system;

[0230] and, optionally, Figure 4 As shown, the device may also include:

[0231] A verification module 305, configured to verify the data stored in the data management system based on the verification strategy to obtain a first verification result;

[0232] The judgment module 306 is used to judge whether there is abnormal data in the data management system according to the monitoring result and / or the first verification result; the abnormal data is data that is damaged / lost / tampered with;

[0233] The generating module 307 is used to generate warning information about the abnormal data and a data recovery plan for the abnormal data when the judging module 306 judges that the data management system has abnormal data;

[0234] A screening module 308 is used to screen out target backup data that meets the backup conditions corresponding to the abnormal data from all backup data of the data management system based on the data recovery solution;

[0235] The data recovery module 309 is used to perform a data recovery operation on abnormal data based on the target backup data.

[0236] It can be seen that the device described in the implementation of this optional embodiment can verify the data stored in the data management system based on the acquired verification strategy to obtain a first verification result, and determine whether there is abnormal data based on the monitoring results and / or the first verification results. If abnormal data exists, an alarm message and a corresponding data recovery plan are generated to filter out target backup data that meets the conditions from all backup data to recover the abnormal data, which can improve the flexibility, timeliness and accuracy of data anomaly detection, thereby improving the timeliness and accuracy of generating data anomaly processing plans, and further improving the accuracy and timeliness of abnormal data recovery, which is conducive to further improving the data security and data reliability of the data management system.

[0237] In this optional embodiment, the specific manner in which the data recovery module 309 performs the data recovery operation on the abnormal data based on the target backup data may include:

[0238] Extracting file data matching the abnormal data from the target backup data as recovery file data;

[0239] Restoring the recovery metadata corresponding to the abnormal data; the recovery metadata includes at least one of attribute information of the abnormal data, permission information of the abnormal data, and timestamp information of the abnormal data;

[0240] Verifying the restored data corresponding to the abnormal data to obtain a second verification result; the restored data includes restored file data and restored metadata; the second verification result is used to indicate the integrity of the restored data;

[0241] According to the restored data and the second verification result, recovery log information about the data recovery operation corresponding to the abnormal data is recorded.

[0242] It can be seen that the device described in the implementation of this optional embodiment can also extract file data matching the abnormal data from the target backup data as recovery file data and restore the recovery metadata corresponding to the abnormal data, and then verify the above recovery data to obtain a second verification result, and based on the recovery data and the second verification result, record recovery log information about the data recovery operation corresponding to the abnormal data, which can improve the accuracy of data recovery and the verification accuracy of recovery data, thereby helping to improve the processing accuracy of abnormal data, and further helping to further improve the operating stability and data reliability of the data management system; and, recording the recovery log information can serve as a basis for processing subsequent operation errors or data anomalies, which is conducive to improving the processing accuracy and processing efficiency of subsequent processing of data anomalies.

[0243] Embodiment 4

[0244] See also Figure 5 , Figure 5FIG. 1 is a schematic diagram of another data synchronization and backup device for NAS disclosed in an embodiment of the present invention. Figure 5 As shown, the data synchronization and backup device applied to NAS may include:

[0245] A memory 401 storing executable program codes;

[0246] a processor 402 coupled to the memory 401;

[0247] The processor 402 calls the executable program code stored in the memory 401 to execute part or all of the steps of the data synchronization and backup method applied to NAS described in the first embodiment of the present invention or the second embodiment of the present invention.

[0248] Embodiment 5

[0249] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all steps of the data synchronization and backup method applied to NAS described in Embodiment 1 or Embodiment 2 of the present invention.

[0250] Embodiment 6

[0251] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of the data synchronization and backup method applied to NAS described in Embodiment 1 or Embodiment 2.

[0252] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0253] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0254] Finally, it should be noted that the data synchronization and backup method and device applied to NAS disclosed in the embodiment of the present invention discloses only the preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A data synchronization and backup method applied to NAS, characterized in that: The method comprises: Acquire a data processing strategy configured by a data management system; the data management system includes at least two data storage terminals, and all of the data storage terminals include a NAS device and at least one associated data terminal associated with the NAS device; the data processing strategy includes a synchronization strategy and / or a backup strategy; Monitoring the data stored in the data management system to obtain monitoring results; When the monitoring result is used to indicate that there is a data change in the monitored data, determining a processing control parameter of the data management system with respect to the monitoring result according to the monitoring result and the data processing strategy; According to the processing control parameters, the data management system is controlled to perform a data processing operation on target data; the target data is data on which the data changes exist; and the data processing operation includes a synchronization operation and / or a backup operation.

2. The data synchronization and backup method applied to NAS according to claim 1, characterized in that: The monitoring results include system scanning results and / or event monitoring results; Wherein, the monitoring of the data stored in the data management system to obtain monitoring results includes: Scan the monitoring data path corresponding to the data management system to obtain a system scanning result; and / or, Setting a monitoring event for a monitoring data path corresponding to the data management system, and based on the monitoring event, monitoring the monitoring data path to obtain an event monitoring result; The monitoring data paths corresponding to the data management system include all paths for storing data in the data management system or paths required to be monitored by the data processing strategy in the data management system.

3. The data synchronization and backup method applied to NAS according to claim 1, characterized in that: The synchronization strategy includes at least two synchronization data terminals in the data management system that need to synchronize data, the synchronization data path corresponding to each of the synchronization data terminals, the synchronization frequency, the data synchronization direction, and at least one of the first filtering path list; the backup strategy includes at least one of the backup storage data terminal, the backup frequency, the backup source data path, the backup data storage path, the backup mode, the version backup frequency, the number of backup versions, and the second filtering path list; wherein the backup mode includes an incremental backup mode and / or a full backup mode; The data processing strategy is configured in the following way: When it is detected that the data management system is not configured with a data processing policy, receiving policy configuration information input by a user, and creating a data processing policy corresponding to the data management system according to the policy configuration information; When it is detected that the data management system is configured with a data processing strategy, historical log information corresponding to the data processing strategy is obtained, and the data processing strategy is optimized according to the historical log information.

4. The data synchronization and backup method applied to NAS according to claim 3, characterized in that: Determining the processing control parameters of the data management system regarding the monitoring results according to the monitoring results and the data processing strategy includes: Determine, according to the monitoring result, the target data having the data change and the target data terminal storing the target data; When the data processing strategy includes the synchronization strategy, determining the synchronization control parameters of the data management system regarding the monitoring results according to the synchronization strategy; the synchronization control parameters at least include the synchronization data end corresponding to the target data end; When the data processing strategy includes the backup strategy, judging whether the target data end satisfies the backup condition corresponding to the target data end according to the backup strategy; When it is determined that the target data end meets the backup conditions corresponding to the target data end, the backup control parameters of the data management system regarding the monitoring results are determined according to the backup strategy; the backup control parameters at least include the backup storage data end corresponding to the target data end.

5. The data synchronization and backup method applied to NAS according to claim 4, characterized in that: The step of controlling the data management system to perform a data processing operation on the target data according to the processing control parameter comprises: When the processing control parameter includes the synchronization control parameter, according to the synchronization control parameter, controlling the data management system to synchronize the target data to the synchronization data paths of all synchronization data terminals corresponding to the target data terminal; When the processing control parameters include the backup control parameters, the data management system is controlled to back up the target backup data to the backup data storage path of the backup storage data end corresponding to the target data end according to the backup control parameters; the target backup data at least includes the target data.

6. The data synchronization and backup method applied to NAS according to any one of claims 1 to 5, characterized in that: After monitoring the data stored in the data management system and obtaining the monitoring results, the method further includes: Acquire a verification strategy configured by the data management system, and verify the data stored in the data management system based on the verification strategy to obtain a first verification result; According to the monitoring result and / or the first verification result, determining whether the data management system has abnormal data; the abnormal data is data that is damaged / lost / tampered with; When it is determined that the data management system has abnormal data, generating alarm information about the abnormal data and a data recovery plan for the abnormal data; Based on the data recovery solution, target backup data satisfying the backup condition corresponding to the abnormal data is screened out from all backup data of the data management system; Based on the target backup data, a data recovery operation is performed on the abnormal data.

7. The data synchronization and backup method applied to NAS according to claim 6, characterized in that: The performing a data recovery operation on the abnormal data based on the target backup data includes: Extracting file data matching the abnormal data from the target backup data as recovery file data; Restoring the restoration metadata corresponding to the abnormal data; the restoration metadata including at least one of attribute information of the abnormal data, permission information of the abnormal data and timestamp information of the abnormal data; Verifying the restored data corresponding to the abnormal data to obtain a second verification result; the restored data includes the restored file data and the restored metadata; the second verification result is used to indicate the integrity of the restored data; According to the restored data and the second verification result, recovery log information about the data recovery operation corresponding to the abnormal data is recorded.

8. A data synchronization and backup device applied to NAS, characterized in that: The device comprises: An acquisition module, used for acquiring a data processing strategy configured by a data management system; the data management system comprises at least two data storage terminals, and all the data storage terminals comprise a NAS device and at least one associated data terminal associated with the NAS device; the data processing strategy comprises a synchronization strategy and / or a backup strategy; A monitoring module, used to monitor the data stored in the data management system and obtain monitoring results; A determination module, configured to determine, when the monitoring result indicates that the monitored data has a data change, a processing control parameter of the data management system with respect to the monitoring result according to the monitoring result and the data processing strategy; A control module is used to control the data management system to perform data processing operations on target data according to the processing control parameters; the target data is the data with the data changes; the data processing operations include synchronization operations and / or backup operations.

9. A data synchronization and backup device applied to NAS, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the data synchronization and backup method applied to NAS according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the data synchronization and backup method applied to NAS as described in any one of claims 1 to 7.