Abnormal event backtracking method and device for microcontroller in vehicle and vehicle

By acquiring the microcontroller's operating status while the vehicle is in operation, identifying abnormal events, and performing multi-level backtracking operations, the problem of low efficiency in MCU anomaly localization is solved, achieving efficient anomaly localization.

CN121325829APending Publication Date: 2026-01-13CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511665267.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

In existing technologies, the anomaly localization efficiency of vehicle microcontrollers (MCUs) is low, making it impossible to efficiently solve problems in mass production scenarios.

Method used

While the vehicle is in operation, the microcontroller's working status is obtained, abnormal events are identified, and an abnormal backtracking strategy is determined based on the abnormal events. Multi-level backtracking operations are performed through the backtracking interface to obtain the backtracking results. After restarting, the results are verified and output to the chip for abnormal location.

Benefits of technology

This improves the efficiency of anomaly localization in the vehicle's MCU, enabling multi-level backtracking and accurate anomaly localization for abnormal events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121325829A_ABST
    Figure CN121325829A_ABST
Patent Text Reader

Abstract

The invention discloses an abnormal event backtracking method and device for a microcontroller in a vehicle and the vehicle, and the method comprises the steps: obtaining the working state of the microcontroller in the vehicle when the vehicle is in a running state; determining an abnormal event existing in the microcontroller in response to the fact that the working state is an abnormal working state; on the basis of the abnormal event, an abnormity backtracking strategy for the microcontroller is determined, and the abnormity backtracking strategy is used for representing a rule for executing backtracking operation on the microcontroller for the abnormal event; and calling an exception backtracking strategy, and executing backtracking operation on the microcontroller to obtain a backtracking result for the microcontroller. According to the invention, the technical problem of low efficiency of abnormal positioning of the MCU in the vehicle is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of vehicles, and in particular, to a method and device for backtracking an abnormal event of a microcontroller in a vehicle and the vehicle. BACKGROUND

[0002] At present, in the software design of a microcontroller (MCU) in most current vehicles, the positioning of an abnormal problem only depends on the problem positioning of a debugger in the development and debugging stage, which cannot guarantee the efficiency of solving problems when problems occur in the mass production scene of the vehicle, thereby causing the problem of low efficiency of abnormal positioning of the MCU in the vehicle.

[0003] At present, there is no effective solution to the technical problem of low efficiency of abnormal positioning of the MCU in the vehicle. SUMMARY

[0004] Embodiments of the present application provide a method and device for backtracking an abnormal event of a microcontroller in a vehicle and the vehicle to at least solve the technical problem of low efficiency of abnormal positioning of the MCU in the vehicle.

[0005] According to an aspect of embodiments of the present application, a method for backtracking an abnormal event of a microcontroller in a vehicle is provided, comprising: acquiring a working state of the microcontroller in the vehicle when the vehicle is in a running state; determining an abnormal event existing in the microcontroller in response to the working state being an abnormal working state; determining an abnormal backtracking strategy for the microcontroller based on the abnormal event, wherein the abnormal backtracking strategy is used to represent a rule for performing a backtracking operation on the microcontroller for the abnormal event; and calling the abnormal backtracking strategy to perform the backtracking operation on the microcontroller to obtain a backtracking result for the microcontroller.

[0006] Further, the microcontroller integrates a hardware system and a software system of the vehicle, and the abnormal event includes a first abnormal event existing in the hardware system and / or a second abnormal event existing in the software system, wherein in response to the working state being the abnormal working state, the abnormal event existing in the microcontroller is determined, including: in response to the working state of the hardware system being the abnormal working state, the abnormal event is determined as the first abnormal event; or, in response to the working state of the software system being the abnormal working state, the abnormal event is determined as the second abnormal event; or, in response to the working state of the hardware system being the abnormal working state and the working state of the software system being the abnormal working state, the abnormal event is determined as the first abnormal event and the second abnormal event.

[0007] Further, based on the abnormal event, an abnormal backtracking strategy for the microcontroller is determined, including: in response to the abnormal event being a first abnormal event, the abnormal backtracking strategy is determined as a first abnormal backtracking strategy, wherein the first abnormal backtracking strategy is used to represent the rule for performing a first backtracking operation on the hardware system in response to the first abnormal event, and the first backtracking operation is a multi-level backtracking operation performed on the hardware system; or, in response to the abnormal event being a second abnormal event, the abnormal backtracking strategy is determined as a second abnormal backtracking strategy, wherein the second abnormal backtracking strategy is used to represent the rule for performing a second backtracking operation on the software system in response to the second abnormal event, and the second backtracking operation is a multi-level backtracking operation performed on the software system; or, in response to the abnormal event being a first abnormal event and a second abnormal event, the abnormal backtracking strategy is determined as both a first abnormal backtracking strategy and a second abnormal backtracking strategy.

[0008] Furthermore, the exception backtracking strategy is invoked to perform a backtracking operation on the microcontroller and obtain the backtracking result for the microcontroller. This includes: invoking the exception backtracking strategy through the backtracking interface of the microcontroller to perform a backtracking operation on the microcontroller and obtain the backtracking result. The backtracking interface includes: a first backtracking interface corresponding to the first exception backtracking strategy and a second backtracking interface corresponding to the second exception backtracking strategy.

[0009] Furthermore, by invoking the exception backtracking strategy through the microcontroller's backtracking interface, a backtracking operation is performed on the microcontroller to obtain a backtracking result. This includes: responding to the exception backtracking strategy as a first exception backtracking strategy, invoking the first exception backtracking strategy through the first backtracking interface to perform a first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, obtaining a first backtracking result; or, responding to the exception backtracking strategy as a second exception backtracking strategy, invoking the second exception backtracking strategy through the second backtracking interface to perform a second backtracking operation corresponding to the second exception backtracking strategy on the software system, obtaining a second backtracking result; or, responding to the exception backtracking strategy as a first exception backtracking strategy and a second exception backtracking strategy, invoking the first exception backtracking strategy through the first backtracking interface to perform a first backtracking operation on the hardware system, and invoking the second exception backtracking strategy through the second backtracking interface to perform a second backtracking operation on the software system, obtaining a first backtracking result and a second backtracking result.

[0010] Furthermore, the method also includes: after the microcontroller calls the reset interface to complete the restart, verifying the backtracking result and obtaining the verification result; in response to the verification result indicating that the backtracking result has been successfully verified, outputting the backtracking result to the chip, wherein the chip is used to output the backtracking result to the cloud, and the cloud is used to use the backtracking result to locate the anomaly of the microcontroller.

[0011] Furthermore, in response to the verification result indicating that the backtracking result has been successfully verified, the backtracking result is output to the chip, including: in response to the verification result indicating that the first backtracking result has been successfully verified, the first backtracking result is output to the chip; or, in response to the verification result indicating that the second backtracking result has been successfully verified, the second backtracking result is output to the chip; or, in response to the verification result indicating that the first backtracking result and the second backtracking result have been successfully verified, the first backtracking result and the second backtracking result are output to the chip.

