Terminal data automatic backup and recovery method and system
By dynamically adjusting priority and generating personalized backup strategies, combining real-time data capture changes and incremental backup technology, and using hybrid encryption solutions, the problem of difficult backup strategies to dynamically adjust, low incremental backup efficiency, insufficient data security and storage optimization in the existing technology is solved, and intelligent, efficient and secure terminal data backup and recovery is achieved.
Patent Information
- Application Number
- CN202411756776.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-21
AI Technical Summary
The existing data backup and recovery methods have problems such as difficult to dynamically adjust the backup strategy, low incremental backup efficiency, and insufficient data security and storage optimization.
By dynamically adjusting priorities and generating personalized backup policies, data changes are captured in real time and incremental backups are protected using a hybrid encryption scheme.
It realizes intelligent priority adjustment and efficient resource utilization, improves the real-time and efficiency of backups, and ensures data security and storage optimization.
Smart Images

Figure CN119668939A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data backup and recovery, and in particular to a method and system for automatic terminal data backup and recovery. Background Art
[0002] With the rapid development of information technology, the data scale and importance of terminal devices are increasing, and data backup and recovery have become important means to ensure data security and business continuity. Traditional data backup methods mostly adopt the form of full backup or periodic backup. Although this method is simple, it has low backup efficiency and consumes a lot of storage resources. In recent years, incremental backup technology has gradually become mainstream. It effectively reduces storage pressure by backing up only the changed part of the data. In addition, the introduction of hybrid encryption technology and distributed storage provides important guarantees for data security and high availability. At the same time, multi-version management technology allows users to trace and restore any version of data, thereby significantly improving the practicality of the backup system. However, with the continuous expansion of data types and scales, how to achieve intelligent priority adjustment and efficient resource utilization has become an important challenge in the field of data backup.
[0003] Existing data backup and recovery technologies have many deficiencies in practical applications. First, in terms of backup strategy formulation, traditional methods often cannot dynamically adjust the backup priority according to the importance, type and user needs of the data, resulting in uneven resource allocation or low backup efficiency. Although some studies have introduced data classification mechanisms, their classification standards are single and difficult to adjust adaptively, and cannot meet the backup needs in complex data scenarios. Secondly, in incremental backup technology, existing methods mostly rely on simple file timestamps or content comparisons for change capture. This method is prone to omissions or redundant backups when dealing with large-scale data changes, affecting backup efficiency. Thirdly, in terms of data security, traditional encryption and storage mechanisms have problems with high computational overhead and single point failure risks. Especially when dealing with distributed storage architectures, data consistency and recovery efficiency are difficult to guarantee. In addition, although version management technology has been implemented in some backup systems, its storage and cleanup strategies for historical versions lack intelligent design, which often leads to waste of storage resources or inaccurate version recovery. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is: the existing data backup and recovery methods have the problems of difficulty in dynamically adjusting the backup strategy, low incremental backup efficiency, insufficient data security and storage optimization, and how to achieve intelligent, efficient and secure terminal data backup and recovery.
[0006] To solve the above technical problems, the present invention provides the following technical solutions: a method for automatic backup and recovery of terminal data, including dynamically adjusting priorities and generating personalized backup strategies; capturing data changes in real time to perform incremental backup; and encrypting backup data for version recovery.
[0007] As a preferred solution of the terminal data automatic backup and recovery method of the present invention, wherein: the dynamic adjustment of priority and generation of personalized backup strategy includes analyzing and prioritizing the data in the terminal device through a classification model;
[0008] Data prioritization criteria include file type, frequency of use, last modification time, and file size characteristics;
[0009] Using the support vector machine algorithm, the priority is assigned according to the data characteristics as follows:
[0010] y=sign(w T x+b)
[0011] Among them, x represents the feature vector of the data, w represents the weight vector of the classification model, b represents the bias value of the classification, and y represents the classification result;
[0012] The classification model automatically optimizes parameters w and b through training data and adjusts the classification strategy in real time according to actual needs;
[0013] After the classification is completed, make a backup plan according to the priority.
[0014] As a preferred solution of the terminal data automatic backup and recovery method of the present invention, wherein: the dynamic adjustment of priority and generation of personalized backup strategy includes generating a dynamic backup strategy according to data priority and user setting requirements;
[0015] The strategy generation adopts an optimization function model, which comprehensively considers backup time, storage resources, and encryption overhead, with the goal of minimizing system resource usage:
[0016] minF=αT+βS+γE
[0017] Among them, T represents the time of backup execution, S represents the storage space occupied by the backup, E represents the computational overhead of backup encryption, and α, β, and γ represent weight parameters, which are dynamically adjusted to meet user needs.
[0018] Generate the optimal backup strategy, set the backup time window, data compression ratio and transmission method, and ensure the backup process is error-free.
[0019] As a preferred solution of the terminal data automatic backup and recovery method of the present invention, wherein: the real-time capture of data changes to perform incremental backup includes real-time capture of newly created, modified or deleted file information in the terminal device through a file monitoring tool;
[0020] For changed data, an incremental backup algorithm is used to record only the difference in the file, reducing the amount of backup data and storage requirements;
[0021] The amount of data for incremental backup is expressed as:
[0022]
[0023] Among them, F i Indicates the corresponding data block of the file before backup, F′ i Indicates the corresponding data block of the backup file, H(F i ) represents the hash value of the data block, and △D represents the difference in data that needs to be backed up;
[0024] The backup locates the changed area of the data block by comparing the hash value and performs the backup operation on the area, thereby improving the backup efficiency;
[0025] Real-time monitoring combined with incremental backup eliminates the need to repeatedly back up the entire data set;
[0026] The monitored data changes will be directly entered into the backup queue.
[0027] As a preferred solution of the terminal data automatic backup and recovery method of the present invention, wherein: the real-time capture of data changes to perform incremental backup includes adopting a hybrid encryption scheme to ensure security when the backup data is transmitted and stored;
[0028] The data is quickly encrypted through the symmetric encryption algorithm to generate ciphertext;
[0029] Encrypt the symmetric key using an asymmetric encryption algorithm;
[0030] The backup data is stored in a distributed storage system;
[0031] Distributed storage uses a redundant mechanism.
[0032] As a preferred solution of the terminal data automatic backup and recovery method of the present invention, wherein: the version recovery of the encrypted backup data includes generating a unique version number for each backup and recording the file change history;
[0033] Query and roll back to any historical version through the version management module;
[0034] Optimize storage space, use the LRU algorithm to clean up versions with a priority lower than the threshold or unused versions, and give priority to retaining backup data of files with a priority higher than the threshold.
[0035] As a preferred solution of the terminal data automatic backup and recovery method of the present invention, wherein: the version recovery of the encrypted backup data includes that when data is restored, the system preferentially restores data with a priority higher than a threshold, and supports full recovery or partial recovery operations;
[0036] After the recovery is complete, the data integrity is verified by the hash value as follows:
[0037]
[0038] Among them, H k (D) represents the hash value of the backup data, H′ k (D) represents the hash value of the recovered data, and I represents the integrity check value. If I = 0, the recovered data is complete and correct;
[0039] Verify data integrity through hash values to locate the target data for recovery;
[0040] Users can choose to restore to the backup point as needed to obtain the required data.
[0041] Another object of the present invention is to provide a terminal data automatic backup and recovery system, which can perform incremental backup by capturing data changes in real time, thereby solving the problem of low efficiency of current data backup and recovery including incremental backup.
[0042] As a preferred solution of the terminal data automatic backup and recovery system described in the present invention, it includes: a backup strategy generation module, an incremental backup execution module, and an encrypted storage module; the backup strategy generation module is used to classify terminal data and dynamically generate backup strategies that meet user needs; the incremental backup execution module is used to capture changes through a data monitoring tool and perform backup operations on the difference parts; the encrypted storage module is used to encrypt and store the backup data.
[0043] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a step of a method for automatically backing up and restoring terminal data.
[0044] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for automatically backing up and restoring terminal data.
[0045] Beneficial effects of the present invention: The terminal data automatic backup and recovery method provided by the present invention uses a classification model to accurately analyze and prioritize terminal data, so that the backup process can dynamically adjust the backup plan according to the importance of the data. Real-time capture of data changes and execution of incremental backups effectively improves the real-time and efficiency of backup. An incremental backup algorithm is used to record only the changed part of the file, and the changed area of the data block is quickly located by comparing the hash value, thereby reducing the demand for storage space and the transmission overhead of the backup data. Combined with the dynamic backup strategy optimization model, a dynamic balance can be achieved between backup time, storage resources and encryption overhead to ensure efficient execution of backup tasks under various network conditions. The backup data and keys are doubly protected by a hybrid encryption scheme to effectively prevent the risk of data leakage or tampering during transmission and storage. The present invention achieves better results in terms of the real-time and accuracy of backup, as well as the pertinence and efficiency of backup. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0047] Figure 1 This is an overall flow chart of a terminal data automatic backup and recovery method provided by the first embodiment of the present invention.
[0048] Figure 2 This is an overall flow chart of a terminal data automatic backup and recovery system provided by the third embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0050] Example 1, reference Figure 1 , as an embodiment of the present invention, provides a terminal data automatic backup and recovery method, comprising:
[0051] S1: Dynamically adjust priorities and generate personalized backup strategies.
[0052] Furthermore, the classification model is used to analyze and prioritize the terminal data, and the support vector machine algorithm is used to achieve dynamic classification of data, which is an important basis for ensuring the intelligence and efficiency of the backup system. This method is not limited to simple file classification, but combines multi-dimensional features (such as file type, usage frequency, last modification time, file size, etc.) for comprehensive evaluation. By calculating the specific weights of these features, the model can accurately identify the importance of data and the backup priority expressed as:
[0053] y=sign(w T x+b)
[0054] Among them, x represents the feature vector of the data, w represents the weight vector of the classification model, b represents the bias value of the classification, and y represents the classification result;
[0055] By optimizing parameters w and b in real time, the classification model can be dynamically adjusted to meet the needs of different users and scenarios, ensuring the effectiveness and accuracy of the classification strategy.
[0056] After the classification is completed, the backup plan is generated according to the priority to ensure that the key data is processed first. High-priority files (such as work documents and configuration files) will be backed up immediately, while low-priority data (such as cache files) may be processed later. This achieves accurate allocation of resources.
[0057] By prioritizing data through a classification model, the problem of treating data equally and being unable to distinguish importance in traditional backup technology is solved. For example, in certain high-risk scenarios (such as when the device faces hardware damage), prioritizing the backing up of important files can minimize user data loss. The introduction of the support vector machine (SVM) algorithm improves the accuracy and dynamic adaptability of the model. Unlike simple rules or static classification methods, SVM uses training data to optimize weights w and b, and can dynamically adapt to a variety of terminal scenarios and data features, making the classification strategy more flexible. In this way, the present invention can not only meet the personalized needs of users, but also improve backup efficiency and reliability.
[0058] If the classification strategy fails to distinguish data priorities, critical data may not be backed up in time when system resources are limited. The method of dynamically adjusting priorities avoids this problem.
[0059] The learning mechanism of SVM ensures the optimization ability of the model. Even when faced with unknown data features, the system can adjust the model through new data training to ensure its applicability.
[0060] It should be noted that dynamic backup strategies are generated based on data priority and user-set requirements;
[0061] The strategy generation adopts an optimization function model, which comprehensively considers backup time, storage resources, and encryption overhead, with the goal of minimizing system resource usage:
[0062] minF=αT+βS+γE
[0063] Among them, T represents the time of backup execution, S represents the storage space occupied by the backup, E represents the computational overhead of backup encryption, and α, β, and γ represent weight parameters, which are dynamically adjusted to meet user needs.
[0064] The optimization model dynamically adjusts weight parameters to adapt to different user scenarios. For example, when network bandwidth is limited, the weight of α can be increased to prioritize time efficiency, while in scenarios with higher requirements for data security, the weight of γ can be increased to improve encryption strength. This strategy generation method enables the backup system to balance the contradictions between speed, storage, and security, and achieve optimal resource allocation.
[0065] By optimizing the function, the backup strategy can avoid blindly pursuing a single goal (such as speed or storage) and achieve a dynamic balance of multiple goals. This design is highly adaptable and can be applied to different network environments and storage conditions. Traditional backup strategies are usually fixed and difficult to cope with diverse user needs, while the present invention significantly improves system flexibility.
[0066] By setting the backup time window and data compression ratio in the dynamic strategy, the present invention further optimizes the backup execution efficiency. For example, for files with a high modification frequency, the system can set a shorter backup time window to ensure timely backup of data, and compress large files to reduce transmission time.
[0067] Setting a time window can reduce the computing burden caused by excessively high backup frequency, while ensuring that important data is not missed due to time delays.
[0068] The data compression function effectively reduces the load of network transmission, especially in cloud backup scenarios, which can significantly save bandwidth resources.
[0069] Compared with the traditional method of fixed backup interval, the time window design of the present invention can better adapt to the dynamic changes of actual data. Combined with data compression technology, it can ensure that the backup task of large files is not delayed under the condition of limited bandwidth, thereby further improving the practicality of the backup system.
[0070] S2: Capture data changes in real time and perform incremental backups.
[0071] Furthermore, using file monitoring tools to capture the newly created, modified or deleted file information in the terminal device in real time is the basis for achieving efficient and accurate data backup. The introduction of the incremental backup algorithm determines the data range that needs to be backed up by calculating the hash value difference of the data block before and after the file change, thereby avoiding the redundant operation of the full backup as follows:
[0072]
[0073] Among them, F i Indicates the corresponding data block of the file before backup, F i Indicates the corresponding data block of the backup file, H(F i ) represents the hash value of the data block, and △D represents the difference in data that needs to be backed up;
[0074] In order to ensure data security during the transmission and storage of backup data, the present invention adopts a hybrid encryption scheme: the data is encrypted by a symmetric encryption algorithm (such as AES256) to generate ciphertext, and the symmetric key is encrypted and protected by an asymmetric encryption algorithm (such as RSA). This combined hybrid encryption mechanism not only ensures the speed of data encryption, but also ensures the security of key distribution. Finally, the backup data is stored in a distributed storage system, and the data disaster tolerance and storage reliability are further improved through redundancy mechanisms (such as erasure codes).
[0075] Using file monitoring tools to capture new, modified or deleted file information in terminal devices in real time is an improvement over traditional scheduled scanning methods. Traditional methods need to traverse the entire file system during backup, which is time-consuming and may miss changed data. The real-time monitoring tool of the present invention can accurately capture the operation events of the file system and push the changed data directly to the backup queue. This design significantly improves the timeliness and accuracy of data capture, and is particularly suitable for data scenarios with high-frequency changes, such as database logs or multi-user collaborative folders.
[0076] By capturing changed data in real time, the full scan process is avoided, the backup delay is shortened, and the backup response speed and reliability are improved.
[0077] It should be noted that the hybrid encryption scheme of the present invention adopts a combination of symmetric encryption and asymmetric encryption: symmetric encryption is responsible for fast data encryption, and asymmetric encryption is used to securely distribute symmetric keys. Compared with the method of using symmetric encryption or asymmetric encryption alone, this combination can reduce computing overhead while taking into account speed and security. The design of the hybrid encryption scheme is very suitable for data transmission and storage scenarios. In a distributed storage system, this scheme effectively prevents the risk of data leakage or tampering during transmission and storage, while utilizing the characteristics of asymmetric encryption to avoid key leakage problems.
[0078] Beneficial effects: Through the hybrid encryption mechanism, backup data can be highly protected throughout its life cycle, meeting application scenarios with high security requirements, such as enterprise data protection or privacy-sensitive personal data backup.
[0079] Backup data is stored in a distributed storage system, combined with redundancy mechanisms (such as erasure codes) to enhance data disaster recovery capabilities. Compared with traditional centralized storage, distributed storage can better cope with single point failures and improve system stability through redundant distribution.
[0080] Function and Use: The introduction of distributed storage mechanism is particularly suitable for multi-node backup environment, which can ensure high data availability in the event of hardware failure, network interruption, etc. The redundancy mechanism further reduces the risk of data loss, especially in disaster recovery scenarios.
[0081] Beneficial effect: Through distributed storage and redundancy mechanism, the backup data of the present invention can be quickly restored when a node fails, thereby improving the reliability and scalability of the backup system.
[0082] The present invention effectively solves the deficiencies of traditional backup systems in data capture, resource occupation, security and disaster recovery capabilities through real-time file monitoring, incremental backup algorithm, hybrid encryption scheme and distributed storage.
[0083] Real-time monitoring tools improve the timeliness and accuracy of data capture;
[0084] The incremental backup algorithm optimizes backup efficiency and storage utilization;
[0085] The hybrid encryption scheme ensures the security of backup data and the reliability of key distribution;
[0086] Distributed storage and redundancy mechanisms enhance the disaster recovery capability and data high availability of the backup system.
[0087] S3: Encrypt backup data for version recovery.
[0088] Furthermore, by generating a unique version number for each backup and recording the file change history, systematic support is provided for querying, tracing and restoring the backup data. After the backup is completed, the version management module generates a corresponding version number as a key index to identify file changes. Combined with the LRU (Least Recently Used) algorithm, the system can intelligently clean up backup versions with a priority lower than the set threshold, thereby avoiding storage space being occupied by unnecessary historical version accumulation. In addition, the backup data of high-priority files is retained first to ensure the storage integrity of critical data.
[0089] During the data recovery process, the present invention supports two modes: full recovery and partial recovery. Users can flexibly choose the recovery strategy according to their needs. After the recovery is completed, the system verifies the data integrity through the hash value verification mechanism to ensure the consistency of the recovered data with the original backup data. The specific integrity verification is expressed as:
[0090]
[0091] Among them, H k (D) represents the hash value of the backup data, H′ k (D) represents the hash value of the recovered data, and I represents the integrity check value. If I = 0, the recovered data is complete and correct;
[0092] This design provides a strong guarantee for the accuracy and reliability of data recovery, and significantly improves the operational efficiency and user experience of the backup system.
[0093] By generating a unique version number for each backup and recording the file change history, the problem of difficult version tracing in traditional backup systems is solved. The version number, as an index of the file change history, can quickly locate a specific backup point, making data query and rollback operations efficient and accurate.
[0094] Function and use: In multi-version backup scenarios, the version management module ensures high traceability of data, especially in complex data scenarios (such as multi-department collaborative file management in an enterprise), which enables quick query of specified versions. The version management module shortens query and rollback time through the index mechanism, while ensuring the orderliness and efficiency of multi-version backup, which is more advantageous than the traditional method of preserving historical records in general.
[0095] It should be noted that the LRU algorithm is used to clean up versions with a priority lower than the threshold, and the backup data of high-priority files is retained first, which effectively solves the space allocation problem when storage resources are limited. The characteristic of the LRU algorithm is that it automatically eliminates the least recently used version by dynamically tracking the usage frequency of the version, thereby avoiding manual intervention and decision-making errors. Combined with the priority strategy, the LRU algorithm not only optimizes the utilization of storage space, but also ensures the retention of key data versions, providing users with highly reliable data storage services. When storage resources are limited, the system avoids resource waste through an intelligent version cleaning mechanism, while ensuring the availability of high-priority data, which is more flexible and efficient than traditional fixed cleaning strategies.
[0096] Verifying the integrity of the restored data through a hash value verification mechanism is the core design of the present invention to ensure the accuracy of data recovery. Traditional methods rely only on file size or timestamp to verify the restored data, which may have a certain risk of misjudgment. The present invention mathematically ensures the complete consistency of the data content by comparing the hash values of the backup data and the restored data. During the data recovery process, the hash verification mechanism avoids recovery errors caused by storage device errors or data corruption during transmission. Especially in high-security scenarios (such as financial data backup or medical data management), this design significantly improves the reliability of data recovery. Through the hash verification mechanism, the present invention realizes consistency verification after data recovery, reduces the risk of recovery failure, and ensures that users can obtain accurate data versions.
[0097] The design supports both full recovery and partial recovery modes to meet the needs of users in different scenarios. Full recovery is suitable for scenarios where the device needs to be completely reset or for disaster recovery, while partial recovery provides users with more flexible options, such as restoring only some files or data from a specific time period. This flexible design not only improves the practicality of the backup system, but also reduces unnecessary data transmission and recovery time, making system resource allocation more efficient. By providing flexible recovery modes, users can freely choose recovery strategies according to actual needs, thereby reducing resource waste and improving operational efficiency.
[0098] Embodiment 2, an embodiment of the present invention, provides a method for automatic backup and recovery of terminal data. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0099] First, the experiment was conducted under various file types and backup strategies, including full backup of high-priority files and low-priority files, traditional incremental backup, and the incremental backup scheme proposed by the present invention. The experimental environment is:
[0100] Device configuration: Intel i7-9700K CPU, 16GB RAM, 1TB SSD.
[0101] File size: 2000 files were simulated, divided into high priority (such as documents and configuration files) and low priority (such as log files and media files), with a total file size of about 50GB.
[0102] Experimental tools: Python is used to implement file monitoring and backup simulation. The hash algorithm is SHA256, and the encryption algorithm is a hybrid of AES256 and RSA2048.
[0103] Experimental indicators: backup time, storage space usage, encryption overhead, recovery accuracy, and data loss risk.
[0104] The detailed experimental process is as follows:
[0105] Prioritization and strategy generation: Use the support vector machine algorithm to prioritize files. The backup strategy for high-priority files is based on real-time performance and integrity, while the backup strategy for low-priority files is based on resource saving.
[0106] Backup execution and monitoring: Capture file addition, modification, and deletion operations in real time, and record only the changed parts in incremental backup based on hash comparison. Traditional incremental backup records the complete content of changed files for comparison.
[0107] Encryption and storage: Backup data is protected through a hybrid encryption solution, stored in a distributed system, and a unique version number is generated for each backup.
[0108] Data recovery: Randomly select backup files for recovery testing to verify the performance of full recovery and partial recovery modes, and use a hash verification mechanism to ensure data consistency.
[0109] Table 1 Experimental data table
[0110]
[0111] The following analysis conclusions can be drawn from the above data table:
[0112] Compared with traditional incremental backup and full backup, the incremental backup solution of the present invention reduces the backup time by 40% and 50% in high-priority file and low-priority file scenarios, respectively. This is due to the dynamic priority adjustment and the design of recording only the difference part, which significantly reduces unnecessary data processing.
[0113] Under the same file size, the storage requirement of the incremental backup solution of the present invention is reduced by about 40% compared with the traditional incremental backup and about 65% compared with the full backup. This advantage mainly comes from the hash comparison mechanism, which effectively optimizes the utilization of storage resources by accurately identifying and backing up changed data.
[0114] The present invention adopts a hybrid encryption scheme to control the encryption overhead within 10% of the total backup time, while the encryption overhead of full backup and traditional incremental backup is 33% and 20% respectively. This optimization reflects the balance between speed and security of hybrid encryption.
[0115] During the recovery process, the present invention achieves 100% data recovery accuracy, which is better than the 96% to 98% recovery rate of traditional incremental backup. This shows that the hash value verification mechanism can effectively detect and avoid data loss or damage.
[0116] The present invention performs well in data loss risk control, ensuring a 0% data loss rate, while traditional incremental backup has a 4% data loss risk in low priority file recovery.
[0117] The present invention not only significantly improves backup efficiency through the combined application of priority division, incremental backup and hybrid encryption, but also has significant advantages in storage optimization and data security. Compared with traditional methods, the present invention innovatively combines dynamic strategy generation and hash verification mechanism to provide a reliable and efficient solution for the backup and recovery of high-frequency changing data.
[0118] Example 3, reference Figure 2 , as an embodiment of the present invention, provides a terminal data automatic backup and recovery system, including a backup strategy generation module, an incremental backup execution module, and an encryption storage module.
[0119] The backup strategy generation module is used to classify terminal data and dynamically generate backup strategies that meet user needs; the incremental backup execution module is used to capture changes through data monitoring tools and perform backup operations on the differences; the encrypted storage module is used to encrypt and store backup data.
[0120] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0122] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0123] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
[0124] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for automatic backup and recovery of terminal data, characterized in that: include: Dynamically adjust priorities and generate personalized backup strategies; Capture data changes in real time and perform incremental backups; Encrypt backup data for version recovery.
2. The terminal data automatic backup and recovery method according to claim 1, characterized in that: The dynamically adjusting the priority and generating the personalized backup strategy includes analyzing and prioritizing the data in the terminal device through a classification model; Data prioritization criteria include file type, frequency of use, last modification time, and file size characteristics; Using the support vector machine algorithm, the priority is assigned according to the data characteristics as follows: y=sign(w T x+b) Among them, x represents the feature vector of the data, w represents the weight vector of the classification model, b represents the bias value of the classification, and y represents the classification result; The classification model automatically optimizes parameters w and b through training data and adjusts the classification strategy in real time according to actual needs; After the classification is completed, make a backup plan according to the priority.
3. The method for automatically backing up and restoring terminal data according to claim 2, characterized in that: The dynamically adjusting the priority and generating the personalized backup strategy includes generating a dynamic backup strategy according to the data priority and the user setting requirements; The strategy generation adopts an optimization function model, which comprehensively considers backup time, storage resources, and encryption overhead, with the goal of minimizing system resource usage: minF=αT+βS+γE Among them, T represents the time of backup execution, S represents the storage space occupied by the backup, E represents the computational overhead of backup encryption, and α, β, and γ represent weight parameters, which are dynamically adjusted to meet user needs. Generate the optimal backup strategy, set the backup time window, data compression ratio and transmission method, and ensure the backup process is error-free.
4. The method for automatically backing up and restoring terminal data according to claim 3, characterized in that: The real-time capture of data changes to perform incremental backup includes capturing, through a file monitoring tool, the file information created, modified or deleted in the terminal device in real time; For changed data, an incremental backup algorithm is used to record only the difference in the file, reducing the amount of backup data and storage requirements; The amount of data for incremental backup is expressed as: Among them, F i Indicates the corresponding data block of the file before backup, F′ i Indicates the corresponding data block of the backup file, H(F i ) represents the hash value of the data block, and △D represents the difference in data that needs to be backed up; The backup locates the changed area of the data block by comparing the hash value and performs the backup operation on the area, thereby improving the backup efficiency; Real-time monitoring combined with incremental backup eliminates the need to repeatedly back up the entire data set; The monitored data changes will be directly entered into the backup queue.
5. The terminal data automatic backup and recovery method according to claim 4, characterized in that: The real-time capture of data changes and execution of incremental backup includes adopting a hybrid encryption scheme to ensure security when the backup data is transmitted and stored; The data is quickly encrypted through the symmetric encryption algorithm to generate ciphertext; Encrypt the symmetric key using an asymmetric encryption algorithm; The backup data is stored in a distributed storage system; Distributed storage uses a redundant mechanism.
6. The terminal data automatic backup and recovery method according to claim 5, characterized in that: The version recovery of the encrypted backup data includes generating a unique version number for each backup and recording the file change history; Query and roll back to any historical version through the version management module; Optimize storage space, use the LRU algorithm to clean up versions with a priority lower than the threshold or unused versions, and give priority to retaining backup data of files with a priority higher than the threshold.
7. The terminal data automatic backup and recovery method according to claim 6, characterized in that: The encrypted backup data is restored for version including data recovery, the system preferentially restores data with a priority higher than a threshold, and supports full recovery or partial recovery operations; After the recovery is complete, the data integrity is verified by the hash value as follows: Among them, H k (D) represents the hash value of the backup data, H′ k (D) represents the hash value of the recovered data, and I represents the integrity check value. If I = 0, the recovered data is complete and correct; Verify data integrity through hash values to locate the target data for recovery; Users can choose to restore to the backup point as needed to obtain the required data.
8. A system using the terminal data automatic backup and recovery method according to any one of claims 1 to 7, characterized in that: It includes a backup strategy generation module, an incremental backup execution module, and an encryption storage module; The backup strategy generation module is used to classify terminal data and dynamically generate a backup strategy that meets user needs; The incremental backup execution module is used to capture the changed content through the data monitoring tool and perform a backup operation on the difference part; The encryption storage module is used to encrypt and store the backup data.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the terminal data automatic backup and recovery method described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the terminal data automatic backup and recovery method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Data rescue and filing system based on cloud platform
CN120315653A
A data rescue and archiving system based on cloud platform
CN120315653B
Data preservation method for server and application system
CN120315946A
Backup disaster recovery method and system combined with AI technology
CN120371609A
A backup and disaster recovery method and system combining AI technology
CN120371609B