Data recovery method and device, electronic equipment and storage medium

By acquiring and analyzing the name of the target source code file and matching it with a preset prefix, the system automatically identifies file system anomalies and performs data recovery, solving the problem of low data recovery efficiency in existing technologies and achieving rapid recovery and cost reduction.

CN115185741BActive Publication Date: 2026-04-28ROLLING WIRELESS SARL
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ROLLING WIRELESS SARL
Filing Date
2022-06-14
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, when fatal problems arise due to file systems and the data within them, it takes a long time and the data recovery efficiency is low.

Method used

By obtaining the name of the target source code file and matching its prefix with a preset prefix, the cause of the communication module's abnormality is automatically determined. If the abnormality is due to a file system error, data recovery is performed; otherwise, the module is restarted directly.

Benefits of technology

Quickly identify the cause of the anomaly and automatically perform data recovery, improving data recovery efficiency and reducing labor costs and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115185741B_ABST
    Figure CN115185741B_ABST
Patent Text Reader

Abstract

The application relates to a data recovery method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining the name of a source code file corresponding to an abnormal code of a target source code file when a communication module appears to be abnormal; if the prefix of the name of the target source code file is the same as the preset prefix of the source code file corresponding to a file system, determining that the abnormal reason of the communication module appearing to be abnormal is a file system abnormality, and automatically performing data recovery and restarting the communication module; and if the prefix of the name of the target source code file is different from the preset prefix, determining that the abnormal reason of the communication module appearing to be abnormal is not a file system abnormality and directly restarting the communication module. The application can quickly determine the abnormal reason of the communication module appearing to be abnormal based on the name of the target source code file and the preset prefix of the source code file corresponding to the file system, and automatically performs data recovery when the abnormal reason is a file system abnormality, thereby improving the data recovery efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data recovery method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of intelligence and communication technology, communication modules are being used in an increasing number of devices. Taking smart cars and cellular wireless communication technology as examples, with the development of the concept of smart cars and the advancement of cellular wireless communication technology, cellular wireless communication modules have become an essential component of new smart cars or electric vehicles. This allows these new smart cars or electric vehicles to access cellular wireless networks, providing car owners with richer functions. Among these, the reliability design of the cellular wireless communication module, as a crucial component of the automotive electrical system, is extremely important. Typically, reliability design should include the ability to recover from data anomalies in the product (either the device with the communication module installed or the communication module itself). That is, when a fatal error occurs in the product, it should accurately capture problems caused by file system anomalies (including anomalies in the product data stored in the file system), so as to facilitate the recovery of the file system and the product data stored in the file system, ultimately restoring the product to normal function.

[0003] like Figure 1 As shown, in the prior art, when a product has a fatal problem caused by a file system or data, it is usually necessary for development and maintenance personnel with professional knowledge to intervene. After the product enters the system failure mode, the problem is analyzed and located, and the fault logs and parameters are debugged multiple times through the debugging interface using professional debugging tools. Then, based on the debugging commands, the product data is manually restored, usually the key data of the product, so as to achieve the purpose of repairing the product.

[0004] However, it is not difficult to see that when dealing with fatal problems caused by the file system and the data in the file system through multiple debugging using existing technologies, it takes a long time and the data recovery efficiency is low. Summary of the Invention

[0005] This application provides a data recovery method, apparatus, electronic device, and storage medium to address the problem that data recovery is time-consuming and inefficient when dealing with fatal problems caused by file systems and data within file systems.

[0006] Firstly, this application provides a data recovery method, which includes:

[0007] Obtain the name of the target source code file, which is the source code file corresponding to the exception code when the communication module malfunctions;

[0008] If the prefix of the target source code file name is the same as the preset prefix, then the abnormality of the communication module is determined to be a file system abnormality, and the communication module is automatically restarted after data recovery; the preset prefix is ​​the file name prefix of the source code file of the file system corresponding to the communication module.

