Emergency rescue method, electronic equipment and computer storage medium for real-time operating system

By introducing emergency rescue mode into the real-time operating system and using repair data to upgrade the real-time operating system, the problem of abnormal and repeated device startups is solved and the normal operation of the device is ensured.

CN113568770BActive Publication Date: 2024-08-27ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010358236.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-29
Publication Date
2024-08-27
Estimated Expiration
2040-04-29

AI Technical Summary

Technical Problem

An abnormality occurs during the startup process of electronic equipment, causing the system to crash and cannot return to normal after restarting, causing the equipment to be unable to be used normally.

Method used

An emergency rescue method for a real-time operating system is provided. By starting the core program and entering the emergency rescue mode when the preset trigger conditions are met, the real-time operating system is upgraded using repair data to avoid abnormal restart cycles.

Benefits of technology

It effectively avoids the problem that the real-time operating system cannot start normally due to abnormalities during the startup process, ensures that the device can be repaired and upgraded in emergency rescue mode, and ensures the normal operation of the next startup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113568770B
    Figure CN113568770B
Patent Text Reader

Abstract

The embodiment of the present application provides an emergency rescue method for a real-time operating system, an electronic device, and a computer storage medium, wherein the emergency rescue method for the real-time operating system includes: starting the core program of the real-time operating system; when the real-time operating system meets a preset trigger condition, entering an emergency rescue mode for starting basic functions; in the emergency rescue mode, upgrading the real-time operating system according to the obtained repair data. This avoids the real-time operating system from being unable to start normally due to an abnormality during the startup process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic information technology, and in particular to an emergency rescue method of a real-time operating system, an electronic device, and a computer storage medium. Background Art

[0002] With the development of the electronic information industry, more and more electronic devices are widely used in all aspects of people's daily life. For some electronic devices, if an abnormality occurs during the startup process, it may cause the entire system to crash and need to be restarted to recover. However, for some abnormal situations, the system still cannot be restored to normal after restarting, which will cause the system to not operate normally and the electronic device cannot be used normally. Summary of the invention

[0003] In view of this, an embodiment of the present application provides an emergency rescue method for a real-time operating system to solve some or all of the above problems.

[0004] According to a first aspect of an embodiment of the present application, a real-time operating system emergency rescue method is provided, including: starting a core program of the real-time operating system; when the real-time operating system meets a preset trigger condition, entering an emergency rescue mode for starting basic functions; in the emergency rescue mode, upgrading the real-time operating system according to the obtained repair data.

[0005] According to the second aspect of an embodiment of the present application, an electronic device is provided, including: a startup module, used to start the core program of a real-time operating system; a trigger module, used to enter an emergency rescue mode for starting basic functions when the real-time operating system meets a preset trigger condition; and a rescue module, used to upgrade the real-time operating system according to the obtained repair data in the emergency rescue mode.

[0006] According to a third aspect of an embodiment of the present application, there is provided an electronic device comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an emergency rescue method of a real-time operating system such as the first aspect of an embodiment of the present application.

[0007] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the emergency rescue method of the real-time operating system as described in the first aspect of the embodiment of the present application is implemented.

[0008] According to the emergency rescue method of the real-time operating system provided by the embodiment of the present application, the core program of the real-time operating system is started; when the real-time operating system meets the preset trigger condition, the emergency rescue mode for starting the basic functions is entered; in the emergency rescue mode, the real-time operating system is upgraded according to the obtained repair data. Because after the real-time operating system starts the core program, it does not continue to start other programs, but determines whether the preset trigger condition is met. If the preset trigger condition is met, the emergency rescue mode is entered, and the real-time operating system is upgraded using the repair data, which avoids the real-time operating system from being unable to start normally due to anomalies during the startup process. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0010] Figure 1 A schematic diagram of a startup process of a real-time operating system provided in Example 1 of the present application;

[0011] Figure 2 A flowchart of an emergency rescue method for a real-time operating system provided in Embodiment 2 of the present application;

[0012] Figure 3 A logic block diagram of an emergency rescue method of a real-time operating system provided in Example 3 of the present application;

