File system backup and recovery methods and their communication devices

By detecting the damaged state of the embedded file system and performing corresponding recovery or backup confirmation steps, the problems of data integrity and flexibility in the backup and recovery of the embedded file system are solved, realizing instant recovery and reducing maintenance costs.

CN116804953BActive Publication Date: 2026-11-17WISTRON NEWEB CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210258390.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2026-11-17
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

Existing embedded file system backup and recovery technologies cannot effectively detect whether the system is damaged or confirm the existence of backup data, resulting in incomplete or lost backup data, poor flexibility and high maintenance costs.

Method used

The first processing unit detects whether the file system is corrupted, and the second processing unit performs system recovery or backup confirmation steps based on the detection results to ensure that the storage unit contains backup data, including steps such as object reset, restoration and system restart.

Benefits of technology

It enables instant recovery of damaged file systems and ensures the integrity of backup data in the future, improving system flexibility and reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116804953B_ABST
    Figure CN116804953B_ABST
Patent Text Reader

Abstract

A method for backing up and restoring a file system and a communication device thereof are disclosed. The method includes a detection step and a transmission step. The detection step involves driving a first processing unit to detect whether the file system stored in a storage unit is corrupted, and then generating a detection result. The storage unit is used to access multiple backup lists and backup data corresponding to the file system. The transmission step involves driving the first processing unit to transmit the detection result to a second processing unit. When the detection result indicates that the file system is corrupted, the second processing unit executes a system recovery step. The system recovery step includes restoring the file system based on one of the backup lists and the backup data. When the detection result indicates that the file system is not corrupted, the second processing unit executes a backup confirmation step. The backup confirmation step confirms whether the storage unit contains backup data. The method for backing up and restoring a file system and the communication device thereof of the present invention perform backup and recovery of the file system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for backing up and restoring a file system and a communication device thereof, and particularly to a method for backing up and restoring an embedded file system and a communication device thereof. Background Technology

[0002] An Embedded File System (EFS) is a module that implements file access in an embedded system. It also provides file input / output management functions and file system support for embedded systems and devices. Embedded systems are prone to repeated power outages and restarts under conditions of high temperature, unstable power supply, insufficient voltage load capacity, or low battery power. During restarts, internal system parameters may be lost, causing the system to revert to factory settings, or even resulting in complete data loss and preventing the system from booting properly. Furthermore, most product defect reports indicate corrupted or incomplete embedded file systems; therefore, the backup and recovery of embedded file systems is an extremely important function.

[0003] Existing backup and recovery technologies determine whether to back up and restore based solely on the system's last boot information. However, backup data can be lost due to prolonged storage or become incomplete due to human modification. Therefore, current backup and recovery technologies cannot guarantee the existence, integrity, or damage of backup data, resulting in poor flexibility and the need for manual maintenance, thus increasing maintenance costs.

[0004] In view of this, the public eagerly anticipates the development of a backup and recovery method and communication device for a file system that can simultaneously detect whether the system is damaged and confirm the existence of backups. This is also the goal and direction that relevant businesses must strive to develop and break through. Summary of the Invention

[0005] Therefore, the purpose of this invention is to provide a file system backup and recovery method and its communication device, which utilizes a first processing unit to determine whether the file system is corrupted, and a second processing unit to restore the file system while simultaneously confirming the existence of backup data, thereby reducing losses caused by returns due to file system corruption. Furthermore, the file system backup and recovery method and its communication device of this invention enable the device to immediately restore the corrupted file system upon detection of corruption.

[0006] According to an embodiment of the present invention, a method for backing up and restoring a file system is provided, comprising a detection step and a transmission step. The detection step involves driving a first processing unit to detect whether a file system stored in a storage unit is corrupted, and then generating a detection result. The storage unit is used to access multiple backup lists and backup data corresponding to the file system. The transmission step involves driving the first processing unit to transmit the detection result to a second processing unit. Notably, when the detection result indicates that the file system is corrupted, the second processing unit performs a system recovery step. The system recovery step includes restoring the file system based on one of the backup lists and the backup data. Furthermore, when the detection result does not indicate that the file system is corrupted, the second processing unit performs a backup confirmation step. The backup confirmation step confirms whether the storage unit contains backup data.