[0012] According to another aspect of the embodiments of this application, an abnormal event backtracking device for a microcontroller in a vehicle is also provided. The device may include: an acquisition unit, configured to acquire the working state of the microcontroller in the vehicle when the vehicle is in operation; a first determination unit, configured to determine an abnormal event existing in the microcontroller in response to the working state being an abnormal working state; a second determination unit, configured to determine an abnormal backtracking strategy for the microcontroller based on the abnormal event, wherein the abnormal backtracking strategy is used to represent the rules for performing a backtracking operation on the microcontroller in response to the abnormal event; and a backtracking unit, configured to invoke the abnormal backtracking strategy to perform a backtracking operation on the microcontroller and obtain a backtracking result for the microcontroller.

[0013] According to another aspect of the embodiments of this application, a vehicle is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0016] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.

[0017] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.

[0018] In this embodiment, when performing an anomaly backtracking operation on a microcontroller in a vehicle, the operating state of the microcontroller is obtained while the vehicle is running. In response to an abnormal operating state, an abnormal event is identified in the microcontroller. Based on the abnormal event, an anomaly backtracking strategy for the microcontroller is determined. The anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, yielding a backtracking result. Since this embodiment, based on the obtained operating state of the microcontroller, can determine an abnormal event if the operating state is abnormal, and based on the determined abnormal event, an anomaly backtracking strategy for the microcontroller can be determined, and then the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, a backtracking result can be obtained. This achieves the goal of multi-level backtracking for MCUs experiencing abnormal events, thereby solving the technical problem of low efficiency in anomaly localization of MCUs in vehicles, and ultimately improving the technical effect of improving the efficiency of anomaly localization of MCUs in vehicles. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1(a) is a schematic diagram of an application scenario of an abnormal event backtracking method for a microcontroller in a vehicle according to an embodiment of the present invention;

[0021] Figure 1(b) is a flowchart of an abnormal event backtracking method for a microcontroller in a vehicle according to an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of a kernel-based multi-core system exception backtracking architecture according to an embodiment of the present invention;

[0023] Figure 3 This is a structural block diagram of an abnormal event tracing device for a microcontroller in a vehicle according to an embodiment of the present invention;

[0024] Figure 4 This is a schematic diagram of a vehicle according to an embodiment of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] According to an embodiment of this application, an embodiment of an abnormal event backtracking method for a microcontroller in a vehicle is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0028] As an optional implementation, the above-described method for tracing back abnormal events of a microcontroller in a vehicle can be applied, but is not limited to, the application scenario shown in Figure 1(a). Figure 1(a) is a schematic diagram of an application scenario of a method for tracing back abnormal events of a microcontroller in a vehicle according to an embodiment of the present invention. As shown in Figure 1(a), in the application scenario, the terminal device 10 can communicate with the server 13 via the network 11, but is not limited to. The server 13 can perform operations on the database, such as writing or reading data. The terminal device 10 can include, but is not limited to, a human-machine interface screen, a processor, and a memory. The human-machine interface screen can be used, but is not limited to, to display a virtual machine on the mobile terminal 10. The vehicle 12 can be used, but is not limited to, to respond to the above-described human-machine interface operation, execute the corresponding operation, or generate the corresponding instruction and send the generated instruction to the server 13.

[0029] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here. Specifically, the vehicle risk warning method of this application may include: step S102, obtaining the operating state of the microcontroller in the vehicle while the vehicle is in operation; step S104, determining an abnormal event existing in the microcontroller in response to the operating state being an abnormal operating state; step S106, determining an abnormal backtracking strategy for the microcontroller based on the abnormal event; and step S108, invoking the abnormal backtracking strategy to perform a backtracking operation on the microcontroller and obtain a backtracking result for the microcontroller.

[0030] It should be noted that all information and data involved in this application (including but not limited to abnormal events and backtracking results) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of such data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0031] Figure 1(b) is a flowchart of an abnormal event backtracking method for a microcontroller in a vehicle according to an embodiment of the present invention. As shown in Figure 1(b), the method may include the following steps:

[0032] Step S112: While the vehicle is in operation, obtain the working status of the microcontroller in the vehicle.

[0033] In the technical solution provided in step S112 of the present invention, the operating state of the microcontroller can be a normal operating state or an abnormal operating state. For example, if the operating state of the hardware system integrated in the microcontroller is a normal operating state, and the operating state of the software system integrated in the microcontroller is a normal operating state, then the operating state of the microcontroller is a normal operating state; if the operating state of the hardware system integrated in the microcontroller is an abnormal operating state, and / or the operating state of the software system integrated in the microcontroller is an abnormal operating state, then the operating state of the microcontroller is an abnormal operating state. This is only an example and is not specifically limited.

[0034] In this embodiment, the operating status of the microcontroller in the vehicle is obtained while the vehicle is in operation. Optionally, this embodiment identifies the current state of the vehicle. If the current state is identified as an operating state, it indicates that the vehicle is in operation. When the vehicle is in operation, the operating status of the microcontroller in the vehicle can be obtained, that is, the operating status of the MCU in the vehicle can be obtained.

[0035] Step S114: In response to the abnormal operating state, determine the abnormal event existing in the microcontroller.

[0036] In the technical solution provided by step S114 of the present invention, the above-mentioned abnormal event may include: a first abnormal event existing in the hardware system, and / or a second abnormal event existing in the software system. The first abnormal event may indicate that the hardware system has a trap situation, and the second abnormal event may indicate that the software system has an error situation.

[0037] In this embodiment, after acquiring the operating status of the microcontroller in the vehicle while it is in operation, an abnormal event is determined in response to the abnormal operating status. Optionally, this embodiment, based on the acquired operating status of the microcontroller, determines whether the operating status is a normal operating status or an abnormal operating status. If the operating status is determined to be an abnormal operating status, an abnormal event is determined in the microcontroller, thereby achieving the purpose of identifying abnormal situations occurring in the microcontroller.

[0038] Optionally, the working state of the hardware system can be determined as either normal or abnormal, and the working state of the software system can also be determined as either normal or abnormal. A determination result can be obtained, where the hardware system is in an abnormal working state, the software system is in an abnormal working state, or both the hardware and software systems are in an abnormal working state. Based on these determination results, an abnormal event occurring in the microcontroller can be identified.

[0039] Step S116: Based on the abnormal event, determine the abnormal backtracking strategy for the microcontroller, wherein the abnormal backtracking strategy is used to represent the rules for performing backtracking operations on the microcontroller in response to the abnormal event.

[0040] In the technical solution provided by step S116 of the present invention, the above-mentioned anomaly backtracking strategy can be used to represent the rules for performing backtracking operations on the microcontroller in response to anomaly events.

[0041] In this embodiment, the above-mentioned anomaly backtracking strategy may include: a first anomaly backtracking strategy and a second anomaly backtracking strategy.

[0042] In this embodiment, the first anomaly backtracking strategy can be used to represent the rules for performing a first backtracking operation on the hardware system in response to a first anomaly event, wherein the first backtracking operation is a multi-level backtracking operation performed on the hardware system.

[0043] In this embodiment, the aforementioned second anomaly backtracking strategy can be used to represent the rules for performing a second backtracking operation on the software system in response to a second anomaly event, wherein the aforementioned second backtracking operation is a multi-level backtracking operation performed on the software system.

[0044] In this embodiment, after determining an abnormal event in response to an abnormal operating state, an abnormal backtracking strategy for the microcontroller is determined based on the abnormal event. Optionally, this embodiment compares the abnormal event with a first abnormal event and a second abnormal event to obtain a first comparison result. This first comparison result can be used to represent the relationship between the abnormal event and the first and second abnormal events. Based on the first comparison result, an abnormal backtracking strategy for the microcontroller can be determined, thereby achieving the goal of determining the rules for performing backtracking operations on the microcontroller in response to abnormal events.

