Reset processing and protection method, device, equipment, medium and vehicle

By diagnosing and analyzing the abnormal reset type when the controller chip is started and determining the protection strategy, the problem of unknown reset cannot be accurately handled in the existing technology, and the chip's safe operation and problem-solving efficiency is improved.

CN119225822APending Publication Date: 2024-12-31SHANGHAI LIXIANG AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310804746.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing controller software cannot accurately diagnose and handle unknown forms of reset after the chip is reset, resulting in difficulty in troubleshooting and chip downtime that cannot be saved.

Method used

By controlling the startup software operating system to diagnose the startup process when the chip is started, determine whether it is normal or abnormal startup, and decide whether to start the application software operating system based on the correspondence between the abnormal reset type and the preset protection logic, so as to realize the abnormal reset type Analysis and corresponding protection strategies.

Benefits of technology

Improves the diagnostic and processing accuracy of the chip in abnormal startup situations, and avoids chip damage caused by long-term continuous abnormal resets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225822A_ABST
    Figure CN119225822A_ABST
Patent Text Reader

Abstract

The invention relates to a reset processing and protection method, device and equipment, a medium and a vehicle, and the reset processing and protection method comprises the steps: responding to the starting of a chip, and controlling a starting software operation system to diagnose the starting process of the chip; controlling the starting software operating system to point the pointer position of the chip to a second position corresponding to the application software operating system from a first position corresponding to the starting software operating system under the condition that the starting process is determined to be normal starting, so as to start the application software operating system; when it is determined that the starting process is abnormal starting, an abnormal reset type corresponding to the abnormal starting is determined; and determining whether to start the application software operating system or not based on the corresponding relationship between the abnormal reset type and the preset protection logic, thereby analyzing the abnormal reset type when reset occurs, determining a corresponding protection strategy according to the analysis result, ensuring the safe operation of the chip, and improving the safety of the chip. And chip damage caused by long-time continuous abnormal reset is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a reset processing and protection method, device, equipment, medium and vehicle. Background Art

[0002] At present, there are many types of controller resets, such as soft reset triggered by software, hard reset triggered by watchdog, clock failure, voltage failure, illegal instruction trap, etc. In the existing controller software solution, when the controller chip is reset, it is diagnosed whether the reset is a known form of reset such as watchdog reset. If so, further processing is performed. When other unknown forms of reset occur in the controller, it is impossible to accurately diagnose and process.

[0003] As a result, the controller's chip diagnosis and processing strategies after reset are not sufficient, which can easily lead to problems such as difficulty in troubleshooting and chip downtime that cannot be rescued. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a reset processing and protection method, device, equipment, medium and vehicle.

[0005] A first aspect of an embodiment of the present disclosure provides a reset processing and protection method, the method comprising:

[0006] In response to the chip starting up, controlling the startup software operating system to diagnose the startup process of the chip;

[0007] When it is determined that the boot process is a normal boot, controlling the boot software operating system to point the pointer position of the chip from the first position corresponding to the boot software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system;

[0008] In the case where it is determined that the startup process is an abnormal startup, determining an abnormal reset type corresponding to the abnormal startup;

[0009] Based on the correspondence between the abnormal reset type and the preset protection logic, it is determined whether to start the application software operating system.

[0010] A second aspect of an embodiment of the present disclosure provides a reset processing and protection device, the device comprising:

[0011] A process diagnosis module, for controlling the startup software operating system to diagnose the startup process of the chip in response to the startup of the chip;

[0012] A first startup module, for controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system when determining that the startup process is a normal startup;

[0013] A first determination module is used to determine the abnormal reset type corresponding to the abnormal startup when determining that the startup process is an abnormal startup;

[0014] The second determination module is used to determine whether to start the application software operating system based on the corresponding relationship between the abnormal reset type and the preset protection logic.

[0015] A third aspect of an embodiment of the present disclosure provides an electronic device, the device comprising:

[0016] Memory;

[0017] Processor; and

[0018] A computer program, wherein the computer program is stored in a memory and is configured to be executed by a processor to implement the reset processing and protection method of the first aspect as described above.

[0019] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the reset processing and protection method as described in the first aspect above is implemented.

[0020] A fifth aspect of an embodiment of the present disclosure provides a vehicle, comprising the electronic device described in the third aspect.