[0007] Therefore, the file system backup and recovery method of the present invention drives the second processing unit to perform system recovery steps or backup confirmation steps based on the detection results generated by the first processing unit. This not only restores the damaged file system, but also ensures that the storage unit has backup data when the file system is damaged in the future, thereby avoiding the situation where recovery is impossible due to lack of backup data.

[0008] According to another embodiment of the present invention, a communication device is provided, comprising a storage unit, a first processing unit, and a second processing unit. The storage unit is used to access a file system, a plurality of backup lists corresponding to the file system, and backup data. The first processing unit is connected to the storage unit and detects whether the file system is corrupted to generate a detection result. The second processing unit is connected to the storage unit and the first processing unit and receives the detection result. Notably, when the detection result indicates that the file system is corrupted, the second processing unit performs a system recovery step. The system recovery step includes restoring the file system based on one of the backup lists and the backup data. Furthermore, when the detection result does not indicate that the file system is corrupted, the second processing unit performs a backup confirmation step. The backup confirmation step confirms whether the storage unit contains backup data.

[0009] Therefore, the communication device of the present invention enables the second processing unit to perform a system recovery step or a backup confirmation step based on the detection result generated by the first processing unit. This not only restores the damaged file system, but also ensures that the storage unit has backup data when the file system is damaged in the future, thereby avoiding the situation where recovery is impossible due to lack of backup data. Attached Figure Description

[0010] Figure 1 A flowchart illustrating a file system backup and recovery method according to a first embodiment of the present invention is shown.

[0011] Figure 2 A schematic diagram illustrating a communication device according to a second embodiment of the present invention;

[0012] Figure 3 A flowchart illustrating a file system backup and recovery method according to a third embodiment of the present invention is provided; and

[0013] Figure 4 Draw Figure 2 A schematic diagram of the backup list and backup data of the file system of the first storage block and the file system of the second storage block.

[0014] Explanation of key component symbols:

[0015] Backup and restore methods for 100 and 600 file systems

[0016] 110 Test Results

[0017] 200 communication devices

[0018] 300 storage units

[0019] 310 First storage block

[0020] 311 and 321 file systems

[0021] 3111 Hardware Identification Code

[0022] 3112 Static Object Parameter Group

[0023] 3113 Dynamic Object Parameter Group

[0024] 320 Second storage block

[0025] Backup lists for 3211 and 3212

[0026] 3213 Backup Data

[0027] 400 First Processing Unit

[0028] 500 Second Operation Processing Unit

[0029] S02, S12 Detection Steps

[0030] S04, S14 Transmission Steps

[0031] S062, S162 System Recovery Steps

[0032] S1622 Object Reset Steps

[0033] S1624 Object Restoration Steps

[0034] S16241 Select Sub-step

[0035] S1626 System Reboot Procedure

[0036] S064, S164 Backup Confirmation Steps

[0037] S182 Data Backup Steps

[0038] S184 Backup and Update Steps

[0039] L1, L2 dynamic object tags

[0040] P1, P2, P3 Dynamic object parameters Detailed Implementation

[0041] Several embodiments of the present invention will now be described with reference to the accompanying drawings. For clarity, many practical details will be set forth in the following description. However, it should be understood that these practical details are not intended to limit the invention. That is, in some embodiments of the invention, these practical details are not essential. Furthermore, for the sake of simplicity in the drawings, some well-known and customary structures and elements will be illustrated in a simple schematic manner; and repeated elements may be denoted by the same reference numerals.

[0042] Furthermore, in this document, when a component (or unit or module, etc.) is "connected / linked" to another component, it can mean that the component is directly connected / linked to the other component, or it can mean that the component is indirectly connected / linked to the other component, that is, there is another component between the component and the other component. Only when it is explicitly stated that a component is "directly connected / linked" to another component does it indicate that there is no other component between the component and the other component. The terms "first," "second," and "third" are only used to describe different components and do not limit the components themselves; therefore, "first component" can also be referred to as "second component." Moreover, the combinations of components / units / circuits in this document are not combinations generally known, conventional, or publicly known in this art. Whether the components / units / circuits themselves are publicly known cannot be used to determine whether their combination relationships are easily performed by a person skilled in the art.