[0045] It should be noted that the above method for determining the anomaly backtracking strategy for the microcontroller based on abnormal events is only an illustrative example and is not intended to impose specific limitations. Any method that can determine the anomaly backtracking strategy for the microcontroller based on the identification of an abnormal event is within the protection scope of the embodiments of this application, and will not be described in detail here.

[0046] Step S118: Invoke the exception backtracking strategy to perform a backtracking operation on the microcontroller and obtain the backtracking result for the microcontroller.

[0047] In the technical solution provided by step S118 of the present invention, the backtracking result can be represented in the form of backtracking data. The backtracking data may include: first backtracking data and / or second backtracking data. The first backtracking data is data generated during the backtracking operation on the hardware system, and the second backtracking data is data generated during the backtracking operation on the software system.

[0048] In this embodiment, after determining the anomaly backtracking strategy for the microcontroller based on the abnormal event, the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, thereby obtaining a backtracking result for the microcontroller. Optionally, this embodiment, based on the determined anomaly backtracking strategy for the microcontroller, compares the above-mentioned anomaly backtracking strategy with a first anomaly backtracking strategy and a second anomaly backtracking strategy to obtain a second comparison result. The second comparison result can be used to represent the relationship between the anomaly backtracking strategy and the first and second anomaly backtracking strategies. According to the second comparison result, the anomaly backtracking strategy that satisfies the second comparison result can be invoked to perform a backtracking operation on the microcontroller, thereby obtaining a backtracking result for the microcontroller. This achieves the purpose of multi-level backtracking for the MCU that has experienced an anomaly event.

[0049] In steps S112 to S118 of this application, when performing an anomaly backtracking operation on the microcontroller in the vehicle, the working state of the microcontroller in the vehicle is obtained while the vehicle is in operation; in response to an abnormal working state, an abnormal event existing in the microcontroller is determined; based on the abnormal event, an anomaly backtracking strategy for the microcontroller is determined; the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, and a backtracking result for the microcontroller is obtained. Since this embodiment, based on obtaining the working state of the microcontroller, if the working state is abnormal, an abnormal event existing in the microcontroller can be determined. Based on the determined abnormal event, an anomaly backtracking strategy for the microcontroller can be determined, and then the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, a backtracking result for the microcontroller can be obtained. This achieves the purpose of multi-level backtracking for MCUs experiencing abnormal events, thereby solving the technical problem of low efficiency in anomaly localization of MCUs in vehicles, and thus achieving the technical effect of improving the efficiency of anomaly localization of MCUs in vehicles.

[0050] The steps for determining the presence of an abnormal event in the microcontroller in response to an abnormal operating state, as described above in this embodiment, will be further described below.

[0051] As an optional embodiment, the microcontroller integrates the vehicle's hardware and software systems. Abnormal events include: a first abnormal event existing in the hardware system, and / or a second abnormal event existing in the software system. Step S114, in response to an abnormal operating state, determines an abnormal event existing in the microcontroller, including: in response to the hardware system's abnormal operating state, determining the abnormal event as a first abnormal event; or, in response to the software system's abnormal operating state, determining the abnormal event as a second abnormal event; or, in response to both the hardware and software systems being in an abnormal operating state, determining the abnormal event as both the first and second abnormal events.

[0052] In this embodiment, the microcontroller integrates the vehicle's hardware and software systems. The hardware system can be a system integrating hardware devices, and the software system can be an operating system (OS).

[0053] In this embodiment, the aforementioned abnormal event may include: a first abnormal event existing in the hardware system, and / or a second abnormal event existing in the software system. The first abnormal event may indicate a trap condition in the hardware system, and the second abnormal event may indicate an error condition in the software system.

[0054] In this embodiment, after acquiring the operating status of the microcontroller in the vehicle while it is in operation, and in response to the hardware system's abnormal operating status, the abnormal event is identified as the first abnormal event. Optionally, this embodiment, based on acquiring the microcontroller's operating status, determines whether the hardware system's operating status is normal or abnormal, and also determines whether the software system's operating status is normal or abnormal, obtaining a judgment result. If the judgment result indicates that the hardware system's operating status is abnormal, the abnormal event is identified as the first abnormal event, thereby achieving the goal of determining the abnormal situation of the microcontroller and improving the technical effect of determining abnormal events.

[0055] In this embodiment, after acquiring the operating status of the microcontroller in the vehicle while it is in operation, and in response to the software system's operating status being abnormal, the abnormal event is identified as a second abnormal event. Optionally, this embodiment, based on acquiring the microcontroller's operating status, determines whether the hardware system's operating status is normal or abnormal, and also determines whether the software system's operating status is normal or abnormal, obtaining a judgment result. If the judgment result indicates that the software system's operating status is abnormal, the abnormal event is identified as a second abnormal event, thereby achieving the goal of determining the abnormal situation of the microcontroller and improving the technical effect of determining abnormal events.

[0056] In this embodiment, after acquiring the operating status of the microcontroller in the vehicle while it is in operation, and in response to both the hardware and software systems being in an abnormal operating state, the abnormal events are identified as a first abnormal event and a second abnormal event. Optionally, this embodiment, based on the acquired microcontroller operating status, determines whether the hardware system is in a normal or abnormal operating state, and also determines whether the software system is in a normal or abnormal operating state, and obtains a judgment result. If the judgment result indicates that both the hardware and software systems are in an abnormal operating state, then the abnormal events are identified as a first abnormal event and a second abnormal event. This achieves the goal of determining the abnormal situation of the microcontroller, thereby improving the technical effect of improving the accuracy of abnormal event determination.

[0057] The following description further explains the steps of determining the exception backtracking strategy for the microcontroller based on the above-described exception events in this embodiment.

[0058] As an optional embodiment, step S116, determining an exception backtracking strategy for the microcontroller based on the exception event, includes: in response to the exception event being a first exception event, determining the exception backtracking strategy as a first exception backtracking strategy, wherein the first exception backtracking strategy is used to represent the rule for performing a first backtracking operation on the hardware system in response to the first exception event, and the first backtracking operation is a multi-level backtracking operation performed on the hardware system; or, in response to the exception event being a second exception event, determining the exception backtracking strategy as a second exception backtracking strategy, wherein the second exception backtracking strategy is used to represent the rule for performing a second backtracking operation on the software system in response to the second exception event, and the second backtracking operation is a multi-level backtracking operation performed on the software system; or, in response to the exception event being both a first exception event and a second exception event, determining the exception backtracking strategy as both a first exception backtracking strategy and a second exception backtracking strategy.

[0059] In this embodiment, the first anomaly backtracking strategy can be used to represent the rules for performing a first backtracking operation on the hardware system in response to a first anomaly event, wherein the first backtracking operation is a multi-level backtracking operation performed on the hardware system.

[0060] In this embodiment, after determining an abnormal event in the microcontroller in response to an abnormal operating state, and further, in response to the abnormal event being a first abnormal event, the abnormal backtracking strategy is determined as a first abnormal backtracking strategy. Optionally, based on the determined abnormal event, this embodiment compares the abnormal event with a first abnormal event and a second abnormal event to obtain a first comparison result. If the first comparison result indicates that the abnormal event is the first abnormal event, then the abnormal backtracking strategy is determined as the first abnormal backtracking strategy. This achieves the goal of determining the rules for performing backtracking operations on the microcontroller in response to abnormal events, thereby realizing the technical effect of improving the diversity of abnormal backtracking strategies.