[0021] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0022] The reset processing and protection method, device, equipment, medium and vehicle provided by the embodiments of the present disclosure can respond to chip startup, control the startup software operating system to diagnose the startup process of the chip, and determine whether the startup process of the chip is a normal startup or an abnormal startup. When it is determined that the startup process is a normal startup, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system, and then run the application software operating system normally. When it is determined that the startup process is an abnormal startup, the abnormal reset type corresponding to the abnormal startup is determined, and based on the corresponding relationship between the abnormal reset type and the preset protection logic, it is determined whether to start the application software operating system. In this way, when the chip startup is higher than you and the startup process is an abnormal startup, the abnormal reset type is analyzed, and the corresponding protection strategy is determined according to the analysis result to ensure the safe operation of the chip and avoid chip damage caused by long-term continuous abnormal reset. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0025] Figure 1 is a flow chart of a reset processing and protection method provided by an embodiment of the present disclosure;

[0026] Figure 2 It is a schematic diagram of a reset processing architecture design structure provided by an embodiment of the present disclosure;

[0027] Figure 3 is a flow chart of another reset processing and protection method provided by an embodiment of the present disclosure;

[0028] Figure 4 is a flow chart of determining whether to start an application software operating system provided by an embodiment of the present disclosure;

[0029] Figure 5 is a flow chart of another reset processing and protection method provided by an embodiment of the present disclosure;

[0030] Figure 6 is a flow chart of another reset processing and protection method provided by an embodiment of the present disclosure;

[0031] Figure 7 It is a structural schematic diagram of a reset processing and protection device provided by an embodiment of the present disclosure;

[0032] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0035] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0036] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0037] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0038] Typically, in existing controller software solutions, when the controller chip is reset, it is diagnosed whether the reset is a known form of reset such as a watchdog reset. If so, further processing is performed. When other unknown forms of reset occur in the controller, it is impossible to accurately diagnose and process. As a result, the diagnosis and processing strategy after the controller chip is reset is not sufficient, which can easily lead to problems such as difficulty in troubleshooting and chip downtime that cannot be rescued. To address this problem, the embodiments of the present disclosure provide a reset processing and protection method, which is described below in conjunction with specific embodiments.

[0039] Figure 1 It is a flowchart of a reset processing and protection method provided by an embodiment of the present disclosure. The method can be executed by a reset processing and protection device. The reset processing and protection device can be implemented in software and / or hardware. The reset processing and protection device can be configured in an electronic device, such as a server or a terminal or a server cluster, wherein the terminal can specifically include a mobile phone, a computer or a tablet computer, etc., and can also be any device that can be used to process the reset processing and protection method.

[0040] like Figure 1 As shown, the reset processing and protection method provided by the embodiment of the present disclosure includes the following steps.

[0041] S110 , in response to chip startup, controlling the startup software operating system to diagnose the startup process of the chip.

[0042] In an embodiment of the present disclosure, in response to chip startup, the electronic device controls the startup software operating system to diagnose the startup process of the chip.

[0043] In the disclosed embodiment, the startup software operating system is the first operating system that runs after the chip is started.

[0044] The startup software operating system is used to execute the processing logic after the chip is started, including the logic for diagnosing the startup process of the chip and the reset recording logic when an abnormal reset occurs, among which the main part is the reset recording logic when an abnormal hard reset occurs.

[0045] A hard reset is a hardware reset triggered by a watchdog, clock failure, voltage failure, illegal instruction trap, etc., such as a reset caused by voltage abnormality.

[0046] Specifically, in response to chip startup, the electronic device controls the startup software operating system to read the target variable in the preset area when the chip is started, determines whether the target variable is a preset variable, and then implements the logic of diagnosing the startup process of the chip.

[0047] S120. When it is determined that the boot process is a normal boot, control the boot software operating system to point the pointer position of the chip from the first position corresponding to the boot software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system.

[0048] In the embodiment of the present disclosure, after the electronic device diagnoses the startup process of the chip, if it determines that the target variable is a preset variable, it determines that the startup process is a normal startup.

[0049] When it is determined that the startup process is a normal startup, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system.

[0050] In the disclosed embodiment, the application software operating system is used to execute the application program, and is also used to execute the determination logic of abnormal reset and the reset recording logic when abnormal reset occurs, wherein the reset recording logic when abnormal soft reset occurs is mainly recorded. A unified application program interface for identifying reset calls is set in the application software operating system, and reset call logic corresponding to all applications is pre-set, and the reset call logic corresponding to all applications is managed through the unified application program interface.

[0051] A soft reset is a reset triggered by software, such as a reset caused by software operation exceptions. The application software operating system can identify all soft reset scenarios, including active reset requests and passive resets caused by exceptions. When a soft reset occurs, it requests to call a unified application software interface to record and store the reset history information corresponding to the soft reset in the volatile memory shared area.

[0052] S130: When it is determined that the startup process is an abnormal startup, determine an abnormal reset type corresponding to the abnormal startup.

[0053] In the embodiment of the present disclosure, after the electronic device diagnoses the startup process of the chip, if it determines that the target variable is a non-preset variable, it determines that the startup process is an abnormal startup.

[0054] In the case where it is determined that the startup process is an abnormal startup, an abnormal reset type corresponding to the abnormal startup is determined.

[0055] Specifically, when determining that the startup process is an abnormal startup, the electronic device determines the abnormal reset type corresponding to the abnormal startup according to the abnormal reset history information.

[0056] S140: Determine whether to start the application software operating system based on the correspondence between the abnormal reset type and the preset protection logic.

[0057] In the embodiment of the present disclosure, after determining the abnormal reset type corresponding to the abnormal startup, the electronic device determines whether to start the application software operating system based on the corresponding relationship between the abnormal reset type and the preset protection logic.

[0058] The preset protection logic is a pre-set execution logic for protecting the chip. Different preset protection logics corresponding to the abnormal reset type are set according to the abnormal reset type and the severity level of the abnormal reset.

[0059] Specifically, after determining the abnormal reset type corresponding to the abnormal startup, the electronic device determines whether the abnormal reset type satisfies the preset protection logic corresponding to the abnormal reset type based on the correspondence between the abnormal reset type and the preset protection logic. If the preset protection logic is satisfied, the application software operating system is started; otherwise, the application software operating system is not started.

[0060] In the disclosed embodiment, in response to chip startup, the startup software operating system can be controlled to diagnose the startup process of the chip to determine whether the startup process of the chip is a normal startup or an abnormal startup. When it is determined that the startup process is a normal startup, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system, and then run the application software operating system normally. When it is determined that the startup process is an abnormal startup, the abnormal reset type corresponding to the abnormal startup is determined, and based on the corresponding relationship between the abnormal reset type and the preset protection logic, it is determined whether to start the application software operating system. Thus, when the chip startup is higher than you and the startup process is an abnormal startup, the abnormal reset type is analyzed, and the corresponding protection strategy is determined according to the analysis result to ensure the safe operation of the chip and avoid chip damage caused by long-term continuous abnormal reset.

[0061] On the basis of the above-mentioned embodiments of the present disclosure, the abnormal reset type includes a hard reset and a soft reset. In S130, when it is determined that the startup process is an abnormal startup, the abnormal reset type corresponding to the abnormal startup is determined, which may specifically include: when it is determined that the startup process is an abnormal startup, reading the first reset history information in the volatile memory shared area and the second reset history information in the non-volatile memory shared area; when the first reset history information and the second reset history information are consistent, determining that the abnormal reset type is a soft reset; when the first reset history information and the second reset history information are inconsistent, determining that the abnormal reset type is a hard reset.

[0062] In the embodiment of the present disclosure, the volatile memory shared area and the non-volatile memory shared area are pre-set areas for sharing reset history information.

[0063] In the disclosed embodiment, due to the hardware characteristics of the memory area, if a soft reset occurs, the reset history information in the volatile memory shared area will not be cleared. Conversely, if a hard reset occurs, the reset history information in the volatile memory shared area will be cleared. Therefore, by reading the first reset history information in the volatile memory shared area and the second reset history information in the non-volatile memory shared area, it can be determined whether the abnormal reset type is a hard reset or a soft reset based on the first reset history information and the second reset history information. When the first reset history information and the second reset history information are consistent, the abnormal reset type is determined to be a soft reset. When the first reset history information and the second reset history information are inconsistent, the abnormal reset type is determined to be a hard reset.

[0064] In the disclosed embodiment, the type of abnormal reset can be quickly determined based on the reset history information in the shared area by using the pre-set volatile memory shared area and non-volatile memory shared area, as well as the hardware characteristics of the volatile memory shared area, thereby further improving the rate of determining the type of abnormal reset.

[0065] Figure 2 is a schematic diagram of a reset processing architecture design structure provided by an embodiment of the present disclosure, such as Figure 2 As shown, the reset processing architecture includes a startup software operating system, an application software operating system and a protection software operating system.

[0066] In the embodiment of the present disclosure, when it is determined not to start the application software operating system based on the correspondence between the abnormal reset type and the preset protection logic, the protection software operating system is started.

[0067] The protection software operating system is used to report fault information corresponding to the abnormal reset type to avoid frequent abnormal resets and damage to the chip.

[0068] In the embodiment of the present disclosure, the reset processing and protection of the chip and the system are achieved through the collaboration between the startup software operating system, the application software operating system and the protection software operating system.

[0069] Figure 3 is a flow chart of another reset processing and protection method provided by an embodiment of the present disclosure, such as Figure 3 As shown, when it is determined that the abnormal reset type is a soft reset, steps S310-S320 are executed.

[0070] S310: When it is determined that the abnormal reset type is a soft reset, determine a first target reset group corresponding to the soft reset from a preset reset group according to the first reset history information.

[0071] In the embodiment of the present disclosure, the preset reset group is a reset group pre-set according to the abnormal reset specific type corresponding to the abnormal reset type and the severity level of the abnormal reset specific type.

[0072] In the embodiments of the present disclosure, soft reset corresponds to specific types of abnormal soft reset, for example, the specific types of abnormal soft reset corresponding to soft reset may include data abnormality, memory abnormality, system timeout, system stack overflow, etc., and hard reset also corresponds to specific types of abnormal hard reset, for example, the specific types of abnormal hard reset corresponding to hard reset may include watchdog reset, voltage fault, over-voltage and under-voltage reset, etc.

[0073] According to the abnormal reset type, the specific abnormal reset type corresponding to the hard reset and soft reset, and the severity level of the specific abnormal reset type, multiple reset groups are pre-set. The reset group can be stored in the form of base address and offset, and masks can be used to access different reset groups during recording and judgment.

[0074] Among them, the severity levels can include general, medium, severe, etc., and can also be set according to customer needs.

[0075] In an embodiment of the present disclosure, the first reset history information stored in the shared area of ​​the volatile memory may include a pointer to a most recent reset record structure and a structure array recording the reset history, wherein the first historical reset information follows a first-in-first-out logic, wherein the structure includes at least the reset time, an enumeration representing the reset type, an enumeration representing the specific type of reset, the chip core where the reset is located and the core register value at the reset time, the memory location where the reset is located and the context stack, and when a chip security management module exists, it may also include the monitoring status of the chip security management module, etc.

[0076] Specifically, when determining that the abnormal reset type is a soft reset, the electronic device determines the specific type of abnormal soft reset corresponding to the soft reset according to the first reset history information, and then determines a first target reset group corresponding to the soft reset from a preset reset group.

[0077] S320: Determine whether to start an application software operating system according to the first preset protection logic and the first reset history information corresponding to the first target reset group.

[0078] In the embodiment of the present disclosure, after determining the first target reset group corresponding to the soft reset, the electronic device determines whether to start the application software operating system according to the first preset protection logic and the first reset history information corresponding to the first target reset group.

[0079] The first preset protection logic includes a first preset threshold for the soft reset to occur within a preset time period.

[0080] Figure 4 is a flow chart of determining whether to start an application software operating system provided by an embodiment of the present disclosure, such as Figure 4 As shown, determining whether to start the application software operating system according to the first preset protection logic and the first reset history information corresponding to the first target reset group may specifically include steps S3201-S3203.

[0081] S3201. Read first reset history information to determine the number of times a soft reset occurs within a first preset time period.

[0082] In the embodiment of the present disclosure, the first preset time period is a pre-set time period, and the customer can set it according to needs.

[0083] Specifically, the electronic device reads the first reset history information, determines the specific type of abnormal soft reset corresponding to the soft reset according to the first reset history information, and further determines the number of times the specific type of abnormal soft reset occurs within the first preset time period.

[0084] S3202: When the number of times does not exceed the first preset threshold, control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system.

[0085] In the embodiment of the present disclosure, when it is determined that the number of soft resets that occur within the first preset time period does not exceed the first preset threshold, indicating that the soft reset will not cause damage to the chip, etc., the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system.

[0086] S3203. When the number of times exceeds the first preset threshold, control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system, so as to start the protection software operating system.

[0087] In the embodiment of the present disclosure, when it is determined that the number of soft resets that occur within a first preset time period exceeds a first preset threshold, indicating that continuing to start the application software operating system will cause problems such as damage to the chip, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system, so as to start the protection software operating system, and then protect the chip through the protection software operating system.

[0088] In the embodiment of the present disclosure, the boot software operating system, the application software operating system, and the protection software operating system can share the reset history information through the volatile memory shared area and the non-volatile memory shared area.

[0089] In the disclosed embodiment, when it is determined that the abnormal reset type is a soft reset, the first reset history information can be read, and the number of times the soft reset occurs within a first preset time period can be determined based on the first reset history information. Whether to start the application software operating system or the protection software operating system can be determined based on whether the number exceeds a first preset threshold. In this way, the protection software operating system can be executed while the chip and the system are safe. At the same time, the protection software operating system can be used to ensure that the chip and the system are not damaged, thereby improving the accuracy of the reset processing and protection of the chip.

[0090] Figure 5 is a flowchart of another reset processing and protection method provided by an embodiment of the present disclosure, such as Figure 5 As shown, when it is determined that the abnormal reset type is a hard reset, steps S510-S540 are executed.

[0091] S510: When it is determined that the abnormal reset type is a hard reset, read the operation record information of the peripheral status register.

[0092] In the disclosed embodiment, since the application software operating system cannot recognize when a hard reset occurs, it is necessary to control the startup software operating system to read the operation record information of the peripheral status register after the chip is started, and determine the reset history information corresponding to the hard reset through the operation record information of the peripheral status register.

[0093] S520: Determine third reset history information corresponding to the hard reset according to the operation record information.

[0094] In the disclosed embodiment, the electronic device comprehensively determines the reset history information corresponding to the hard reset based on the operation record information, and then determines the third reset history information corresponding to the hard reset, and reads the third reset history information into the volatile memory shared area, wherein the third reset history information contains the same content as the first reset history information.

[0095] S530: Determine a second target reset group corresponding to the hard reset from the preset reset groups according to the third reset history information.

[0096] In the embodiment of the present disclosure, after determining the third reset history information corresponding to the hard reset, the electronic device determines a second target reset group corresponding to the hard reset from the preset reset group according to the third reset history information.

[0097] S540: Determine whether to start an application software operating system according to the second preset protection logic corresponding to the second target reset group and the third reset history information.

[0098] In the embodiment of the present disclosure, after determining the second target reset group, the electronic device determines whether to start the application software operating system according to the second preset protection logic and the third reset history information corresponding to the second target reset group.

[0099] The second preset protection logic includes a second preset threshold for a hard reset to occur within a preset time period.

[0100] In the disclosed embodiment, determining whether to start the application software operating system based on the second preset protection logic and the third reset history information corresponding to the second reset group may specifically include: reading the third reset history information to determine the number of times the hard reset occurs within the second preset time period; when the number does not exceed the second preset threshold, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system; when the number exceeds the second preset threshold, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system to start the protection software operating system.

[0101] In the embodiment of the present disclosure, the first preset time period is a pre-set time period, and the customer can set it according to needs.

[0102] Specifically, the electronic device reads the third reset history information, determines the specific type of abnormal hard reset corresponding to the hard reset according to the third reset history information, and then determines the number of times the specific type of abnormal hard reset occurs within the second preset time period. When it is determined that the number of times the hard reset occurs within the second preset time period does not exceed the second preset threshold, it means that the hard reset will not cause damage to the chip, etc., then the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system. When it is determined that the number of times the hard reset occurs within the second preset time period exceeds the second preset threshold, it means that continuing to start the application software operating system will cause damage to the chip, etc., then the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system to start the protection software operating system, and then the chip is protected by the protection software operating system.

[0103] In the disclosed embodiment, when it is determined that the abnormal reset type is a hard reset, the third reset history information corresponding to the hard reset can be determined by reading the operation record information of the peripheral status register, and then according to the third reset history information and the second target reset group corresponding to the hard reset, it is determined whether to start the application software operating system or the protection software operating system. In this way, the protection software operating system is executed while the chip and the system are safe. At the same time, the protection software operating system can be used to ensure that the chip and the system are not damaged, thereby improving the accuracy of the reset processing and protection of the chip.

[0104] Figure 6 is a flowchart of another reset processing and protection method provided by an embodiment of the present disclosure, such as Figure 5 As shown, the reset processing and protection method includes steps S610-S6010.

[0105] S610 , in response to chip startup, controlling the startup software operating system to diagnose the startup process of the chip.

[0106] S620: When it is determined that the boot process is a normal boot, control the boot software operating system to point the pointer position of the chip from the first position corresponding to the boot software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system.

[0107] S630: When it is determined that the startup process is an abnormal startup, determine an abnormal reset type corresponding to the abnormal startup.

[0108] In the embodiment of the present disclosure, the specific implementation of steps S610-S630 is similar to that of steps S110-S130, and will not be described in detail here.

[0109] When it is determined that the abnormal reset type is a soft reset, steps S640 - S650 are executed, and when it is determined that the abnormal reset type is a hard reset, steps S660 - S680 are executed.

[0110] S640: When it is determined that the abnormal reset type is a soft reset, determine a first target reset group corresponding to the soft reset from a preset reset group according to the first reset history information.

[0111] S650: Read first reset history information to determine the number of times the soft reset occurs within a first preset time period.

[0112] S660: When it is determined that the abnormal reset type is a hard reset, read the operation record information of the peripheral status register.

[0113] S670: Determine third reset history information corresponding to the hard reset according to the operation record information, and determine a second target reset group corresponding to the hard reset from the preset reset group according to the third reset history information.

[0114] S680: Read third reset history information to determine the number of times the hard reset occurs within the second preset time period.

[0115] In the embodiment of the present disclosure, the number of times in step S650 or step S680 is compared with a preset threshold to determine whether the number of resets exceeds the preset threshold. If it does not exceed the preset threshold, S690 is executed, and if it exceeds the preset threshold, S6010 is executed.

[0116] S690, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system.

[0117] S6010, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system, so as to start the protection software operating system.

[0118] In the disclosed embodiment, the startup process of the chip is diagnosed by controlling the startup software operating system to determine whether the startup process is abnormal. In the case of abnormal startup process, the abnormal reset type is further judged. When the abnormal reset type is determined to be a hard reset or a soft reset, the number of times the hard reset or soft reset occurs within a preset time period is determined based on the reset history information corresponding to the hard reset or soft reset and the target reset group. Then, the protection strategy is further determined based on the number of occurrences, that is, whether to continue to start the application software operating system or to start the protection software operating system. Therefore, by analyzing the reset type, the specific chip and system protection strategy can be determined to achieve reset processing and protection of the chip and system.

[0119] Based on the above embodiments of the present disclosure, after starting the protection software operating system, the reset processing and protection method may further include: based on the protection software operating system, reporting fault information corresponding to the abnormal reset type; controlling the protection software operating system to perform repair operations corresponding to the fault information.

[0120] In the disclosed embodiment, the protection software operating system can be connected to the diagnostic device, debugging device, update device, etc. through a wireless network or the like, and then control the diagnostic device, debugging device, update device, etc. to specifically perform corresponding repair operations to avoid the recurrence of the reset corresponding to the abnormal reset type.

[0121] In the disclosed embodiment, after starting the protection software operating system, the electronic device can read the abnormal reset history information corresponding to the abnormal reset type through the protection software operating system, and then determine the fault information corresponding to the abnormal reset type and report it, so as to facilitate the maintenance personnel to perform further maintenance. At the same time, the protection software operating system can also be controlled to perform the repair operation corresponding to the fault information to avoid the reset corresponding to the abnormal reset type from happening again.

[0122] Figure 7 It is a schematic diagram of the structure of a reset processing and protection device provided in an embodiment of the present disclosure. The reset processing and protection device in the embodiment of the present disclosure can be set in an electronic device, and the electronic device can be a server or a terminal or a server cluster, wherein the terminal can specifically include a mobile phone, a computer or a tablet computer, etc., and can also be any device that can be used to process the reset processing and protection method, etc., which is not limited here.

[0123] like Figure 7 As shown, the reset processing and protection device 700 may include a process diagnosis module 710 , a first starting module 720 , a first determination module 730 and a second determination module 740 .

[0124] The process diagnosis module 710 may be used to control the startup software operating system to diagnose the startup process of the chip in response to the chip startup.

[0125] The first startup module 720 can be used to control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system when determining that the startup process is a normal startup.

[0126] The first determining module 730 may be configured to determine an abnormal reset type corresponding to the abnormal startup when determining that the startup process is an abnormal startup.

[0127] The second determination module 740 may be configured to determine whether to start the application software operating system based on a correspondence between the abnormal reset type and the preset protection logic.

[0128] In the disclosed embodiment, in response to chip startup, the startup software operating system can be controlled to diagnose the startup process of the chip to determine whether the startup process of the chip is a normal startup or an abnormal startup. When it is determined that the startup process is a normal startup, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system, and then run the application software operating system normally. When it is determined that the startup process is an abnormal startup, the abnormal reset type corresponding to the abnormal startup is determined, and based on the corresponding relationship between the abnormal reset type and the preset protection logic, it is determined whether to start the application software operating system. Thus, when the chip startup is higher than you and the startup process is an abnormal startup, the abnormal reset type is analyzed, and the corresponding protection strategy is determined according to the analysis result to ensure the safe operation of the chip and avoid chip damage caused by long-term continuous abnormal reset.

[0129] In some embodiments of the present disclosure, abnormal reset types include hard reset and soft reset.

[0130] The first determination module 730 may include a first reading unit 7301 , a first determination unit 7302 , and a second determination unit 7303 .

[0131] The first reading unit 7301 may be configured to read the first reset history information in the volatile memory shared area and the second reset history information in the non-volatile memory shared area when it is determined that the startup process is an abnormal startup.

[0132] The first determining unit 7302 may be configured to determine that the abnormal reset type is a soft reset when the first reset history information and the second reset history information are consistent.

[0133] The second determining unit 7303 may be configured to determine that the abnormal reset type is a hard reset when the first reset history information and the second reset history information are inconsistent.

[0134] In some embodiments of the present disclosure, the second determining module 740 may include a third determining unit 7401 and a fourth determining unit 7402 .

[0135] The third determining unit 7401 may be configured to determine, when the abnormal reset type is determined to be a soft reset, a first target reset group corresponding to the soft reset from the preset reset groups according to the first reset history information.

[0136] The fourth determination unit 7402 may be configured to determine whether to start the application software operating system according to the first preset protection logic and the first reset history information corresponding to the first target reset group.

[0137] In some embodiments of the present disclosure, the first preset protection logic includes a first preset threshold for a soft reset to occur within a preset time period.

[0138] The fourth determining unit 7402 may include a first number determining subunit, a first controlling subunit, and a second controlling subunit.

[0139] The first number determination subunit may be used to read the first reset history information and determine the number of times the soft reset occurs within a first preset time period.

[0140] The first control subunit can be used to control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system when the number of times does not exceed the first preset threshold.

[0141] The second control subunit can be used to control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system to start the protection software operating system when the number of times exceeds the first preset threshold.

[0142] In some embodiments of the present disclosure, the second determining module 740 may include a second reading unit 7403 , a fifth determining unit 7404 , a sixth determining unit 7405 and a seventh determining unit 7406 .

[0143] The second reading unit 7403 may be configured to read the operation record information of the peripheral status register when determining that the abnormal reset type is a hard reset.

[0144] The fifth determining unit 7404 may be configured to determine third reset history information corresponding to the hard reset according to the operation record information.

[0145] The sixth determining unit 7405 may be configured to determine, according to the third reset history information, a second target reset group corresponding to the hard reset from the preset reset groups.

[0146] The seventh determination unit 7406 may be configured to determine whether to start the application software operating system according to the second preset protection logic corresponding to the second target reset group and the third reset history information.

[0147] In some embodiments of the present disclosure, the second preset protection logic includes a second preset threshold for a hard reset to occur within a preset time period.

[0148] The seventh determination unit 7406 may include a second number determination subunit, a third control subunit and a fourth control subunit.

[0149] The second number determination subunit may be used to read the third reset history information to determine the number of times the hard reset occurs within the second preset time period.

[0150] The third control subunit can be used to control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system to start the application software operating system when the number of times does not exceed the second preset threshold.

[0151] The fourth control subunit can be used to control the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system to start the protection software operating system when the number exceeds the second preset threshold.

[0152] In some embodiments of the present disclosure, the reset processing and protection device 700 may further include an information reporting module 750 and a repair module 760 .

[0153] The information reporting module 750 may be used to report fault information corresponding to the abnormal reset type based on the protection software operating system.

[0154] The repair module 760 may be used to control the protection software operating system to perform a repair operation corresponding to the fault information.

[0155] It should be noted that Figure 7 The reset processing and protection device 700 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.

[0156] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.

[0157] In the disclosed embodiment, Figure 8 The electronic device shown may be a server or a terminal or a server cluster, wherein the terminal may specifically include a mobile phone, a computer or a tablet computer, etc., or may be any device that can be used for reset processing and protection methods, etc., and is not limited here.

[0158] like Figure 8 As shown, the electronic device may include a processor 810 and a memory 820 storing computer program instructions.

[0159] Specifically, the processor 810 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0160] The memory 820 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 820 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 820 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 820 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 820 is a non-volatile solid-state memory. In a particular embodiment, the memory 820 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0161] The processor 810 reads and executes the computer program instructions stored in the memory 820 to perform the steps of the reset processing and protection method provided in the embodiment of the present disclosure.