[0043] Please see Figure 1 It illustrates a flowchart of a file system backup and recovery method 100 according to a first embodiment of the present invention. Figure 1 As shown, the file system backup and recovery method 100 includes a detection step S02 and a transfer step S04.

[0044] The detection step S02 involves driving a first processing unit to detect whether the file system stored in a storage unit is corrupted, and then generating a detection result 110. The storage unit is used to access multiple backup lists and backup data of the corresponding file system. The transmission step S04 involves driving the first processing unit to transmit the detection result 110 to a second processing unit.

[0045] In detail, when the detection result 110 indicates file system corruption (i.e., the detection result 110 is "yes"), the second processing unit executes a system recovery step S062. System recovery step S062 includes restoring the file system based on one of the backup lists and backup data in the storage unit. When the detection result does not indicate file system corruption (i.e., the detection result 110 is "no"), the second processing unit executes a backup confirmation step S064. Backup confirmation step S064 confirms whether the storage unit contains backup data. Therefore, the file system backup and recovery method 100 of the present invention drives the second processing unit to execute either system recovery step S062 or backup confirmation step S064 based on the detection result 110 generated by the first processing unit. This not only restores corrupted file systems but also ensures that the storage unit contains backup data in the event of future file system corruption, thereby avoiding situations where recovery is impossible due to a lack of backup data.

[0046] Please refer to the following: Figure 1 and Figure 2 ,in Figure 2 A schematic diagram of a communication device 200 according to a second embodiment of the present invention is shown. Figure 1 and Figure 2 As shown, the communication device 200 can be used to implement the file system backup and recovery method 100 of the first embodiment, and includes a storage unit 300, a first processing unit 400 and a second processing unit 500.

[0047] Storage unit 300 includes a first storage block 310 and a second storage block 320. The first storage block 310 is used to access a file system 311. The second storage block 320 is used to access another file system 321, and the file system 321 is used to access two backup lists 3211 and 3212 and a backup data 3213.

[0048] The first processing unit 400 is connected to the storage unit 300 and detects whether the file system 311 is corrupted to generate a detection result 110. The second processing unit 500 is connected to the storage unit 300 and the first processing unit 400 and receives the detection result 110 from the first processing unit 400. Specifically, the communication device 200 may be a modem, or a communication module inside other electronic devices, or a communication module installed in a vehicle, but the present invention is not limited thereto. The storage unit 300 may be a memory. The first processing unit 400 may be a modem processor. The second processing unit 500 may be an application processor. The file system 311 may be an embedded file system (EFS), and the file system 321 may be an unsorted block image file system (UBIFS), but the present invention is not limited thereto.

[0049] When the detection result 110 indicates that the file system 311 is corrupted, the second processing unit 500 executes the system recovery step S062. When the detection result 110 does not indicate that the file system 311 is corrupted, the second processing unit 500 executes the backup confirmation step S064. Thus, the communication device 200 of the present invention, based on the detection result 110 generated by the first processing unit 400, causes the second processing unit 500 to execute either the system recovery step S062 or the backup confirmation step S064. This not only restores the corrupted file system 311 but also ensures that the storage unit 300 stores backup data 3213 in the event of future corruption of the file system 311, thereby avoiding situations where recovery is impossible due to a lack of backup data 3213.

[0050] Please refer to the following: Figure 2 , Figure 3 as well as Figure 4 ,in Figure 3 A flowchart illustrating a file system backup and recovery method 600 according to a third embodiment of the present invention; and Figure 4 Draw Figure 2 A schematic diagram of the file system 311 of the first storage block 310 and the file system 321 of the second storage block 320, including backup lists 3211, 3212 and backup data 3213. Figure 3As shown, the file system backup and recovery method 600 of the third embodiment can be implemented by the communication device 200 of the second embodiment, and includes a detection step S12, a transmission step S14, a system recovery step S162 and a backup confirmation step S164. The detection step S12, the transmission step S14 and the backup confirmation step S164 are the same as the steps corresponding to the file system backup and recovery method 100 in the first embodiment, and will not be described again.