[0009] If the prefix of the target source code file name is different from the preset prefix, it is determined that the abnormality of the communication module is not due to a file system abnormality, and the communication module is directly restarted.

[0010] Optionally, obtaining the name of the target source code file includes:

[0011] The system receives exception information reported by the exception handling module of the communication module. The exception information includes the exception code, the location of the exception code, and the name of the target source code file.

[0012] Based on the anomaly information, the name of the target source code file is determined.

[0013] Optionally, the method further includes:

[0014] Record the time when the communication module malfunctions and the reason for the malfunction.

[0015] Optionally, the automatic data recovery includes:

[0016] Based on the time when the communication module malfunctioned and the cause of the malfunction, determine the number of consecutive occurrences of the file system malfunction in the cause of the malfunction.

[0017] If the number of consecutive occurrences of the file system error exceeds a preset number, data recovery will be performed automatically.

[0018] Optionally, the automatic data recovery includes:

[0019] Retrieve backup data from the target storage area via the target interface;

[0020] Replace the data in the communication module with the backup data.

[0021] Optionally, the method further includes:

[0022] Construct a target interface to facilitate access to the backup data in the target storage area;

[0023] Construct a file system interface to facilitate access to the file system in the file system storage area through the file system interface.

[0024] Optionally, before obtaining the name of the target source code file, the method further includes:

[0025] When writing the source code file corresponding to the file system, add the preset prefix to the name of the source code file corresponding to the file system.

[0026] Secondly, this application also provides a data recovery apparatus, the apparatus comprising:

[0027] The acquisition module is used to acquire the name of the target source code file, which is the source code file corresponding to the exception code when the communication module malfunctions.

[0028] The restart module is used to determine that the abnormality of the communication module is due to a file system abnormality if the prefix of the name of the target source code file is the same as the preset prefix, and to automatically perform data recovery and restart the communication module; the preset prefix is ​​the file name prefix of the source code file of the file system corresponding to the communication module.

[0029] The restart module is further configured to determine that the cause of the communication module's malfunction is not a file system malfunction if the prefix of the target source code file's name is different from the preset prefix, and to directly restart the communication module.

[0030] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0031] Memory, used to store computer programs;

[0032] When a processor executes a program stored in memory, it implements the steps of the data recovery method described in any embodiment of the first aspect.

[0033] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data recovery method as described in any embodiment of the first aspect.

[0034] The technical solutions provided in this application have the following advantages compared with the prior art:

[0035] The data recovery method provided in this application embodiment obtains the target source code file corresponding to the exception code when the communication module malfunctions, and quickly determines the cause of the malfunction based on the name of the target source code file and the preset prefix of the source code file corresponding to the file system. After quickly determining that the cause of the malfunction is a file system malfunction, it automatically performs data recovery, thereby quickly performing data recovery and improving data recovery efficiency. Attached Figure Description

[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 A schematic diagram illustrating a prior art process for manually recovering data, provided as an embodiment of this application;

[0039] Figure 2 A schematic diagram illustrating a data recovery method provided in an embodiment of this application;

[0040] Figure 3 A schematic diagram illustrating a data recovery process provided in an embodiment of this application;

[0041] Figure 4 A schematic diagram of a data recovery device provided in an embodiment of this application;

[0042] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0044] To address the problem of long recovery times and low efficiency in data recovery when fatal problems arise due to file systems and data within them, this application provides a data recovery method applicable to any device, which may be a communication module or a device equipped with a communication module, or other devices capable of communicating with a communication module or a device equipped with a communication module. Figure 2 As shown, the data recovery method includes steps 201-203:

[0045] Step 201: Obtain the name of the target source code file.

[0046] The target source code file is the source code file corresponding to the exception code when the communication module malfunctions.

[0047] Optionally, in the process of obtaining the name of the target source code file, the exception information reported by the exception handling module of the communication module is received first, and then the name of the target source code file is determined based on the exception information.