[0013] Figure 4 A schematic diagram of a system update method in an emergency rescue mode provided in Embodiment 4 of the present application;

[0014] Figure 5 A structural diagram of an electronic device provided in Embodiment 5 of the present application;

[0015] Figure 6 A structural diagram of another electronic device provided in Embodiment 5 of the present application;

[0016] Figure 7 A structural diagram of another electronic device provided in Embodiment 5 of the present application;

[0017] Figure 8 This is a structural diagram of an electronic device provided in Example 6 of the present application. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0019] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.

[0020] Embodiment 1

[0021] Reference Figure 1 , Figure 1 A schematic diagram of the startup process of a real-time operating system provided for Example 1 of the present application. It should be noted that in the present application, a real-time operating system (RTOS) may include a core program or an application program. A real-time operating system is an operating system that controls at least one real-time task to run in a coordinated manner. A real-time operating system can be installed on various electronic devices, such as smart speakers, routers, etc. Of course, this is only an exemplary description and does not mean that the present application is limited to this.

[0022] Figure 1 In the real-time operating system startup process, the following steps are included:

[0023] Step 101, execute the code stored in the startup read-only memory inside the micro control unit to perform the first step of initialization.

[0024] The initialization includes initialization of RAM. The microcontroller unit (MCU) is the main body for performing the first step of initialization. Of course, this is only an exemplary description, and other types of processors or processing units may also be used. The present application does not limit this. The boot read only memory (Boot ROM) stores program code for the first step of initialization.

[0025] Step 102: Execute the boot loader to perform the second initialization step.

[0026] The boot loader can initialize hardware devices, create memory space mapping, read real-time operating system images, etc.

[0027] Step 103: Start the core program of the real-time operating system.

[0028] The core program may include a basic program for running a real-time operating system.

[0029] Step 104: Start the application program of the real-time operating system.

[0030] Step 105: When a startup exception occurs in a core program or an application program running the real-time operating system, restart the real-time operating system.

[0031] If the abnormal situation occurs every time the electronic device is started, the startup process of the real-time operating system will fall into a cycle of "abnormal situation-restart the real-time operating system-abnormal situation", resulting in the electronic device being unable to start normally.

[0032] Embodiment 2

[0033] In combination with the startup process described in Example 1 of the present application, Example 2 of the present application provides an emergency rescue method for a real-time operating system, referring to Figure 2 As shown, Figure 2 This is a flowchart of an emergency rescue method for a real-time operating system provided in Embodiment 2 of the present application. The method can be applied to an electronic device installed with a real-time operating system. The method includes the following steps:

[0034] Step 201: Start the core program of the real-time operating system.

[0035] In combination with the startup process described in Example 1, before step 201, the code stored in the startup read-only memory inside the microcontroller unit can also be executed to perform the first step of initialization, and then the boot loader is executed to perform the second step of initialization. Of course, this is only an optional solution and does not mean that the present application is limited to this.

[0036] Step 202: When the real-time operating system meets a preset trigger condition, it enters an emergency rescue mode for starting basic functions.

[0037] It should be noted that in the emergency rescue mode, the real-time operating system can only start basic functions. For example, the basic functions may include at least one of the functions such as network connection, data transmission, system upgrade, etc. In addition, in the emergency rescue mode, the real-time operating system may not start the application. Of course, this is just an exemplary description. The emergency rescue mode is a rescue mode for the real-time operating system in an emergency situation. The effects that can be achieved by the emergency rescue mode include at least one of the following: only starting basic functions, not starting the application at this time, which can avoid abnormal situations in the application operation and thus cause abnormal startup of the entire real-time operating system; as described in step 203, repair the real-time operating system so that it can start normally next time.

[0038] The preset trigger condition may include at least one judgment criterion. For example, the preset trigger condition includes determining, based on historical abnormality information, that the number of times the real-time operating system starts abnormally within a preset time period is greater than or equal to a preset threshold. For another example, the preset trigger condition includes that the user's input operation conforms to a preset operation mode. Here, two specific implementation methods are listed for illustration:

