System backup method and device and memory
By backing up the system map tables before system files are updated and historical data is retained, the problem of existing system backup methods occupying a large amount of storage space is solved, and efficient system file backup is achieved, reducing storage space usage and improving device availability.
Patent Information
- Application Number
- CN202311282675.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
Existing system backup methods occupy a large amount of storage space, affecting the operating performance of electronic devices.
Before the system file is updated, backup the system map table and retain the updated system file data in memory, while storing the updated system file data and the new system map table.
By backing up the system map table and retaining historical system file data, the system file backup is realized, reducing the storage space occupation and improving the availability of equipment.
Smart Images

Figure CN119718773A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular to a system backup method and device, and a memory. Background Art
[0002] At present, in order to avoid system update failure, electronic devices can back up system file data in the memory. However, such a backup method will occupy a large amount of storage space of the memory, thereby affecting the operating performance of the electronic device. The system backup method needs to be optimized. Summary of the invention
[0003] In view of this, the present application discloses a system backup method and device, and a memory.
[0004] According to a first aspect of an embodiment of the present disclosure, a system backup method is provided, the method comprising:
[0005] Before the system file is updated, a system mapping table is backed up; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where current first system file data is stored in a memory;
[0006] In response to a system file update occurring, retaining the first system file data in the memory; and
[0007] The updated second system file data is stored in the memory, and an updated system mapping table is determined.
[0008] According to a second aspect of an embodiment of the present disclosure, a memory is provided, wherein the memory is used for:
[0009] Before the system file is updated, a system mapping table is backed up and stored; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory;
[0010] In response to a system file update occurring, retaining the first stored system file data; and
[0011] The updated second system file data is stored, and the updated system mapping table is stored.
[0012] According to a third aspect of an embodiment of the present disclosure, a system backup device is provided, the device comprising:
[0013] A backup module, used for backing up a system mapping table before a system file is updated; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where current first system file data is stored in a memory;
[0014] a processing module, configured to retain the first system file data in the memory in response to a system file update; and
[0015] The updated second system file data is stored in the memory, and an updated system mapping table is determined.
[0016] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the system backup method described in any one of the above items are implemented.
[0017] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0018] processor;
[0019] Memory;
[0020] Wherein, the processor is used to send a backup instruction to the memory before the system file is updated;
[0021] The memory is used to back up the system mapping table based on the backup instruction; the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory;
[0022] The memory is further used to retain the first system file data in response to a system file update; and
[0023] The updated second system file data is stored, and the updated system mapping table is stored.
[0024] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0025] In the present disclosure, the electronic device can back up the system mapping table in advance before the system file is updated. When the system file is updated, the first system file data before the update can be retained in the memory, and the updated second system file data can be stored in the memory, and the updated system mapping table can be determined. The present disclosure can achieve the purpose of backing up the system file by backing up the system mapping table and retaining the historical system file data, thereby reducing the storage space of the memory occupied and having high availability.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0028] Figure 1 is a flowchart of a system backup method according to an exemplary embodiment of the present disclosure;
[0029] Figure 2A is a schematic diagram of a scenario of a backup system mapping table according to an exemplary embodiment of the present disclosure;
[0030] Figure 2B is a schematic diagram of a scenario of updating a system mapping table according to an exemplary embodiment of the present disclosure;
[0031] Figure 3 is a flowchart of a system restoration method according to an exemplary embodiment of the present disclosure;
[0032] Figure 4 is a flowchart of another system restoration method according to an exemplary embodiment of the present disclosure;
[0033] Figure 5 is a schematic diagram of a scenario of performing system restoration based on a backed-up system mapping table according to an exemplary embodiment of the present disclosure;
[0034] Figure 6 is a block diagram of a system backup device according to an exemplary embodiment of the present disclosure;
[0035] Figure 7 The figure is a schematic diagram of a structure of a system backup device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0037] The following first introduces the system backup method provided by the present disclosure from the first device side.
[0038] Reference Figure 1 As shown, Figure 1 This is a flowchart of a system backup method shown in an exemplary embodiment of the present disclosure. This embodiment is described from the perspective of an electronic device, which may include but is not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, etc. Figure 1 As shown, the system backup method may include the following steps:
[0039] In step 101, before a system file update occurs, a system mapping table is backed up.
[0040] In some embodiments, the system mapping table includes one or more first storage addresses, each of which corresponds to current first system file data, ie, an address where the file data of the first system is stored in the memory before the system file is updated.
[0041] The memory may include but is not limited to storage devices such as flash memory. Of course, the memory may also refer to a storage chip, which is not limited in the present disclosure.
[0042] For example Figure 2A As shown, the first system file data includes data 1 to data #5, which correspond to storage addresses a, b, c, d, and e respectively, and the current system mapping table #1 includes storage addresses a, b, c, d, and e. The electronic device can back up the system mapping table #1.
[0043] In some embodiments, a processor of the electronic device, such as a central processing unit (CPU), may serve as a host of the electronic device to send a backup instruction to the memory.
[0044] The memory may back up the system mapping table based on the backup instruction, for example Figure 2A As shown, back up the system mapping table #1.
[0045] In step 102, in response to a system file update, the first system file data is retained in the memory; and the updated second system file data is stored in the memory, and an updated system mapping table is determined.
[0046] In some embodiments, the memory does not delete the first system file data previously stored.
[0047] In some embodiments, the updated second system file data may be stored in the memory in the following manners, but not limited to:
[0048] Determine incremental data of the second system file data relative to the first system file data;
[0049] The incremental data is stored in the memory.
[0050] In one example, when the system file is upgraded, only part of the functions may be upgraded, that is, there is generally common data between the second system file data and the first system file data, and this part of the data is not changed.
[0051] In addition, the file data of the second system file data that is changed relative to the first system file data can be called incremental data, that is, the data belonging to the second system file data but not belonging to the first system file data can be called incremental data.
[0052] In an embodiment of the present disclosure, after the incremental data of the second system file data relative to the first system file data is determined, the incremental data may be stored in a memory.
[0053] Exemplarily, the first system file data includes data #1 to data #5, the second system file data includes data #1 to data #3, and data #6 and data #7, and the incremental data is data #6 and data #7.
[0054] The memory can store incremental data while retaining the first system file data, for example Figure 2B As shown, data #1 to data #7 can now be stored in the memory.
[0055] In some embodiments, the updated system mapping table may be determined in the following manner:
[0056] Determining a second storage address of the incremental data in the memory;
[0057] Determining common data between the first system file data and the second system file data;
[0058] It is determined that the updated system mapping table includes the first storage address and the second storage address of the common data.
[0059] Exemplarily, the second storage address of the incremental data in the memory may be determined first, for example Figure 2B As shown, the incremental data includes data #6 and data #7, which correspond to storage address f and storage address g respectively. Then the second storage address includes storage address f and storage address g.
[0060] Further, the common data of the first system file data and the second system file data may be determined, such as Figure 2B As shown, the common data includes data #1 to data #3. The first storage addresses corresponding to the common data include storage address a, storage address b, and storage address c.
[0061] In the embodiment of the present disclosure, the updated system mapping table may include the first storage address of the common data and the second storage address. Figure 2BAs shown, the updated system mapping table, namely, system mapping table #2, includes storage address a, storage address b, storage address c, storage address f, and storage address g.
[0062] In the embodiment of the present disclosure, when performing system backup, it is not necessary to back up all system file data. For example, when the first system file data includes data #1 to data #5, and the second system file data includes data #1 to data #3, and data #6 to data #7, it is not necessary to back up all the first system file data. When the system file is updated again, it is also not necessary to back up all the second system file data. The present disclosure only needs to back up system mapping table #1, and when the system file is updated again, system mapping table #2 can be backed up.
[0063] In the above embodiment, the purpose of backing up system files can be achieved by backing up the system mapping table and retaining historical system file data, thereby reducing the storage space of the memory occupied and achieving high availability.
[0064] Reference Figure 3 As shown, Figure 3 is Figure 1 The embodiment shown is a flowchart of a system restoration method based on the system backup method. Figure 3 As shown, this embodiment is described from the electronic device side, and the system restoration method may include the following steps:
[0065] In step 301, in response to detecting a system restore instruction, a third storage address of a target system file to be restored in the memory is determined based on a target backup system mapping table indicated by the system restore instruction.
[0066] In some embodiments, the electronic device can receive a system restore instruction sent by another electronic device. The other electronic device can be another electronic device external to the electronic device. The other electronic device can include but is not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, etc.
[0067] In some embodiments, when the OTA upgrade of the system files fails and the electronic device establishes a connection with the other electronic device, it can receive the system restoration instruction sent by the other electronic device through the connection.
[0068] In some embodiments, the electronic device may establish a wireless connection with other electronic devices, including but not limited to Bluetooth, infrared, Zigbee and other wireless connections.
[0069] In some embodiments, the electronic device may establish a wired connection with other electronic devices, which is not limited in the present disclosure. In some embodiments, a processor of the first device, such as a CPU, may serve as a host to receive the system restoration instruction sent by other electronic devices.
[0070] In some embodiments, the electronic device may also automatically generate a system restore instruction by a processor. For example, the system restore instruction may be automatically generated by a CPU in a recovery mode.
[0071] The present disclosure does not limit the manner in which the system restoration instruction is detected.
[0072] In some embodiments, the system restore instruction may indicate a target backup system mapping table.
[0073] The target backup system mapping table is one of the system mapping tables backed up by the memory.
[0074] The target backup system mapping table is used to indicate a third address where file data of the target system file is stored in the memory of the first device.
[0075] In some embodiments, the electronic device may determine a third storage address of the target system file to be restored in the memory based on the target backup system mapping table indicated by the system restore instruction.
[0076] In step 302, after reading the file data of the target system file from the memory according to the third storage address, the target system file is restored.
[0077] In some embodiments, the electronic device may adopt a snapshot recovery method to restore the target system file after reading the file data of the target system file from the memory according to the third storage address.
[0078] In one example, snapshot recovery is a data recovery method, which is usually used to recover data in a file system or database system to return to the data state at a certain point in the past. The file system or data is usually restored by creating a pointer for each data block or each file.
[0079] In the disclosed embodiment, the target backup system mapping table is a pre-created pointer, and the first device can restore the target system file according to the target backup system mapping table, so that the system of the electronic device is restored to the target system corresponding to the target system file.
[0080] In the above embodiment, the electronic device can restore the target system file based on the target backup system mapping table indicated by the system restoration instruction. The system restoration can be completed without special flashing software, and the system can be restored without losing user data, which has high availability.
[0081] In some embodiments, reference Figure 4 As shown, Figure 4 This disclosure Figure 3 The embodiment shown is a flow chart of a system restoration method. Before executing step 301, the system restoration method may further include the following steps:
[0082] In step 401, the processor sends the system mapping table backed up in the memory to other electronic devices, so that the other electronic devices determine the target backup system mapping table in the system mapping table backed up in the memory.
[0083] Exemplarily, the processor may send the system mapping table backed up in the memory to other electronic devices through a wireless connection or a wired connection between the devices.
[0084] After receiving, other electronic devices may display the received backup system mapping table, and the user may determine the target backup system mapping table. Alternatively, other electronic devices may determine the target backup system mapping table based on preset rules. The present disclosure does not limit the manner in which other electronic devices determine the target backup system mapping table.
[0085] Other electronic devices can send the target backup system mapping table to the electronic device through a system restoration instruction. The electronic device can continue to perform the above steps 301 to 302 to restore the target system file.
[0086] In the above embodiment, the system file can be restored to the target system file specified in the multiple system files backed up before, and the system recovery can be completed without special flashing software, and the system can be restored without losing user data, with high availability.
[0087] In some embodiments, the memory may store a backup system mapping table, a system mapping table, and system file data. The read and write operations of the electronic device may manage data or information through the system mapping table. The storage addresses a, b, c, d, and e respectively correspond to the addresses where the file data #1, file data #2, file data #3, file data #4, and file data #5 of the first system file are stored in the memory. For example, Figure 2A shown.
[0088] The processor may send a backup instruction to the memory. After receiving the backup instruction from the processor, the memory may immediately back up a system mapping table in the memory to obtain a backup system mapping table #1, and may retain the first system file data in the storage space from this moment on. For example, Figure 2A shown.
[0089] When a system file update occurs, such as Figure 2B As shown, the incremental data in the second system file data that does not belong to the first system file data includes file data #6 and file data #7, and the corresponding second storage addresses include storage addresses f and g. At this time, the processor does not send a backup instruction to the memory, so the backup system mapping table in the memory is still the backup system mapping table #1.
[0090] When the processor of the first device receives the system restoration instruction sent by the second device, for example Figure 5 As shown, the system restore instruction is used to indicate the target backup system mapping table, namely, backup system mapping table #1.
[0091] At this time, the first device can adopt the snapshot recovery method, based on the backup system mapping table #1, read the file data #1, file data #2, file data #3, file data #4, and file data #5 according to the storage addresses a, b, c, d, and e, and restore the target system file after obtaining the target system file. Thus, the system is restored to the target system corresponding to the target system file, realizing the storage device-level system restoration function.
[0092] In the above embodiment, the system recovery can be completed without special flashing software, and the system can be restored without losing user data, so the availability is high.
[0093] In some embodiments, the system backup method and system restore method provided by the present disclosure can also be applied to other scenarios, including but not limited to the debugging process of electronic equipment before or after leaving the factory. It is understandable that if the storage space of the memory is large enough, the solution of the present disclosure can also be extended to the backup and restoration of application layer data.
[0094] In some embodiments, the present disclosure further provides a memory, the memory being used to:
[0095] Before the system file is updated, a system mapping table is backed up and stored; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory;
[0096] In response to a system file update occurring, retaining the first stored system file data; and
[0097] The updated second system file data is stored, and the updated system mapping table is stored.
[0098] In some embodiments, the memory is further used to:
[0099] In response to receiving a backup instruction sent by a processor, the system mapping table is backed up based on the backup instruction.
[0100] In some embodiments, the memory is further used to:
[0101] The incremental data of the second file system data relative to the first file system data is stored.
[0102] In some embodiments, the updated system mapping table stored in the memory includes:
[0103] The first storage address of common data; wherein the common data is system file data common to the first system file data and the second system file data; and
[0104] The second storage address of the incremental data.
[0105] In some embodiments, the processor may read file data corresponding to the storage address from the memory to perform system restoration.
[0106] In some embodiments, the memory may include but is not limited to storage devices such as flash. Of course, the memory may also refer to a storage chip, which is not limited in the present disclosure.
[0107] Corresponding to the aforementioned application function implementation method embodiment, the present disclosure also provides an application function implementation device embodiment.
[0108] Reference Figure 6 , Figure 6 is a block diagram of a system backup device according to an exemplary embodiment, the device comprising:
[0109] The backup module 601 is used to back up the system mapping table before the system file is updated; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory;
[0110] A processing module 602 is used for retaining the first system file data in the memory in response to a system file update; and
[0111] The updated second system file data is stored in the memory, and an updated system mapping table is determined.
[0112] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.
[0113] Accordingly, the present disclosure further provides a computer-readable storage medium for storing a computer program, wherein the computer program is used to implement the steps of any of the above-mentioned system backup methods when executed by a processor.
[0114] Accordingly, the present disclosure also provides an electronic device, including:
[0115] processor;
[0116] Memory;
[0117] Wherein, the processor is used to send a backup instruction to the memory before the system file is updated;
[0118] The memory is used to back up the system mapping table based on the backup instruction; the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory;
[0119] The memory is further used to retain the first system file data in response to a system file update; and
[0120] The updated second system file data is stored, and the updated system mapping table is stored.
[0121] Accordingly, the present disclosure also provides an electronic device, including:
[0122] processor;
[0123] A memory, wherein the memory is any of the memory described above.
[0124] Figure 7 700 is a block diagram of a system backup device according to an exemplary embodiment. For example, the device 700 may be a terminal device such as a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc. The terminal device may correspond to the first device or the second device described above.
[0125] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 716 , and a communication component 718 .
[0126] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0127] One of the processors 720 in the processing component 702 may be configured to execute any of the above-mentioned system backup methods.
[0128] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 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.
[0129] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.
[0130] The multimedia component 708 includes a screen that provides an output interface between the device 700 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 708 includes a front camera and / or a rear camera. When the device 700 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 rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0131] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 718. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0132] I / O interface 712 provides an interface between processing component 702 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.
[0133] The sensor assembly 716 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 716 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 716 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 716 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 716 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 716 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0134] The communication component 718 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 3G, 4G, 5G, 6G or a combination thereof. In an exemplary embodiment, the communication component 718 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 718 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.
[0135] In an exemplary embodiment, the apparatus 700 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.
[0136] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0137] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0138] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0139] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A system backup method, characterized in that: The method comprises: Before the system file is updated, a system mapping table is backed up; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where current first system file data is stored in a memory; In response to a system file update occurring, retaining the first system file data in the memory; and The updated second system file data is stored in the memory, and an updated system mapping table is determined.
2. The method according to claim 1, characterized in that The backup system mapping table includes: The processor sends a backup instruction to the memory; The memory backs up the system mapping table based on the backup instruction.
3. The method according to claim 1, characterized in that The storing the updated second system file data in the memory comprises: Determining, in the second system file data, incremental data that does not belong to the first system file data; The incremental data is stored in the memory.
4. The method according to claim 3, characterized in that The step of determining an updated system mapping table includes: Determining a second storage address of the incremental data in the memory; determining common data between the first system file data and the second system file data; It is determined that the updated system mapping table includes the first storage address and the second storage address of the common data.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to detecting a system restore instruction, determining a third storage address of a target system file to be restored in the memory based on a target backup system mapping table indicated by the system restore instruction; wherein the target backup system mapping table is one of the system mapping tables backed up by the memory; After reading the file data of the target system file from the memory according to the third storage address, the target system file is restored.
6. The method according to claim 5, characterized in that The method further comprises: In response to determining that the over-the-air OTA upgrade of the system files fails, detecting whether the system restore instruction is received.
7. The method according to claim 5, characterized in that The detecting of the system restoration instruction comprises: detecting that the processor has received the system restoration instruction; or It is detected that the processor generates the system restore instruction.
8. The method according to claim 5, characterized in that Before detecting the system restoration instruction, the method further includes: The processor sends the system mapping table backed up by the memory to other electronic devices, so that the other electronic devices determine the target backup system mapping table in the backed-up system mapping table.
9. A memory, characterized in that: The memory is used for: Before the system file is updated, back up the system mapping table; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory; In response to a system file update occurring, retaining the first stored system file data; and The updated second system file data is stored, and the updated system mapping table is stored.
10. The memory according to claim 9, characterized in that: The memory is also used for: In response to receiving a backup instruction sent by a processor, the system mapping table is backed up based on the backup instruction.
11. The memory according to claim 9, characterized in that: The memory is also used for: The incremental data of the second file system data relative to the first file system data is stored.
12. The memory according to claim 11, characterized in that: The updated system mapping table stored in the memory includes: The first storage address of common data; wherein the common data is system file data common to the first system file data and the second system file data; and The second storage address of the incremental data.
13. A system backup device, characterized in that: The device comprises: A backup module, used for backing up a system mapping table before a system file is updated; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where current first system file data is stored in a memory; a processing module, configured to retain the first system file data in the memory in response to a system file update; and The updated second system file data is stored in the memory, and an updated system mapping table is determined.
14. 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 system backup method described in any one of claims 1 to 8 are implemented.
15. An electronic device, characterized in that: include: processor; Memory; Wherein, the processor is used to send a backup instruction to the memory before the system file is updated; The memory is used to back up the system mapping table based on the backup instruction; wherein the system mapping table includes one or more first storage addresses, each of which corresponds to an address where the current first system file data is stored in the memory; The memory is further used to retain the first system file data in response to a system file update; and The updated second system file data is stored, and the updated system mapping table is stored.
Citation Information
Patent Citations
Data processing method and device
CN109408278A