[0048] In one possible implementation, the exception information includes the exception code, the location of the exception code, and the name of the target source code file. Of course, the exception information reported by the exception handling module can also include other required content.

[0049] In this way, obtaining the name of the target source code file based on the anomaly information facilitates the rapid identification of the cause of the communication module's operational anomaly, reducing the time spent locating the cause and improving data recovery efficiency. Furthermore, the content contained in the anomaly information reported by the anomaly handling module allows for the location of the anomaly code. This enables relevant personnel to understand the communication module's operational status based on the anomaly code and its location within the anomaly information, and to improve related source code files.

[0050] In other words, when the communication module's exception handling module detects an operational anomaly, it scans to obtain the exception code, the location of the exception code, and the name of the target source code file. Subsequently, the exception handling module generates exception information based on the scanned information and reports the exception information.

[0051] In one possible implementation, source code for detecting and handling operational anomalies of the communication module is added to the software or firmware. This source code is then compiled and linked by a compiler and linker to obtain executable code, including software or firmware code. This executable code, along with its corresponding source code and other information, is then packaged into the appropriate software or firmware to obtain the aforementioned anomaly handling module. The compiler and linker used in this process are standard functions and require no additional development. Of course, other source code also needs to undergo similar or identical processing by the compiler and linker to ensure the normal operation of the communication module.

[0052] Step 202: If the prefix of the target source code file name is the same as the preset prefix, the cause of the communication module's abnormal operation is determined to be a file system abnormality, and the communication module is automatically restarted after data recovery.

[0053] The preset prefix is ​​the filename prefix of the source code file in the file system corresponding to the communication module.

[0054] Optionally, before obtaining the name of the target source code file, a preset prefix is ​​added to the name of the source code file corresponding to the file system when writing the source code file. In this way, based on the preset prefix, all communication module malfunctions caused by file system abnormalities can be identified.

[0055] In one possible implementation, before obtaining the name of the target source code file, when writing the source code for the file system package, a fixed and uniform filename prefix, i.e., a preset prefix, is used. In this case, the format of the source code filename can be, for example, xxx_aaa.b. Here, xxx_ represents the preset prefix, aaa represents a non-fixed filename determined according to actual needs, and .b represents the file extension determined according to actual needs.

[0056] For example, the default prefix is ​​set to, for instance, fs_, in C language. In this case, the source code file used for file system initialization can be named fs_init.c; the source code file used to build the application interface outside the file system can be named fs_user.c; the source code file for the file system driver layer can be named fs_driver.c; and so on, adding fs_ as a prefix to the beginning of the names of all file system source code files.

[0057] Optionally, after determining the cause of the communication module's malfunction, the time and cause of the malfunction are recorded. This facilitates automatic data recovery of the communication module based on the cause and time of the malfunction, or allows for understanding the module's operational status and making corresponding improvements.

[0058] In one possible implementation, automatic data recovery is possible only if the following conditions are met: based on the time when the communication module malfunctions and the cause of the malfunction, the number of consecutive occurrences of file system malfunctions in the cause of the malfunction is determined. Subsequently, if the number of consecutive occurrences of file system malfunctions exceeds a preset number, automatic data recovery is performed.

[0059] In other words, based on the time and cause of the communication module's malfunction, if the cause of the malfunction is determined to be a file system error for a predetermined number of consecutive preset number of times, then automatic data recovery will be performed. The preset number of times can be fixed or determined based on actual operating conditions.

[0060] For example, the preset number of times can be 3.

[0061] In this way, after the communication module is detected to have an abnormality due to a file system abnormality a certain number of times, the reliability of the determined abnormality cause can be guaranteed, thereby accurately performing data recovery and ensuring data recovery efficiency.

[0062] In one possible implementation, if, within a preset time period, the communication module experiences anomalies a preset number of times consecutively due to file system errors, automatic data recovery is initiated. The preset time period can be a fixed value or a value determined based on actual operating conditions. This further ensures the reliability of the identified causes of communication module malfunctions, accurately performs data recovery, and guarantees efficient data recovery.