[0039] Optionally, in a first implementation, when it is determined based on historical exception information that the number of times the real-time operating system starts abnormally within a preset time period is greater than or equal to a preset number of times (i.e., the real-time operating system meets a preset trigger condition), an emergency rescue mode for starting basic functions is entered. It can also be considered that the preset trigger condition is that the number of times the real-time operating system starts abnormally within a preset time period is greater than or equal to a preset number of times. Of course, it is also possible to determine based on historical exception information that the number of times the real-time operating system continuously starts abnormally is greater than or equal to a preset number of times, and then determine that the real-time operating system meets the preset trigger condition. At this time, the preset trigger condition is that the number of times the real-time operating system continuously starts abnormally is greater than or equal to a preset number of times. The preset number of times can be 2 times or 3 times, or 5 times, 10 times, etc., and this application does not limit this.

[0040] Further optionally, the historical exception information is updated according to the startup exception of the real-time operating system. For example, the method further includes: when the real-time operating system starts abnormally, updating the historical exception information.

[0041] It should be noted that the historical abnormal information may include a historical record of abnormal startup of the real-time operating system. For example, the historical abnormal information may include the number of abnormal startups of the real-time operating system and the time of abnormal startup. The historical abnormal information may record abnormal startups of the real-time operating system within a period of time in the past. A period may be a week, a month or a year, and the present application is not limited to this. The historical abnormal information may be cleared periodically. For example, with a period of one month, the abnormal startup of the real-time operating system is recorded from January 1st. The historical abnormal information is updated every time a startup abnormality occurs. On February 1st, the historical abnormal information is cleared and the recording is restarted. On March 1st, the historical abnormal information is cleared and the recording is restarted. By analogy, of course, this is only an exemplary description and does not mean that the present application is limited to this. Compared with the period, the period of the historical abnormal information, the preset time period can be set to a shorter time. For example, the preset time period can be a time period with the current moment as the end moment and the time length as the preset time length; for example, if the preset time length is 5 minutes, the preset time period is the period of 5 minutes just past. Of course, this is only an exemplary description and does not mean that the present application is limited to this.

[0042] Furthermore, after determining that the last startup was abnormal, if it is determined based on historical abnormal information that the number of abnormal startups of the real-time operating system within a preset time period is greater than or equal to a preset number, it is determined that the real-time operating system meets the preset trigger condition. At this time, the preset trigger condition is that the last startup of the real-time operating system was abnormal, and the number of abnormal startups within the preset time period is greater than or equal to the preset number. If the last startup was normal, it is likely that the startup can be normal this time, so there is no need to enter the emergency rescue mode, which can reduce misoperation to a certain extent.

[0043] Optionally, in a second implementation, the preset trigger condition includes that the user's input operation conforms to a preset operation mode. When the user's input operation conforms to the preset operation mode (ie, the real-time operating system satisfies the preset trigger condition), an emergency rescue mode for starting basic functions is entered.

[0044] It should be noted that in the present application, the preset operation mode may be a key mode, and the key may be a single key or a combination of keys; it may be a physical key or a virtual key, and the preset operation mode may also be a touch operation mode. Here, several examples are listed to illustrate the preset operation mode. For example, the preset operation mode may include pressing / touching key A twice in a short detection time, and the detection time may be 3 seconds or 5 seconds, or 7 seconds, etc.; for another example, the preset operation mode may include pressing / touching key A and holding it for a certain time (it can also be said to be long pressing key A), pressing / touching key A for more than 3 seconds, or pressing / touching key A for more than 5 seconds, or pressing / touching key A for more than 7 seconds; for another example, the preset operation mode may include pressing / touching key A and key B at the same time; for another example, the preset operation mode may include pressing / touching key A twice after pressing / touching key A; for another example, the preset operation mode may include pressing / touching key A, key B, and key C at the same time. For example, the preset operation mode may include single-point touching on the touch screen and sliding along a preset trajectory, which may be circular or zigzag; for example, the preset operation mode may include two-point touching on the touch screen and sliding along a preset trajectory, which may be sliding back and forth. Of course, this is just an exemplary description, and it may also be a multi-point touch method such as three-point touching, and the present application does not limit this.