[0061] In this embodiment, the aforementioned second anomaly backtracking strategy can be used to represent the rules for performing a second backtracking operation on the software system in response to a second anomaly event, wherein the aforementioned second backtracking operation is a multi-level backtracking operation performed on the software system.

[0062] In this embodiment, after determining an abnormal event in the microcontroller in response to an abnormal operating state, and further, in response to the abnormal event being a second abnormal event, the abnormal backtracking strategy is determined to be the second abnormal backtracking strategy. Optionally, based on the determined abnormal event, this embodiment compares the abnormal event with the first and second abnormal events to obtain a first comparison result. If the first comparison result indicates that the abnormal event is the second abnormal event, then the abnormal backtracking strategy is determined to be the second abnormal backtracking strategy. This achieves the goal of determining the rules for performing backtracking operations on the microcontroller in response to abnormal events, thereby realizing the technical effect of improving the diversity of abnormal backtracking strategies.

[0063] In this embodiment, after determining an abnormal event in the microcontroller in response to an abnormal operating state, and in response to whether the abnormal event is a first abnormal event or a second abnormal event, the abnormal backtracking strategy is determined to be a first abnormal backtracking strategy and a second abnormal backtracking strategy. Optionally, based on the determination of the abnormal event, this embodiment compares the abnormal event with the first and second abnormal events to obtain a first comparison result. If the first comparison result indicates that the abnormal event is either the first or second abnormal event, then the abnormal backtracking strategy is determined to be the first and second abnormal backtracking strategies. This achieves the goal of determining the rules for performing backtracking operations on the microcontroller in response to abnormal events, thereby realizing the technical effect of improving the diversity of abnormal backtracking strategies.

[0064] The following section further explains the steps of the above-described call exception backtracking strategy in this embodiment, which involves performing a backtracking operation on the microcontroller to obtain the backtracking result for the microcontroller.

[0065] As an optional embodiment, step S118, invoking the exception backtracking strategy to perform a backtracking operation on the microcontroller and obtaining a backtracking result for the microcontroller, includes: invoking the exception backtracking strategy through the backtracking interface of the microcontroller to perform a backtracking operation on the microcontroller and obtaining a backtracking result, wherein the backtracking interface includes: a first backtracking interface corresponding to the first exception backtracking strategy and a second backtracking interface corresponding to the second exception backtracking strategy.

[0066] In this embodiment, the aforementioned backtracking interface may include: a first backtracking interface corresponding to the first anomaly backtracking strategy, and a second backtracking interface corresponding to the second anomaly backtracking strategy.

[0067] In this embodiment, after determining the anomaly backtracking strategy for the microcontroller based on the abnormal event, the anomaly backtracking strategy is invoked through the microcontroller's backtracking interface to perform a backtracking operation on the microcontroller and obtain the backtracking result. Optionally, based on the determined anomaly backtracking strategy for the microcontroller, this embodiment compares the above anomaly backtracking strategy with a first anomaly backtracking strategy and a second anomaly backtracking strategy to obtain a second comparison result. According to the second comparison result, the anomaly backtracking strategy that satisfies the second comparison result can be invoked through the microcontroller's backtracking interface to perform a backtracking operation on the microcontroller and obtain the backtracking result for the microcontroller. This achieves the purpose of multi-level backtracking for MCUs that have experienced abnormal events, thereby realizing the technical effect of improving the efficiency of anomaly localization in vehicle MCUs.

[0068] The following section further explains the steps of this embodiment, which involve calling the exception backtracking strategy through the microcontroller's backtracking interface to perform a backtracking operation on the microcontroller and obtain the backtracking result.

[0069] As an optional implementation, an exception backtracking strategy is invoked through the microcontroller's backtracking interface to perform a backtracking operation on the microcontroller and obtain a backtracking result. This includes: responding to a first exception backtracking strategy by invoking the first exception backtracking strategy through the first backtracking interface to perform a first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, obtaining a first backtracking result; or, responding to a second exception backtracking strategy by invoking the second exception backtracking strategy through the second backtracking interface to perform a second backtracking operation corresponding to the second exception backtracking strategy on the software system, obtaining a second backtracking result; or, responding to both a first and a second exception backtracking strategy by invoking the first exception backtracking strategy through the first backtracking interface to perform a first backtracking operation on the hardware system, and invoking the second exception backtracking strategy through the second backtracking interface to perform a second backtracking operation on the software system, obtaining both a first backtracking result and a second backtracking result.

[0070] In this embodiment, the first backtracking result can be represented in the form of first backtracking data, wherein the first backtracking data is data generated during the backtracking operation of the hardware system.

[0071] In this embodiment, after determining the anomaly backtracking strategy for the microcontroller based on the abnormal event, in response to the anomaly backtracking strategy being a first anomaly backtracking strategy, the first anomaly backtracking strategy is invoked through the first backtracking interface to perform the first backtracking operation corresponding to the first anomaly backtracking strategy on the hardware system, resulting in the first backtracking result. Optionally, in this embodiment, based on determining the anomaly backtracking strategy for the microcontroller, the above anomaly backtracking strategy is compared with the first anomaly backtracking strategy and the second anomaly backtracking strategy to obtain a second comparison result. If the second comparison result indicates that the anomaly backtracking strategy is the first anomaly backtracking strategy, then the first anomaly backtracking strategy is invoked through the first backtracking interface to perform the first backtracking operation corresponding to the first anomaly backtracking strategy on the hardware system, resulting in the first backtracking result. This achieves the purpose of multi-level backtracking for the MCU experiencing an anomaly event, thereby realizing the technical effect of improving the efficiency of anomaly localization in the MCU of the vehicle.

[0072] In this embodiment, the second backtracking result can be represented in the form of second backtracking data, wherein the second backtracking data is data generated during the backtracking operation of the software system.

[0073] In this embodiment, after determining the anomaly backtracking strategy for the microcontroller based on the abnormal event, in response to the anomaly backtracking strategy being a second anomaly backtracking strategy, the second anomaly backtracking strategy is invoked through the second backtracking interface to perform the second backtracking operation corresponding to the second anomaly backtracking strategy on the software system, resulting in the second backtracking result. Optionally, this embodiment, based on determining the anomaly backtracking strategy for the microcontroller, compares the above anomaly backtracking strategy with the first and second anomaly backtracking strategies to obtain a second comparison result; if the second comparison result indicates that the anomaly backtracking strategy is the second anomaly backtracking strategy, then the second anomaly backtracking strategy is invoked through the second backtracking interface to perform the second backtracking operation corresponding to the second anomaly backtracking strategy on the software system, resulting in the second backtracking result. This achieves the purpose of multi-level backtracking for MCUs experiencing abnormal events, thereby realizing the technical effect of improving the efficiency of anomaly localization in vehicle MCUs.