[0063] Optionally, during automatic data recovery, backup data is first obtained from the target storage area through the target interface, and then the data in the communication module is replaced with the backup data.

[0064] The backup data can be a backup of the communication module's file system and its data made before the communication module leaves the factory, or a backup of the file system and its data that is periodically updated according to actual needs. This update can be performed upon receiving a user command or automatically.

[0065] For example, taking a preset number of times as 3, after the cause of the communication module's abnormal operation is determined to be a file system abnormality 3 times in a row, the software or firmware automatically uses backup data to restore the file system and data in the file system of the communication module.

[0066] In one possible implementation, backup data is obtained from the target storage area via a target interface. Therefore, when writing the code, it is also necessary to construct the target interface to access the backup data in the target storage area. Of course, a file system interface also needs to be constructed to access the file system in the file system storage area, including the data within the file system.

[0067] In other words, the target interface for accessing backup data is different from the interface for accessing the file system; the two are independent of each other, and the target storage area is independent of the file system storage area. This allows access to the target storage area, and the access to the target storage area is independent of the corresponding file system code, or in other words, it does not depend on the corresponding file system code.

[0068] For example, the file system and backup data are stored in different storage partitions.

[0069] It should be noted that after automatic data recovery, the communication module should be restarted to ensure that the data recovery takes effect and the communication module operates normally.

[0070] Step 203: If the prefix of the target source code file name is different from the preset prefix, it is determined that the abnormality of the communication module is not due to a file system abnormality, and the communication module is restarted directly.

[0071] Once it is determined that the cause of the communication module's malfunction is not a file system error, the communication module can be reset by restarting it, thereby restoring it from the malfunction and enabling it to operate normally.

[0072] For example, this application provides a schematic diagram of a data recovery process, such as... Figure 3 As shown. When the communication module powers on and runs, if a fatal error occurs, such as a system crash, the system detects the exception code and retrieves the name of the corresponding source code file. If it runs normally, no action is taken. Then, based on the name of the source code file corresponding to the exception code, it checks whether the source code file originates from the source code in the file system. If so, it automatically restores data using backup data and restarts the communication module; otherwise, it directly restarts the device.

[0073] It should be noted that in existing technologies, when a file system malfunction causes a product to malfunction, the problem is typically analyzed and repaired by skilled after-sales service personnel through multiple debugging attempts. In this process, these personnel need to manually identify the cause of the communication module's malfunction and use specialized debugging tools to recover data via debugging commands, ultimately repairing the product. However, this process is time-consuming. In this application, based on the name of the target source code file and the preset prefix of the source code file corresponding to the file system, it is possible to quickly determine whether the cause of the communication module's malfunction is a file system malfunction. If the cause is indeed a file system malfunction, data recovery is automatically performed, thereby improving data recovery efficiency by quickly identifying the cause of the malfunction.

[0074] Furthermore, existing technologies require significant manpower to repair products, potentially leading to high after-sales costs and additional usage expenses for users. In this application, however, when a product experiences a fatal error due to a file system anomaly, the file system, including the data stored within it, can be automatically restored, restoring the product's normal functionality. This reduces maintenance and after-sales costs, improves user experience, and enhances product competitiveness.

[0075] like Figure 4 As shown in the figure, this application embodiment provides a data recovery device, which includes an acquisition module 401 and a restart module 402.

[0076] The acquisition module 401 is used to acquire the name of the target source code file, which is the source code file corresponding to the exception code when the communication module malfunctions.

[0077] The restart module 402 is used to determine that the abnormality of the communication module is due to a file system abnormality if the prefix of the name of the target source code file is the same as the preset prefix, and to automatically perform data recovery and restart the communication module; the preset prefix is ​​the file name prefix of the source code file of the file system corresponding to the communication module.