[0045] In the first implementation method, the electronic device can automatically enter the emergency rescue mode. In another implementation method, the user can actively control the electronic device to enter the emergency rescue mode. Both implementation methods can prevent the real-time operating system from repeatedly attempting to start up, but instead entering the emergency rescue mode, so that the electronic device can be controlled in the emergency rescue mode and will not fall into a loop.

[0046] It should be noted that in some preset scenarios, it is not necessary to enter the emergency rescue mode. In an optional embodiment, when the real-time operating system meets the preset trigger conditions, the emergency rescue mode for starting the basic functions is entered, including: when it is determined that the real-time operating system is a non-preset scenario and meets the preset trigger conditions, the emergency rescue mode for starting the basic functions is entered. The scene mode of the real-time operating system can be controlled by the user. For example, the method also includes: triggering the interactive operation of the scene switch, setting the real-time operating system to the preset scene, and prohibiting the real-time operating system from entering the emergency rescue mode in the preset scenario. For another example, the method also includes: triggering the interactive operation of the scene switch, setting the real-time operating system to a non-preset scene. Of course, this is just an exemplary explanation. In the preset scenario, not entering the emergency rescue mode can make the user control more flexible.

[0047] Optionally, in one embodiment of the present application, the method further includes: after entering the rescue mode, performing an indication operation in the emergency rescue state. For example, the indicator light can be controlled to flash, and the flashing of the indicator light can prompt the user that the electronic device has entered the emergency rescue mode. It should be noted that the flashing mode of the indicator light can be preset. For example, the indicator light is always on to indicate that the emergency rescue mode has been entered; for example, the indicator light flashes in a cycle according to different brightnesses, and in a flashing cycle, it first lights up at a first brightness, then lights up at a second brightness, and then lights up at a third brightness, and so on. Of course, only three brightnesses are used as an example here for explanation; for example, the indicator light flashes in a cycle according to different colors, or the indicator light flashes in a cycle according to different time lengths. This application does not limit this. It should be noted that the indicator light is only a prompting method, and the electronic device can also prompt the user through sound or image, which is not limited by this application.

[0048] Optionally, when the real-time operating system does not meet the preset trigger conditions, the application in the real-time operating system can be started. If the real-time operating system meets the preset trigger conditions, it can be indicated that the real-time operating system has vulnerabilities to a large extent. At this time, entering the emergency rescue mode can avoid the real-time operating system from repeatedly starting and falling into a loop; if the real-time operating system does not meet the preset trigger conditions, it can be indicated that the real-time operating system can be started normally to a large extent, so the startup process can continue to be executed. After the real-time operating system has only started the core program, judging whether to enter the emergency rescue mode can also be understood as a prejudgment of whether the real-time operating system can start normally. If it is determined that the real-time operating system meets the preset trigger conditions, it indicates that it is very likely that it cannot start normally. If it is determined that the real-time operating system does not meet the preset conditions, it indicates that it is very likely that it can start normally. It can avoid abnormalities in the real-time operating system during the startup process and avoid falling into a repeated startup cycle.

[0049] Step 203: In the emergency rescue mode, the real-time operating system is upgraded according to the obtained repair data.

[0050] The repair data may be transmitted through an external device interface or received through a network interface, and this application does not limit this. Here, two implementation methods are listed for detailed description.

[0051] Optionally, in a first implementation, in an emergency rescue mode, the real-time operating system is upgraded according to the repair data obtained, including: in an emergency rescue mode, obtaining the repair data through data interaction with a server; and upgrading the real-time operating system according to the repair data.

[0052] It should be noted that the service end may include the cloud, servers, other network devices, etc., and this application does not impose any restrictions on this.

[0053] Specifically, obtaining repair data through data interaction with the server includes: establishing a network connection with the server; sending a repair data request to the server based on the network connection; receiving repair data sent by the server based on the repair data request. The repair data request is used to request to obtain repair data, that is, to request the server to send repair data to the electronic device. For example, a rescue report can be sent to the server, and the rescue report is used to request to upgrade the real-time operating system; receive the repair data sent by the server. A rescue report can be sent to the server through a network interface, and repair data can be received through the network interface. The real-time operating system is upgraded according to the repair data to ensure that the real-time operating system does not have an abnormality during the next startup.