[0074] In this embodiment, after determining the exception backtracking strategy for the microcontroller based on the exception event, in response to the exception backtracking strategy being a first exception backtracking strategy and a second exception backtracking strategy, the first exception backtracking strategy is invoked through the first backtracking interface to perform a first backtracking operation on the hardware system, and the second exception backtracking strategy is invoked through the second backtracking interface to perform a second backtracking operation on the software system, resulting in the first backtracking result and the second backtracking result. Optionally, based on the determined anomaly backtracking strategy for the microcontroller, the above anomaly backtracking strategy is compared with the first anomaly backtracking strategy and the second anomaly backtracking strategy to obtain a second comparison result. If the second comparison result indicates that the anomaly backtracking strategy is the first anomaly backtracking strategy and the second anomaly backtracking strategy, then the first anomaly backtracking strategy is called through the first backtracking interface to perform the first backtracking operation on the hardware system, and the second anomaly backtracking strategy is called through the second backtracking interface to perform the second backtracking operation on the software system. The backtracking result can be the first backtracking result and the second backtracking result, thereby achieving the purpose of multi-level backtracking for MCUs that have anomaly events, and thus realizing the technical effect of improving the efficiency of anomaly localization of MCUs in vehicles.

[0075] The abnormal event backtracking method of the microcontroller in the vehicle described in this embodiment will be further explained below.

[0076] As an optional embodiment, the method further includes: after the microcontroller calls the reset interface to complete the restart, verifying the backtracking result and obtaining the verification result; in response to the verification result indicating that the backtracking result has been successfully verified, outputting the backtracking result to the chip, wherein the chip is used to output the backtracking result to the cloud, and the cloud is used to use the backtracking result to locate the anomaly of the microcontroller.

[0077] In this embodiment, the reset interface can be linked to a reset software program.

[0078] In this embodiment, the verification result can be used to indicate whether the backtracking result has been successfully verified. For example, if the verification result indicates that the backtracking result has been successfully verified, then the backtracking data is valid data; if the verification result indicates that the backtracking result has failed to be verified, then the backtracking data is invalid data.

[0079] In this embodiment, after the microcontroller calls the reset interface to complete the restart, the backtracking result is verified to obtain the verification result. Optionally, after obtaining the backtracking result for the microcontroller, this embodiment has the microcontroller call the reset interface to complete the microcontroller restart, and then the obtained backtracking data is verified for data validity to obtain the verification result.

[0080] In this embodiment, the chip described above can be used to output the backtracking results to the cloud. For example, the chip can be, but is not limited to, a system-on-a-chip (SoC).

[0081] In this embodiment, the cloud can be used to locate anomalies in the microcontroller using the backtracking results.

[0082] In this embodiment, after the microcontroller completes a restart by calling the reset interface, the backtracking result is verified. Upon obtaining the verification result, indicating that the backtracking result has been successfully verified, the backtracking result is output to the chip. Optionally, this embodiment, based on the obtained verification result, performs result parsing. If the parsed result indicates that the backtracking result has been successfully verified, the backtracking result is output to the chip. This achieves the goal of using the chip to output the backtracking result to the cloud, and using the backtracking result in the cloud to perform anomaly localization on the microcontroller, thereby improving the efficiency of anomaly localization in the vehicle's MCU.

[0083] The following section further explains the steps of responding to the verification result in this embodiment, indicating that the backtracking result has been successfully verified, and outputting the backtracking result to the chip.

[0084] As an optional embodiment, in response to a verification result indicating that the backtracking result has been successfully verified, the backtracking result is output to the chip, including: in response to a verification result indicating that the first backtracking result has been successfully verified, the first backtracking result is output to the chip; or, in response to a verification result indicating that the second backtracking result has been successfully verified, the second backtracking result is output to the chip; or, in response to a verification result indicating that the first backtracking result and the second backtracking result have been successfully verified, the first backtracking result and the second backtracking result are output to the chip.

[0085] In this embodiment, after the microcontroller completes the restart by calling the reset interface, the backtracking result is verified. Upon obtaining the verification result, in response to the verification result indicating that the first backtracking result has been successfully verified, the first backtracking result is output to the chip. Optionally, based on the obtained verification result, this embodiment parses the verification result. If the parsed verification result indicates that the first backtracking result has been successfully verified, the first backtracking result is output to the chip. This achieves the goal of using the chip to output the first backtracking result to the cloud, and using the first backtracking result in the cloud to perform anomaly localization of the hardware system, thereby improving the efficiency of anomaly localization in the vehicle's MCU.

[0086] In this embodiment, after the microcontroller completes the restart by calling the reset interface, the backtracking result is verified. Upon obtaining the verification result, indicating that the second backtracking result has been successfully verified, the second backtracking result is output to the chip. Optionally, this embodiment, based on the obtained verification result, performs result parsing. If the parsed result indicates that the second backtracking result has been successfully verified, the second backtracking result is output to the chip. This achieves the goal of using the chip to output the second backtracking result to the cloud, and using the second backtracking result in the cloud to perform anomaly localization of the software system, thereby improving the efficiency of anomaly localization in the vehicle's MCU.

[0087] In this embodiment, after the microcontroller completes the restart by calling the reset interface, the backtracking results are verified. Upon obtaining the verification result, in response to the verification result indicating that the first and second backtracking results have been successfully verified, the first and second backtracking results are output to the chip. Optionally, based on the obtained verification results, this embodiment performs result parsing. If the parsed result indicates that the first and second backtracking results have been successfully verified, then the first and second backtracking results are output to the chip. This achieves the goal of using the chip to output the first and second backtracking results to the cloud, using the first backtracking result for hardware system anomaly localization, and using the second backtracking result for software system anomaly localization, thereby improving the efficiency of anomaly localization in the vehicle's MCU.

[0088] In this embodiment of the invention, when performing an anomaly backtracking operation on a microcontroller in a vehicle, the working state of the microcontroller is obtained while the vehicle is in operation; in response to an abnormal working state, an abnormal event is determined for the microcontroller; based on the abnormal event, an anomaly backtracking strategy for the microcontroller is determined; the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, and a backtracking result for the microcontroller is obtained. Since this embodiment, based on obtaining the working state of the microcontroller, if the working state is abnormal, an abnormal event can be determined for the microcontroller. Based on the determined abnormal event, an anomaly backtracking strategy for the microcontroller can be determined, and then the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, a backtracking result for the microcontroller can be obtained. This achieves the goal of multi-level backtracking for MCUs experiencing abnormal events, thereby solving the technical problem of low efficiency in anomaly localization of MCUs in vehicles, and ultimately achieving the technical effect of improving the efficiency of anomaly localization of MCUs in vehicles.

[0089] The technical solutions of the embodiments of the present invention will be illustrated below with reference to preferred embodiments.

[0090] Currently, in the MCU software design of most vehicles, the localization of abnormal problems relies solely on the debugger's problem localization during the development and debugging phase. This cannot guarantee the efficiency of problem-solving when problems occur in mass production scenarios, resulting in low efficiency of abnormal localization in the MCU of the vehicle.

[0091] However, this invention proposes a method for backtracking abnormal events of a microcontroller in a vehicle. Based on the obtained working state of the microcontroller, if the working state is an abnormal working state, an abnormal event can be determined. Based on the determined abnormal event, an abnormal backtracking strategy for the microcontroller can be determined. Then, the above-mentioned abnormal backtracking strategy is called to perform a backtracking operation on the microcontroller, and the backtracking result for the microcontroller can be obtained. This achieves the purpose of multi-level backtracking of the MCU that has an abnormal event, thereby solving the technical problem of low efficiency in abnormal MCU location in a vehicle, and thus achieving the technical effect of improving the efficiency of abnormal MCU location in a vehicle.

