CN117290157A - Data recovery method, communication module, electronic device and storage medium - Google Patents

Data recovery method, communication module, electronic device and storage medium Download PDF

Info

Publication number
CN117290157A
CN117290157A CN202311034358.1A CN202311034358A CN117290157A CN 117290157 A CN117290157 A CN 117290157A CN 202311034358 A CN202311034358 A CN 202311034358A CN 117290157 A CN117290157 A CN 117290157A
Authority
CN
China
Prior art keywords
data
backup data
backup
data area
abnormal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311034358.1A
Other languages
Chinese (zh)
Inventor
问晶博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Fibocom Wireless Software Inc
Original Assignee
Xian Fibocom Wireless Software Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Fibocom Wireless Software Inc filed Critical Xian Fibocom Wireless Software Inc
Priority to CN202311034358.1A priority Critical patent/CN117290157A/en
Publication of CN117290157A publication Critical patent/CN117290157A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application relates to a data recovery method, a communication module, electronic equipment and a storage medium, wherein the method comprises the following steps: under the condition that the data recovery triggering condition is met, sequentially detecting a plurality of backup data in a backup data area, wherein the plurality of backup data are obtained by backing up a plurality of original data in a main data area; detecting the state of original data corresponding to the abnormal backup data in a main data area under the condition that the abnormal backup data exists in the plurality of backup data; under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be the normal state, the original data corresponding to the abnormal backup data is utilized to restore the abnormal backup data; and recovering the plurality of original data by utilizing the recovered plurality of backup data. Therefore, the two-way data recovery can be carried out on the main data area and the backup data area, the probability of successful data recovery is improved, and the service performance of the communication module is more stable.

Description