[0054] Optionally, in a second implementation, the method further includes: obtaining repair data through an external device interface. For example, reading repair data on an external storage device through an external device interface; or receiving repair data transmitted by an external device through an external device interface. Of course, this is only an exemplary description and does not mean that the present application is limited to this.

[0055] After the real-time operating system is upgraded, the real-time operating system may be restarted. It should be noted that restarting the real-time operating system may be performed according to steps 201-202.

[0056] In this embodiment, the core program of the real-time operating system is started; when the real-time operating system meets the preset trigger condition, the emergency rescue mode for starting basic functions is entered; in the emergency rescue mode, the real-time operating system is upgraded according to the obtained repair data. Because after the real-time operating system starts the core program, it does not continue to start other programs, but determines whether the preset trigger condition is met. If the preset trigger condition is met, the emergency rescue mode is entered, and the real-time operating system is upgraded using the repair data, which avoids the real-time operating system from being unable to start normally due to anomalies during the startup process.

[0057] Embodiment 3

[0058] Based on the emergency rescue method of the real-time operating system described in the above-mentioned embodiment 2, the embodiment 3 of the present application provides a method for recording historical abnormal information, and the historical abnormal information described in the embodiment 2 is described in detail. Figure 3 As shown, Figure 3 A logic block diagram of an emergency rescue method of a real-time operating system provided in Embodiment 3 of the present application, the method can be applied to an electronic device installed with a real-time operating system, and the method comprises the following steps:

[0059] Step 301: When a startup exception occurs in a real-time operating system, update the historical record information.

[0060] Specifically, the information of this startup abnormality can be added to the historical record information, for example, the time of this startup abnormality can be added. It should be noted that the historical record information can be updated in real time, for example, every 5 minutes. If there is no startup abnormality, it remains unchanged. If a startup abnormality occurs, the record is updated.

[0061] Step 302: Restart the real-time operating system.

[0062] Step 303: After starting the core program of the real-time operating system, if it is determined that the last startup of the real-time operating system was abnormal, a health check is performed on the real-time operating system.

[0063] Step 304: read the historical record information, and determine whether the real-time operating system meets the preset trigger condition according to the historical record information.

[0064] In this embodiment, if it is determined based on historical record information that the real-time operating system has 10 startup exceptions within 5 minutes, it is determined that the real-time operating system meets the preset trigger condition, that is, the preset trigger condition is that the real-time operating system has 10 startup exceptions within 5 minutes.

[0065] 306. When the real-time operating system meets the preset triggering conditions, it enters the emergency rescue mode.

[0066] 307. When the real-time operating system does not meet the preset trigger condition, continue to start the application program of the real-time operating system.

[0067] In this embodiment, after the real-time operating system starts abnormally, the real-time operating system is restarted. At this time, after starting the core program, other programs are not started continuously, but it is determined whether the preset trigger conditions are met. If the preset trigger conditions are met, the emergency rescue mode is entered, and the real-time operating system is upgraded using the repair data, thereby avoiding the real-time operating system from being unable to start normally due to an abnormality during the startup process.

[0068] Embodiment 4

[0069] Based on the emergency rescue method of the real-time operating system described in the above embodiment 2, the fourth embodiment of the present application provides a system upgrade method in an emergency rescue mode, and the system upgrade described in the second embodiment is described in detail. Figure 4 As shown, Figure 4 A schematic diagram of a system update method in an emergency rescue mode provided in Embodiment 4 of the present application, the method can be applied to an electronic device installed with a real-time operating system, in the emergency rescue mode of the electronic device, or in the emergency rescue mode of the real-time operating system, the method comprises the following steps:

[0070] Step 401: Establish a network connection with a server.

[0071] Establishing a network connection with the server can also be said to be establishing a data transmission link with the server, as long as data can be transmitted with the server.

[0072] Because the electronic device has been connected to the Internet normally before, a data transmission link is established with the server first, that is, the electronic device is connected to the network, or a network is built for the electronic device to ensure the basic network communication function of the electronic device.