[0092] In this embodiment, the kernel-based multi-core system exception backtracking method of this application can be executed through a kernel-based multi-core system exception backtracking architecture. For example, Figure 2 This is a schematic diagram of a kernel-based multi-core system exception backtracking architecture according to an embodiment of the present invention, such as... Figure 2 As shown, the architecture may include: an exception backtracking module 201, a data verification module 202, a data storage module 203, and a data output module 204. The exception backtracking module 201 is connected to the data verification module 202, and the data verification module 202 is connected to the data storage module 203 and the data output module 204, respectively.

[0093] exist Figure 2 In this configuration, the aforementioned exception backtracking module 201 can be used to perform a first backtracking operation on the hardware system when a trap occurs, obtaining a first backtracking result. The same module can also be used to perform a second backtracking operation on the OS system when an error occurs, obtaining a second backtracking result. The aforementioned data verification module 202 can be used to verify the first and / or second backtracking results. The aforementioned data storage module 203 can be used to store the verified first and / or second backtracking results. The aforementioned data output module 204 can be used to output the verified first and / or second backtracking results to the SOC.

[0094] For example, the above-mentioned kernel-based multi-core system exception backtracking method can perform backtracking operations on the MCU for two types of exceptions that may occur during MCU software operation. Specifically, the backtracking module has two specific interfaces for the two types of exceptions mentioned above (software-level OS errors / hardware-generated traps). Each core runs an OS with its own independent stack space and CSA area. When the OS detects an error, it calls a callback program (error hook) to the backtracking interface (sys_error_hook_back_trace) of the exception backtracking module. The backtracking interface is the same for each core, and the core identifier (ID) is passed in when it is called. In the backtracking interface, the OS-provided error information acquisition interface (Os_GetDetailedError interface) is used to obtain further error information. When the MCU generates a hardware trap, the computer will automatically load the corresponding trap handling function entry. This entry is set to the address of the unified exception trap backtracking interface (sys_exection_trap_back_trace interface) of the exception backtracking module during software initialization. The trap backtracking operation is performed in the sys_exection_trap_back_trace interface.

[0095] In this embodiment, a backtracking operation can be performed on the OS by executing a backtracking method for abnormal events in the software system. Specifically, the backtracking method for abnormal events in the software system provides an interface for obtaining detailed error information in various types of OS that can check for errors at runtime. This detailed information can assist in problem localization. The error information may include: error type, thread number at the point of error, and system interface ID, etc. After obtaining the above error information, a checksum is calculated and stored in retention RAM. The software calls the reset interface to output the backtracking data after startup.

[0096] In this embodiment, a backtracking operation can be performed on the hardware system by executing a backtracking method for abnormal events occurring in the hardware system. This backtracking method, based on the kernel's trap mechanism, is similar to the hard fault mechanism of an Advanced RISC Machine (ARM) core. It is a non-maskable interrupt that cannot be disabled or enabled by software. The entry address is set during software initialization (each core has its own setting capability). When a corresponding trap is generated by a core, the kernel automatically jumps to the corresponding trap handling function entry point. In a multi-core system based on the kernel, each core contains 8 types of traps, each with a different trap ID. Traps of the same type share the same handling function entry point. The specific trap ID is automatically loaded into the kernel register when it is generated. The handling function uses this register for further trap ID differentiation. After a trap is generated, the trap exception backtracking interface is called. In this interface, by obtaining the current kernel snapshot information (Link register / deadd / datr / dstr / etc.), further investigation of asynchronous traps can be performed. Then, the context storage area (Context Save) is obtained based on the kernel register (pcxi). The backtracking process begins at the CSA (Continuous Service Area) location. The CSA is a memory region that stores the kernel's general-purpose register values ​​recorded at the time of each function interrupt call, with a length of 16 words. The CSA is structured as a hardware linked list, with preceding and following contexts linked by addresses. Based on the relationship between the base address and offset address in the PCXi field, the corresponding CSA address of the previous node is calculated. During backtracking, the validity of the PCXi field address and the preset maximum backtracking level in the CSA are checked to complete multi-level backtracking. Further verification calculations are performed, a reset flag is set, and flag information is entered. Finally, a software reset is performed. After restarting, the data validity is verified based on the reset information, and the backtracking data is output.

[0097] In this embodiment, when performing an anomaly backtracking operation on the microcontroller in the vehicle, the operating state of the microcontroller is obtained while the vehicle is running; in response to an abnormal operating state, an abnormal event is determined for the microcontroller; based on the abnormal event, an anomaly backtracking strategy for the microcontroller is determined; the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, and a backtracking result for the microcontroller is obtained. Since this embodiment, based on obtaining the operating state of the microcontroller, if the operating state is abnormal, an abnormal event can be determined for the microcontroller. Based on the determined abnormal event, an anomaly backtracking strategy for the microcontroller can be determined, and then the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, a backtracking result for the microcontroller can be obtained. This achieves the goal of multi-level backtracking for MCUs experiencing abnormal events, thereby solving the technical problem of low efficiency in anomaly localization of MCUs in vehicles, and ultimately achieving the technical effect of improving the efficiency of anomaly localization of MCUs in vehicles.

[0098] According to another aspect of the present invention, corresponding to the above-described embodiment of the abnormal event backtracking method for microcontrollers in vehicles, the present invention also provides an abnormal event backtracking device for microcontrollers in vehicles. Figure 3 This is a structural block diagram of an abnormal event tracing device for a microcontroller in a vehicle according to an embodiment of the present invention, such as... Figure 3 As shown, the abnormal event tracing device 300 of the microcontroller in the vehicle may include: an acquisition unit 302, a first determination unit 304, a second determination unit 306, and a tracing unit 308.

[0099] The acquisition unit 302 is used to acquire the working status of the microcontroller in the vehicle when the vehicle is in operation.

[0100] The first determining unit 304 is used to determine the abnormal event existing in the microcontroller in response to the abnormal working state.

[0101] The second determining unit 306 is used to determine an exception backtracking strategy for the microcontroller based on the exception event, wherein the exception backtracking strategy is used to represent the rules for performing a backtracking operation on the microcontroller in response to the exception event.

[0102] The backtracking unit 308 is used to invoke the exception backtracking strategy, perform backtracking operations on the microcontroller, and obtain the backtracking result for the microcontroller.

[0103] Optionally, the microcontroller integrates the vehicle's hardware and software systems. Abnormal events include: a first abnormal event existing in the hardware system, and / or a second abnormal event existing in the software system. The first determining unit 304 may include: a first determining module, configured to determine the abnormal event as the first abnormal event in response to the hardware system's abnormal operating state; a second determining module, configured to determine the abnormal event as the second abnormal event in response to the software system's abnormal operating state; and a third determining module, configured to determine the abnormal event as both the first and second abnormal events in response to both the hardware and software systems' abnormal operating states.

[0104] Optionally, the second determining unit 306 may include: a fourth determining module, configured to determine an exception backtracking strategy as a first exception backtracking strategy in response to the exception event being a first exception event, wherein the first exception backtracking strategy represents the rule for performing a first backtracking operation on the hardware system in response to the first exception event, and the first backtracking operation is a multi-level backtracking operation performed on the hardware system; a fifth determining module, configured to determine an exception backtracking strategy as a second exception backtracking strategy in response to the exception event being a second exception event, wherein the second exception backtracking strategy represents the rule for performing a second backtracking operation on the software system in response to the second exception event, and the second backtracking operation is a multi-level backtracking operation performed on the software system; and a sixth determining module, configured to determine an exception backtracking strategy as a first exception backtracking strategy and a second exception backtracking strategy in response to the exception event being a first exception event and a second exception event.