Data recovery method, communication module, electronic device and storage medium
Technical Field
The present disclosure relates to the field of wireless communications, and in particular, to a data recovery method, a communication module, an electronic device, and a storage medium.
Background
When the communication module leaves the factory, related parameters of the communication module are usually required to be calibrated by a tool, and the calibrated data are stored in a nonvolatile random access memory (Non-Volatile Random Access Memory, abbreviated as NVRAM). However, during the use of the communication module, the data in the NVRAM may be abnormal, and the use performance of the communication module may be affected, so that a backup and restore function needs to be added to restore the data.
In the prior art, calibrated data is typically stored in a primary data area and a backup data area. When the data in the main data area is abnormal, the data in the main data area can be recovered by utilizing the data in the backup data area, so that the service performance of the communication module is ensured. However, when the data in the backup data area is abnormal, the data in the main data area cannot be recovered, so that the situation of failure in data backup and recovery easily occurs in the mode, and the service performance of the communication module is not stable enough.
Disclosure of Invention
The application provides a data recovery method, a communication module, electronic equipment and a storage medium, which are used for solving the technical problem that the service performance of the communication module is not stable enough due to the fact that data backup and restoration fail easily to occur in the prior art.
In a first aspect, an embodiment of the present application provides a data recovery method, where the method includes:
under the condition that the data recovery triggering condition is met, sequentially detecting a plurality of backup data in a backup data area, wherein the plurality of backup data are obtained by backing up a plurality of original data in a main data area;
detecting the state of original data corresponding to the abnormal backup data in the main data area under the condition that the abnormal backup data exists in the plurality of backup data;
under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be a normal state, the original data corresponding to the abnormal backup data is utilized to restore the abnormal backup data;
and restoring the plurality of original data by utilizing the restored plurality of backup data.
Optionally, the plurality of raw data includes calibration data, an international mobile equipment identification code, and a product serial number;
the sequentially detecting the plurality of backup data in the backup data area includes:
and detecting the backup data corresponding to the calibration data, the backup data corresponding to the product serial number and the backup data corresponding to the international mobile equipment identification code in the backup data area in sequence.
Optionally, the abnormal backup data includes at least one of backup data corresponding to the calibration data, backup data corresponding to the international mobile equipment identification code, and backup data corresponding to the product serial number.
Optionally, after the detecting the state of the original data corresponding to the abnormal backup data in the main data area, the method further includes:
and ending the data recovery flow when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is an abnormal state.
Optionally, after the sequentially detecting the plurality of backup data in the backup data area, the method further includes:
and under the condition that each piece of backup data in the plurality of pieces of backup data is detected to be normal, the plurality of pieces of original data are directly restored by utilizing the plurality of pieces of backup data.
Optionally, before the sequentially detecting the plurality of backup data in the backup data area, the method further includes:
detecting whether the target file in the main data area exists or not, wherein the target file in the main data area and the target file in the backup data area are preset, and the target file in the main data area is used for reflecting whether the plurality of original data in the main data area exist abnormal original data or not;
under the condition that the absence of the target file in the main data area is detected, determining that the data recovery triggering condition is currently met;
under the condition that the existence of the target file in the main data area is detected, sequentially detecting the plurality of original data in the main data area;
if the plurality of original data are abnormal, deleting the target file in the main data area, and restarting the target file so as to enable the restarting target file to meet the data recovery triggering condition;
if the plurality of original data are not abnormal, the starting-up process is directly entered.
Optionally, the method further comprises:
and under the condition that the restored plurality of backup data are utilized to restore the plurality of original data, restoring the target files in the main data area by utilizing the target files in the backup data area.
In a second aspect, embodiments of the present application further provide a communication module, where the communication module includes:
the first detection module is used for sequentially detecting a plurality of backup data in a backup data area under the condition that a data recovery triggering condition is met, wherein the plurality of backup data are obtained by backing up a plurality of original data in a main data area in the backup data area;
the second detection module is used for detecting the state of the original data corresponding to the abnormal backup data in the main data area under the condition that the abnormal backup data exists in the plurality of backup data;
the first recovery module is used for recovering the abnormal backup data by using the original data corresponding to the abnormal backup data under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be in a normal state;
and the second recovery module is used for recovering the data in the main data area by utilizing the recovered backup data.
In a third aspect, an embodiment of the present application further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the steps of the data recovery method according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data recovery method according to any of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the method provided by the embodiment of the application, under the condition that the data recovery triggering condition is met, a plurality of backup data in the backup data area are sequentially detected, wherein the plurality of backup data are obtained by backing up a plurality of original data in the main data area; detecting the state of original data corresponding to the abnormal backup data in the main data area under the condition that the abnormal backup data exists in the plurality of backup data; under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be a normal state, the original data corresponding to the abnormal backup data is utilized to restore the abnormal backup data; and restoring the plurality of original data by utilizing the restored plurality of backup data. By the method, the bidirectional data recovery can be realized on the main data area and the backup data area, so that when abnormal backup data exists in the backup data area, the normal original data corresponding to the abnormal backup data in the main data area can be utilized to carry out data recovery on the abnormal backup data, thereby ensuring that a plurality of backup data in the backup data area are kept normal, and further ensuring that the data in the backup data area can carry out data recovery on the data in the main data area. Therefore, the probability of successful data backup and restoration can be improved, and the service performance of the communication module is more stable.
Drawings
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.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flow chart of a data recovery method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another data recovery method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a communication module according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
Referring to fig. 1, fig. 1 is a flow chart of a data recovery method according to an embodiment of the present application. As shown in fig. 1, the data recovery method may include the steps of:
and 101, under the condition that the data recovery triggering condition is met, sequentially detecting a plurality of backup data in the backup data area, wherein the plurality of backup data are obtained by backing up a plurality of original data in the main data area.
Specifically, the main data area refers to an NVRAM area of the communication module. The main data area may be used for storing a plurality of original data that needs to be used by the communication module during the startup process, where the plurality of original data may include, but is not limited to, calibration data, international mobile equipment identification (International Mobile Equipment Identity, abbreviated as IMEI), serial Number (SN), and the like. The backup data area may be any area of the communication module other than the main data area. The backup data area may be used for storing a plurality of backup data corresponding to a plurality of original data, such as backup data corresponding to calibration data, backup data corresponding to an international mobile equipment identification code, backup data corresponding to a product serial number, and the like.
Step 102, detecting a state of original data corresponding to the abnormal backup data in the main data area when detecting that the abnormal backup data exists in the plurality of backup data.
In this step, when detecting that there is abnormal backup data in the plurality of backup data in the backup data area, the state of the original data corresponding to the abnormal backup data in the main data area may be detected, and if detecting that the state of the original data corresponding to the abnormal backup data in the main data area is a normal state, step 103 is executed; if the state of the original data corresponding to the abnormal backup data in the main data area is detected to be the abnormal state, ending the data recovery flow.
And 103, when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is normal, recovering the abnormal backup data by using the original data corresponding to the abnormal backup data.
In this step, if it is detected that the state of the original data corresponding to the abnormal backup data in the main data area is a normal state, the abnormal backup data may be restored using the original data corresponding to the abnormal backup data. Therefore, the original abnormal backup data in the backup data area can be restored to be normal, and the original data in the main data area can be restored conveniently by using the backup data after the normal backup data in the backup data area is restored later.
And 104, recovering the plurality of original data by utilizing the recovered plurality of backup data.
In this step, after the original abnormal backup data in the backup data area is restored, the original data in the main data area may be restored by using the backup data after the normal restoration in the backup data area.
In this embodiment, bidirectional data recovery can be performed on the main data area and the backup data area, so that when abnormal backup data exists in the backup data area, normal original data corresponding to the abnormal backup data in the main data area can be utilized to perform data recovery on the abnormal backup data, thereby ensuring that a plurality of backup data in the backup data area are kept normal, and further ensuring that data in the backup data area can perform data recovery on data in the main data area. Therefore, the probability of successful data backup and restoration can be improved, and the service performance of the communication module is more stable.
Further, the plurality of raw data includes calibration data, an international mobile equipment identification code, and a product serial number;
step 101, detecting a plurality of backup data in the backup data area sequentially includes:
and detecting the backup data corresponding to the calibration data, the backup data corresponding to the product serial number and the backup data corresponding to the international mobile equipment identification code in the backup data area in sequence.
In one embodiment, the plurality of raw data in the primary data region may include calibration data, an international mobile equipment identification code, and a product serial number. In this way, when detecting a plurality of backup data in the backup data area, it is necessary to sequentially detect the backup data corresponding to the calibration data in the backup data area, the backup data corresponding to the product serial number, and the backup data corresponding to the international mobile equipment identification code. If any one or more of the backup data are detected to be abnormal, the abnormal backup data are considered to exist; if all of the backup data are detected to be normal, it is considered that no abnormal backup data exist. By the method, the detection of the plurality of backup data in the backup data area can be realized, so that the plurality of backup data in the backup data area are ensured to be in a normal state.
Further, the abnormal backup data includes at least one of backup data corresponding to the calibration data, backup data corresponding to the international mobile equipment identification code, and backup data corresponding to the product serial number.
In an embodiment, since the plurality of original data in the main data area may include calibration data, an international mobile equipment identification code, and a product serial number, the plurality of backup data in the backup data area may include backup data corresponding to the calibration data, backup data corresponding to the international mobile equipment identification code, and backup data corresponding to the product serial number. That is, the abnormal backup data in the backup data area may be one or more of the backup data corresponding to the calibration data, the backup data corresponding to the international mobile equipment identification code, and the backup data corresponding to the product serial number, which is not specifically limited in the embodiment of the present application. When the number of the abnormal backup data is multiple, the data recovery is required for the multiple abnormal backup data, and if all the multiple abnormal backup data can be recovered to be normal, the original data in the main data area can be recovered by using the backup data after the normal recovery in the backup data area. If the plurality of abnormal backup data portions are restored to normal, the original data in the main data area cannot be restored by using the backup data in the backup data area.
Further, after detecting the state of the original data corresponding to the abnormal backup data in the main data area in sequence in step 102, the method further includes:
and when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is an abnormal state, ending the data recovery flow.
In an embodiment, when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is an abnormal state, the original data corresponding to the abnormal backup data cannot restore the abnormal backup data, and at this time, the data restoring process can be ended, and detection and judgment of other backup restoring files are not performed, so that the communication module is prevented from being always stopped in the link of the data restoring process in the starting process.
Further, after detecting the plurality of backup data in the backup data area in sequence in step 101, the method further includes:
and under the condition that each backup data in the plurality of backup data is detected to be normal, the plurality of original data is directly restored by utilizing the plurality of backup data.
In an embodiment, after detecting the plurality of backup data in the backup data area, if each backup data in the plurality of backup data is detected to be normal, the plurality of original data can be directly recovered by using the plurality of backup data, thereby improving the data recovery efficiency.
Further, before detecting the plurality of backup data in the backup data area in step 101, the method further includes:
detecting whether target files in a main data area exist or not, wherein the target files in the main data area and the target files in a backup data area are preset, and the target files in the main data area are used for reflecting whether a plurality of original data in the main data area exist abnormal original data or not;
under the condition that the absence of the target file in the main data area is detected, determining that the data recovery triggering condition is currently met;
under the condition that the existence of the target file in the main data area is detected, sequentially detecting a plurality of original data in the main data area;
if the plurality of original data are abnormal, deleting the target file in the main data area, and restarting the target file so as to enable the restarting target file to meet the data recovery triggering condition;
if the plurality of original data are not abnormal, the starting-up process is directly entered.
In an embodiment, before detecting the plurality of backup data in the backup data area, it is further required to determine whether a data recovery trigger condition is currently satisfied, so that it is required to detect the target file in the main data area, and determine whether the target file in the main data area exists. If the target file in the main data area does not exist, the condition that the original data in the main data area is abnormal and the data recovery is needed is indicated, namely that the current meeting of the data recovery triggering condition can be determined, and the data recovery flow is executed subsequently; if the target file in the main data area exists, detecting a plurality of original data in the main data area in sequence, if abnormality exists in the plurality of original data, deleting the target file in the main data area, restarting, and then meeting the triggering condition of data recovery after restarting, and executing the data recovery flow subsequently. If the plurality of original data in the main data area are normal, the data recovery is not needed, and the starting-up process is directly carried out.
By the mode, the communication module can determine whether to trigger the data recovery flow according to the target file in the main data area, namely, when a plurality of original data in the main data area have abnormal original data, the data recovery flow is actively triggered, and data recovery is carried out on the abnormal original data.
Further, the method further comprises:
and under the condition that the recovered plurality of backup data are utilized to recover the plurality of original data, recovering the target files in the main data area by utilizing the target files in the backup data area.
In an embodiment, the target file in the main data area is deleted before the data recovery process is triggered, so that when the recovered multiple backup data are used for recovering multiple original data, the target file in the main data area can be recovered by using the target file in the backup data area, and when the original data in the main data area are recovered, the target file in the main data area can be recovered, and the communication module can conveniently judge the state of the original data in the main data area in the next starting process.
In one embodiment, the data recovery process is shown in fig. 2, and may specifically include the following steps:
step 201, starting a communication module.
It should be noted that, when the communication module is calibrated before leaving the factory, the BACKUP and restore function of the communication module needs to be started by a tool, and calibration Data, an international mobile equipment identification code, a product serial number, and a target file (such as a restoeflag flag file) are respectively stored in two areas, namely an NVRAM-Data area (corresponding to the main Data area above) and a BACKUP-Data area (corresponding to the BACKUP Data area above).
Step 202, judging whether a RestoreFlag flag bit file exists in the NVRAM-Data area.
After the communication module is started, it is first required to detect whether a RestoreFlag flag bit file exists in the NVRAM-Data area, and if so, step 203 is executed; if the RestoreFlag flag bit file does not exist within the NVRAM-Data area, step 206 is performed.
Step 203, traversing all files within the NVRAM-Data area (i.e., the plurality of files corresponding to the plurality of original Data above).
Specifically, calibration Data in NVRAM-Data needs to be detected, and its deposition path may be: /mnt/vendor/nvdata/md/NVRAM/CALIBRAT/;
there is also a need to detect international mobile equipment identities in NVRAM-Data, which deposit paths may be: /mnt/vendor/nvdata/md/NVRAM/IMEI/;
there is also a need to detect a product serial number in NVRAM-Data, which can be deposited on the path: N/mnt/vendor/nvdata/md/NVRAM/SN/;
step 204, determining whether all files in the NVRAM-Data area cannot be opened.
If all files within the NVRAM-Data area can be opened normally, then step 205 is performed; if there is a file in the NVRAM-Data area that cannot be opened normally, then step 218 is performed.
Step 205, entering a startup procedure.
Step 206, triggering a restoration mechanism.
Step 207, traversing all files in the BACKUP-Data area.
Step 208, it is determined whether the calibration Data file in the BACKUP-Data area cannot be opened.
If the calibration Data file in the BACKUP-Data area cannot be opened, step 212 is performed; if the calibration Data file in the BACKUP-Data area can be opened, step 209 is performed;
step 209, determining whether the international mobile equipment identity file in the BACKUP-Data area cannot be opened.
If the International Mobile Equipment identity document in the BACKUP-Data region cannot be opened, step 214 is performed; if the International Mobile Equipment identity file in the BACKUP-Data region can be opened, step 210 is performed;
step 210, judging whether the product serial number file in the BACKUP-Data area cannot be opened.
If the product serial number file in the BACKUP-Data area cannot be opened, then step 216 is performed; if the product serial number file in the BACKUP-Data area can be opened, step 211 is performed;
step 211, cover NVRAM-Data area with all files in BACKUP-Data area.
Step 212, determine if the calibration Data file within the NVRAM-Data area cannot be opened.
If the calibration Data file within the NVRAM-Data area cannot be opened, then step 205 is performed; if the calibration Data file within the NVRAM-Data area can be opened, then step 213 is performed;
step 213, overwrite the calibration Data file in the BACKUP-Data area with the calibration Data file in the NVRAM-Data area.
Step 214, determining whether the international mobile equipment identity file in the NVRAM-Data area cannot be opened.
If the International Mobile Equipment identity file in the NVRAM-Data area cannot be opened, then step 205 is performed; if the International Mobile Equipment identity file within the NVRAM-Data area can be opened, then step 215 is performed;
step 215, using the international mobile equipment identity file in the NVRAM-Data area to overwrite the international mobile equipment identity file in the BACKUP-Data area.
Step 216, determine whether the product serial number file in the NVRAM-Data area cannot be opened.
If the product serial number file within the NVRAM-Data area cannot be opened, then step 205 is performed; if the product sequence number file within the NVRAM-Data area can be opened, then step 217 is performed;
step 217, the product sequence number file in the BACKUP-Data area is overlaid with the product sequence number file in the NVRAM-Data area.
Step 218, determining whether the calibration Data file, the international mobile equipment identification code file, and/or the product serial number file belong to the NVRAM-Data area.
If the calibration Data file, the International Mobile Equipment identity file, and/or the product sequence number file belong to the NVRAM-Data area, step 219 is performed; if the calibration Data file, the International Mobile Equipment identity file, and/or the product sequence number file do not belong to the NVRAM-Data area, step 205 is performed.
Step 219, delete the RestoreFlag flag bit file in the NVRAM-Data area and restart the module.
Through the steps, when the communication module triggers the backup restoring mechanism, the states of the calibration Data file, the international mobile equipment identification code file and the product serial number file in the back_data area can be detected one by one, when a certain file abnormality is detected, the corresponding file in the NVRAM_data area is detected, and when the backup restoring file in the back_data area is abnormal, the corresponding normal file in the NVRAM_data area can be backed up to the back_data area, so that the backup restoring Data of the back_data area can be restored. And once detecting that a certain file cannot be normally opened in the BACK-up_data area and the NVRAM_data area, immediately ending the detection and judgment flow, and not detecting and judging abnormality of other backup restored files, thereby simplifying the backup restoring mechanism flow.
Through the steps, the following technical effects can be achieved: by detecting states of the calibration Data file, the international mobile equipment identification code file and the product serial number file in the BACK_data area one by one, when detecting that a certain file is abnormal, by detecting the corresponding file in the NVRAM_data area, when the backup restoring file in the BACK_data area is abnormal, the corresponding normal file in the NVRAM_data area can be backed up to the BACK_data area, backup restoring Data of the BACK_data area can be restored, the purpose of bidirectional backup restoring of the NVRAM_data area and the BACK_data area is achieved, and the success rate of backup restoring is improved.
For example: when the calibration Data file in the NVRAM_data area is normal, the international mobile equipment identification code file and the product serial number file are abnormal, a backup restoring mechanism is triggered, and if the calibration Data file in the BACK_data is abnormal, the international mobile equipment identification code file and the product serial number file are normal, the calibration Data file in the NVRAM_data area can be backed up and restored to the BACK_data area, so that the purpose of restoring the BACK_data area is achieved, and then all the file backups in the BACK_data are restored to the NVRAM_data area, so that the purpose of restoring the NVRAM_data area is achieved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a communication module according to an embodiment of the present application. As shown in fig. 3, the communication module 300 includes:
the first detection module 301 is configured to detect, in sequence, a plurality of backup data in a backup data area when a data recovery trigger condition is satisfied, where the plurality of backup data is obtained by backing up a plurality of original data in a main data area in the backup data area;
the second detection module 302 is configured to detect, when detecting that abnormal backup data exists in the plurality of backup data, a state of original data corresponding to the abnormal backup data in the main data area;
the first recovery module 303 is configured to, when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is a normal state, recover the abnormal backup data by using the original data corresponding to the abnormal backup data;
and the second recovery module 304 is configured to recover the data in the main data area by using the recovered plurality of backup data.
Further, the plurality of raw data includes calibration data, an international mobile equipment identification code, and a product serial number;
the first detection module 301 includes:
and the detection sub-module is used for sequentially detecting the backup data corresponding to the calibration data, the backup data corresponding to the product serial number and the backup data corresponding to the international mobile equipment identification code in the backup data area.
Further, the abnormal backup data includes at least one of backup data corresponding to the calibration data, backup data corresponding to the international mobile equipment identification code, and backup data corresponding to the product serial number.
Further, the communication module 300 further includes:
and the ending module is used for ending the data recovery flow when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is the abnormal state.
Further, the communication module 300 further includes:
and the third recovery module is used for directly recovering the plurality of original data by utilizing the plurality of backup data under the condition that each backup data in the plurality of backup data is detected to be normal.
Further, the communication module 300 further includes:
the third detection module is used for detecting whether the target file in the main data area exists or not, wherein the target file in the main data area and the target file in the backup data area are preset, and the target file in the main data area is used for reflecting whether a plurality of original data in the main data area exist or not;
the determining module is used for determining that the data recovery triggering condition is currently met under the condition that the absence of the target file in the main data area is detected;
and the processing module is used for sequentially detecting a plurality of original data in the main data area under the condition that the existence of the target file in the main data area is detected, deleting the target file in the main data area under the condition that the existence of abnormal original data in the plurality of original data is detected, and restarting.
Further, the communication module 300 further includes:
and the fourth recovery module is used for recovering the target files in the main data area by using the target files in the backup data area under the condition that the recovered plurality of backup data are used for recovering the plurality of original data.
It should be noted that, the communication module 300 can implement the steps of the data recovery method provided in any of the foregoing method embodiments, and can achieve the same technical effects, which are not described herein in detail.
As shown in fig. 4, the embodiment of the present application further provides an electronic device, which includes a processor 411, a communication interface 412, a memory 413, and a communication bus 414, where the processor 411, the communication interface 412, and the memory 413 perform communication with each other through the communication bus 414,
a memory 413 for storing a computer program;
in one embodiment of the present application, the processor 411 is configured to implement the data recovery method provided in any one of the foregoing method embodiments when executing the program stored in the memory 413, where the method includes:
under the condition that the data recovery triggering condition is met, sequentially detecting a plurality of backup data in a backup data area, wherein the plurality of backup data are obtained by backing up a plurality of original data in a main data area;
detecting the state of original data corresponding to the abnormal backup data in a main data area under the condition that the abnormal backup data exists in the plurality of backup data;
under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be the normal state, the original data corresponding to the abnormal backup data is utilized to restore the abnormal backup data;
and recovering the plurality of original data by utilizing the recovered plurality of backup data.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data recovery method provided by any of the method embodiments described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of data recovery, the method comprising:
under the condition that the data recovery triggering condition is met, sequentially detecting a plurality of backup data in a backup data area, wherein the plurality of backup data are obtained by backing up a plurality of original data in a main data area;
detecting the state of original data corresponding to the abnormal backup data in the main data area under the condition that the abnormal backup data exists in the plurality of backup data;
under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be a normal state, the original data corresponding to the abnormal backup data is utilized to restore the abnormal backup data;
and restoring the plurality of original data by utilizing the restored plurality of backup data.
2. The method of claim 1, wherein the plurality of raw data includes calibration data, an international mobile equipment identification code, and a product serial number;
the sequentially detecting the plurality of backup data in the backup data area includes:
and detecting the backup data corresponding to the calibration data, the backup data corresponding to the product serial number and the backup data corresponding to the international mobile equipment identification code in the backup data area in sequence.
3. The method of claim 2, wherein the abnormal backup data comprises at least one of backup data corresponding to the calibration data, backup data corresponding to the international mobile equipment identification code, and backup data corresponding to the product serial number.
4. The method of claim 1, wherein after detecting the state of the original data corresponding to the abnormal backup data within the primary data area, the method further comprises:
and ending the data recovery flow when detecting that the state of the original data corresponding to the abnormal backup data in the main data area is an abnormal state.
5. The method of claim 1, wherein after sequentially detecting the plurality of backup data within the backup data area, the method further comprises:
and under the condition that each piece of backup data in the plurality of pieces of backup data is detected to be normal, the plurality of pieces of original data are directly restored by utilizing the plurality of pieces of backup data.
6. The method of claim 1, wherein prior to said sequentially detecting the plurality of backup data within the backup data area, the method further comprises:
detecting whether the target file in the main data area exists or not, wherein the target file in the main data area and the target file in the backup data area are preset, and the target file in the main data area is used for reflecting whether the plurality of original data in the main data area exist abnormal original data or not;
under the condition that the absence of the target file in the main data area is detected, determining that the data recovery triggering condition is currently met;
under the condition that the existence of the target file in the main data area is detected, sequentially detecting the plurality of original data in the main data area;
if the plurality of original data are abnormal, deleting the target file in the main data area, and restarting the target file so as to enable the restarting target file to meet the data recovery triggering condition;
if the plurality of original data are not abnormal, the starting-up process is directly entered.
7. The method of claim 6, wherein the method further comprises:
and under the condition that the restored plurality of backup data are utilized to restore the plurality of original data, restoring the target files in the main data area by utilizing the target files in the backup data area.
8. A communication module, the communication module comprising:
the first detection module is used for sequentially detecting a plurality of backup data in a backup data area under the condition that a data recovery triggering condition is met, wherein the plurality of backup data are obtained by backing up a plurality of original data in a main data area in the backup data area;
the second detection module is used for detecting the state of the original data corresponding to the abnormal backup data in the main data area under the condition that the abnormal backup data exists in the plurality of backup data;
the first recovery module is used for recovering the abnormal backup data by using the original data corresponding to the abnormal backup data under the condition that the state of the original data corresponding to the abnormal backup data in the main data area is detected to be in a normal state;
and the second recovery module is used for recovering the data in the main data area by utilizing the recovered backup data.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the data recovery method of any one of claims 1 to 7 when executing a program stored on a memory.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the data recovery method according to any one of claims 1-7.
CN202311034358.1A 2023-08-16 2023-08-16 Data recovery method, communication module, electronic device and storage medium Pending CN117290157A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311034358.1A CN117290157A (en) 2023-08-16 2023-08-16 Data recovery method, communication module, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311034358.1A CN117290157A (en) 2023-08-16 2023-08-16 Data recovery method, communication module, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN117290157A true CN117290157A (en) 2023-12-26