[0073] Step 402: Send a repair data request to the server based on the network connection.

[0074] It should be noted that a cloud monitoring system can be set up on the server to monitor the emergency rescue mode. The repair data request can include a rescue report. The rescue (SOS) report is often accompanied by specific information about the startup abnormality. The server can notify relevant personnel or organizations. Based on the information in the rescue report, relevant personnel can quickly locate the cause of the problem and launch a version that fixes the problem.

[0075] Step 403: Check whether there is a new version of repair data.

[0076] Step 404: After the latest version of the repair data is found, the real-time operating system is upgraded.

[0077] It should be noted that the upgrade process is actually a repair process, and the repair data can be downloaded through Over the Air (OTA) technology. Of course, this is only an exemplary description and does not mean that the present application is limited to this. Specifically, the repair data can be downloaded through OTA technology, that is, through OTA technology, the repair data sent by the server based on the repair data request is received, and the real-time operating system is upgraded (repaired) using the repair data.

[0078] Step 405: After the system upgrade is completed, exit the rescue mode and restart the upgraded real-time operating system.

[0079] In this embodiment, in the emergency rescue mode, the repair data is downloaded and used to upgrade the real-time operating system, so that the upgraded real-time operating system can overcome the startup abnormality problem and the real-time operating system can start normally.

[0080] Embodiment 5

[0081] Based on the methods described in the above embodiments 1 to 4, the fifth embodiment of the present application provides an electronic device for executing the above methods, such as Figure 5 As shown, Figure 5 This is a structural diagram of an electronic device provided in Embodiment 5 of the present application. The electronic device 50 includes:

[0082] A startup module 501 is used to start the core program of the real-time operating system;

[0083] A trigger module 502, used to enter an emergency rescue mode for starting basic functions when the real-time operating system meets a preset trigger condition;

[0084] The rescue module 503 is used to upgrade the real-time operating system according to the obtained repair data in the emergency rescue mode.

[0085] Optionally, in an implementation of the present application, the trigger module 502 is further configured to enter an emergency rescue mode for starting basic functions when it is determined according to historical abnormality information that the number of abnormal startups of the real-time operating system within a preset time period is greater than or equal to a preset number of times. The preset trigger condition includes: determining according to historical abnormality information that the number of abnormal startups of the real-time operating system within a preset time period is greater than or equal to a preset threshold.

[0086] Optionally, in one implementation of the present application, Figure 6 As shown, the electronic device 50 further includes a history information module 504, which is used to update the history abnormality information when the real-time operating system starts abnormally. The history abnormality information is updated according to the startup abnormality of the real-time operating system.

[0087] Optionally, in an implementation of the present application, the trigger module 502 is further configured to enter an emergency rescue mode in which basic functions are activated when the user's input operation conforms to a preset operation mode. The preset trigger condition includes: the user's input operation conforms to a preset operation mode.

[0088] Optionally, in one implementation of the present application, Figure 7 As shown, the rescue module 503 includes a network unit 5031 and an upgrade unit 5032;

[0089] The network unit 5031 is used to obtain repair data through data interaction with the server in the emergency rescue mode;

[0090] The upgrading unit 5032 is used to upgrade the real-time operating system according to the repair data.

[0091] Optionally, in one implementation of the present application, the network unit 5031 is further used to establish a network connection with the server; send a repair data request to the server based on the network connection; and receive repair data sent by the server based on the repair data request.

[0092] Optionally, in an implementation of the present application, the rescue module 503 is further used to perform an indication operation of being in an emergency rescue state after entering the rescue mode.

[0093] Optionally, in an implementation of the present application, the startup module 501 is further configured to start an application program in the real-time operating system when the real-time operating system does not meet a preset trigger condition.

[0094] In this embodiment, the core program of the real-time operating system is started; when the real-time operating system meets the preset trigger condition, the emergency rescue mode for starting basic functions is entered; in the emergency rescue mode, the real-time operating system is upgraded according to the obtained repair data. Because after the real-time operating system starts the core program, it does not continue to start other programs, but determines whether the preset trigger condition is met. If the preset trigger condition is met, the emergency rescue mode is entered, and the real-time operating system is upgraded using the repair data, which avoids the real-time operating system from being unable to start normally due to anomalies during the startup process.

