Method and apparatus for abnormal-event tracing of microcontroller unit in vehicle, and vehicle
By acquiring the operating status of the microcontroller in the vehicle, identifying abnormal events, and performing multi-level backtracking operations, the problem of low efficiency in MCU anomaly localization is solved, and the efficiency of anomaly localization is improved.
Patent Information
- Application Number
- PCT/CN2026/085317
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-11-13
- Filing Date
- 2026-03-23
- Publication Date
- 2026-11-12
AI Technical Summary
Existing technologies have low efficiency in anomaly localization for vehicle microcontrollers (MCUs), making it impossible to efficiently solve problems in mass production scenarios.
A method for backtracking abnormal events of a microcontroller in a vehicle is provided. The method involves obtaining the working state of the microcontroller, identifying abnormal events, determining an abnormal backtracking strategy based on the abnormal events, invoking the backtracking strategy to perform multi-level backtracking operations on the microcontroller, and obtaining the backtracking results.
This improves the efficiency of anomaly localization in the vehicle's MCU, enables multi-level backtracking of abnormal events, and enhances problem-solving efficiency.
Smart Images

Figure CN2026085317_12112026_PF_FP_ABST
Abstract
Description
Abnormal event backtracking method and device of microcontroller in vehicle and vehicle
[0001] Cross-reference to related applications
[0002] The present disclosure claims priority to a Chinese patent application No. 202511665267.7, filed on November 13, 2025, and entitled "Abnormal event backtracking method and device of microcontroller in vehicle and vehicle", the entire content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] Embodiments of the present disclosure relate to the field of vehicles, and in particular, to an abnormal event backtracking method and device of microcontroller in vehicle and vehicle. BACKGROUND
[0004] Currently, in the software design of microcontroller (MCU) in most current vehicles, the positioning of abnormal problems relies on the problem positioning of a debugger in the development and debugging stage. This 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.
[0005] Currently, there is no effective solution to the technical problem of low efficiency of abnormal positioning of the MCU in the vehicle. SUMMARY
[0006] Embodiments of the present disclosure provide an abnormal event backtracking method and device of microcontroller in vehicle and vehicle to at least solve the technical problem of low efficiency of abnormal positioning of the MCU in the vehicle.
[0007] According to an aspect of an embodiment of the present disclosure, an abnormal event backtracking method of microcontroller in vehicle is provided, comprising: in response to the vehicle being in a running state, acquiring a working state of a microcontroller in the vehicle; in response to the working state being an abnormal working state, determining an abnormal event existing in the microcontroller; based on the abnormal event, determining an abnormal backtracking strategy for the microcontroller, wherein the abnormal backtracking strategy is used to represent a rule of performing a backtracking operation on the microcontroller for the abnormal event; calling the abnormal backtracking strategy to perform a backtracking operation on the microcontroller to obtain a backtracking result for the microcontroller.
[0008] According to another aspect of the embodiments of this disclosure, an abnormal event backtracking device for a microcontroller in a vehicle is also provided. The device includes: an acquisition component configured to acquire the working state of the microcontroller in the vehicle in response to the vehicle being in an operating state; a first determination component configured to determine an abnormal event existing in the microcontroller in response to the working state being an abnormal working state; a second determination component 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 component configured to invoke the abnormal backtracking strategy to perform a backtracking operation on the microcontroller and obtain a backtracking result for the microcontroller.
[0009] According to another aspect of the present disclosure, a vehicle is also provided, including: a memory storing an executable program; and a processor configured to run the program, wherein the program executes the methods of various embodiments of the present disclosure when it runs.
[0010] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the methods of the various embodiments of the present disclosure.
[0011] According to another aspect of the embodiments of this disclosure, 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 disclosure.
[0012] According to another aspect of the embodiments of this disclosure, 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 of various embodiments of this disclosure.
[0013] According to another aspect of the embodiments of this disclosure, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this disclosure.
[0014] In this embodiment, when performing an anomaly backtracking operation on a microcontroller in a vehicle, the operating state of the microcontroller is obtained in response to the vehicle being in operation; if the operating state is 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 an abnormal operating state, an abnormal event is determined for the microcontroller, an anomaly backtracking strategy for the microcontroller is determined based on the determined abnormal event, and then the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, a backtracking result for the microcontroller is obtained, thereby achieving the purpose of multi-level backtracking of the MCU experiencing an abnormal event, thus solving the technical problem of low efficiency in anomaly localization of the MCU in the vehicle, and thereby achieving the technical effect of improving the efficiency of anomaly localization of the MCU in the vehicle. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:
[0016] 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 disclosure;
[0017] 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 disclosure;
[0018] Figure 2 is a schematic diagram of an anomaly backtracking architecture for a kernel-based multi-core system according to an embodiment of the present disclosure;
[0019] Figure 3 is a structural block diagram of an abnormal event tracing device for a microcontroller in a vehicle according to an embodiment of the present disclosure;
[0020] Figure 4 is a schematic diagram of a vehicle according to an embodiment of the present disclosure. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0022] The terms "first," "second," etc., used in this disclosure, claims, and accompanying drawings 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 are interchangeable where appropriate so that the embodiments of this disclosure 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 a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or components is not necessarily limited to those steps or components explicitly listed, but may include other steps or components not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] According to an embodiment of this disclosure, an embodiment of an abnormal event backtracking method for a microcontroller in a vehicle is provided. The steps shown in the flowchart in the accompanying drawings are executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described are executed in a different order than that shown here.
[0024] As an optional implementation, the above-described method for tracing back abnormal events of a microcontroller in a vehicle 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 this disclosure. As shown in Figure 1(a), in this application scenario, the terminal device 10 is not limited to communicating with the server 13 via the network 11, and the server 13 is not limited to performing operations on the database, such as writing or reading data. The terminal device 10 includes, but is not limited to, a human-machine interface screen, a processor, and a memory. The human-machine interface screen is not limited to displaying a virtual machine on the mobile terminal 10. The vehicle 12 is not limited to responding to the above-described human-machine interface operation, performing corresponding operations, or generating corresponding instructions and sending the generated instructions to the server 13.
[0025] The steps shown in the flowcharts of the accompanying drawings are executed in a computer system such as a set of computer-executable instructions. While a logical order is shown in the flowcharts, in some cases, the steps shown or described are executed in a different order than that presented here. The vehicle risk warning method of this disclosure includes: step S102, in response to the vehicle being in operation, obtaining the operating state of the microcontroller in the vehicle; step S104, in response to the operating state being an abnormal operating state, determining an abnormal event existing in the microcontroller; step S106, based on the abnormal event, determining an abnormal backtracking strategy for the microcontroller; and step S108, invoking the abnormal backtracking strategy to perform a backtracking operation on the microcontroller, obtaining a backtracking result for the microcontroller.
[0026] All information and data disclosed herein (including but not limited to abnormal events and backtracking results) are information and data authorized by the user or fully authorized by all parties. The collection, use and processing of such data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.
[0027] 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 disclosure. As shown in Figure 1(b), the method includes the following steps.
[0028] Step S112: In response to the vehicle being in operation, obtain the working status of the microcontroller in the vehicle.
[0029] In the technical solution provided in step S112 of this disclosure, the microcontroller operates in either a normal working state or an abnormal working state. For example, in response to the hardware system integrated in the microcontroller operating in a normal working state and the software system integrated in the microcontroller operating in a normal working state, the microcontroller operates in a normal working state; in response to the hardware system integrated in the microcontroller operating in an abnormal working state, and / or the software system integrated in the microcontroller operating in an abnormal working state, the microcontroller operates in an abnormal working state. This is merely an example and is not intended to be specific.
[0030] In this embodiment, in response to the vehicle being in a running state, the operating state of the microcontroller in the vehicle is obtained. Optionally, this embodiment identifies the current state of the vehicle. In response to identifying the current state as a running state, it indicates that the vehicle is in a running state. In response to the vehicle being in a running state, the operating state of the microcontroller in the vehicle is obtained, that is, the operating state of the MCU in the vehicle is obtained.
[0031] Step S114: In response to the abnormal operating state, determine the abnormal event existing in the microcontroller.
[0032] In the technical solution provided by step S114 of this disclosure, the 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 abnormal event indicates that the hardware system is trapped, and the second abnormal event indicates that the software system is malfunctioning.
[0033] In this embodiment, after acquiring the operating status of the microcontroller in the vehicle in response to the vehicle being in operation, and in response to the operating status being an abnormal operating state, an abnormal event is determined to exist in the microcontroller. Optionally, this embodiment, based on acquiring the operating status of the microcontroller, determines whether the operating status is a normal operating state or an abnormal operating state. In response to determining that the operating status is an abnormal operating state, an abnormal event is determined to exist in the microcontroller, thereby achieving the purpose of determining the abnormal event that has occurred in the microcontroller.
[0034] Optionally, the system determines whether the hardware system is in a normal or abnormal operating state, and the system also determines whether the software system is in a normal or abnormal operating state, obtaining a determination result. The determination result is either that the hardware system is in an abnormal operating state, or that the software system is in an abnormal operating state, or both the hardware and software systems are in an abnormal operating state. Based on these determination results, an abnormal event occurring in the microcontroller is identified.
[0035] 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.
[0036] In the technical solution provided by step S116 of this disclosure, the above-mentioned anomaly backtracking strategy is used to represent the rules for performing backtracking operations on the microcontroller in response to anomaly events.
[0037] In this embodiment, the above-mentioned anomaly backtracking strategy includes: a first anomaly backtracking strategy and a second anomaly backtracking strategy.
[0038] In this embodiment, the first anomaly backtracking strategy is 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.
[0039] In this embodiment, the second anomaly backtracking strategy is used to represent the rules for performing a second backtracking operation on the software system in response to a second anomaly event, wherein the second backtracking operation is a multi-level backtracking operation performed on the software system.
[0040] In this embodiment, after determining an abnormal event in response to an abnormal operating state, an anomaly backtracking strategy for the microcontroller is determined based on the abnormal event. Optionally, this embodiment compares the abnormal event with a first abnormal event for the hardware system and a second abnormal event for the software system to obtain a first comparison result, wherein the first comparison result is used to represent the relationship between the abnormal event and the first and second abnormal events; based on the first comparison result, an anomaly backtracking strategy for the microcontroller is determined, thereby achieving the purpose of determining the rules for performing backtracking operations on the microcontroller in response to the abnormal event.
[0041] The above method for determining the anomaly backtracking strategy for a microcontroller based on anomaly events is for illustrative purposes only and is not intended to be specific. Any method that determines the anomaly backtracking strategy for a microcontroller based on anomaly events is within the protection scope of this disclosure, and will not be described in detail here.
[0042] Step S118: Invoke the exception backtracking strategy to perform a backtracking operation on the microcontroller and obtain the backtracking result for the microcontroller.
[0043] In the technical solution provided by step S118 of this disclosure, the backtracking result is represented in the form of backtracking data, wherein the backtracking data includes: first backtracking data and / or second backtracking data, the first backtracking data is data generated during the backtracking operation of the hardware system, and the second backtracking data is data generated during the backtracking operation of the software system.
[0044] In this embodiment, after determining the exception backtracking strategy for the microcontroller based on the abnormal event, the exception 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 exception backtracking strategy for the microcontroller, compares the above exception backtracking strategy with a first exception backtracking strategy for the hardware system and a second exception backtracking strategy for the software system to obtain a second comparison result. The second comparison result is used to represent the relationship between the exception backtracking strategy and the first and second exception backtracking strategies. According to the second comparison result, the exception backtracking strategy that satisfies the second comparison result is 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 abnormal event.
[0045] In steps S112 to S118 of this disclosure, when performing an anomaly backtracking operation on the microcontroller in the vehicle, in response to the vehicle being in operation, the working state of the microcontroller in the vehicle is obtained; in response to the working state being 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 an abnormal working state, an abnormal event existing in the microcontroller is determined, an anomaly backtracking strategy for the microcontroller is determined according to the determined abnormal event, and then the anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, a backtracking result for the microcontroller is obtained, thereby achieving the purpose of multi-level backtracking of the MCU experiencing an abnormal event, thus solving the technical problem of low efficiency in anomaly localization of the MCU in the vehicle, and thereby achieving the technical effect of improving the efficiency of anomaly localization of the MCU in the vehicle.
[0046] 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.
[0047] 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.
[0048] In this embodiment, the microcontroller integrates the vehicle's hardware and software systems. The hardware system is a system that integrates hardware devices, and the software system is an operating system (OS).
[0049] In this embodiment, the aforementioned 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 abnormal event indicates a trap condition in the hardware system, and the second abnormal event indicates an error condition in the software system.
[0050] In this embodiment, after obtaining the operating state of the microcontroller in the vehicle in response to the vehicle being in operation, and in response to the hardware system's operating state being abnormal, the abnormal event is identified as the first abnormal event. Optionally, based on obtaining the microcontroller's operating state, this embodiment determines whether the hardware system's operating state is normal or abnormal, and also determines whether the software system's operating state is normal or abnormal, obtaining a determination result; if the determination result indicates that the hardware system's operating state is abnormal, then the abnormal event is identified as the first abnormal event, thereby achieving the purpose of determining the abnormal situation of the microcontroller, and thus achieving the technical effect of improving the accuracy of determining abnormal events.
[0051] In this embodiment, after obtaining the operating state of the microcontroller in the vehicle in response to the vehicle being in operation, and in response to the software system's operating state being abnormal, the abnormal event is identified as a second abnormal event. Optionally, based on obtaining the microcontroller's operating state, this embodiment determines whether the hardware system's operating state is normal or abnormal, and also determines whether the software system's operating state is normal or abnormal, obtaining a determination result; if the determination result indicates that the software system's operating state is abnormal, then the abnormal event is identified as a second abnormal event, thereby achieving the purpose of determining the abnormal situation of the microcontroller, and thus achieving the technical effect of improving the accuracy of determining abnormal events.
[0052] In this embodiment, after obtaining the operating state of the microcontroller in the vehicle in response to the vehicle being in operation, and in response to both the hardware system and software system operating states being abnormal, the abnormal events are identified as a first abnormal event and a second abnormal event. Optionally, this embodiment, based on obtaining the microcontroller's operating state, determines whether the hardware system's operating state is normal or abnormal, and also determines whether the software system's operating state is normal or abnormal, obtaining a judgment result; if the judgment result indicates that both the hardware system and software system are operating abnormally, then the abnormal events are identified as a first abnormal event and a second abnormal event, thereby achieving the purpose of determining the abnormal situation of the microcontroller, and thus achieving the technical effect of improving the accuracy of determining abnormal events.
[0053] The following section further explains the steps of determining the exception backtracking strategy for the microcontroller based on the above-described exception events in this embodiment.
[0054] 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.
[0055] In this embodiment, the first anomaly backtracking strategy is 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.
[0056] 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, an 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 improving the technical effect of increasing the diversity of abnormal backtracking strategies.
[0057] In this embodiment, the second anomaly backtracking strategy is used to represent the rules for performing a second backtracking operation on the software system in response to a second anomaly event, wherein the second backtracking operation is a multi-level backtracking operation performed on the software system.
[0058] 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.
[0059] In this embodiment, after determining an abnormal event in the microcontroller in response to an abnormal operating state, and further determining 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 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 either the first or second abnormal event, then the abnormal backtracking strategy is determined to be either the first or 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 improving the technical effect of increasing the diversity of abnormal backtracking strategies.
[0060] 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.
[0061] 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.
[0062] In this embodiment, the backtracking interface includes: a first backtracking interface corresponding to the first anomaly backtracking strategy, and a second backtracking interface corresponding to the second anomaly backtracking strategy.
[0063] 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, this embodiment, based on the determined anomaly backtracking strategy for the microcontroller, 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 is 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 of the MCU that has experienced an abnormal event, thereby realizing the technical effect of improving the efficiency of anomaly localization of the MCU in the vehicle.
[0064] 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.
[0065] 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.
[0066] In this embodiment, the first backtracking result is represented in the form of first backtracking data, which is data generated during the backtracking operation on the hardware system.
[0067] 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 a first backtracking interface to perform a first backtracking operation corresponding to the first anomaly backtracking strategy on the hardware system, resulting in a first backtracking result. Optionally, this embodiment, based on determining the anomaly backtracking strategy for the microcontroller, compares the aforementioned 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 first anomaly backtracking strategy, then the first anomaly backtracking strategy is invoked through the first backtracking interface corresponding to the first anomaly backtracking strategy to perform a first backtracking operation corresponding to the first anomaly backtracking strategy on the hardware system, resulting in a first backtracking result. This achieves the purpose of multi-level backtracking for the MCU experiencing an anomaly event, thereby improving the technical effect of improving the efficiency of anomaly localization in the vehicle's MCU.
[0068] In this embodiment, the second backtracking result is represented in the form of second backtracking data, which is data generated during the backtracking operation of the software system.
[0069] 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, obtaining the backtracking result as the second 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 above 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 corresponding to the second anomaly backtracking strategy to perform the second backtracking operation corresponding to the second anomaly backtracking strategy on the software system, obtaining the backtracking result as the second backtracking result. This achieves the purpose of multi-level backtracking for the MCU that has an anomaly event, thereby realizing the technical effect of improving the efficiency of anomaly localization of the MCU in the vehicle.
[0070] 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 corresponding to the first anomaly backtracking strategy to perform the first backtracking operation on the hardware system, and the second anomaly backtracking strategy is called through the second backtracking interface corresponding to the second anomaly backtracking strategy to perform the second backtracking operation on the software system, so as to obtain the backtracking result as the first backtracking result and the second backtracking result. This achieves the purpose of multi-level backtracking of the MCU that has an anomaly event, thereby realizing the technical effect of improving the efficiency of anomaly location of the MCU in the vehicle.
[0071] The abnormal event backtracking method of the microcontroller in the vehicle described in this embodiment will be further explained below.
[0072] 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 configured to output the backtracking result to the cloud, and the cloud is configured to use the backtracking result to locate the anomaly of the microcontroller.
[0073] In this embodiment, the reset interface is linked to a reset software program, which is used to restart the microcontroller.
[0074] In this embodiment, the verification result is used to indicate whether the backtracking result was successfully verified. For example, if the verification result indicates that the backtracking result has been successfully verified, the backtracking data corresponding to the backtracking result is valid data. If the verification result indicates that the backtracking result has failed to be verified, the backtracking data corresponding to the backtracking result is invalid data.
[0075] 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 restart the microcontroller, and then the obtained backtracking data is validated to obtain the verification result.
[0076] In this embodiment, the chip is configured to output the backtracking results to the cloud. For example, the chip is, but is not limited to, a system-on-a-chip (SoC).
[0077] In this embodiment, the cloud is configured to use the backtracking results to locate anomalies in the microcontroller.
[0078] 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 outputting the backtracking result to the cloud via the chip, 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.
[0079] 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.
[0080] 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.
[0081] 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 first backtracking result has been successfully verified, the first 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 first backtracking result has been successfully verified, the first backtracking result is output to the chip. This achieves the goal of setting 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.
[0082] In this embodiment, if the above verification result indicates that the second backtracking result has been successfully verified, the second backtracking result is output to the chip. This achieves the purpose of setting the chip to output the second backtracking result to the cloud and using the second backtracking result in the cloud to locate anomalies in the software system, thereby improving the efficiency of anomaly location of the MCU in the vehicle.
[0083] In this embodiment, if the above verification result indicates that the first backtracking result and the second backtracking result have been successfully verified, then the first backtracking result and the second backtracking result are output to the chip. This achieves the purpose of setting the chip to output the first backtracking result and the second backtracking result to the cloud, and using the first backtracking result to locate anomalies in the hardware system and the second backtracking result to locate anomalies in the software system. This improves the efficiency of anomaly location in the MCU of the vehicle.
[0084] In this embodiment, when performing an anomaly backtracking operation on a microcontroller in a vehicle, the operating state of the microcontroller is obtained in response to the vehicle being in operation; if the operating state is 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. Because this embodiment, based on obtaining the operating state of the microcontroller, determines an abnormal event for the microcontroller in response to the aforementioned abnormal operating state, determines an anomaly backtracking strategy for the microcontroller based on the determined abnormal event, and then invokes the aforementioned anomaly backtracking strategy to perform a backtracking operation on the microcontroller, obtaining a backtracking result for the microcontroller, it achieves the purpose of multi-level backtracking of the MCU experiencing an abnormal event, thereby solving the technical problem of low efficiency in anomaly localization of the MCU in the vehicle, and thus achieving the technical effect of improving the efficiency of anomaly localization of the MCU in the vehicle.
[0085] The technical solutions of the present disclosure embodiments are illustrated below with reference to preferred embodiments.
[0086] Currently, in the MCU software design of most vehicles, the location of abnormal problems relies on the debugger to locate problems 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 location of MCUs in vehicles.
[0087] However, this disclosure proposes an abnormal event backtracking method for a microcontroller in a vehicle. Based on the obtained working state of the microcontroller, in response to the abnormal working state, an abnormal event is determined for the microcontroller. According to the determined abnormal event, an abnormal backtracking strategy for the microcontroller is determined, and then the above-mentioned abnormal backtracking strategy is called to perform a backtracking operation on the microcontroller, thereby obtaining the backtracking result for the microcontroller. 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.
[0088] In this embodiment, the kernel-based multi-core system exception backtracking method of this disclosure is executed through a kernel-based multi-core system exception backtracking architecture. For example, Figure 2 is a schematic diagram of a kernel-based multi-core system exception backtracking architecture according to an embodiment of this disclosure. As shown in Figure 2, the architecture includes: an exception backtracking component 201, a data verification component 202, a data storage component 203, and a data output component 204. The exception backtracking component 201 is connected to the data verification component 202, and the data verification component 202 is connected to both the data storage component 203 and the data output component 204.
[0089] In Figure 2, the aforementioned exception backtracking component 201 is configured to perform a first backtracking operation on the hardware system when a trap occurs, obtaining a first backtracking result. The same component is also configured to perform a second backtracking operation on the OS system when an error occurs, obtaining a second backtracking result. The aforementioned data verification component 202 is configured to verify the first and / or second backtracking results. The aforementioned data storage component 203 is configured to store the verified first and / or second backtracking results. The aforementioned data output component 204 is configured to output the verified first and / or second backtracking results to the SOC.
[0090] For example, the above-mentioned kernel-based multi-core system exception backtracking method performs backtracking operations on the MCU for two types of exceptions that may occur during MCU software runtime. Specifically, the backtracking component has two specific corresponding interfaces for the two types of exceptions mentioned above (software-level OS errors / hardware-generated traps). Each core runs an OS with an independent stack space and context save area (CSA). 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 component. The backtracking interface is the same for each core, and the core identifier (ID) is passed in when calling it. 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 function entry has been set to the address of the unified exception trap backtracking interface (sys_exection_trap_back_trace interface) of the exception backtracking component during software initialization. The trap backtracking operation is performed in the sys_exection_trap_back_trace interface.
[0091] In this embodiment, a backtracking operation is performed on the OS by executing a backtracking method for abnormal events in the software system. This backtracking method, which checks error information at runtime in various OS types, provides an interface for obtaining detailed error information. The detailed information obtained through this interface aids in problem localization. This error information includes: error type, the thread number at which the error occurred, and the system interface ID. After obtaining this error information, a checksum is calculated and stored in retention RAM. The software then calls the reset interface to output the backtracking data after startup.
[0092] In this embodiment, a backtracking operation is 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 kernel-based multi-core system, 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.
[0093] The above processing function entry uses this register for further trap ID differentiation. After a trap is generated, the trap exception backtracking interface is called. In the trap exception backtracking interface, the current kernel snapshot information (Link register / deadd / datr / dstr / etc.) is obtained to perform further investigation of asynchronous traps. Then, the CSA region is obtained based on the kernel register (pcxi), and the CSA region backtracking begins.
[0094] The aforementioned CSA region is a memory area used to store the recorded kernel general-purpose register values at the time of each function interrupt call, with a length of 16 words. Based on the content stored in the CSA region, it can be divided into preceding and following contexts, and is a hardware-like linked list data structure 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 in the CSA region and the preset maximum backtracking level are judged to complete multi-level backtracking. The backtracking results are then verified, a reset flag and flag information are set, and finally, a software reset is performed. After restarting, the data validity is verified based on the reset information, and the backtracking data is output.
[0095] In this embodiment, when performing an anomaly backtracking operation on the microcontroller in the vehicle, the operating state of the microcontroller is obtained in response to the vehicle being in operation; if the operating state is an abnormal operating 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 operating state of the microcontroller, if the operating state is an abnormal operating state, an abnormal event existing in the microcontroller is determined, an anomaly backtracking strategy for the microcontroller is determined based on the determined abnormal event, and then the above-mentioned anomaly backtracking strategy is invoked to perform a backtracking operation on the microcontroller, obtaining a backtracking result for the microcontroller, the purpose of multi-level backtracking of the MCU experiencing an abnormal event is achieved, thereby solving the technical problem of low efficiency in anomaly localization of the MCU in the vehicle, and thus achieving the technical effect of improving the efficiency of anomaly localization of the MCU in the vehicle.
[0096] According to another aspect of the present disclosure, corresponding to the embodiments of the above-described method for tracing back abnormal events of a microcontroller in a vehicle, the present disclosure also provides a device for tracing back abnormal events of a microcontroller in a vehicle. Figure 3 is a structural block diagram of a device for tracing back abnormal events of a microcontroller in a vehicle according to an embodiment of the present disclosure. As shown in Figure 3, the device 300 for tracing back abnormal events of a microcontroller in a vehicle includes: an acquisition component 302, a first determination component 304, a second determination component 306, and a tracing component 308.
[0097] Get component 302, set it to respond to the vehicle being in operation, and get the working status of the microcontroller in the vehicle.
[0098] The first determining component 304 is configured to determine the presence of an abnormal event in response to an abnormal operating state of the microcontroller.
[0099] The second determining component 306 is configured to determine an exception backtracking strategy for the microcontroller based on an exception event, wherein the exception backtracking strategy is used to represent the rules for performing a backtracking operation on the microcontroller in response to an exception event.
[0100] The backtracking component 308 is configured to invoke the exception backtracking strategy, perform a backtracking operation on the microcontroller, and obtain the backtracking result for the microcontroller.
[0101] 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 component 304 includes: a first determining component configured to determine the abnormal event as the first abnormal event in response to an abnormal operating state of the hardware system; a second determining component configured to determine the abnormal event as the second abnormal event in response to an abnormal operating state of the software system; and a third determining component configured to determine the abnormal event as both the first and second abnormal events in response to an abnormal operating state of both the hardware and software systems.
[0102] Optionally, the second determining component 306 includes: a fourth determining component, configured to determine an exception backtracking strategy as a first exception backtracking strategy in response to an exception event being a first exception event, 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; a fifth determining component, configured to determine an exception backtracking strategy as a second exception backtracking strategy in response to an exception event being a second exception event, 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; and a sixth determining component, configured to determine an exception backtracking strategy as a first exception backtracking strategy and a second exception backtracking strategy in response to an exception event being a first exception event and a second exception event.
[0103] Optionally, the backtracking component 308 includes: a backtracking component configured 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.
[0104] Optionally, the backtracking component includes: a first backtracking subcomponent, configured to respond to an exception backtracking strategy as a first exception backtracking strategy, and through a first backtracking interface, call the first exception backtracking strategy to perform a first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, obtaining a backtracking result as a first backtracking result; a second backtracking subcomponent, configured to respond to an exception backtracking strategy as a second exception backtracking strategy, and through a second backtracking interface, call the second exception backtracking strategy to perform a second backtracking operation corresponding to the second exception backtracking strategy on the software system, obtaining a backtracking result as a second backtracking result; and a third backtracking subcomponent, configured to respond to an exception backtracking strategy as a first exception backtracking strategy and a second exception backtracking strategy, and through a first backtracking interface, call the first exception backtracking strategy to perform a first backtracking operation on the hardware system, and through a second backtracking interface, call the second exception backtracking strategy to perform a second backtracking operation on the software system, obtaining a backtracking result as a first backtracking result and a second backtracking result.
[0105] Optionally, the abnormal event backtracking device 300 of the microcontroller in the vehicle includes: a verification component, configured to verify the backtracking result after the microcontroller completes the restart by calling the reset interface, and obtain the verification result; and an output component, configured 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 configured to output the backtracking result to the cloud, and the cloud is configured to use the backtracking result to locate the abnormality of the microcontroller.
[0106] Optionally, the output components include: a first output component 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 component 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 component 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.
[0107] In this embodiment, the abnormal event backtracking device for the microcontroller in the vehicle includes the following components: an acquisition component, configured to acquire the working state of the microcontroller in the vehicle in response to the vehicle being in operation; a first determination component, configured to determine an abnormal event existing in the microcontroller in response to the working state being an abnormal working state; a second determination component, 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 backtracking operations on the microcontroller in response to the abnormal event; and a backtracking component, configured 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 of 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.
[0108] Embodiments of this disclosure also provide a vehicle, including: a memory storing an executable program; and a processor configured to run the program, wherein the program executes the methods of various embodiments of this disclosure when it runs.
[0109] Embodiments of this disclosure also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium resides to perform the methods of the various embodiments of this disclosure.
[0110] Embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this disclosure.
[0111] Embodiments of this disclosure also provide a computer program product including a non-volatile computer-readable storage medium configured to store a computer program that, when executed by a processor, implements the methods described in various embodiments of this disclosure.
[0112] Embodiments of this disclosure also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this disclosure.
[0113] In the above embodiments of this disclosure, 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.
[0114] According to an embodiment of this disclosure, a vehicle is also provided. Figure 4 is a schematic diagram of a vehicle according to an embodiment of this disclosure. As shown in Figure 4, the vehicle 400 includes a memory 410 and a processor 420, wherein the memory 410 is configured to store an executable program; the processor 420 is configured to run the program stored in the memory 410, and the program executes the abnormal event backtracking method of the microcontroller in the vehicle disclosed herein during runtime.
[0115] In this disclosure, "multiple" refers to two or more.
[0116] In this disclosure, unless otherwise expressly defined, the terms "installation," "connection," and "linkage" should be interpreted broadly, for example, as a fixed connection, a detachable connection, or an integral connection; as a mechanical connection or an electrical connection; as a direct connection or an indirect connection through an intermediate medium; and as a connection within two components. Those skilled in the art will understand the specific meaning of these terms in this disclosure based on the specific circumstances.
[0117] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0118] In this disclosure, the term "and / or" describes the relationship between related objects, indicating that there are three possible relationships. For example, A and / or B means: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, in this disclosure, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0119] Unless otherwise specified, all steps in this disclosure are performed sequentially or randomly. For example, the abnormal event backtracking method for a microcontroller in a vehicle disclosed herein includes steps S112 and S114, indicating that the abnormal event backtracking method for a microcontroller in a vehicle disclosed herein includes steps S112 and S114 performed sequentially, and also includes steps S114 and S116 performed sequentially.
[0120] For example, the abnormal event backtracking method for microcontrollers in vehicles disclosed herein also includes step S116, which means that step S116 can be added to the method in any order. For example, the abnormal event backtracking method for microcontrollers in vehicles disclosed herein includes steps S112, S114 and S116, or it may include steps S112, S116 and S114, or steps S116, S114 and S112, etc. This is just an example and is not specifically limited.
[0121] For example, the abnormal event backtracking method for microcontrollers in vehicles disclosed herein also includes step S118, which means that step S118 can be added to the method in any order. For example, the abnormal event backtracking method for microcontrollers in vehicles disclosed herein includes steps S112, S114, S116 and S118, or it may include steps S118, S112, S116 and S114, or steps S116, S114 and S112 and S118, etc. This is just an example and is not specifically limited.
[0122] According to another aspect of the embodiments of this disclosure, 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 an abnormal event backtracking method for a microcontroller in a vehicle, as described in the embodiments.
[0123] Computer-readable storage media, also known as computer storage media, include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. These propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable storage media transmit, propagate, or transfer programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0124] The program code contained in the computer-readable storage medium may be transmitted by any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency, etc., or any suitable combination thereof.
[0125] Optionally, when the above computer program is executed by the processor, the program code implements the following steps: in response to the vehicle being in operation, obtaining the working state of the microcontroller in the vehicle; in response to the working state being an abnormal working state, determining the abnormal event existing in the microcontroller; based on the abnormal event, determining 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; invoking the abnormal backtracking strategy to perform backtracking operations on the microcontroller and obtaining the backtracking result for the microcontroller.
[0126] 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.
[0127] 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.
[0128] 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.
[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 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.
[0130] 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 configured to output the backtracking result to the cloud, and the cloud is configured to use the backtracking result to locate the anomaly of the microcontroller.
[0131] 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.
[0132] In the embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are illustrative; for example, the division of components is a logical functional division, and in actual implementation, there may be other division methods, such as multiple components being combined or integrated into another system, or some features being ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections are through some interfaces; the indirect couplings or communication connections between components are electrical or other forms.
[0133] The components described as separate parts may or may not be physically separate. The parts shown as components may or may not be physical components; that is, they may be located in one place or distributed across multiple components. Some or all of the components are selected according to actual needs to achieve the purpose of this embodiment.
[0134] Furthermore, in the various embodiments of this disclosure, the functional components are integrated into a single processing component, or each component exists physically separately, or two or more components are integrated into one component. The integrated components are implemented either in hardware or as software functional components.
[0135] If the integrated components are implemented as software functional components and sold or used as independent products, they are stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, is 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 disclosure. The aforementioned storage medium includes various media for storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0136] The above description represents the preferred embodiments of this disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure. Industrial applicability
[0137] This disclosure provides one or more embodiments of a method, apparatus, and vehicle for tracing abnormal events of a microcontroller in a vehicle. When performing an abnormal tracing operation on the microcontroller in the vehicle, in response to the vehicle being in operation, the working state of the microcontroller is obtained; in response to the working state being an abnormal working state, an abnormal event existing in the microcontroller is determined; based on the abnormal event, an abnormal tracing strategy for the microcontroller is determined; the abnormal tracing strategy is invoked to perform a tracing operation on the microcontroller, and a tracing result for the microcontroller is obtained. Since this disclosure, based on obtaining the working state of the microcontroller, if the working state is an abnormal working state, an abnormal event existing in the microcontroller is determined, an abnormal tracing strategy for the microcontroller is determined according to the determined abnormal event, and then the abnormal tracing strategy is invoked to perform a tracing operation on the microcontroller, a tracing result for the microcontroller is obtained, thereby achieving the purpose of multi-level tracing of the MCU experiencing an abnormal event, thus solving the technical problem of low efficiency in abnormal MCU location in vehicles, and thereby achieving the technical effect of improving the efficiency of abnormal MCU location in vehicles.
Claims
1. A method for tracing abnormal events in a vehicle's microcontroller, comprising: In response to the vehicle being 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, wherein, 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. In response to the abnormal operating state, an abnormal event is determined to exist in the microcontroller, including one of the following: In response to the abnormal operating state of the hardware system, the abnormal event is identified as the first abnormal event. In response to the abnormal working state of the software system, the abnormal event is identified as the second abnormal event; 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, wherein, 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 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.
4. The method according to claim 3, wherein, The exception backtracking strategy is invoked to perform a backtracking operation on the microcontroller, obtaining the backtracking result for the microcontroller, including: By calling the first exception backtracking strategy through the backtracking interface of the microcontroller, the first backtracking operation is performed on the microcontroller to obtain the first backtracking result.
5. The method according to claim 4, wherein, The backtracking interface includes: a first backtracking interface corresponding to the first anomaly backtracking strategy, which, through the microcontroller's backtracking interface, calls the first anomaly backtracking strategy to execute the first backtracking operation on the microcontroller, obtaining a first backtracking result, including: By using the first backtracking interface, the first exception backtracking strategy is invoked to perform the first backtracking operation corresponding to the first exception backtracking strategy on the hardware system, and the first backtracking result is obtained.
6. The method according to claim 2, wherein, Based on the abnormal event, an abnormal backtracking strategy for the microcontroller is determined, including: In response to the abnormal event being the 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 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.
7. The method according to claim 6, wherein, The exception backtracking strategy is invoked to perform a backtracking operation on the microcontroller, obtaining the backtracking result for the microcontroller, including: By calling the second exception backtracking strategy through the backtracking interface of the microcontroller, the second backtracking operation is performed on the microcontroller to obtain the second backtracking result.
8. The method according to claim 7, wherein, The backtracking interface includes: a second backtracking interface corresponding to the second anomaly backtracking strategy. Through the microcontroller's backtracking interface, the second anomaly backtracking strategy is invoked to perform the second backtracking operation on the microcontroller, obtaining a second backtracking result, including: By using the second backtracking interface, the second exception backtracking strategy is invoked to perform the second backtracking operation corresponding to the second exception backtracking strategy on the software system, and the second backtracking result is obtained.
9. The method according to claim 2, wherein, Based on the abnormal event, an abnormal backtracking strategy for the microcontroller is determined, including: In response to the abnormal events being the first abnormal event and the second abnormal event, the abnormal backtracking strategy is determined to be a first abnormal backtracking strategy and a second abnormal backtracking strategy. 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. 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.
10. The method according to claim 9, wherein, The exception backtracking strategy is invoked to perform a backtracking operation on the microcontroller, obtaining the backtracking result for the microcontroller, including: The first exception backtracking strategy is invoked through the backtracking interface of the microcontroller to perform the first backtracking operation on the microcontroller and obtain the first backtracking result. The second exception backtracking strategy is then invoked to perform the second backtracking operation on the microcontroller and obtain the second backtracking result.
11. The method according to claim 10, wherein, The backtracking interface includes: a first backtracking interface corresponding to the first anomaly backtracking strategy, and a second backtracking interface corresponding to the second anomaly backtracking strategy. Through the backtracking interface of the microcontroller, the first anomaly backtracking strategy is invoked to execute the first backtracking operation on the microcontroller, obtaining a first backtracking result, including: By calling the first exception backtracking strategy through the first backtracking interface, the first backtracking operation is performed on the hardware system to obtain the first backtracking result; The second exception backtracking strategy is invoked to perform the second backtracking operation on the microcontroller, obtaining a second backtracking result, including: By calling the second exception backtracking strategy through the second backtracking interface, the second backtracking operation is performed on the software system to obtain the second backtracking result.
12. The method according to any one of claims 1 to 11, wherein, 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.
13. The method according to claim 12, wherein, The chip is configured to output the backtracking result to the cloud, and the cloud is configured to use the backtracking result to locate anomalies in the microcontroller.
14. A vehicle comprising: Memory, which stores executable programs; A processor configured to run the program, wherein the program, when running, performs the method according to any one of claims 1 to 13.
15. A computer-readable storage medium comprising a stored executable program, wherein, When the executable program is executed, it controls the device containing the storage medium to perform the method described in any one of claims 1 to 13.