Family

ID=89237977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311034358.1A Pending CN117290157A (en) 2023-08-16 2023-08-16 Data recovery method, communication module, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117290157A (en)

Similar Documents

Publication Publication Date Title
US5721918A (en) Method and system for fast recovery of a primary store database using selective recovery by data type
CN101706802B (en) Method, device and sever for writing, modifying and restoring data
US8677189B2 (en) Recovering from stack corruption faults in embedded software systems
US20230041089A1 (en) State management methods, methods for switching between master application server and backup application server, and electronic devices
CN107153559A (en) The application program updating method of a kind of electronic equipment
CN102821011A (en) Opposite terminal state detection method, device and equipment
CN112463437B (en) Service recovery method, system and related components of storage cluster system offline node
CN111901176B (en) Fault determination method, device, equipment and storage medium
CN111176900A (en) Distributed storage system and data recovery method, device and medium thereof
US6483746B2 (en) Electronic apparatus
CN112650624B (en) Cluster upgrading method, device, equipment and computer readable storage medium
CN104572352B (en) A kind of POS terminal critical data back-up restoring method
CN117290157A (en) Data recovery method, communication module, electronic device and storage medium
CN111371642B (en) Network card fault detection method, device, equipment and storage medium
CN106815098A (en) Setting backup and the method and system for recovering based on linux system
CN109491836B (en) Data recovery method, device and base station
CN110555017A (en) block chain data cleaning method and device, computer equipment and storage medium
CN115309585A (en) Data recovery method and device, electronic equipment and storage medium
CN111427718B (en) File backup method, file recovery method and file recovery device
US9348701B2 (en) Method and apparatus for failure recovery in a machine-to-machine network
CN115185741A (en) Data recovery method and device, electronic equipment and storage medium
CN110427280B (en) Cache management method, system, computer equipment and storage medium
CN101835067A (en) ASON (Automatic Switch Optical Network) automatic backup method, reduction method and device
CN113127883A (en) Locking method, device, equipment and medium for platform firmware protection recovery
CN111090491A (en) Method and device for recovering task state of virtual machine and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination