CN114706713A - Embedded operating system protection method and device, electronic equipment and storage medium - Google Patents

Embedded operating system protection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114706713A
CN114706713A CN202210365053.8A CN202210365053A CN114706713A CN 114706713 A CN114706713 A CN 114706713A CN 202210365053 A CN202210365053 A CN 202210365053A CN 114706713 A CN114706713 A CN 114706713A
Authority
CN
China
Prior art keywords
control unit
controlling
task
detected
operating system
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
CN202210365053.8A
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.)
Hunan Beiyun Technology Co ltd
Original Assignee
Hunan Beiyun Technology Co ltd
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 Hunan Beiyun Technology Co ltd filed Critical Hunan Beiyun Technology Co ltd
Priority to CN202210365053.8A priority Critical patent/CN114706713A/en
Publication of CN114706713A publication Critical patent/CN114706713A/en
Pending legal-status Critical Current

Links

Images

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/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2002Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where interconnections or communication control functionality are redundant
    • G06F11/2005Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where interconnections or communication control functionality are redundant using redundant communication controllers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides an embedded operating system protection method, which is applied to embedded equipment, wherein the embedded equipment comprises a first control unit and a second control unit, the first control unit and the second control unit are provided with the same embedded operating system, and when the running state of the first control unit is detected to be abnormal, the second control unit is controlled to run so as to continuously execute a target running task of the first control unit; and when the running state of the first control unit is detected to be recovered to be normal, controlling the first control unit to run so as to continuously execute the target running task. The dual-system is deployed through the first control unit and the second control unit, and the second control unit is controlled to operate when the operating state of the first control unit is abnormal, so that the operating system can continue to operate, and the safety of the embedded operating system is improved.

Description