[0162] In one example, the electronic device may further include a transceiver 830 and a bus 840. Figure 8 As shown, the processor 810, the memory 820 and the transceiver 830 are connected via a bus 840 and communicate with each other.

[0163] The bus 840 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 840 may include one or more buses.

[0164] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the reset processing and protection method provided by the embodiments of the present disclosure.

[0165] The above-mentioned storage medium may, for example, include a memory 820 of computer program instructions, and the above-mentioned instructions may be executed by the processor 810 of the electronic device to complete the reset processing and protection method provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0166] The disclosed embodiments further provide a vehicle, comprising the electronic device described in the above embodiments.

[0167] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0168] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A reset processing and protection method, characterized in that: The method comprises: In response to the chip starting up, controlling the startup software operating system to diagnose the startup process of the chip; When it is determined that the startup process is a normal startup, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system; In the case where it is determined that the startup process is an abnormal startup, determining an abnormal reset type corresponding to the abnormal startup; Based on the corresponding relationship between the abnormal reset type and the preset protection logic, it is determined whether to start the application software operating system.

2. The method according to claim 1, characterized in that The abnormal reset types include hard reset and soft reset; In the case where it is determined that the startup process is an abnormal startup, determining an abnormal reset type corresponding to the abnormal startup includes: In the case where it is determined that the startup process is an abnormal startup, reading the first reset history information in the volatile memory shared area and the second reset history information in the non-volatile memory shared area; When the first reset history information and the second reset history information are consistent, determining that the abnormal reset type is a soft reset; When the first reset history information and the second reset history information are inconsistent, it is determined that the abnormal reset type is a hard reset.

3. The method according to claim 2, characterized in that The determining whether to start the application software operating system based on the correspondence between the abnormal reset type and the preset protection logic includes: When determining that the abnormal reset type is a soft reset, determining a first target reset group corresponding to the soft reset from a preset reset group according to the first reset history information; Determine whether to start the application software operating system according to a first preset protection logic corresponding to the first target reset group and the first reset history information.

4. The method according to claim 3, characterized in that The first preset protection logic includes a first preset threshold value for the soft reset to occur within a preset time period; The determining whether to start the application software operating system according to the first preset protection logic corresponding to the first target reset group and the first reset history information includes: Reading the first reset history information to determine the number of times the soft reset occurs within a first preset time period; When the number of times does not exceed the first preset threshold, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system; When the number exceeds the first preset threshold, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system to start the protection software operating system.

5. The method according to claim 2, characterized in that: The determining whether to start the application software operating system based on the correspondence between the abnormal reset type and the preset protection logic includes: When determining that the abnormal reset type is a hard reset, reading the operation record information of the peripheral status register; Determine third reset history information corresponding to the hard reset according to the operation record information; determining, according to the third reset history information, a second target reset group corresponding to the hard reset from a preset reset group; Determine whether to start the application software operating system according to the second preset protection logic corresponding to the second target reset group and the third reset history information.

6. The method according to claim 5, characterized in that The second preset protection logic includes a second preset threshold value for the hard reset to occur within a preset time period; The determining whether to start the application software operating system according to the second preset protection logic corresponding to the second reset group and the third reset history information includes: Reading the third reset history information to determine the number of times the hard reset occurs within a second preset time period; When the number of times does not exceed the second preset threshold, controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system; When the number exceeds the second preset threshold, the startup software operating system is controlled to point the pointer position of the chip from the first position corresponding to the startup software operating system to the third position corresponding to the protection software operating system to start the protection software operating system.

7. The method according to claim 4 or 6, characterized in that: After the protection software operating system is started, the method further includes: Based on the protection software operating system, reporting the fault information corresponding to the abnormal reset type; The protection software operating system is controlled to execute a repair operation corresponding to the fault information.

8. A reset processing and protection device, characterized in that: include: A process diagnosis module, for controlling the startup software operating system to diagnose the startup process of the chip in response to the startup of the chip; A first startup module, for controlling the startup software operating system to point the pointer position of the chip from the first position corresponding to the startup software operating system to the second position corresponding to the application software operating system, so as to start the application software operating system, when determining that the startup process is a normal startup; A first determining module, configured to determine an abnormal reset type corresponding to the abnormal startup when determining that the startup process is an abnormal startup; The second determination module is used to determine whether to start the application software operating system based on the corresponding relationship between the abnormal reset type and the preset protection logic.

9. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A vehicle, characterized in that: Comprising the electronic device as claimed in claim 9.