CN115509803A - Software recovery method, electronic device and storage medium - Google Patents
Software recovery method, electronic device and storage medium Download PDFInfo
- Publication number
- CN115509803A CN115509803A CN202110700003.6A CN202110700003A CN115509803A CN 115509803 A CN115509803 A CN 115509803A CN 202110700003 A CN202110700003 A CN 202110700003A CN 115509803 A CN115509803 A CN 115509803A
- Authority
- CN
- China
- Prior art keywords
- software
- self
- healing
- position point
- target operation
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000002159 abnormal effect Effects 0.000 claims abstract description 43
- 238000004590 computer program Methods 0.000 claims description 6
- 230000005856 abnormality Effects 0.000 claims description 3
- 239000000126 substance Substances 0.000 claims 1
- 238000011084 recovery Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000006978 adaptation Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 238000011895 specific detection Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/142—Reconfiguring to eliminate the error
- G06F11/1425—Reconfiguring to eliminate the error by reconfiguration of node membership
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Retry When Errors Occur (AREA)
Abstract
The embodiment of the invention relates to the field of embedded systems, and discloses a software recovery method, which comprises the following steps: when software runs to a preset self-healing position point, acquiring and storing a target running variable of the software, wherein the number of the self-healing position points is at least one; and if the software is detected to be abnormal in operation, recovering the software according to the target operation variable. The embodiment of the invention also discloses electronic equipment and a storage medium. The software recovery method, the electronic device and the storage medium provided by the embodiment of the invention can improve the real-time performance of the software recovery of the embedded system and reduce the influence on the execution progress of the service of the embedded system.
Description
Technical Field
The embodiment of the application relates to the field of embedded systems, in particular to a software recovery method, electronic equipment and a storage medium.
Background
An Embedded System (Embedded System) is a computer System Embedded in a mechanical or electrical System and having a specific function and real-time computing performance. The embedded system that is applied to at present in every industry is more and more, and in the in-process that the embedding was used, because the requirement of various embedded equipment adaptations is different among the embedded system, some adaptations high temperature, some adaptations low temperature for the embedded system is higher to the requirement of hardware and software level comprehensive adaptation, appears software and hardware unusual problem easily, for example the software is trampled because the code is canonicalized and is appeared unusually, and hardware appears unusually because the temperature of external world, voltage scheduling problem.
At present, when the above problems occur in an embedded system, the problems are mainly solved by the following two ways: the first is a restart mode after system shutdown, and the first is recovery through an initialization configuration mode. However, the recovery period is long by means of shutdown and restart, the recovery real-time performance is poor, and the method is not applicable to an embedded system with a strong requirement on recovering real-time performance; the recovery mode by the initialization configuration mode needs the service corresponding to the software to be re-run, which greatly affects the execution progress of the service.
Disclosure of Invention
The embodiment of the application mainly aims to provide a software recovery method, electronic equipment and a storage medium, which can improve the real-time performance of embedded system software recovery and reduce the influence on the execution progress of embedded system services.
In order to achieve the above object, an embodiment of the present application provides a software recovery method, including: when software runs to a preset self-healing position point, acquiring and storing a target running variable of the software, wherein the number of the self-healing position points is at least one; and if the software is detected to be abnormal in operation, recovering the software according to the target operation variable.
In order to achieve the above object, an embodiment of the present application further provides a software recovery method, including: detecting whether the software runs abnormally when the software runs; if the abnormal operation of the software is detected, calling a self-healing module to restore the software, acquiring and storing a target operation variable of the software when the self-healing module runs to a preset self-healing position point, and restoring the software according to the target operation variable when the self-healing module is called, wherein the number of the self-healing position points is at least one.
In order to achieve the above object, an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the software recovery method described above.
To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, where the computer program is executed by a processor to implement the software recovery method.
According to the software recovery method, the self-healing position point is preset in the software, and when the software runs to the self-healing position point, the target running variable of the software is obtained and stored; and recovering the software according to the target operation variables when the abnormal operation of the software is detected. The self-healing position point can be preset according to different running schedules of the software, so that the software is recovered according to the target running variable of the self-healing position point, and the software can be recovered from a position close to the running exception, so that the time required by software recovery is shortened, the real-time performance of embedded system software recovery is improved, and the influence on the execution schedule of the embedded system software service is reduced.
Drawings
One or more embodiments are illustrated by the corresponding figures in the drawings, which are not meant to be limiting.
Fig. 1 is a schematic diagram illustrating a software recovery method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a software recovery method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the step of refining S102 in the software recovery method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a software recovery method according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a recovery flow in a software recovery method according to an embodiment of the present invention;
FIG. 6 is another schematic diagram of a software recovery method provided by an embodiment of the present invention;
FIG. 7 is another flowchart of a software recovery method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that in the various embodiments of the present application, numerous technical details are set forth in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present application, and the embodiments may be mutually incorporated and referred to without contradiction.
In one embodiment, the method comprises the steps of presetting a self-healing position point in software, and acquiring and storing a target operation variable of the software when the software runs to the self-healing position point; and when the abnormal operation of the software is detected, recovering the software according to the target operation variable. The self-healing position point can be preset according to different running schedules of the software, so that the software is recovered according to the target running variable of the self-healing position point, and the software can be recovered from a position close to the running exception, so that the time required by software recovery is shortened, the recovery real-time performance is improved, and the influence on the service schedule of the software is reduced.
The software recovery method according to the embodiment of the present invention may be applied to an embedded system, and a specific execution main body may be a certain module of the embedded system, for example, a self-healing module as shown in fig. 1, where fig. 1 is a schematic diagram illustrating a principle of the software recovery method according to the embodiment of the present invention. As shown in fig. 1, the self-healing module presets a self-healing location point in software, and when detecting that the software runs abnormally (after being triggered abnormally by hardware equipment in fig. 1, the self-healing module obtains abnormal information to detect), service recovery is performed on the software according to the self-healing location point. For convenience of description, the following specific example will be described with the self-healing module as an execution subject.
The specific flow of the software recovery method provided by the embodiment of the invention is shown in fig. 2, and comprises the following steps:
s101: when the software runs to a preset self-healing position point, acquiring and storing a target running variable of the software, wherein the number of the self-healing position points is at least one.
When the self-healing position points of the software are preset, the granularity can be set to be larger, for example, one self-healing position point is preset for one function of the software, so that the preset number of the self-healing position points is smaller, the storage space required by storing the target operation variables of the software is reduced, the software recovery precision is reduced, and the execution progress deviation before the service recovery of the software is larger; the granularity can also be set to be smaller, for example, a self-healing position point is preset for a function of the software, so that the software recovery precision can be improved, the deviation from the execution progress of the software before service recovery is reduced, but the preset number of the self-healing position points is large, and the storage space required for storing the target operation variable of the software is increased. The self-healing location point can be preset according to factors such as the storage space of the embedded system, the complexity of software, the recovery time requirement, the recovery precision requirement and the like, and the embodiment of the invention is not limited to this.
If the number of the self-healing position points is multiple, when the target operation variable of the self-healing position point is obtained and stored, the increment of the target operation variable of the current self-healing position point relative to the target operation variable of the previous self-healing position point is obtained and stored. Particularly, when the current self-healing position point is the first self-healing position point, the target operation variable of the current self-healing position point is obtained and stored. Because the memory of the embedded system is generally limited, the storage in the incremental form can reduce the occupation of the target operating variable on the storage space of the embedded system. Because the storage in the incremental form can reduce the occupation of the storage space of the embedded system, compared with the full-storage form, the granularity of the self-healing position point can be set to be smaller, the software recovery precision is improved, and the deviation of the execution progress before the service recovery of the software is reduced.
The target operation variable refers to an operation variable corresponding to the software at the current self-healing position point, and the specific target operation variable can be set according to actual needs, so long as the software can be recovered to operate according to the target operation variable. In the case of a relatively sufficient storage space of the embedded system, all the operating variables of the software can be used as target operating variables. In a specific example, the target operation variable is a key variable that affects secondary operation of the software, such as key information of a memory, a PC pointer, register information, and the like, so that occupation of a storage space of the embedded system by the stored target operation variable can be reduced, time required for software recovery can be shortened, and efficiency of software recovery can be improved.
S102: and if the abnormal operation of the software is detected, recovering the software according to the target operation variable.
When the software runs abnormally, the hardware equipment can have abnormal state information, so that when the software is detected to run abnormally, the hardware equipment in the embedded system can perform abnormal triggering, and then the detection is performed in a self-healing module capturing mode. For example, the hardware device performs exception triggering when an instruction interrupt occurs, and then the self-healing module captures corresponding exception information. When the hardware device triggers the exception, the hardware device is required to support reporting the state information of the hardware exception to the self-healing module. The specific detection mode of the software running abnormity can be set according to actual conditions, and can be realized by other monitoring software or scripts, for example, without limitation, as long as the information of the software running abnormity can be detected.
In a specific example, S102 may include: if the software is detected to be abnormal in operation, analyzing the type of the abnormal operation; and if the type of the abnormal operation is the self-healing type, recovering the software according to the target operation variable, otherwise, restarting the software. When the type of the abnormal operation is a self-healing type, the self-healing can be realized by restoring the target operation variable of the self-healing position point, and the software is recovered according to the target operation variable; if the type of the abnormal operation is the non-self-healing type, the self-healing can not be realized by restoring the target operation variable of the self-healing position point, the software is directly restarted for recovery, and an invalid recovery process is avoided. As to whether the type of the abnormal operation specifically belongs to a self-healing type or a non-self-healing type, the type may be configured in the self-healing module in advance.
In a specific example, after the software is restored according to the target operating variable, the method further includes: the abnormal information and the self-healing time of the software recovery are obtained and stored, so that the software recovery effect can be conveniently counted and evaluated, the self-healing position point setting can be further analyzed and improved, and the software recovery effect can be further improved.
When the self-healing location points are multiple and the target operation variables are saved in an incremental manner, as shown in fig. 3, the recovering the software according to the target operation variables may include the following steps:
s1021: and restoring the target operation variables of the self-healing position points one by one according to the storage sequence of the self-healing position points.
Because the self-healing position points are stored in an incremental manner, if the previous self-healing position point fails to restore, the subsequent self-healing position points fail to restore, and the self-healing position points are restored one by one according to the storage sequence of the self-healing position points, so that the software can be restored to the last successfully restored self-healing position point, and the self-healing of the software is realized.
Before restoring the target operation variable of the self-healing location point, optionally, an integrity check of the target operation variable may be performed. Specifically, after S101, that is, after the target operation variable of the software is acquired and saved, the first integrity feature value of the target operation variable may be calculated and saved; and then, before restoring the target operation variable of each self-healing position point, calculating a second integrity characteristic value of the target operation variable corresponding to the self-healing position point needing to be restored currently, if the second integrity characteristic value is equal to the first integrity characteristic value, the backup of the target operation variable is complete, restoring the target operation variable of the current self-healing position point, and otherwise, judging that the restoration of the current self-healing position point fails. The first integrity characteristic value and the second integrity characteristic value are used for checking the integrity of the backup of the target operation variable, and the specifically selected values may be selected according to actual needs, for example, may be CRC (Cyclic Redundancy Check) values or MD5 (MD 5 Message-Digest Algorithm, MD5 \35338), and the like, which is not limited herein. Because the target operation variable may be incomplete due to memory trampling and the like, the integrity of the target operation variable is checked before the target operation variable of the self-healing position point is restored, so that the restoration success of the self-healing position point can be ensured; and when the backup of the target operation variable is incomplete, the current self-healing position is judged to fail to be restored, and the incomplete self-healing position point can be automatically identified as an invalid self-healing position point.
S1022: and if the current self-healing position point is successfully restored, continuing to restore the next self-healing position point.
S1023: and if the current self-healing position point fails to be restored, judging whether the current self-healing position point is the first self-healing position point.
S1024: and if the current self-healing position point is the first self-healing position point, restarting the software, otherwise, pointing the PC pointer to the previous successfully restored self-healing position point, and completing the restoration of the software.
When the self-healing position points store the target operation variables in an incremental mode, if the current self-healing position point is the first self-healing position point, all the self-healing position points are invalid self-healing position points, the effect of recovering the software cannot be achieved, and the software is directly restarted. If the current self-healing position is not the first self-healing position point, the fact that at least one self-healing position point is a valid self-healing position point is indicated, the PC pointer points to the previous successfully restored self-healing position point (the last successfully restored self-healing position point), and the operation of the software is restored from the self-healing position point.
Particularly, if all the self-healing position points are successfully restored, the PC pointer points to the last successfully restored self-healing position point, and the software is restored.
In the example shown in fig. 3, the self-healing position points store the target operation variables in an incremental manner, if the target operation variables are stored in a full manner, the software can be restored from the last self-healing position point, and if the restoration of the last self-healing position point is successful, the restoration of the software is directly completed without restoring other self-healing position points; if the last self-healing position point fails to be restored, restoring the last self-healing position point until the first self-healing position point which is successfully restored; and if all the self-healing position points fail to restore, restarting the software.
It can be understood that the software may also be composed of several modules with low relevance, so that when the self-healing position points are preset, different self-healing position points need to be separately set for the several modules, and at this time, the self-healing position points of different modules are mutually independent; when the software is restored according to the target operation variable, the self-healing of the software can be realized only if the self-healing position points of all the modules are successfully restored. Certainly, for the same module in the software, multiple self-healing location points may still be set, for example, location points of the same function or function at different time points, and when the target operation variables of the self-healing location points in the module are saved, the target operation variables may still be saved in an incremental manner, so as to reduce the occupation of the storage space.
In order to better describe the software recovery method according to the embodiment of the present invention, a specific example is described below. Please refer to fig. 4, which is a diagram illustrating a software recovery method according to an embodiment of the present invention. The specific process is as follows:
1. starting and running software;
2. the software searches for a self-healing position point according to the logic of the service, when the first self-healing position point is reached, the self-healing module acquires and stores key information which influences secondary operation of the service, such as a memory, a PC pointer, register information and the like of the software as target operation variables, and calculates CRC values of the stored target operation variables for checking the integrity of backup of the target operation variables;
3. after the first self-healing position point is stored, the software continues to run;
4. continuously setting a next self-healing position point of the software according to the operation mechanism of the software, and storing a target operation variable of the next self-healing position point, wherein the target operation variables of a plurality of self-healing position points can be repeatedly stored according to actual needs;
5. the software continues to run;
6. the software is abnormal in operation;
7. judging whether the recovery can be carried out or not, if the recovery can be carried out, entering a recovery flow, and returning to 5 after the recovery; if the recovery cannot be carried out, 8 is entered;
8. restarting the software;
9. and ending the flow.
As shown in fig. 5, the flow example specifically included in the recovery flow specifically includes the following steps:
1. the recovery flow begins;
2. the self-healing module firstly judges whether the current self-healing times exceed a threshold value (the value can be built in or issued by a network manager); if the self-healing frequency exceeds the threshold value, the self-healing frequency is too many, a larger software fault possibly exists, and the software needs to be restarted, then the step 8 is carried out; if the threshold value is not exceeded, entering 3;
3. the self-healing module acquires abnormal information (abnormal information reported by hardware equipment) of software operation, analyzes the abnormal type and stores the abnormal information;
4. the self-healing module judges whether self-healing can be carried out at present according to the abnormal type, if yes, 5 is entered, and if not, 9 is entered;
5. the self-healing module clears information such as an abnormal state bit, an abnormal interrupt and an abnormal register of the hardware equipment according to the analyzed abnormal type, so that the hardware equipment can be conveniently and normally triggered when the abnormal state is identified next time;
6. the first self-healing position point is recovered;
7. recovering other self-healing position points; 6 and 7 take three self-healing position points A, B and C as examples, wherein A is a first self-healing position point, the self-healing position point A is recovered, the CRC value is recalculated for the backup data of the target operation variable of the self-healing position point A, if the current CRC value is consistent with the CRC value stored before, the target operation variable stored in the self-healing position point A is restored, the current time is recorded as effective self-healing, and the self-healing position point B is recovered continuously; if the self-healing position point A fails to be restored, entering 9; when the self-healing position point A is successfully restored, continuing to restore the self-healing position point B, recalculating the CRC value of the backup data of the target operation variable of the self-healing position point B, if the current calculated CRC value is consistent with the previously stored CRC value, restoring the target operation variable stored in the self-healing position point B, recording that the current calculated CRC value is effective self-healing, and continuing to restore the self-healing position point C; if the self-healing position point B fails to restore, 8 is entered; when the B self-healing position point is successfully restored, continuing to restore the C self-healing position point, firstly recalculating the CRC value of the backup data of the target operation variable of the C self-healing position point, if the current calculated CRC value is consistent with the previously stored CRC value, restoring the target operation variable stored in the C self-healing position point, recording that the current time is effective self-healing, and entering 7; if the self-healing position point C fails to restore, entering 8;
8. storing reasons (running position and abnormal reason) of the software recovery triggering abnormity and self-healing position points of the software recovery, and recording the self-healing times and self-healing time of the self-healing position points so as to carry out granularity analysis on the self-healing position points through statistical data; finally, pointing the pc to the self-healing position point which is finally and effectively recovered and recorded, and continuing the service operation of the software;
9. storing abnormal information and abnormal positions, and recording self-healing times and self-healing reasons;
10. triggering a restart operation;
11. and starting running of software.
According to the software recovery method provided by the embodiment of the invention, the self-healing position point is preset in the software, and when the software runs to the self-healing position point, the target running variable of the software is obtained and stored; and when the abnormal operation of the software is detected, recovering the software according to the target operation variable. The self-healing position point can be preset according to different operation schedules of the software, so that the software can be recovered according to the target operation variable of the self-healing position point, and the software can be recovered from a position which is close to the position before abnormal operation, so that the time required by software recovery is shortened, the real-time performance of embedded system software recovery is improved, and the influence on the execution schedule of the embedded system software service is reduced.
In one embodiment, the method comprises detecting whether software runs abnormally when the software runs; and if the abnormal operation of the software is detected, calling a self-healing module to recover the software, wherein the self-healing module acquires and stores a target operation variable of the software when the software operates to a preset self-healing position point, and recovers the software according to the target operation variable when the self-healing module is called, wherein the number of the self-healing position points is at least one. The self-healing module is actively called by the software, so that the software can achieve the effect of active self-healing.
It should be noted that the main execution body of the software recovery method provided by the embodiment of the present invention is the software itself of the embedded system, for example, the software shown in fig. 6, where fig. 6 is a schematic diagram illustrating the principle of the software recovery method provided by the embodiment of the present invention. As shown in fig. 6, in the running process of the software, whether an abnormality occurs in the software layer of the software itself is detected, and when the abnormality occurs, the self-healing module is actively called to recover the software. Because the software detects whether the software layer is abnormal or not, the software is required to support the abnormal detection function of the software layer.
The specific flow of the software recovery method provided by the embodiment of the invention is shown in fig. 7, and comprises the following steps:
s201: and detecting whether the software runs abnormally or not when the software runs.
S202: if the abnormal operation of the software is detected, calling a self-healing module to recover the software, acquiring and storing a target operation variable of the software by the self-healing module when the software operates to a preset self-healing position point, and recovering the software according to the target operation variable when the software is called, wherein the number of the self-healing position points is at least one.
The software recovery method provided by the embodiment of the invention detects whether the software is abnormal in operation by the software, and actively calls the self-healing module to realize the self-healing of the software when the software is abnormal in operation, so that the effect of the active self-healing of the software can be achieved, and the diversity of the recovery software of the embedded system in the concrete implementation can be improved.
It should be understood that the present embodiment is an embodiment applied to the software side corresponding to the embodiment of the foregoing method, and the present embodiment can be implemented in cooperation with the embodiment of the foregoing method. The related technical details mentioned in the embodiments of the foregoing method are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related technical details mentioned in the present embodiment can also be applied in the embodiments of the foregoing method.
In addition, those skilled in the art can understand that the steps of the above methods are divided for clarity, and the implementation can be combined into one step or split into some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, and the method is within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
In one embodiment, an electronic device is related, as shown in fig. 8, comprising: at least one processor 301; and a memory 302 communicatively coupled to the at least one processor 301; the memory 302 stores instructions executable by the at least one processor 301, and the instructions are executed by the at least one processor 301 to enable the at least one processor 301 to perform the software recovery method.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the bus connecting together various circuits of the memory and the processor or processors. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, etc., which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. While the memory may be used to store data used by the processor in performing operations.
In one embodiment, a computer-readable storage medium stores a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific to implementations of the invention, and that various changes in form and detail may be made therein without departing from the spirit and scope of the invention in practice.
Claims (10)
1. A method for recovering software, comprising:
when software runs to a preset self-healing position point, acquiring and storing a target running variable of the software, wherein the number of the self-healing position points is at least one;
and if the software is detected to be abnormal in operation, recovering the software according to the target operation variable.
2. The software recovery method according to claim 1, wherein the target operation variable is a key variable that affects secondary operation of the software, and the key variable includes the following information: memory, PC pointer and register information.
3. The method for recovering software according to claim 1 or 2, wherein the number of the self-healing location points is plural, and the acquiring and saving the target operation variable of the software comprises:
and when the target operation variable of the self-healing position point is obtained and stored, the increment of the target operation variable of the current self-healing position point relative to the target operation variable of the previous self-healing position point is obtained and stored.
4. The method for recovering software according to claim 3, wherein the recovering the software according to the target operation variable comprises:
restoring the target operation variables of the self-healing position points one by one according to the storage sequence of the self-healing position points;
if the current self-healing position point is successfully restored, continuing to restore the next self-healing position point;
if the current self-healing position point fails to be restored, judging whether the current self-healing position point is a first self-healing position point;
and if the current self-healing position point is the first self-healing position point, restarting the software, otherwise, pointing the PC pointer to the previous successfully restored self-healing position point, and completing the restoration of the software.
5. The method according to claim 4, further comprising, after the obtaining and saving the target operating variable of the software:
calculating and storing a first integrity characteristic value of the target operation variable;
the restoring the target operation variables of the self-healing position points one by one according to the storage sequence of the self-healing position points comprises the following steps:
according to the storage sequence of the self-healing position points, second integrity characteristic values of the target operation variables corresponding to the self-healing position points are calculated one by one;
and if the second integrity characteristic value is equal to the first integrity characteristic value, restoring the target operation variable of the current self-healing position point, otherwise, judging that the restoration of the current self-healing position point fails.
6. The method according to claim 1, wherein if the software operation abnormality is detected, the recovering the software according to the target operation variable includes:
if the software is detected to be abnormal in operation, analyzing the type of the abnormal operation;
and if the type is the self-healing type, recovering the software according to the target operation variable, otherwise, restarting the software.
7. The method for recovering software according to claim 1, further comprising, after the recovering the software according to the target operating variable:
and acquiring and storing the abnormal information and the self-healing time recovered by the software.
8. A method for recovering software, comprising:
detecting whether the software runs abnormally when the software runs;
if the abnormal operation of the software is detected, calling a self-healing module to restore the software, acquiring and storing a target operation variable of the software when the self-healing module runs to a preset self-healing position point, and restoring the software according to the target operation variable when the self-healing module is called, wherein the number of the self-healing position points is at least one.
9. An electronic device, comprising:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the software recovery method of any one of claims 1 to 7 or the software recovery method of claim 8.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the software recovery method of any one of claims 1 to 7 or the software recovery method of claim 8.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110700003.6A CN115509803A (en) | 2021-06-23 | 2021-06-23 | Software recovery method, electronic device and storage medium |
PCT/CN2022/095332 WO2022267812A1 (en) | 2021-06-23 | 2022-05-26 | Software recovery method, electronic device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110700003.6A CN115509803A (en) | 2021-06-23 | 2021-06-23 | Software recovery method, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115509803A true CN115509803A (en) | 2022-12-23 |
Family
ID=84499426
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110700003.6A Pending CN115509803A (en) | 2021-06-23 | 2021-06-23 | Software recovery method, electronic device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115509803A (en) |
WO (1) | WO2022267812A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117931532B (en) * | 2024-03-25 | 2024-05-31 | 山东科技大学 | Multi-granularity recovery method for embedded system program supported by on-chip hardware |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7739547B2 (en) * | 2007-06-07 | 2010-06-15 | International Business Machines Corporation | Failure recovery and error correction techniques for data loading in information warehouses |
CN105550056B (en) * | 2015-12-11 | 2019-08-06 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of fault self-recovery system and its implementation based on system reconfiguration |
CN109391481A (en) * | 2017-08-02 | 2019-02-26 | 中国电信股份有限公司 | Virtualize network element failure self-healing method and device |
CN109189607B (en) * | 2018-08-13 | 2020-08-04 | 南京翼辉信息技术有限公司 | Method for restoring breakpoint of application program |
-
2021
- 2021-06-23 CN CN202110700003.6A patent/CN115509803A/en active Pending
-
2022
- 2022-05-26 WO PCT/CN2022/095332 patent/WO2022267812A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2022267812A1 (en) | 2022-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7886181B2 (en) | Failure recovery method in cluster system | |
CN115994044B (en) | Database fault processing method and device based on monitoring service and distributed cluster | |
CN108762118B (en) | Fault processing method and device between communication devices | |
CN108737153B (en) | Block chain disaster recovery system, method, server and computer-readable storage medium | |
CN115509803A (en) | Software recovery method, electronic device and storage medium | |
CN113672471A (en) | Software monitoring method, device, equipment and storage medium | |
CN116991559B (en) | Method and device for exiting uninterrupted sleep state process | |
CN109684117B (en) | Processor crash recovery method and device | |
US20200285520A1 (en) | Information processor, information processing system, and method of processing information | |
CN115904793B (en) | Memory transfer method, system and chip based on multi-core heterogeneous system | |
CN104158843A (en) | Storage unit invalidation detecting method and device for distributed file storage system | |
CN117271234A (en) | Fault diagnosis method and device, storage medium and electronic device | |
CN108964992B (en) | Node fault detection method and device and computer readable storage medium | |
CN110838940A (en) | Underground cable inspection task configuration method and device | |
CN115309585A (en) | Data recovery method and device, electronic equipment and storage medium | |
CN115495301A (en) | Fault processing method, device, equipment and system | |
CN117234787B (en) | Method and system for monitoring running state of system-level chip | |
CN114942687B (en) | Reset safety mechanism based on monitoring, implementation method and reset circuit | |
CN115543698B (en) | Data backup method, device, equipment and storage medium | |
CN107451035B (en) | Error state data providing method for computer device | |
CN116302641A (en) | Fault memory isolation method and device and electronic equipment | |
CN110569120B (en) | Processing method and device for timing task | |
CN114978891B (en) | Processing method, device and storage medium for BIOS configuration of network device | |
CN114356617B (en) | Error injection testing method, device, system and computing equipment | |
CN115963756A (en) | Electronic system start control method and device and monitoring system |
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 |