[0105] Optionally, the backtracking unit 308 may include: a backtracking module, used to call an exception backtracking strategy through the backtracking interface of the microcontroller, perform a backtracking operation on the microcontroller, and obtain a backtracking result, wherein the backtracking interface includes: a first backtracking interface corresponding to the first exception backtracking strategy, and a second backtracking interface corresponding to the second exception backtracking strategy.

[0106] Optionally, the backtracking module may include: a first backtracking submodule, configured to respond to an exception backtracking strategy of the first exception backtracking strategy by calling the first exception backtracking strategy through a first backtracking interface to perform a first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, and obtain a backtracking result as the first backtracking result; a second backtracking submodule, configured to respond to an exception backtracking strategy of the second exception backtracking strategy by calling the second exception backtracking strategy through a second backtracking interface to perform a second backtracking operation corresponding to the second exception backtracking strategy on the software system, and obtain a backtracking result as the second backtracking result; and a third backtracking submodule, configured to respond to an exception backtracking strategy of the first exception backtracking strategy and the second exception backtracking strategy by calling the first exception backtracking strategy through a first backtracking interface to perform a first backtracking operation on the hardware system, and by calling the second exception backtracking strategy through a second backtracking interface to perform a second backtracking operation on the software system, and obtain a backtracking result as the first backtracking result and the second backtracking result.

[0107] Optionally, the abnormal event backtracking device 300 of the microcontroller in the vehicle may include: a verification unit, used to verify the backtracking result after the microcontroller calls the reset interface to complete the restart, and obtain the verification result; and an output unit, used to output the backtracking result to the chip in response to the verification result indicating that the backtracking result has been successfully verified, wherein the chip is used to output the backtracking result to the cloud, and the cloud is used to use the backtracking result to locate the abnormality of the microcontroller.

[0108] Optionally, the output unit may include: a first output module, configured to output the first backtracking result to the chip in response to a verification result indicating that the first backtracking result has been successfully verified; a second output module, configured to output the second backtracking result to the chip in response to a verification result indicating that the second backtracking result has been successfully verified; and a third output module, configured to output the first backtracking result and the second backtracking result to the chip in response to a verification result indicating that the first backtracking result and the second backtracking result have been successfully verified.

[0109] In this embodiment, the abnormal event backtracking device for the microcontroller in the vehicle includes the following units: an acquisition unit, used to acquire the working state of the microcontroller in the vehicle when the vehicle is in operation; a first determination unit, used to determine an abnormal event existing in the microcontroller in response to the working state being an abnormal working state; a second determination unit, used to determine an abnormal backtracking strategy for the microcontroller based on the abnormal event, wherein the abnormal backtracking strategy represents the rules for performing backtracking operations on the microcontroller in response to the abnormal event; and a backtracking unit, used to call the abnormal backtracking strategy to perform backtracking operations on the microcontroller and obtain the backtracking result for the microcontroller. This achieves the purpose of multi-level backtracking for the MCU that has an abnormal event, thereby solving the technical problem of low efficiency in abnormal MCU location in the vehicle, and thus achieving the technical effect of improving the efficiency of abnormal MCU location in the vehicle.

[0110] Embodiments of this application also provide a vehicle, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods described in various embodiments of this application when it runs.

[0111] Embodiments of this application also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0112] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0113] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.

[0114] Embodiments of this application also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this application.

[0115] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0116] According to an embodiment of the present invention, a vehicle is also provided. Figure 4 This is a schematic diagram of a vehicle according to an embodiment of the present invention, such as... Figure 4 As shown, the vehicle 400 may include a memory 410 and a processor 420. The memory 410 is used to store an executable program; the processor 420 is used to run the program stored in the memory 410. When the program runs, it executes the abnormal event backtracking method of the microcontroller in the vehicle of this application.

[0117] In this application, "multiple" refers to two or more.

[0118] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0119] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0120] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0121] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, the abnormal event backtracking method for a microcontroller in a vehicle may include steps S112 and S114, indicating that the abnormal event backtracking method for a microcontroller in a vehicle may include steps S112 and S114 performed sequentially, or it may include steps S114 and S116 performed sequentially.

[0122] For example, the abnormal event backtracking method for a microcontroller in a vehicle according to this application may also include step S116, indicating that step S116 can be added to the method in any order. For example, the abnormal event backtracking method for a microcontroller in a vehicle according to this application may include steps S112, S114 and S116, or may include steps S112, S116 and S114, or may include steps S116, S114 and S112, etc. This is only an example and is not specifically limited.

[0123] For example, the abnormal event backtracking method for a microcontroller in a vehicle according to this application may also include step S118, meaning that step S118 can be added to the method in any order. For example, the abnormal event backtracking method for a microcontroller in a vehicle according to this application may include steps S112, S114, S116 and S118, or it may include steps S118, S112, S116 and S114, or it may include steps S116, S114 and S112 and S118, etc. This is only an example and is not specifically limited.

[0124] According to another aspect of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the abnormal event backtracking method of the microcontroller in the vehicle embodiment.

[0125] Computer-readable storage media, also known as computer storage media, may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. These propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable storage media can transmit, propagate, or transfer programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0126] The program code contained in a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency, or any suitable combination thereof.

[0127] Optionally, when the above computer program is executed by the processor, the program code implements the following steps: when the vehicle is in operation, obtain the working state of the microcontroller in the vehicle; in response to the working state being an abnormal working state, determine the abnormal event existing in the microcontroller; based on the abnormal event, determine an abnormal backtracking strategy for the microcontroller, wherein the abnormal backtracking strategy is used to represent the rules for performing backtracking operations on the microcontroller in response to the abnormal event; call the abnormal backtracking strategy to perform backtracking operations on the microcontroller and obtain the backtracking result for the microcontroller.

[0128] Optionally, when the above computer program is executed by the processor, the program code implements the following steps: in response to the hardware system being in an abnormal operating state, the abnormal event is identified as a first abnormal event; or, in response to the software system being in an abnormal operating state, the abnormal event is identified as a second abnormal event; or, in response to both the hardware system and the software system being in an abnormal operating state, the abnormal event is identified as both a first abnormal event and a second abnormal event.

[0129] Optionally, when the above-mentioned computer program is executed by the processor, the program code implements the following steps: in response to an exception event being a first exception event, the exception backtracking strategy is determined to be a first exception backtracking strategy, wherein the first exception backtracking strategy is used to represent the rule for performing a first backtracking operation on the hardware system in response to the first exception event, and the first backtracking operation is a multi-level backtracking operation performed on the hardware system; or, in response to an exception event being a second exception event, the exception backtracking strategy is determined to be a second exception backtracking strategy, wherein the second exception backtracking strategy is used to represent the rule for performing a second backtracking operation on the software system in response to the second exception event, and the second backtracking operation is a multi-level backtracking operation performed on the software system; or, in response to an exception event being a first exception event and a second exception event, the exception backtracking strategy is determined to be a first exception backtracking strategy and a second exception backtracking strategy.