[0095] Embodiment 6

[0096] Based on the methods described in the above embodiments 1 to 4, the sixth embodiment of the present application provides an electronic device for executing the above methods, such as Figure 8 As shown, Figure 8This is a structural diagram of an electronic device provided in Example 6 of the present application. The electronic device 80 includes: a processor (processor) 802, a communication interface (Communications Interface) 804, a memory (memory) 806, and a communication bus 808.

[0097] The processor 802 , the communication interface 804 , and the memory 806 communicate with each other via a communication bus 808 .

[0098] The communication interface 804 is used to communicate with other electronic devices such as terminal devices or servers.

[0099] The processor 802 is used to execute the program 810, and specifically can execute the relevant steps in the embodiment of the emergency rescue method of the real-time operating system.

[0100] Specifically, the program 810 may include program codes, which include computer operation instructions.

[0101] The processor 802 may be a central processing unit (CPU) or a specific integrated circuit (ASIC).

[0102] (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the electronic device can be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0103] The memory 806 is used to store the program 810. The memory 806 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0104] The program 810 may be specifically used to enable the processor 802 to execute the method described in any one of the aforementioned embodiments 1 to 4.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding process descriptions in the aforementioned method embodiments and will not be repeated here.

[0106] Embodiment 7

[0107] Based on the methods described in the above-mentioned embodiments 1 to 4, embodiment 7 of the present application provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any one of embodiments 1 to 4 is implemented.

[0108] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0109] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the emergency rescue method of the real-time operating system described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the emergency rescue method of the real-time operating system shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the emergency rescue method of the real-time operating system shown here.

[0110] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0111] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.

Claims

1. An emergency rescue method for a real-time operating system, comprising: Starting the core program of the real-time operating system; triggering an interactive operation on a scene switch to set the real-time operating system to a preset scene, and prohibiting the real-time operating system from entering an emergency rescue mode under the preset scene; When it is determined that the real-time operating system is not in a preset scenario and meets a preset trigger condition, entering an emergency rescue mode in which basic functions are activated; The preset trigger condition includes: after determining that the last startup of the real-time operating system was abnormal, if the number of startup abnormalities within a preset time period is greater than or equal to a preset number; In the emergency rescue mode, upgrading the real-time operating system according to the obtained repair data; When the real-time operating system does not meet a preset trigger condition, an application program in the real-time operating system is started.

2. The method according to claim 1, wherein: The historical exception information is updated according to the startup exception of the real-time operating system.

3. The method according to claim 1, wherein: In the emergency rescue mode, upgrading the real-time operating system according to the obtained repair data includes: In the emergency rescue mode, the repair data is obtained by exchanging data with the server; The real-time operating system is upgraded according to the repair data.

4. The method according to claim 3, wherein: In the emergency rescue mode, obtaining the repair data through data interaction with the server includes: Establishing a network connection with the server; Sending a repair data request to the server based on the network connection; Receive the repair data sent by the server based on the repair data request.

5. The method according to claim 1, wherein: The method further comprises: Perform instruction operations in emergency rescue status.

6. An electronic device comprising: A startup module is used to start the core program of the real-time operating system; A trigger module, used to trigger an interactive operation on a scene switch, set the real-time operating system to a preset scene, and prohibit the real-time operating system from entering an emergency rescue mode under the preset scene; When it is determined that the real-time operating system is not in a preset scenario and meets a preset trigger condition, entering an emergency rescue mode in which basic functions are activated; The preset trigger condition includes: after determining that the last startup of the real-time operating system was abnormal, if the number of startup abnormalities within a preset time period is greater than or equal to a preset number; A rescue module, used for upgrading the real-time operating system according to the obtained repair data in the emergency rescue mode; The startup module is further configured to start an application program in the real-time operating system when the real-time operating system does not meet the preset trigger condition.

7. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the emergency rescue method of the real-time operating system as described in any one of claims 1-5.

8. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the emergency rescue method of the real-time operating system according to any one of claims 1 to 5 is implemented.