[0051] The third embodiment differs from the first embodiment in that the system recovery step S162 may further include an object reset step S1622, an object restoration step S1624, and a system restart step S1626. The object reset step S1622 involves driving the second processing unit 500 to delete the damaged file system 311 and reset a static object parameter group 3112 of the file system 311. The object restoration step S1624 involves driving the second processing unit 500 to restore a dynamic object parameter group 3113 to the file system 311 based on one of the backup lists 3211 and backup data 3213 within the file system 321. The system restart step S1626 involves driving the second processing unit 500 to restart the restored file system 311.

[0052] In detail, Figure 4 The file system 311 may include a hardware identification code 3111, a static object parameter group 3112, and a dynamic object parameter group 3113. The hardware identification code 3111 is an identification code string defined by the manufacturer according to different product devices, and the hardware identification code 3111 is recorded in the file system 311; in other words, the file system 311 stores the hardware identification code 3111 of its corresponding product device. The static object parameter group 3112 is mainly related to the firmware and can be created by the firmware, so the static object parameter group 3112 does not need to be restored to the file system 311 through backup data 3213. In the object reset step S1622, the second processing unit 500 first deletes the static object parameter group 3112 and the dynamic object parameter group 3113 of the damaged file system 311, and then creates a new static object parameter group 3112 through the firmware of the second processing unit 500 itself.

[0053] In addition, by Figure 2 It can be seen that the file system 321 accesses backup lists 3211 and 3212 and backup data 3213. Backup lists 3211 and 3212 can each correspond to two hardware identification codes (HWID) and can each list two dynamic object tags L1 and L2. For example, Figure 4Backup list 3211 corresponds to hardware identifier 3111 and is listed with dynamic object label L1. Backup list 3212 corresponds to another hardware identifier (not shown separately) and is listed with another dynamic object label L2. Figure 4 The backup data 3213 contains a hardware identification code 3111 and three dynamic object parameters P1, P2, and P3. The object restoration step S1624 may further include a selection sub-step S16241. The selection sub-step S16241 drives the second arithmetic processing unit 500 to select the backup list 3211 according to the hardware identification code 3111 of the backup data 3213, and restore the dynamic object parameters P1, P2, and P3 to the file system 311 according to the dynamic object label L1 listed in the backup list 3211. The dynamic object parameter group 3113 is composed of the dynamic object parameters P1, P2, and P3.

[0054] In detail, the dynamic object parameter group 3113 is written into the file system 311 during factory calibration. Therefore, the tags corresponding to all parameters of the dynamic object parameter group 3113 (i.e., dynamic object tags L1) are recorded in one of the backup lists (i.e., backup list 3211) of the file system 321. The present invention selects different dynamic object parameter groups during calibration based on different hardware identification codes, so each hardware identification code corresponds to a backup list. In other embodiments, the number of backup lists and the number of dynamic object parameters can be multiple, and the present invention is not limited thereto. Next, when the second processing unit 500 has created a new static object parameter group 3112 and restored the new dynamic object parameter group 3113 to the file system 311, the second processing unit 500 executes the system restart step S1626 to completely restore the file system 311. Therefore, compared with existing backup and recovery technologies, the file system backup and recovery method 600 of the present invention selects the corresponding backup list 3211 based on the hardware identification code 3111 when restoring the file system 311. This allows for optimized restoration of the dynamic object parameter group 3113 for specific product devices, eliminating the need to restore the dynamic object parameters of other product devices to the file system 311. This provides greater flexibility and eliminates the need for manual maintenance, thereby reducing maintenance costs. Furthermore, since the file system 321 of the second storage block 320 stores multiple backup lists, the backup and recovery of the file system 311 of the first storage block 310 can support various product devices.

[0055] On the other hand, backup data 3213 is prone to loss due to prolonged storage, or incompleteness due to human modification and product device updates. Please continue reading. Figure 3In the backup confirmation step S164, when the second storage block 320 of storage unit 300 does not contain backup data 3213, the second processing unit 500 executes a data backup step S182. When the second storage block 320 of storage unit 300 contains backup data 3213 but the backup data 3213 is incomplete or corrupted, the second processing unit 500 executes a backup update step S184. When the second storage block 320 of storage unit 300 contains backup data 3213, and the backup data 3213 is complete and normal, the second processing unit 500 re-executes the detection step S12.