[0130] Optionally, when the above computer program is executed by the processor, the program code implements the following steps: through the backtracking interface of the microcontroller, the exception backtracking strategy is called to perform a backtracking operation on the microcontroller and obtain the backtracking result, wherein the backtracking interface includes: a first backtracking interface corresponding to the first exception backtracking strategy, and a second backtracking interface corresponding to the second exception backtracking strategy.

[0131] Optionally, when the above-mentioned computer program is executed by the processor, the program code implements the following steps: in response to an exception backtracking strategy of a first exception backtracking strategy, the program calls the first exception backtracking strategy through a first backtracking interface to perform a first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, and obtains a backtracking result as the first backtracking result; or, in response to an exception backtracking strategy of a second exception backtracking strategy, the program calls the second exception backtracking strategy through a second backtracking interface to perform a second backtracking operation corresponding to the second exception backtracking strategy on the software system, and obtains a backtracking result as the second backtracking result; or, in response to an exception backtracking strategy of a first exception backtracking strategy and a second exception backtracking strategy, the program calls the first exception backtracking strategy through the first backtracking interface to perform a first backtracking operation on the hardware system, and calls the second exception backtracking strategy through the second backtracking interface to perform a second backtracking operation on the software system, and obtains a backtracking result as the first backtracking result and the second backtracking result.

[0132] Optionally, when the above computer program is executed by the processor, the program code implements the following steps: after the microcontroller calls the reset interface to complete the restart, the backtracking result is verified to obtain the verification result; in response to the verification result indicating that the backtracking result has been successfully verified, the backtracking result is output to the chip, wherein the chip is used to output the backtracking result to the cloud, and the cloud is used to use the backtracking result to locate the anomaly of the microcontroller.

[0133] Optionally, when the above computer program is executed by the processor, the program code implements the following steps: in response to the verification result indicating that the first backtracking result has been successfully verified, the first backtracking result is output to the chip; or, in response to the verification result indicating that the second backtracking result has been successfully verified, the second backtracking result is output to the chip; or, in response to the verification result indicating that the first backtracking result and the second backtracking result have been successfully verified, the first backtracking result and the second backtracking result are output to the chip.

[0134] In the embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0135] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0136] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0138] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for backtracking abnormal events in a vehicle's microcontroller, characterized in that, include: While the vehicle is in operation, the operating status of the microcontroller in the vehicle is obtained; In response to the operating state being an abnormal operating state, an abnormal event is determined to exist in the microcontroller; Based on the abnormal event, an abnormal backtracking strategy is determined for the microcontroller, wherein the abnormal backtracking strategy is used to represent the rules for performing a backtracking operation on the microcontroller in response to the abnormal event; The exception backtracking strategy is invoked to perform a backtracking operation on the microcontroller, and the backtracking result for the microcontroller is obtained.

2. The method according to claim 1, characterized in that, The microcontroller integrates the vehicle's hardware and software systems. The abnormal events include: a first abnormal event occurring in the hardware system, and / or a second abnormal event occurring in the software system. Specifically, in response to the operating state being an abnormal operating state, determining the abnormal events occurring in the microcontroller includes: In response to the hardware system's operating state being the abnormal operating state, the abnormal event is identified as the first abnormal event; or... In response to the software system's operating state being the abnormal operating state, the abnormal event is identified as the second abnormal event; or, In response to the abnormal operating state of both the hardware system and the software system, the abnormal event is identified as the first abnormal event and the second abnormal event.

3. The method according to claim 2, characterized in that, Based on the abnormal event, an abnormal backtracking strategy for the microcontroller is determined, including: In response to the abnormal event being the first abnormal event, the abnormal backtracking strategy is determined to be a first abnormal backtracking strategy, wherein the first abnormal backtracking strategy is used to represent the rules for performing a first backtracking operation on the hardware system in response to the first abnormal event, and the first backtracking operation is a multi-level backtracking operation performed on the hardware system; or... In response to the abnormal event being the second abnormal event, the abnormal backtracking strategy is determined to be a second abnormal backtracking strategy, wherein the second abnormal backtracking strategy represents the rules for performing a second backtracking operation on the software system in response to the second abnormal event, and the second backtracking operation is a multi-level backtracking operation performed on the software system; or... In response to the abnormal events being the first abnormal event and the second abnormal event, the abnormal backtracking strategy is determined to be the first abnormal backtracking strategy and the second abnormal backtracking strategy.

4. The method according to claim 3, characterized in that, The exception backtracking strategy is invoked to perform a backtracking operation on the microcontroller, obtaining the backtracking result for the microcontroller, including: The backtracking interface of the microcontroller is used to invoke the exception backtracking strategy to perform the backtracking operation on the microcontroller and obtain the backtracking result. The backtracking interface includes a first backtracking interface corresponding to the first exception backtracking strategy and a second backtracking interface corresponding to the second exception backtracking strategy.

5. The method according to claim 4, characterized in that, By invoking the exception backtracking strategy through the microcontroller's backtracking interface, the backtracking operation is performed on the microcontroller to obtain the backtracking result, including: In response to the exception backtracking strategy being the first exception backtracking strategy, the first exception backtracking strategy is invoked through the first backtracking interface to execute the first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, and the backtracking result obtained is the first backtracking result; or... In response to the exception backtracking strategy being the second exception backtracking strategy, the second exception backtracking strategy is invoked through the second backtracking interface to perform the second backtracking operation corresponding to the second exception backtracking strategy on the software system, and the backtracking result is obtained as the second backtracking result; or... In response to the exception backtracking strategy being the first exception backtracking strategy and the second exception backtracking strategy, the first exception backtracking strategy is invoked through the first backtracking interface to perform the first backtracking operation on the hardware system, and the second exception backtracking strategy is invoked through the second backtracking interface to perform the second backtracking operation on the software system, so that the backtracking result is the first backtracking result and the second backtracking result.

6. The method according to claim 5, characterized in that, The method further includes: After the microcontroller completes the restart by calling the reset interface, the backtracking result is verified to obtain the verification result; In response to the verification result indicating that the backtracking result has been successfully verified, the backtracking result is output to the chip, wherein the chip is used to output the backtracking result to the cloud, and the cloud is used to use the backtracking result to locate the anomaly in the microcontroller.

7. The method according to claim 6, characterized in that, In response to the verification result indicating that the backtracking result has been successfully verified, the backtracking result is output to the chip, including: In response to the verification result indicating that the first backtracking result has been successfully verified, the first backtracking result is output to the chip; or, In response to the verification result indicating that the second backtracking result has been successfully verified, the second backtracking result is output to the chip; or, In response to the verification result indicating that the first backtracking result and the second backtracking result have been successfully verified, the first backtracking result and the second backtracking result are output to the chip.

8. An abnormal event tracing device for a microcontroller in a vehicle, characterized in that, include: The acquisition unit is used to acquire the operating status of the microcontroller in the vehicle when the vehicle is in operation. The first determining unit is configured to determine an abnormal event existing in the microcontroller in response to the operating state being an abnormal operating state. The second determining unit is configured to determine an anomaly backtracking strategy for the microcontroller based on the anomaly event, wherein the anomaly backtracking strategy is used to represent the rules for performing a backtracking operation on the microcontroller in response to the anomaly event; The backtracking unit is used to invoke the exception backtracking strategy, perform a backtracking operation on the microcontroller, and obtain the backtracking result for the microcontroller.

9. A vehicle, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 7.