Embedded operating system protection method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for protecting an embedded operating system, an electronic device, and a storage medium.
Background
In an embedded operating system, a system crash phenomenon often occurs due to system failure or program bugs and the like, and autonomous recovery is often impossible. When the user has such a fault in the using process, the fault can be solved only by restarting the power supply. But for some high security demanding scenarios this is certainly a dangerous way. Therefore, the existing embedded operating system has the problem of low security.
Disclosure of Invention
The embodiment of the invention provides a protection method of an embedded operating system, aiming at solving the problem of low security of the existing embedded operating system.
In a first aspect, an embodiment of the present invention provides a method for protecting an embedded operating system, which is applied to an embedded device, where the embedded device includes a first control unit and a second control unit, and the first control unit and the second control unit carry the same embedded operating system, and the method includes the following steps:
when the abnormal operation state of the first control unit is detected, controlling the second control unit to operate to continuously execute the target operation task of the first control unit;
and when the operating state of the first control unit is detected to be recovered to be normal, controlling the first control unit to operate so as to continuously execute the target operating task.
Optionally, the embedded device further includes a peripheral device, the first control unit is in signal connection with the peripheral device through a first control interface, the second control unit is in signal connection with the peripheral device through a second control interface, and the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit when the abnormal operation state of the first control unit is detected includes:
and when the abnormal operation state of the first control unit is detected, controlling the second control unit to communicate with the peripheral device through the second control interface so as to enable the peripheral device to execute the target operation task of the first control unit.
Optionally, when it is detected that the operating state of the first control unit returns to normal, controlling the first control unit to operate to continue to execute the target operating task includes:
and when the operation of the first control unit is detected to be recovered to normal, controlling the first control unit to communicate with the peripheral device through the first control interface so as to enable the peripheral device to continuously execute the target operation task of the first control unit.
Optionally, the embedded device further includes a storage unit, the storage unit is in signal connection with the first control unit and the second control unit respectively, and the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit when the abnormal operation state of the first control unit is detected includes:
when the operating state of the first control unit is detected to be abnormal, controlling the second control unit to read task data of the target operating task from the storage unit;
and controlling the second control unit to execute the target running task of the first control unit through the task data.
Optionally, before the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit when the operating state of the first control unit is detected to be abnormal, the method further includes:
acquiring a heartbeat packet of the first control unit or a mark which is written by the first control unit and runs normally;
and if the heartbeat packet or the normal operation mark is found to be wrong, determining that the operation state of the first control unit is abnormal.
Optionally, the method further includes:
and performing system recovery on the first control unit while controlling the second control unit to operate to execute the target operation task of the first control unit.
Optionally, the method further includes:
controlling the second control unit to reset the first control unit;
and when the second control unit fails to reset the first control unit, marking the running state of the first control unit as abnormal.
In a second aspect, an embodiment of the present invention provides an embedded operating system protection device, where the device includes:
the first control module is used for controlling the second control unit to operate to continuously execute the target operation task of the first control unit when the abnormal operation state of the first control unit is detected;
and the second control module is used for controlling the first control unit to operate to continuously execute the target operation task when the operating state of the first control unit is detected to be recovered to be normal.
In a third aspect, an embodiment of the present invention provides an electronic device, including: the embedded operating system protection method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the steps in the embedded operating system protection method provided by the embodiment of the invention are realized when the processor executes the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the embedded operating system protection method provided in the embodiment of the present invention are implemented.
In the embodiment of the invention, the method for protecting the embedded operating system is applied to the embedded equipment, the embedded equipment comprises a first control unit and a second control unit, the first control unit and the second control unit are carried with the same embedded operating system, and when the running state of the first control unit is detected to be abnormal, the second control unit is controlled to run so as to continuously execute the target running task of the first control unit; and when the running state of the first control unit is detected to be recovered to be normal, controlling the first control unit to run so as to continuously execute the target running task. The dual-system is deployed through the first control unit and the second control unit, and the second control unit is controlled to operate when the operating state of the first control unit is abnormal, so that the operating system can continue to operate, and the safety of the embedded operating system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for protecting an embedded operating system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an embedded operating system protection device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an embedded operating system protection device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is an architecture diagram of an embedded device according to an embodiment of the present invention, and the method for protecting an embedded operating system according to an embodiment of the present invention is applied to the embedded device, as shown in fig. 1, the embedded device includes a memory unit, a first control unit, a second control unit, and a peripheral device.
The embedded operating system may be a general embedded operating system, including but not limited to Linux, FreeRTOS, RTthread, hong meng, VxWorks, and the like.
The storage unit is respectively in signal connection with the first control unit and the second control unit, so that the first control unit and the second control unit can access the storage unit to read and write data. Specifically, the storage unit is a general storage unit, and in the embodiment of the present invention, the storage unit is an information storage unit that can be accessed by all common control units, including but not limited to ram or rom.
The first control unit and the second control unit can be both called control units, and the control units are units capable of independently implementing control application to peripheral devices. The first control unit and the second control unit may be implemented as two threads or processes on a multi-core control chip, or as two separate control chips. The first control unit and the second control unit can realize mutual independence and mutual noninterference among different control units; the first control unit and the second control unit can control peripheral devices of the system, the functions are the same or similar, and the external interfaces are the same.
The first control unit is in signal connection with the second control unit, specifically, the first control unit is in signal connection with the second control unit through a signal unit, and the signal unit is a unit for transmitting information between the control units, and may be implemented by using communication interfaces, such as gpio, uart, spi, i2c, i2s, can, and the like, or by writing a flag into a storage unit of the storage unit for querying by other control units.
The peripheral devices include, but are not limited to, gpio, uart, spi, i2c, i2s, can, rom, ram and related upper layer application components.
The first control unit and the peripheral device are connected with the a1 and a2 … an interfaces of the peripheral device through the first control interfaces b1 and b2 … bn, and control the peripheral device.
The second control unit and the peripheral device are connected with the a1 and a2 … an interfaces of the peripheral device through the second control interfaces c1 and c2 … cn, and under the condition that the first control unit works normally, the second control unit does not control the peripheral device, and controls the peripheral device when the running state of the first control unit is abnormal.
In a possible embodiment, the signal unit may be provided in the storage unit or the second control unit, but of course, the signal unit may also be provided in both the storage unit and the second control unit.
The first control unit writes a normal operation mark into a signal unit in the storage unit, and the second control unit monitors the signal unit in the storage unit to specifically monitor whether the normal operation mark is abnormal.
The first control unit sends a heartbeat packet to a signal unit in the second control unit, and the second control unit judges whether the first control unit normally operates or not by inquiring the heartbeat packet.
In the embodiment of the invention, the dual systems are deployed through the first control unit and the second control unit, and the second control unit is controlled to operate when the operating state of the first control unit is abnormal, so that the operating system can continue to operate, and the safety of the embedded operating system is improved.
Referring to fig. 2, fig. 2 is a flowchart of a method for protecting an embedded operating system according to an embodiment of the present invention, where the method for protecting an embedded operating system according to an embodiment of the present invention is applied to the embedded device, the embedded device includes a first control unit and a second control unit, and the first control unit and the second control unit carry the same embedded operating system, as shown in fig. 2, the method for protecting an embedded operating system includes:
201. and when the abnormal operation state of the first control unit is detected, controlling the second control unit to operate to continuously execute the target operation task of the first control unit.
In the embodiment of the present invention, the operation state exception may be an unrecoverable exception caused by the influence of a system failure. The system failure can cause the system to be incapable of normal operation and autonomous detection and recovery. Including but not limited to program exceptions, power supply exceptions, and system bugs.
The target running task may be an operating system running task, and when the first control unit runs the operating system running task abnormally, it indicates that the first control unit cannot continue to execute the current task. At this time, the second control unit may be controlled to perform the operating system execution task. So that the application of the embedded device is not affected.
The first control unit and the second control unit may be referred to as control units, and the control units are units capable of independently implementing control applications. The first control unit and the second control unit may be implemented as two threads or processes on a multi-core control chip, or as two separate control chips. The first control unit and the second control unit can realize mutual independence and mutual noninterference among different control units; the first control unit and the second control unit can control the system, the functions are the same or similar, and the external interfaces are the same.
202. And when the running state of the first control unit is detected to be recovered to be normal, controlling the first control unit to run so as to continuously execute the target running task.
In the embodiment of the invention, when the running state of the first control unit is detected to be recovered to be normal, the first control unit is controlled to execute the operating system running task, and the second control unit is stopped from executing the operating system running task.
The recovery of the operating state to normal can be understood as a system troubleshooting or repair.
Optionally, the embedded device further includes a peripheral device, the first control unit is in signal connection with the peripheral device through the first control interface, the second control unit is in signal connection with the peripheral device through the second control interface, and when the operating state of the first control unit is detected to be abnormal, the second control unit is controlled to operate to continue to execute the target operation task of the first control unit.
In the embodiment of the present invention, the peripheral devices may include, but are not limited to, gpio, uart, spi, i2c, i2s, can, rom, ram, and related upper application components.
Further, the first control unit and the peripheral device may be connected to the a1 and the a2 … an interfaces of the peripheral device through the first control interfaces b1 and b2 … bn, and control the peripheral device. The second control unit and the peripheral device can be connected with the a1 and a2 … an interfaces of the peripheral device through the second control interfaces c1 and c2 … cn, and under the condition that the first control unit works normally, the second control unit does not control the peripheral device and controls the peripheral device when the running state of the first control unit is abnormal.
When the running state of the first control unit is abnormal, the second control unit is connected with the a1 and a2 … an interfaces on the peripheral devices through the second control interfaces c1 and c2 … cn and communicates with the interfaces, so that the second control unit can realize control on the system.
Optionally, when it is detected that the operation state of the first control unit returns to normal, the first control unit is controlled to operate to continue to execute the target operation task, and when it is detected that the operation state of the first control unit returns to normal, the first control unit is controlled to communicate with the peripheral device through the first control interface, so that the peripheral device continues to execute the target operation task of the first control unit.
When the running state of the first control unit returns to normal, the first control unit is connected with the a1 and the a2 … an interfaces on the peripheral devices through the first control interfaces b1 and b2 … bn and communicates with the interfaces, so that the first control unit can realize control over the system.
Optionally, the embedded device further includes a storage unit, the storage unit is in signal connection with the first control unit and the second control unit respectively, and when the operating state of the first control unit is detected to be abnormal, the second control unit is controlled to operate to continue to execute the target operation task of the first control unit, and when the operating state of the first control unit is detected to be abnormal, the second control unit is controlled to read task data of the target operation task from the storage unit; and controlling the second control unit to execute the target operation task of the first control unit through the task data.
In the embodiment of the invention, the storage unit is respectively in signal connection with the first control unit and the second control unit, so that the first control unit and the second control unit can access the storage unit to read and write data. Specifically, the storage unit is a general storage unit, and in the embodiment of the present invention, the storage unit is an information storage unit that can be accessed by all common control units, including but not limited to ram or rom. The storage unit may store task data of the target operation task, and may also store state data of the first control unit and the second control unit.
Furthermore, a signal unit is integrated in the storage unit, the first control unit writes the operation state into the signal unit in the storage unit, and the second control unit can read the operation state of the first control unit from the signal unit in the storage unit.
Optionally, when the operating state of the first control unit is detected to be abnormal, before the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit, the heartbeat packet of the first control unit or the flag of normal operation written by the first control unit may also be acquired; and if the heartbeat packet or the normal operation mark is found to be wrong, determining that the operation state of the first control unit is abnormal.
In the embodiment of the invention, the operation state of the first control unit can be acquired and detected through the signal unit.
In a possible embodiment, the signal unit is arranged in the storage unit, the first control unit does not write a normal operation flag into the signal unit in the storage unit when the first control unit operates, the second control unit does not inquire the normal operation flag written by the first control unit into the signal unit in the storage unit, and when the normal operation flag is correct, the operation state of the first control unit is normal. Further, the flag of the normal operation may be a timestamp of the last time the first control unit writes the status, and when the operating status of the first control unit is determined, a difference between the timestamp of the current reading time of the second control unit and the timestamp of the last time the first control unit writes the status may be calculated, and if the difference is greater than a preset time threshold, the status of the first control unit is abnormal. If the difference is smaller than the preset time threshold, the state of the first control unit is normal.
In one possible embodiment, the signal unit is arranged in the second control unit, and the first control unit sends a heartbeat packet to the signal unit in the second control unit, wherein the heartbeat packet is used for indicating that the first control unit normally operates. When the first control unit does not send the heartbeat packet to the signal unit in the second control unit, the abnormal operation state of the first control unit is indicated. Or when the heartbeat packet sent by the first control unit is wrong, the operation state of the first control unit is abnormal. The heartbeat packet can include a running state slice of the first control unit and a heartbeat packet generation timestamp and a heartbeat packet transmission timestamp, the second control unit acquires the heartbeat packet from the signal unit, whether a difference value between the generation timestamp and the transmission timestamp is larger than a preset time threshold value or not is judged, if the difference value between the generation timestamp and the transmission timestamp is larger than the preset time threshold value, the state abnormity of the first control unit is explained, whether the system fault occurs in the first control unit can be further determined through the running state slice, and if the system fault occurs, the second control unit is controlled to take over a running task of an operating system. And if the difference value between the generation timestamp and the sending timestamp is less than or equal to a preset time threshold value, the state of the first control unit is normal.
Optionally, the system may be recovered for the first control unit while controlling the second control unit to operate to execute the target operation task of the first control unit.
In the embodiment of the invention, the signal unit is arranged in the second control unit, and the first control unit and the second control unit can communicate through the signal unit, so that the second control unit can control the reset of the first control unit. The second control unit controls the first control unit to reset through the signal unit while controlling the second control unit to operate to execute the target operation task of the first control unit, so that the aim of restarting the first control unit is fulfilled, and the first control unit does not need to be manually restarted.
Optionally, before the second control unit takes over the running task of the operating system, the second control unit may be further controlled to reset the first control unit; and when the second control unit fails to reset the first control unit, marking the running state of the first control unit as abnormal.
In a possible embodiment, please refer to fig. 3, fig. 3 is another method for protecting an embedded operating system according to an embodiment of the present invention, as shown in fig. 3, including:
301. the system operates.
In the embodiment of the invention, the system is an embedded operating system.
302. And the control unit works normally.
In the embodiment of the present invention, the first control unit may also be referred to as a first control unit.
303. The control unit sends a signal.
In the embodiment of the present invention, the first control unit sends a signal to the second control unit through the signal unit, and the second control unit may also be referred to as a second control unit.
304. The control unit II detects the signal.
In the embodiment of the invention, the second control unit detects the signal of the first control unit.
305. And judging whether the signal is normal or not.
In the embodiment of the invention, the second control unit judges whether the signal of the first control unit is normal. If the signal is normal, the process proceeds to step 302, and if the signal is abnormal, the process proceeds to step 306.
306. It is determined whether the abnormality detection flag is 1.
In the embodiment of the present invention, if it is 1, it indicates that the operation state of the first control unit is abnormal, and the second control unit already responds to the operation state abnormality of the first control unit, and step 310 is performed, and if it is not 1, it indicates that the operation state of the first control unit is abnormal, and the second control unit does not respond to the operation state abnormality of the first control unit, and step 307 is performed.
307. The abnormality detection flag is set to 1.
In the embodiment of the invention, the abnormality detection flag is set to 1, which indicates that the control unit II receives the operation state of the control unit I and responds.
308. The second control unit tries the first control unit.
In the embodiment of the invention, the control unit II tries the control unit I, so that the control unit I normally operates.
309. It is determined whether the reset was successful.
In the embodiment of the present invention, if the control unit two attempts the reset control unit one successfully, step 302 is performed, and if the control unit two attempts the reset control unit one fails, step 310 is performed.
310. The control unit takes over the system.
In the embodiment of the invention, the method for protecting the embedded operating system is applied to the embedded equipment, the embedded equipment comprises a first control unit and a second control unit, the first control unit and the second control unit are provided with the same embedded operating system, and when the running state of the first control unit is detected to be abnormal, the second control unit is controlled to run so as to continuously execute the target running task of the first control unit; and when the running state of the first control unit is detected to be recovered to be normal, controlling the first control unit to run so as to continuously execute the target running task. The dual-system is deployed through the first control unit and the second control unit, and the second control unit is controlled to operate when the operating state of the first control unit is abnormal, so that the operating system can continue to operate, and the safety of the embedded operating system is improved.
It should be noted that the protection method for the embedded operating system provided by the embodiment of the present invention may be applied to devices such as smart phones, computers, servers, and the like.
Optionally, referring to fig. 4, fig. 4 is a schematic structural diagram of an embedded operating system protection device according to an embodiment of the present invention, and as shown in fig. 4, the device includes:
the first control module 401 is configured to, when detecting that an operating state of a first control unit is abnormal, control a second control unit to operate to continue to execute a target operation task of the first control unit;
and a second control module 402, configured to, when it is detected that the operating state of the first control unit returns to normal, control the first control unit to operate so as to continue to execute the target operating task.
Optionally, the embedded device further includes a peripheral device, the first control unit is in signal connection with the peripheral device through a first control interface, the second control unit is in signal connection with the peripheral device through a second control interface, and the first control module 401 includes:
and the first control submodule is used for controlling the second control unit to communicate with the peripheral device through the second control interface when the operating state of the first control unit is detected to be abnormal, so that the peripheral device executes a target operating task of the first control unit.
Optionally, the second control module 402 includes:
and the second control submodule is used for controlling the first control unit to communicate with the peripheral device through the first control interface when the operation of the first control unit is detected to be recovered to normal so as to enable the peripheral device to continuously execute the target operation task of the first control unit.
Optionally, the embedded device further includes a storage unit, the storage unit is in signal connection with the first control unit and the second control unit respectively, and the first control module 401 includes:
the third control sub-module is used for controlling the second control unit to read the task data of the target operation task from the storage unit when the abnormal operation state of the first control unit is detected;
and the fourth control submodule is used for controlling the second control unit to execute the target operation task of the first control unit through the task data.
Optionally, before the first control module 401, the apparatus further includes:
an obtaining module, configured to obtain a heartbeat packet of the first control unit or a flag of normal operation written by the first control unit;
and the determining module is used for determining that the running state of the first control unit is abnormal if the heartbeat packet or the normal running mark is found to be wrong.
Optionally, the apparatus further comprises:
and the recovery module is used for performing system recovery on the first control unit while controlling the second control unit to run so as to execute the target running task of the first control unit.
Optionally, the apparatus further comprises:
the reset module is used for controlling the second control unit to reset the first control unit;
and the marking module is used for marking the running state of the first control unit as abnormal when the second control unit fails to reset the first control unit.
It should be noted that the embedded operating system protection device provided in the embodiment of the present invention may be applied to devices such as a smart phone, a computer, and a server that can perform graph-level service analysis.
The embedded operating system protection device provided by the embodiment of the invention can realize each process realized by the embedded operating system protection method in the method embodiment, and can achieve the same beneficial effect. To avoid repetition, further description is omitted here.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 5, including: memory 502, processor 501 and a computer program for an embedded operating system protection method stored on memory 502 and executable on processor 501, wherein:
the processor 501 is used for calling the computer program stored in the memory 502, and executing the following steps:
when the abnormal operation state of the first control unit is detected, controlling the second control unit to operate to continuously execute the target operation task of the first control unit;
and when the operating state of the first control unit is detected to be recovered to be normal, controlling the first control unit to operate so as to continuously execute the target operating task.
Optionally, the embedded device further includes a peripheral device, the first control unit is in signal connection with the peripheral device through a first control interface, the second control unit is in signal connection with the peripheral device through a second control interface, and the step, executed by the processor 501, of controlling the second control unit to run to continue to execute the target running task of the first control unit when the running state of the first control unit is detected to be abnormal includes:
and when the abnormal operation state of the first control unit is detected, controlling the second control unit to communicate with the peripheral device through the second control interface so as to enable the peripheral device to execute the target operation task of the first control unit.
Optionally, the controlling, executed by the processor 501, the first control unit to continue to execute the target operation task when it is detected that the operation state of the first control unit returns to normal includes:
and when the operation of the first control unit is detected to be recovered to normal, controlling the first control unit to communicate with the peripheral device through the first control interface so as to enable the peripheral device to continuously execute the target operation task of the first control unit.
Optionally, the embedded device executed by the processor 501 further includes a storage unit, the storage unit is respectively in signal connection with the first control unit and the second control unit, and the step of controlling the second control unit to operate to continue executing the target operation task of the first control unit when the abnormal operation state of the first control unit is detected includes:
when the operating state of the first control unit is detected to be abnormal, controlling the second control unit to read task data of the target operating task from the storage unit;
and controlling the second control unit to execute the target running task of the first control unit through the task data.
Optionally, before the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit when the processor 501 detects that the operation state of the first control unit is abnormal, the method further includes:
acquiring a heartbeat packet of the first control unit or a mark which is written by the first control unit and runs normally;
and if the heartbeat packet or the normal operation mark is found to be wrong, determining that the operation state of the first control unit is abnormal.
Optionally, the method executed by the processor 501 further includes:
and performing system recovery on the first control unit while controlling the second control unit to operate to execute the target operation task of the first control unit.
Optionally, the method executed by the processor 501 further includes:
controlling the second control unit to reset the first control unit;
and when the second control unit fails to reset the first control unit, marking the running state of the first control unit as abnormal.
It should be noted that the electronic device provided in the embodiment of the present invention may be applied to a smart phone, a computer, a server, and other devices that can perform embedded operating system protection.
The electronic equipment provided by the embodiment of the invention can realize each process realized by the embedded operating system protection method in the method embodiment, and can achieve the same beneficial effect. To avoid repetition, further description is omitted here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embedded operating system protection method or the application-side embedded operating system protection method provided in the embodiment of the present invention, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A protection method of an embedded operating system is characterized in that the protection method is applied to embedded equipment, the embedded equipment comprises a first control unit and a second control unit, the first control unit and the second control unit carry the same embedded operating system, and the protection method comprises the following steps:
when the abnormal operation state of the first control unit is detected, controlling the second control unit to operate to continuously execute the target operation task of the first control unit;
and when the operating state of the first control unit is detected to be recovered to be normal, controlling the first control unit to operate so as to continuously execute the target operating task.
2. The method as claimed in claim 1, wherein the embedded device further comprises a peripheral device, the first control unit is in signal connection with the peripheral device through a first control interface, the second control unit is in signal connection with the peripheral device through a second control interface, and the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit when the abnormal operation state of the first control unit is detected comprises:
and when the abnormal operation state of the first control unit is detected, controlling the second control unit to communicate with the peripheral device through the second control interface so as to enable the peripheral device to execute the target operation task of the first control unit.
3. The method according to claim 2, wherein the step of controlling the first control unit to operate to continue to execute the target operation task upon detecting that the operation state of the first control unit returns to normal comprises:
and when the operation of the first control unit is detected to be recovered to normal, controlling the first control unit to communicate with the peripheral device through the first control interface so as to enable the peripheral device to continuously execute the target operation task of the first control unit.
4. The method as claimed in claim 1, wherein the embedded device further comprises a storage unit, the storage unit is in signal connection with the first control unit and the second control unit respectively, and the step of controlling the second control unit to operate to continue to execute the target operation task of the first control unit when the abnormal operation state of the first control unit is detected comprises:
when the operating state of the first control unit is detected to be abnormal, controlling the second control unit to read task data of the target operating task from the storage unit;
and controlling the second control unit to execute the target running task of the first control unit through the task data.
5. The method of claim 1, wherein prior to the step of controlling the second control unit to operate to continue to perform the target operational task of the first control unit upon detection of an operational state anomaly of the first control unit, the method further comprises:
acquiring a heartbeat packet of the first control unit or a mark which is written by the first control unit and runs normally;
and if the heartbeat packet or the normal operation mark is found to be wrong, determining that the operation state of the first control unit is abnormal.
6. The method of claim 5, wherein the method further comprises:
and performing system recovery on the first control unit while controlling the second control unit to operate to execute the target operation task of the first control unit.
7. The method of claim 5, wherein the method further comprises:
controlling the second control unit to reset the first control unit;
and when the second control unit fails to reset the first control unit, marking the running state of the first control unit as abnormal.
8. An embedded operating system protection device, comprising:
the first control module is used for controlling the second control unit to operate to continuously execute the target operation task of the first control unit when the abnormal operation state of the first control unit is detected;
and the second control module is used for controlling the first control unit to operate to continuously execute the target operation task when the operating state of the first control unit is detected to be recovered to be normal.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor implementing the steps in the embedded operating system protection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps in the embedded operating system protection method according to any one of claims 1 to 7.
CN202210365053.8A 2022-04-08 2022-04-08 Embedded operating system protection method and device, electronic equipment and storage medium Pending CN114706713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210365053.8A CN114706713A (en) 2022-04-08 2022-04-08 Embedded operating system protection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210365053.8A CN114706713A (en) 2022-04-08 2022-04-08 Embedded operating system protection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114706713A true CN114706713A (en) 2022-07-05