[0056] In data backup step S182, the second processing unit 500 creates backup data 3213 based on the file system 311 and stores the backup data 3213 in the file system 321 of the second storage block 320 of the storage unit 300. Specifically, the file system 311 is intact and contains a hardware identification code 3111, a static object parameter group 3112, and a dynamic object parameter group 3113, wherein the dynamic object parameter group 3113 consists of three dynamic object parameters P1, P2, and P3. In data backup step S182, the second processing unit 500 selects a backup list 3211 based on the hardware identification code 3111 of the file system 311, and backs up the hardware identification code 3111 and the dynamic object parameters P1, P2, and P3 based on the dynamic object tag L1 listed in the backup list 3211 to create the backup data 3213. Then, the second processing unit 500 re-executes the detection step S12.

[0057] Similarly, in backup update step S184, the second processing unit 500 selects a backup list 3211 based on the hardware identification code 3111 of the file system 311, and updates the dynamic object parameters P1, P2, and P3 to the backup data 3213 according to the dynamic object tag L1 listed in the backup list 3211, thereby replacing the previously incomplete or corrupted backup data 3213. Then, the second processing unit 500 re-executes the detection step S12. In short, data backup step S182 and backup update step S184 are similar to the reverse operation of object restoration step S1624. Therefore, compared to existing backup and recovery technologies, the file system backup and recovery method 600 of the present invention can also ensure that the storage unit 300 has complete and up-to-date backup data 3213 when the file system 311 is damaged in the future, thereby avoiding situations where recovery is impossible due to the lack of backup data 3213.

[0058] As can be seen from the above embodiments, the present invention has the following advantages: First, by executing system recovery steps and backup confirmation steps separately according to different detection results, it can not only restore the damaged file system, but also ensure that the storage unit has backup data when the file system is damaged in the future, thereby avoiding the situation where recovery is impossible due to lack of backup data. Second, it optimizes the restoration of dynamic object parameter groups for specific product devices, thus eliminating the need to restore all dynamic object parameters of all product devices to the file system, resulting in high flexibility and eliminating the need for manual maintenance, thereby reducing maintenance costs. Third, since the file system of the second storage block contains multiple backup lists, the backup and restoration of the file system of the first storage block can support multiple product devices.

[0059] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the present invention. Any person skilled in the art should be able to make various modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the appended claims.

Claims

1. A method for backing up and restoring a file system, the method comprising the following steps: A detection step is to drive a first processing unit to detect whether the file system stored in a storage unit is corrupted, and then generate a detection result, wherein the storage unit is used to access multiple backup lists and backup data corresponding to the file system. as well as A transmission step, wherein the transmission step is to drive the first processing unit to transmit the detection result to a second processing unit; When the detection result indicates that the file system is corrupted, the second processing unit executes a system recovery step, which includes restoring the file system based on one of the backup lists and the backup data. When the detection result is not that the file system is damaged, the second processing unit performs a backup confirmation step, which is to confirm whether the storage unit contains the backup data. The system recovery steps also include: An object reset step, wherein the object reset step drives the second processing unit to delete the file system and reset a static object parameter group of the file system; and An object restoration step includes driving the second processing unit to restore a dynamic object parameter group to the file system based on one of the backup lists and the backup data.

2. The file system backup and recovery method as described in claim 1, wherein the system recovery step further includes: The system restart procedure involves driving the second processing unit to restart the file system.

3. The file system backup and recovery method as described in claim 2, wherein the backup lists correspond to multiple hardware identification codes and each lists multiple dynamic object tags, the backup data stores one of the hardware identification codes and multiple dynamic object parameters, and the object restoration step further includes: A selection sub-step is performed to drive the second processing unit to select one of the backup lists based on one of the hardware identification codes, and restore the dynamic object parameters to the file system based on the dynamic object tags listed in one of the backup lists.

4. The file system backup and recovery method as described in claim 1, wherein, When the storage unit does not contain the backup data, the second processing unit performs a data backup step; as well as When the storage unit contains the backup data and the backup data is incomplete or damaged, the second processing unit performs a backup update step.

