A backup method and device
By calculating the change rate and mean variance of the current partition table and historical partition table of the operating system, adapting to the threshold, automatically determining whether to perform backup, solving the problem of untimely and redundant backup in the existing technology, and improving the backup efficiency and accuracy .
Patent Information
- Application Number
- CN202110861586.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-07-29
AI Technical Summary
Existing operating system backup methods rely mostly on artificially triggered or timed backups, resulting in duplicate backups or missing backups, and it is impossible to effectively utilize operating system changes.
By obtaining the operating system's current partition table and historical partition table, calculate the change rate and mean variance, adapt to the threshold, and automatically determine whether to perform backups to avoid redundancy and missing backups.
Automatic backup decisions without user operations are realized, backup efficiency and accuracy are improved, and redundancy and missing backup phenomena are avoided.
Smart Images

Figure CN113505025B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a backup method and device. Background Art
[0002] Currently, backups of operating systems are mostly manually triggered or customized scheduled. However, when people use computers, the operating system (files) often do not change significantly for a long time, which means that backup is not needed. At the same time, users may make significant changes to the operating system during a certain use, which means that backup is needed. Manually triggered or scheduled backups often ignore such backup requirements, resulting in repeated meaningless backups or missed backups. Summary of the invention
[0003] The present invention provides a backup method and a backup device which can automatically select whether to perform backup according to actual backup conditions.
[0004] In order to solve the above technical problem, an embodiment of the present invention provides a backup method, including:
[0005] Obtaining a current partition table and a historical partition table of the operating system, wherein the current partition table records storage information of a target storage area in a current standby-start state of the operating system, and the historical partition table records storage information of the target storage area in each standby-start state of the operating system in a historical period;
[0006] Determine whether to back up the storage content of the current target storage area based on the contents recorded in the current partition table and the historical partition table.
[0007] Optionally, obtaining the current partition table and the historical partition table of the operating system includes:
[0008] During the power-on self-test phase, the current partition table and the historical partition table of the operating system are obtained.
[0009] Optionally, the determining whether to back up the storage content of the current target storage area based on the content recorded in the current partition table and the historical partition table includes:
[0010] Calculating a change rate of recorded contents between the current partition table and a first historical partition table corresponding to the last time the operating system was in a waiting-to-start state;
[0011] Based on the change rate, it is determined whether to back up the storage content of the current target storage area.
[0012] Optionally, storing the change rate calculated and generated each time the operating system is in a waiting-to-start state within a historical period;
[0013] The determining whether to back up the storage content of the current target storage area based on the change rate includes:
[0014] Determine the mean and variance of all currently stored change rates;
[0015] Whether to back up the storage content of the current target storage area is determined based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance.
[0016] Optionally, the determining whether to back up the storage content of the current target storage area based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance includes:
[0017] Calculate an adaptive threshold based on the mean and variance;
[0018] Whether to back up the storage content of the current target storage area is determined based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold.
[0019] Optionally, after determining whether to back up the storage content of the current target storage area based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold, the method further includes:
[0020] The change rate formed by the auxiliary calculation of the current partition table is stored, and the mean and the variance are updated based on the change rate formed by the auxiliary calculation of the current partition table.
[0021] Optionally, before obtaining the current partition table and the historical partition table of the operating system, the method further includes:
[0022] It is determined whether backup data corresponding to the target storage area is currently stored. If it is stored, the current partition table and the historical partition table of the operating system are obtained. If it is not stored, the storage content of the current target storage area is directly backed up.
[0023] Optionally, before obtaining the current partition table and the historical partition table of the operating system, the method further includes:
[0024] Determine the time difference between the last time the target storage area completed backup and the current time;
[0025] Determine the relationship between the time difference and the time threshold. If the difference exceeds the time threshold, directly back up the storage content of the current target storage area. If the difference does not exceed the time threshold, obtain the current partition table and historical partition table of the operating system.
[0026] Optionally, the storage content of the target storage area includes system files and / or data files of the operating system.
[0027] Another embodiment of the present invention also provides a backup device, including:
[0028] an acquisition module, used to obtain a current partition table and a historical partition table of the operating system, wherein the current partition table records storage information of a target storage area in a current standby-start state of the operating system, and the historical partition table records storage information of the target storage area in each standby-start state of the operating system in a historical time;
[0029] The backup module is used to determine whether to back up the storage content of the current target storage area according to the content recorded in the current partition table and the historical partition table.
[0030] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of the embodiments of the present invention include the ability to determine whether the operating system needs to be backed up at present based on the contents recorded in the current partition table and the historical partition table of the operating system, without the need for the user to input any operations throughout the process, thereby simplifying the user backup process and avoiding redundant backups and untimely backups, thereby greatly improving the backup efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The figure is a flowchart of the backup method in an embodiment of the present invention.
[0032] Figure 2 The figure is a flowchart of the backup method in an embodiment of the present invention.
[0033] Figure 3 The figure is a flowchart of the backup method in an embodiment of the present invention.
[0034] Figure 4 The figure is a flowchart of the backup method in an embodiment of the present invention.
[0035] Figure 5 4 is a structural block diagram of a backup system in an embodiment of the present invention.
[0036] Figure 6 This is a diagram of the actual application of the backup system in the embodiment of the present invention. DETAILED DESCRIPTION
[0037] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but are not intended to limit the present invention.
[0038] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.
[0039] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.
[0040] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.
[0041] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.
[0042] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0043] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.
[0044] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.
[0045] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0046] like Figure 1 As shown, an embodiment of the present invention provides a backup method, including:
[0047] Obtaining a current partition table and a historical partition table of the operating system, wherein the current partition table records storage information of the target storage area in the current standby state of the operating system, and the historical partition table records storage information of the target storage area in each standby state of the corresponding operating system in the historical time;
[0048] Determine whether to back up the storage content of the current target storage area based on the content recorded in the current partition table and the historical partition table.
[0049] For example, multiple partition tables are stored in the operating system. The partition table divides the data of a large table into many small subsets called partitions. The types include FAT16, FAT32, NTFS, exFAT, Ext2 / 3 / 4, HFS+, and VMFS. In addition, the types of partition tables are mainly divided into: range, list, and hash partitions. The division is mainly based on the internal attributes of the table. Among them, the current partition table records the storage information of the target storage area in the current standby state of the operating system, that is, the operating system has not yet started, such as the storage information of the target storage area during the BIOS stage startup process. The target storage area can be, for example, the storage area of the system files of the operating system, or the system files of the operating system, the metafiles of the application, etc., which are not specific. Of course, it can also be a data file, that is, other files other than the system files of the operating system, and the target storage area can be any storage area in the hard disk, or it can be a storage area provided by other storage devices. The historical partition table records the storage information of the target storage area in each standby state of the corresponding operating system in the historical time, such as the storage information of the target storage area recorded by the partition table when the user starts and uses the device in the past time period. After obtaining the current partition table and the historical partition table, the system comprehensively determines whether to back up the storage content of the current target storage area based on the contents recorded in the current partition table and the historical partition table.
[0050] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of this embodiment include being able to determine whether the operating system needs to be backed up at present based on the contents recorded in the current partition table and historical partition table of the operating system, without the need for the user to input any operations throughout the process, thereby simplifying the user backup process and avoiding redundant backups and untimely backups, thereby greatly improving the backup efficiency and accuracy.
[0051] Specifically, Figure 2 As shown, in this embodiment, obtaining the current partition table and the historical partition table of the operating system includes:
[0052] During the power-on self-test phase, the current partition table and historical partition table of the operating system are obtained.
[0053] For example, in this embodiment, the current partition table and the historical partition table of the operating system are obtained when the system is in the BIOS startup stage. Of course, it can also be other program running stages for implementing BIOS functions, the details are uncertain.
[0054] Furthermore, combined with Figure 2 and Figure 3As shown, in this embodiment, determining whether to back up the storage content of the current target storage area based on the content recorded in the current partition table and the historical partition table includes:
[0055] Calculate the change rate of the recorded contents between the current partition table and the first historical partition table corresponding to the last time the operating system was in the waiting-to-start state;
[0056] Whether to back up the storage content of the current target storage area is determined based on the change rate.
[0057] For example, taking the content stored in the target area as the system file of the operating system as an example, when the user used the device last time, the system file was modified, such as deleting part of the content and adding part of the content, and the result data of the operation process were all recorded in the partition table when the device was used this time. The partition table corresponds to the first historical partition table corresponding to the last time the operating system was in the waiting state. When the user shuts down and starts the electronic device again at the current time, the partition table corresponding to this startup is the partition table when the user started the device last time. The device compares the current partition table with the first historical partition table to determine whether the contents of the two partition tables have changed, and determines the change rate based on the change. If the change rate meets the corresponding threshold, it means that the change is large and the content of the target storage area needs to be backed up. If the change rate does not meet the corresponding threshold, it means that the change is small, and there is no need to back up the content of the target storage area. In this embodiment, since the user has deleted or added the stored content, the corresponding change rate is large, that is, the change is large. In order to avoid the loss of stored content, in this embodiment, it will be determined that the content of the target storage area needs to be backed up.
[0058] Specifically, combined Figure 2 and Figure 4 As shown, this embodiment stores the change rate calculated and generated each time the operating system is in the waiting-to-start state during the historical time;
[0059] Determine whether to back up the storage content of the current target storage area based on the change rate, including:
[0060] Determine the mean and variance of all currently stored change rates;
[0061] Whether to back up the storage content of the current target storage area is determined based on the change rate, mean value, and variance formed by auxiliary calculation of the current partition table.
[0062] For example, in this embodiment, the change rate calculated by the device based on the contents of the historical partition table and the current partition table will be recorded each time the operating system is in the waiting state. When the device determines whether to back up the contents of the current target storage area, it can calculate the mean and variance based on all the change rates currently stored, and then determine whether to back up the storage contents of the current target storage area based on the change rate, mean, and variance formed by the auxiliary calculation of the current partition table.
[0063] Furthermore, this embodiment determines whether to back up the storage content of the current target storage area based on the change rate, mean, and variance formed by auxiliary calculation of the current partition table, including:
[0064] The adaptive threshold is calculated based on the mean and variance;
[0065] Whether to back up the storage content of the current target storage area is determined based on the relationship between the change rate formed by auxiliary calculation of the current partition table and the adaptive threshold.
[0066] For example, each time the operating system starts, the partition table is backed up to a partition storing the operating system backup file, and the change rate C1 between the current partition table layout2 and the first partition table layout1 backed up when the operating system was started last time is calculated. When the operating system is started next time, the change rate between layout3 and layout2 is calculated, and the change rate is recorded as C2, and so on, forming a sequence C (C1, C2...Cn) that records the change rate of the partition table compared with the partition table at the last startup each time the operating system is started.
[0067] Each time the operating system is started, the Cn (rate of change) calculated at this startup is compared with the mean (C1+C2+...+Cn-1) / (n-1) and variance σn-1 of the previous n-1 startups C1, C2...Cn-1 as follows:
[0068] If Cn≧(C1+C2+...+Cn-1) / (n-1)+2×σn-1, the backup is triggered, and Cn is put into the sequence C, and the mean and variance are recalculated;
[0069] If Cn<(C1+C2+...+Cn-1) / (n-1)+2×σn-1, the backup will not be triggered, and Cn will be put into the sequence C, and the mean and variance will be recalculated;
[0070] In this embodiment, when Cn≧(C1+C2+...+Cn-1) / (n-1)+2×σn-1, it is considered that the operating system (file) change rate is in the top 5%, and the backup is triggered.
[0071] For the convenience of calculation, in this embodiment, a change rate statistical model is established based on the above calculation and comparison process. The specific type of the model is uncertain, for example, it can be a normal distribution model.
[0072] Furthermore, after determining whether to back up the storage content of the current target storage area based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold, this embodiment further includes:
[0073] The change rate formed by auxiliary calculation of the current partition table is stored, and the mean and variance are updated based on the change rate formed by auxiliary calculation of the current partition table.
[0074] That is, each new change rate calculated is stored, and because the new change rate is added, the stored change rate set changes, so the device recalculates the mean and variance based on the currently calculated change rate and the previously stored change rate, and stores the new mean and variance for use when the next device is started to determine whether to perform a backup.
[0075] Optionally, before obtaining the current partition table and the historical partition table of the operating system, this embodiment further includes:
[0076] It is determined whether backup data corresponding to the target storage area is currently stored. If it is stored, the current partition table and the historical partition table of the operating system are obtained. If it is not stored, the storage content of the current target storage area is directly backed up.
[0077] or
[0078] Before obtaining the current partition table and historical partition table of the operating system, it also includes:
[0079] Determine the time difference between the last time the target storage area completed backup and the current time;
[0080] Determine the relationship between the time difference and the time threshold. If the difference exceeds the time threshold, directly back up the storage content of the current target storage area. If the difference does not exceed the time threshold, obtain the current partition table and historical partition table of the operating system.
[0081] For example, when the computer is powered on, the BIOS starts and makes the following judgments:
[0082] (1) determining whether the storage content of the target storage area has a backup, and if not, backing it up immediately, or outputting a reminder to suggest the user to back it up;
[0083] (2) whether a backup has been performed within a certain time interval T (for example, T can be set to 3 months); if not, a backup is performed immediately, or a reminder is output to suggest the user to perform a backup;
[0084] (3) If both of the above two judgments are positive, the judgment steps described above are executed to determine whether the change rate of the operating system files is greater than an adaptive threshold based on the partition table. If so, automatic backup is performed, or a reminder is output to suggest the user to perform a backup.
[0085] like Figure 5 As shown, another embodiment of the present invention further provides a backup device, including:
[0086] An acquisition module is used to obtain a current partition table and a historical partition table of the operating system, wherein the current partition table records storage information of a target storage area in a current standby state of the operating system, and the historical partition table records storage information of the target storage area in each standby state of the corresponding operating system in a historical time;
[0087] The backup module is used to determine whether to back up the storage content of the current target storage area according to the content recorded in the current partition table and the historical partition table.
[0088] For example, multiple partition tables are stored in the operating system. The partition table divides the data of a large table into many small subsets called partitions. The types include FAT16, FAT32, NTFS, exFAT, Ext2 / 3 / 4, HFS+, and VMFS. In addition, the types of partition tables are mainly divided into range, list, and hash partitions, and the division is mainly based on the internal attributes of the table. Among them, the current partition table records the storage information of the target storage area in the current standby state of the operating system, that is, the operating system has not yet started, such as the storage information of the target storage area during the BIOS stage startup process. The target storage area can be, for example, the storage area of the system files of the operating system, or the system files of the operating system, the metafiles of the application, etc., which are not specific, and the target storage area can be any storage area in the hard disk, or it can be a storage area provided by other storage devices. The historical partition table records the storage information of the target storage area in each standby state of the corresponding operating system in the historical time, such as the storage information of the target storage area recorded by the partition table when the user starts and uses the device in the past time period. After the obtaining module obtains the current partition table and the historical partition table, the backup module will comprehensively determine whether to back up the storage content of the current target storage area based on the contents recorded in the current partition table and the historical partition table.
[0089] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of this embodiment include being able to determine whether the operating system needs to be backed up at present based on the contents recorded in the current partition table and historical partition table of the operating system, without the need for the user to input any operations throughout the process, thereby simplifying the user backup process and avoiding redundant backups and untimely backups, thereby greatly improving the backup efficiency and accuracy.
[0090] Optionally, obtaining the current partition table and the historical partition table of the operating system includes:
[0091] During the power-on self-test phase, the current partition table and the historical partition table of the operating system are obtained.
[0092] Optionally, the determining whether to back up the storage content of the current target storage area based on the content recorded in the current partition table and the historical partition table includes:
[0093] Calculating a change rate of recorded contents between the current partition table and a first historical partition table corresponding to the last time the operating system was in a waiting-to-start state;
[0094] Based on the change rate, it is determined whether to back up the storage content of the current target storage area.
[0095] Optionally, storing the change rate calculated and generated each time the operating system is in a waiting-to-start state within a historical period;
[0096] The determining whether to back up the storage content of the current target storage area based on the change rate includes:
[0097] Determine the mean and variance of all currently stored change rates;
[0098] Whether to back up the storage content of the current target storage area is determined based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance.
[0099] Optionally, the determining whether to back up the storage content of the current target storage area based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance includes:
[0100] Calculate an adaptive threshold based on the mean and variance;
[0101] Whether to back up the storage content of the current target storage area is determined based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold.
[0102] Optionally, after determining whether to back up the storage content of the current target storage area based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold, the method further includes:
[0103] The change rate formed by the auxiliary calculation of the current partition table is stored, and the mean and the variance are updated based on the change rate formed by the auxiliary calculation of the current partition table.
[0104] Optionally, it also includes:
[0105] The first judgment module is used to judge whether the backup data corresponding to the target storage area is currently stored. If it is stored, the current partition table and the historical partition table of the operating system are obtained. If it is not stored, the storage content of the current target storage area is directly backed up.
[0106] Optionally, it also includes:
[0107] A second judgment module is used to determine the time difference between the last time the target storage area completed backup and the current time;
[0108] Determine the relationship between the time difference and the time threshold. If the difference exceeds the time threshold, directly back up the storage content of the current target storage area. If the difference does not exceed the time threshold, obtain the current partition table and historical partition table of the operating system.
[0109] Optionally, the storage content of the target storage area includes system files of the operating system.
[0110] A backup system in this embodiment includes:
[0111] at least one processor 602,
[0112] a memory 604 communicatively connected to the at least one processor,
[0113] The memory stores instructions that can be executed by the one processor, and the instructions are executed by the at least one processor to implement the method described above.
[0114] Figure 6 A schematic diagram of component connection relationships of a backup system in one embodiment of the present application. Figure 6 As shown, the backup system 600 in this embodiment may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0115] The processing component 602 generally controls the overall operation of the backup system 600. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0116] The memory 604 is configured to store various types of data to support operations in the backup system 600. Examples of such data include instructions for any application or method operating on the backup system 600, such as text, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0117] The power supply component 606 provides power to the various components of the backup system 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the backup system 600.
[0118] The multimedia component 608 includes a screen that provides an output interface between the backup system 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 may also include a front camera and / or a rear camera. When the backup system 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0119] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes an alarm, a microphone, and when the protection monitoring system 600 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0120] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0121] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the backup system 600. For example, the sensor assembly 614 may include a sound sensor. In addition, the sensor assembly 614 may detect the open / closed state of the backup system 600, the relative positioning of components, such as the display and keypad of the backup system 600, and the sensor assembly 614 may also detect the position change of the backup system 600 or a component of the backup system 600, the presence or absence of user contact with the backup system 600, the orientation or acceleration / deceleration of the backup system 600, and the temperature change of the backup system 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0122] The communication component 616 is configured to enable the backup system 600 to provide the ability to communicate with other devices and cloud platforms in a wired or wireless manner. The backup system 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0123] In an exemplary embodiment, the backup system 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0124] The present invention also provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor corresponding to the backup system, the backup system can implement the method as described above.
[0125] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0126] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0129] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
[0130] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A backup method, include: Obtaining a current partition table and a historical partition table of the operating system, wherein the current partition table records storage information of a target storage area in a current standby-start state of the operating system, and the historical partition table records storage information of the target storage area in each standby-start state of the operating system in a historical period; Determine whether to back up the storage content of the current target storage area based on the contents recorded in the current partition table and the historical partition table; The determining whether to back up the storage content of the current target storage area based on the content recorded in the current partition table and the historical partition table includes: Calculating a change rate of recorded contents between the current partition table and a first historical partition table corresponding to the last time the operating system was in a waiting-to-start state; Determining whether to back up the storage content of the current target storage area based on the change rate; storing the change rate calculated and generated each time the operating system is in a waiting-to-start state within a historical period; The determining whether to back up the storage content of the current target storage area based on the change rate includes: Determine the mean and variance of all currently stored change rates; Whether to back up the storage content of the current target storage area is determined based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance.
2. The method according to claim 1, in, The obtaining of the current partition table and the historical partition table of the operating system includes: During the power-on self-test phase, the current partition table and the historical partition table of the operating system are obtained.
3. The method according to claim 1, in, The determining whether to back up the storage content of the current target storage area based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance includes: Calculate an adaptive threshold based on the mean and variance; Whether to back up the storage content of the current target storage area is determined based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold.
4. The method according to claim 3, in, After determining whether to back up the storage content of the current target storage area based on the relationship between the change rate formed by the auxiliary calculation of the current partition table and the adaptive threshold, the method further includes: The change rate formed by the auxiliary calculation of the current partition table is stored, and the mean and the variance are updated based on the change rate formed by the auxiliary calculation of the current partition table.
5. The method according to claim 1, in, Before obtaining the current partition table and the historical partition table of the operating system, the method further includes: It is determined whether backup data corresponding to the target storage area is currently stored. If it is stored, the current partition table and the historical partition table of the operating system are obtained. If it is not stored, the storage content of the current target storage area is directly backed up.
6. The method according to claim 1, in, Before obtaining the current partition table and the historical partition table of the operating system, the method further includes: Determine the time difference between the last time the target storage area completed backup and the current time; Determine the relationship between the time difference and the time threshold. If the difference exceeds the time threshold, directly back up the storage content of the current target storage area. If the difference does not exceed the time threshold, obtain the current partition table and historical partition table of the operating system.
7. The method according to claim 1, in, The storage content of the target storage area includes system files and / or data files of the operating system.
8. A backup device, include: an acquisition module, used to obtain a current partition table and a historical partition table of the operating system, wherein the current partition table records storage information of a target storage area in a current standby-start state of the operating system, and the historical partition table records storage information of the target storage area in each standby-start state of the operating system in a historical time; A backup module, used to determine whether to back up the storage content of the current target storage area according to the contents recorded in the current partition table and the historical partition table; The determining whether to back up the storage content of the current target storage area based on the content recorded in the current partition table and the historical partition table includes: Calculating a change rate of recorded contents between the current partition table and a first historical partition table corresponding to the last time the operating system was in a waiting-to-start state; Determining whether to back up the storage content of the current target storage area based on the change rate; storing the change rate calculated and generated each time the operating system is in a waiting-to-start state within a historical period; The determining whether to back up the storage content of the current target storage area based on the change rate includes: Determine the mean and variance of all currently stored change rates; Whether to back up the storage content of the current target storage area is determined based on the change rate formed by auxiliary calculation of the current partition table and the mean and variance.