Family

ID=82173323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210365053.8A Pending CN114706713A (en) 2022-04-08 2022-04-08 Embedded operating system protection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114706713A (en)

Similar Documents

Publication Publication Date Title
US9146839B2 (en) Method for pre-testing software compatibility and system thereof
US8677177B2 (en) Apparatus, a recovery method and a program thereof
US20080189570A1 (en) I/o device fault processing method for use in virtual computer system
US20100107148A1 (en) Check-stopping firmware implemented virtual communication channels without disabling all firmware functions
CN111538624A (en) Server power supply maintenance method, device, equipment and medium
US10102088B2 (en) Cluster system, server device, cluster system management method, and computer-readable recording medium
CN110865900A (en) Method for enhancing robustness of embedded system
US10360115B2 (en) Monitoring device, fault-tolerant system, and control method
US7840853B2 (en) CPU suppression system and CPU suppression method using service processor
CN115904793B (en) Memory transfer method, system and chip based on multi-core heterogeneous system
CN114706713A (en) Embedded operating system protection method and device, electronic equipment and storage medium
CN111400136A (en) Server-dedicated GPU fault protection device, method, equipment and medium
CN111078454A (en) Cloud platform configuration recovery method and device
WO2008004330A1 (en) Multiple processor system
CN111767242B (en) PCIE equipment control method and device, computer equipment and storage medium
CN111539044A (en) Server power firmware write protection control method, device, equipment and storage medium
CN111782515A (en) Web application state detection method and device, server and storage medium
CN114020561B (en) Fault reporting method, system, device, computer equipment and storage medium
CN115858222B (en) Virtual machine fault processing method, system and electronic equipment
CN112685086B (en) Information processing method and electronic equipment
CN114185606B (en) Method and device for improving system operation reliability based on embedded system
JPH10133963A (en) Fault detecting and recovering system for computer
JP3107054B2 (en) Minor fault handling system
CN108415788B (en) Data processing apparatus and method for responding to non-responsive processing circuitry
CN117472622A (en) Method, device, equipment and storage medium for isolating fault memory

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