[0078] The restart module 402 is also used to determine that the cause of the communication module's abnormal operation is not a file system abnormality if the prefix of the name of the target source code file is different from the preset prefix, and to directly restart the communication module.

[0079] like Figure 5 As shown, this application embodiment provides an electronic device, which can be any device in the above system, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0080] Memory 503 is used to store computer programs;

[0081] In one embodiment of this application, the processor 501, when executing a program stored in the memory 503, implements the data recovery method provided in any of the foregoing method embodiments.

[0082] The electronic device provided in this application embodiment can specifically be a module capable of communication functions or a terminal device containing such a module. The terminal device can be a mobile terminal or a smart terminal. Specifically, a mobile terminal can be at least one of a mobile phone, tablet computer, or laptop computer; a smart terminal can specifically be a smart car, smartwatch, shared bicycle, smart cabinet, or other terminal containing a wireless communication module; and the module can specifically be a wireless communication module, such as any one of a 2G communication module, 3G communication module, 4G communication module, 5G communication module, or NB-IoT communication module.

[0083] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the data recovery method provided in any of the foregoing method embodiments.

[0084] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0085] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A data recovery method, characterized in that, The method includes: Obtain the name of the target source code file, which is the source code file corresponding to the exception code when the communication module malfunctions; If the prefix of the target source code file name is the same as the preset prefix, then the abnormality of the communication module is determined to be a file system abnormality, and the communication module is automatically restarted after data recovery; the preset prefix is ​​the file name prefix of the source code file of the file system corresponding to the communication module. If the prefix of the name of the target source code file is different from the preset prefix, it is determined that the abnormality of the communication module is not due to a file system abnormality, and the communication module is directly restarted. The automatic data recovery includes: Based on the time when the communication module malfunctioned and the cause of the malfunction, determine the number of consecutive occurrences of the file system malfunction in the cause of the malfunction. If the number of consecutive occurrences of the file system error exceeds a preset number, data recovery will be performed automatically.

2. The data recovery method according to claim 1, characterized in that, The process of obtaining the name of the target source code file includes: The system receives exception information reported by the exception handling module of the communication module. The exception information includes the exception code, the location of the exception code, and the name of the target source code file. Based on the anomaly information, the name of the target source code file is determined.

3. The data recovery method according to claim 1, characterized in that, The method further includes: Record the time when the communication module malfunctions and the reason for the malfunction.

4. The data recovery method according to claim 1, characterized in that, The automatic data recovery includes: Retrieve backup data from the target storage area via the target interface; Replace the data in the communication module with the backup data.

5. The data recovery method according to claim 4, characterized in that, The method further includes: Construct a target interface to facilitate access to the backup data in the target storage area; Construct a file system interface to facilitate access to the file system in the file system storage area through the file system interface.

6. The data recovery method according to claim 1, characterized in that, Before obtaining the name of the target source code file, the method further includes: When writing the source code file corresponding to the file system, add the preset prefix to the name of the source code file corresponding to the file system.

7. A data recovery device, characterized in that, The device includes: The acquisition module is used to acquire the name of the target source code file, which is the source code file corresponding to the exception code when the communication module malfunctions. The restart module is used to determine that the abnormality of the communication module is due to a file system abnormality if the prefix of the name of the target source code file is the same as the preset prefix, and to automatically perform data recovery and restart the communication module; the preset prefix is ​​the file name prefix of the source code file of the file system corresponding to the communication module. The restart module is also used to determine that the cause of the communication module's abnormal operation is not a file system abnormality if the prefix of the name of the target source code file is different from the preset prefix, and to directly restart the communication module. The restart module is used for: Based on the time when the communication module malfunctioned and the cause of the malfunction, determine the number of consecutive occurrences of the file system malfunction in the cause of the malfunction. If the number of consecutive occurrences of the file system error exceeds a preset number, data recovery will be performed automatically.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the data recovery method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data recovery method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Peripheral equipment abnormity repairing method and device

    CN105279054A