5. The file system backup and recovery method as described in claim 4, wherein the data backup step involves driving the second processing unit to create backup data according to the file system and storing the backup data in the storage unit.

6. The backup and recovery method of the file system as described in claim 5, wherein the backup lists correspond to multiple hardware identification codes and are listed with multiple dynamic object tags respectively, the file system stores one of the hardware identification codes and multiple dynamic object parameters, the second processing unit selects one of the backup lists according to one of the hardware identification codes, and backs up the dynamic object parameters according to the dynamic object tags listed in one of the backup lists to establish the backup data.

7. The backup and recovery method of the file system as described in claim 4, wherein the backup lists correspond to multiple hardware identification codes and are listed with multiple dynamic object tags respectively, the file system stores one of the hardware identification codes and multiple dynamic object parameters, and the backup update step is to drive the second processing unit to select one of the backup lists according to one of the hardware identification codes, and update the dynamic object parameters to the backup data according to the dynamic object tags listed in one of the backup lists.

8. The backup and recovery method for a file system as described in claim 1, wherein the storage unit comprises: A first storage block, which is used to access the file system; as well as A second storage block for accessing another file system, wherein the other file system is used to access the backup lists and the backup data.

9. A communication device, the communication device comprising: A storage unit for accessing a file system and multiple backup lists corresponding to the file system and backup data; A first processing unit is connected to the storage unit and detects whether the file system is corrupted to generate a detection result; as well as A second processing unit is connected to the storage unit and the first processing unit and receives the detection result; When the detection result indicates that the file system is corrupted, the second processing unit executes a system recovery step, which includes restoring the file system based on one of the backup lists and the backup data. When the detection result is not that the file system is damaged, the second processing unit performs a backup confirmation step, which is to confirm whether the storage unit contains the backup data. The system recovery steps also include: An object reset step, wherein the object reset step drives the second processing unit to delete the file system and reset a static object parameter group of the file system; and An object restoration step includes driving the second processing unit to restore a dynamic object parameter group to the file system based on one of the backup lists and the backup data.

10. The communication device of claim 9, wherein the system recovery step further includes: The system restart procedure involves driving the second processing unit to restart the file system.

11. The communication device of claim 10, wherein the backup lists correspond to multiple hardware identifiers and each lists multiple dynamic object tags, the backup data stores one of the hardware identifiers and multiple dynamic object parameters, and the object restoration step further includes: A selection sub-step is performed to drive the second processing unit to select one of the backup lists based on one of the hardware identification codes, and restore the dynamic object parameters to the file system based on the dynamic object tags listed in one of the backup lists.

12. The communication device as claimed in claim 9, wherein, When the storage unit does not contain the backup data, the second processing unit performs a data backup step; and When the storage unit contains the backup data and the backup data is incomplete or damaged, the second processing unit performs a backup update step.

13. The communication device of claim 12, wherein the data backup step comprises driving the second processing unit to create the backup data according to the file system and storing the backup data in the storage unit.

14. The communication device of claim 13, wherein the backup lists correspond to a plurality of hardware identifiers and are respectively listed with a plurality of dynamic object tags, the file system stores one of the hardware identifiers and a plurality of dynamic object parameters, the second processing unit selects one of the backup lists according to one of the hardware identifiers, and backs up the dynamic object parameters according to the dynamic object tags listed in one of the backup lists to establish the backup data.

15. The communication device of claim 12, wherein the backup lists correspond to a plurality of hardware identifiers and are respectively listed with a plurality of dynamic object tags, the file system stores one of the hardware identifiers and a plurality of dynamic object parameters, and the backup update step is to drive the second processing unit to select one of the backup lists according to one of the hardware identifiers, and update the dynamic object parameters to the backup data according to the dynamic object tags listed in one of the backup lists.

16. The communication device of claim 9, wherein the storage unit comprises: A first storage block, which is used to access the file system; as well as A second storage block for accessing another file system, wherein the other file system is used to access the backup list and the backup data.

Citation Information

Patent Citations

  • A protection method and a device for blackmail software attack

    CN109145602A

  • Image processing apparatus and image processing method

    US20200195789A1