Controller monitoring method, vehicle and storage medium
By setting a monitoring interface in the microcontroller's preset monitoring function, abnormal information is collected and monitoring records are generated, which solves the problems of large workload and high memory consumption in the existing technology for abnormal location and achieves more efficient abnormal location.
Patent Information
- Application Number
- CN202511338996.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2025-11-18
AI Technical Summary
Existing microcontroller anomaly localization solutions involve a large workload, consume a lot of memory, and are inaccurate, affecting anomaly localization efficiency.
By setting up monitoring interfaces in some pre-defined monitoring functions, abnormal information can be collected through the target pre-defined monitoring functions. Monitoring records can be generated by combining abnormal information and runtime information, thereby reducing development workload and memory usage.
It improves the accuracy and efficiency of microcontroller anomaly localization, and reduces development workload and memory usage.
Smart Images

Figure CN120972736A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle-mounted controllers, and in particular to a controller monitoring method, a vehicle, and a storage medium. BACKGROUND
[0002] Microcontroller Units (MCUs) are widely used in vehicle-mounted systems such as body control systems and battery management systems. As the complexity of vehicle-mounted systems increases, higher requirements are placed on the monitoring of the operating state of the microcontroller and the ability to locate exceptions. Abnormalities may occur during the operation of the microcontroller, and it is necessary to locate and record the abnormal information to facilitate developers to troubleshoot the cause of the abnormality. Related technologies usually use a scheme of setting a location marker interface at the input or output end of each task function to locate the exception. However, the microcontroller system includes a large number of task functions, and the workload of this exception locating scheme is large, and a large amount of memory is occupied, and it is easy to occur inaccurate positioning, thereby affecting the efficiency of exception locating. SUMMARY
[0003] In view of the above, it is necessary to provide a controller monitoring method, a vehicle, and a storage medium to solve the problem that the workload of the exception locating scheme of setting a location marker interface at each task function in related technologies is large, a large amount of memory is occupied, and inaccurate positioning is easy to occur, thereby affecting the efficiency of exception locating.
[0004] In a first aspect, an embodiment of the present application provides a controller monitoring method applied to a vehicle, and the method comprises: setting a monitoring interface for each of a plurality of preset monitoring functions; when an exception occurs during the operation of the controller, determining a target preset monitoring function corresponding to the exception based on the monitoring interface; collecting exception information through the target preset monitoring function; monitoring operating information of the controller; generating a monitoring record of the controller based on the exception information and the operating information.
[0005] In a possible implementation, the determining of the target preset monitoring function corresponding to the exception based on the monitoring interface comprises: determining whether the corresponding preset monitoring function is triggered by using the monitoring interface, and determining the preset monitoring function that is triggered as the target preset monitoring function.
[0006] In a possible implementation, the plurality of preset monitoring functions include an ErrorHook function and a PanicHook function, and the collecting of the exception information through the target preset monitoring function comprises: The task identifier, the task identifier of the activation number exceeding the limit, and an exception information structure are collected through the error hook function or the emergency hook function, and the exception information structure includes a system service triggering the exception, an error code, and an associated task identifier.
[0007] In a possible implementation, the plurality of preset monitoring functions include a hardware error function HardFault, a bus error function BusFault, and a watchdog timeout function, and the collecting of the exception information through the target preset monitoring function includes: The stack pointer register information, the link register information, and the program counter register information are collected through the hardware error function, the bus error function, or the watchdog timeout function.
[0008] In a possible implementation, the method further includes: storing the exception information to an SRAM; or storing the exception information to a Flash memory through a non-volatile storage interface, reading the exception information through a data identifier, or reporting the exception information through a diagnostic fault code.
[0009] In a possible implementation, the running information includes controller load information, and the monitoring of the running information of the controller includes: recording the time consumption of each task executed by the controller once, determining the total time consumption of each task in a preset time period; determining the controller load information of each task based on the total time consumption of each task and the preset time period.
[0010] In a possible implementation, the running information further includes task stack information, and the monitoring of the running information of the controller further includes: obtaining the peak usage of a task stack of each task from initialization to the current time, to obtain the task stack information.
[0011] In a possible implementation, the generating of the monitoring record of the controller based on the exception information and the running information includes: packing and converting the exception information and the running information into a preset file format to generate the monitoring record of the controller; sending the monitoring record to a computer system through an SPI interface for storage.
[0012] In a second aspect, an embodiment of the present application provides a vehicle, the vehicle comprising a memory and a processor, wherein the memory is configured to store program instructions; and the processor is configured to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the vehicle is caused to perform the controller monitoring method described above.
[0013] In a third aspect, an embodiment of the present application provides a computer storage medium, the computer storage medium storing program instructions, when the program instructions are run on a vehicle, the processor of the vehicle is caused to perform the controller monitoring method described above.
[0014] The controller monitoring method, the vehicle and the storage medium provided by the embodiments of the present application can set a monitoring interface in part of the preset monitoring functions, and further determine a target preset monitoring function corresponding to the controller exception, so that the abnormal information can be collected through the target preset monitoring function, thereby reducing the development workload and reducing the memory occupation. In addition, the running information of the controller can be monitored, and the abnormal positioning accuracy of the controller can be effectively improved in combination with the abnormal information and the running information. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0016] Figure 1 FIG. 1 is a flowchart of a controller monitoring method provided by an embodiment of the present application.
[0017] Figure 2 FIG. 2 is a flowchart of monitoring the running information of the controller provided by an embodiment of the present application.
[0018] Figure 3 FIG. 3 is a structural schematic diagram of a controller monitoring device provided by an embodiment of the present application.
[0019] Figure 4 FIG. 4 is a hardware structure schematic diagram of a vehicle provided by an embodiment of the present application. DETAILED DESCRIPTION
[0020] The terms "first", "second", etc. used in the embodiments of the present application are only for descriptive purposes and should not be construed as indicating or implying relative importance or implying a number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of the words "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It is to be understood that the use of "may" herein includes the possibility that "will" occur. The use of "and / or" in the application herein is merely an associative relationship describing the associated objects, and means that there can be three relationships. For example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. "At least one" means one or more. "Multiple" means two or more. For example, at least one of a, b or c can mean a, b, c, a and b, a and c, b and c, and a, b and c. The embodiments described below and the features in the embodiments can be combined with each other without conflict.
[0022] Microcontrollers are widely used in vehicle body control systems, battery management systems and other vehicle-mounted systems. With the increasing complexity of vehicle-mounted systems, higher requirements are placed on the running state monitoring and abnormal positioning capabilities of microcontrollers. Abnormalities may occur during the operation of microcontrollers, and it is necessary to locate and record abnormal information to facilitate developers to troubleshoot the cause of the abnormality.
[0023] The related art sets a mark position interface at the input or output of each task function, when the code executes to the mark position interface, the corresponding position information is saved to the storage area, and arranged in chronological order. When the microcontroller is abnormally reset, the code running position before the microcontroller is abnormally reset in the storage area is read out by calling the sending position interface. However, this scheme needs to set a mark position interface at the input and output of each task function, which is a huge workload and occupies a large amount of memory. Moreover, in the controller system, there are many underlying system-level functions, and after adding the interface, unforeseen problems may occur. In addition, for a real-time scheduling system, there is a task preemption situation, even if the position information before the reset is read out, it may not be the error position, thereby causing inaccurate positioning of abnormal information. For example: a 100ms period task with low priority, due to time consumption, a reset problem occurs, but at this time, a 2ms task with higher priority has been run, and the recorded position information is the position information of the 2ms task, which may cause developers to be confused when locating the problem. In addition, this scheme can only determine that the abnormal restart occurs, but cannot classify the reasons for the problem. In addition, this scheme lacks monitoring of the overall operation of the microcontroller.
[0024] In order to solve the problem that the workload of the abnormal positioning scheme of setting a position mark interface in each task function in the related art is large, a large amount of memory is occupied, inaccurate positioning is prone to occur, and the abnormal positioning efficiency is affected, an embodiment of the present application provides a controller monitoring method. By setting a monitoring interface in part of the preset monitoring functions, and further determining the target preset monitoring function corresponding to the controller abnormality, the abnormal information can be collected through the target preset monitoring function, which reduces the development workload, reduces the memory occupation, and also can monitor the running information of the controller. The abnormal positioning accuracy of the controller can be effectively improved by combining the abnormal information and the running information.
[0025] Referring to Figure 1 The controller monitoring method provided by an embodiment of the present application is shown in the flowchart of the controller monitoring method. The controller monitoring method is applied in a vehicle, and the controller monitoring method comprises: S101, a monitoring interface is set for each of a plurality of preset monitoring functions.
[0026] In an embodiment of the present application, the plurality of preset monitoring functions are functions in an AUTOSAR (automotive open system architecture) system, and the plurality of preset monitoring functions include, but are not limited to, an ErrorHook function, a PanicHook function, a HardFault function, a BusFault function, and a watchdog timeout function. The ErrorHook function is used to handle application layer errors (such as resource conflicts and invalid parameters), supports error logging or recovery operations, for example, the ErrorHook function is used to record the cause of a task activation failure (such as a stack overflow or resource occupation). The PanicHook function is used to handle kernel layer errors, is triggered when a fatal error (such as memory corruption or a critical data structure exception) that cannot be recovered is detected, for example, the PanicHook function is used to handle a memory protection unit configuration violation or a kernel stack overflow. The HardFault function is used to handle serious hardware or instruction level errors (such as illegal memory access, unaligned operations, and division by zero), for example, the HardFault function is used to handle a null pointer dereference or a division by zero operation. The BusFault function is used to be triggered when a bus access error (such as accessing an unmapped address or a peripheral not responding) occurs, for example, the BusFault function is used to handle a register address configured incorrectly or a DMA transfer timeout. The watchdog timeout function is used to detect system lockup (such as a program infinite loop or a task blocking), is triggered after a timeout to reset or interrupt, for example, the watchdog timeout function is used to handle a program infinite loop or a task scheduling blockage causing a watchdog failure (that is, a task processing timeout).
[0027] S102, when an exception occurs during running of the controller, determining a target preset monitoring function corresponding to the exception based on the monitoring interface.
[0028] In an embodiment of the present application, whether the corresponding preset monitoring function is triggered is determined by using the monitoring interface, and the preset monitoring function that is triggered is determined as the target preset monitoring function. For example, if it is determined by using the monitoring interface of the ErrorHook function that the ErrorHook function is triggered, the ErrorHook function is determined as the target preset monitoring function.
[0029] S103, collecting exception information by using the target preset monitoring function.
[0030] In an embodiment of the present application, the ErrorHook or the PanicHook collects a task identifier TaskId of the exception, a task identifier activateTask of the task whose activation number exceeds a preset threshold, and an exception information structure CurrentError, wherein the exception information structure includes a system service triggering the exception, an error code, and an associated task identifier. The task whose activation number exceeds the preset threshold is a task whose activation number is greater than or equal to the preset threshold, for example, the preset threshold is 5, 8, 10, or other values.
[0031] In an embodiment of the present application, the HardFault, the BusFault, or the watchdog timeout function collects general register information (R0-R12), stack pointer register (Stack Pointer) information, link register (LinkRegister, LR) information, program counter register information (Program Counter, PC), and program status register (Program Status Register, PSR). The register information includes register values or stack information, and the task handling the timeout can be located through the register information.
[0032] In an embodiment of the present application, the type of the exception can also be recorded, for example, the type of the exception triggering the ErrorHook is determined to be a first type, the type of the exception triggering the PanicHook is determined to be a second type, the type of the exception triggering the HardFault is determined to be a third type, the type of the exception triggering the BusFault is determined to be a fourth type, and the type of the exception triggering the watchdog timeout function is determined to be a fifth type.
[0033] In an embodiment of the present application, the method further includes storing the exception information to a static random access memory (SRAM).
[0034] In another embodiment of the present application, the method further includes storing the exception information to a flash memory through a non-volatile memory (NvM) interface, reading the exception information through a data identifier (DID), or reporting the exception information through a diagnostic trouble code (DTC).
[0035] S104, monitoring running information of the controller.
[0036] In an embodiment of the present application, the running information of the controller includes but is not limited to load information and task stack information.
[0037] Referring to Figure 2 FIG. 4 shows a flowchart of monitoring running information of a controller according to an embodiment of the present application.
[0038] S1041, the record controller executes the time consumption of each task once, determines the total time consumption of each task in the preset time period.
[0039] In an embodiment of the present application, the task start timestamp is recorded before the execution of each task through the pre-task hook function PreTaskHook, the task end timestamp is recorded after the execution of each task through the post-task hook function PostTaskHook, the task end timestamp and the task start timestamp are obtained through the function GetCounterValue for obtaining the current value of the performance counter, respectively, the difference between the task end timestamp and the task start timestamp is calculated, and the time consumption of the controller executing each task once is obtained.
[0040] In an embodiment of the present application, the number of times that the controller executes each task in the preset time period is determined, the product of the number of times that each task is executed in the preset time period and the time consumption of executing each task once is calculated, and the total time consumption is obtained. For example, the preset time period can be 5000ms, 8000ms, 1s or other time.
[0041] S1042, based on the total time consumption of each task and the preset time period, the load information of each task is determined.
[0042] In an embodiment of the present application, the load information CPULOAD=(preset time period-total time consumption) / preset time period.
[0043] S1043, the peak usage of the task stack of each task from the initialization to the current time is obtained, and the task stack information is obtained.
[0044] In an embodiment of the present application, the peak usage of the task stack of each task from the initialization to the current time is obtained by using the API function Os_GetTaskStackUsage. The peak usage of the task stack is the maximum usage of the stack memory since the task is started.
[0045] In an embodiment of the present application, the load information and the task stack information are output based on a preset period through the universal asynchronous receiver-transmitter (UART) serial port. For example, the preset period is 3s, 5s, 10s or other time length.
[0046] S105, based on the abnormal information and the running information, the monitoring record of the controller is generated.
[0047] In an embodiment of the present application, the abnormal information and the running information are packaged and converted into a preset file format to generate a monitoring record of the controller, and the monitoring record is sent to a computer system through an SPI interface for storage. For example, the preset file format is a CSV format, a binary format or an SQLite format, and the computer system is a Linux system. A developer can read the monitoring record of the controller by reading a Linux system file, and thus perform abnormal positioning and analyze abnormal causes based on the monitoring record.
[0048] The above embodiment of the present application sets the monitoring interface in part of the preset monitoring functions, and further determines the target preset monitoring function corresponding to the controller abnormality, so that the abnormal information can be collected through the target preset monitoring function, thereby reducing the development workload and reducing the memory occupation. In addition, the running information of the controller can be monitored, and the abnormal positioning accuracy of the controller can be effectively improved in combination of the abnormal information and the running information.
[0049] Referring to Figure 3 FIG. 1 shows a structure schematic diagram of a controller monitoring device provided by an embodiment of the present application. In an embodiment of the present application, the controller monitoring device 200 can include a plurality of function modules composed of computer program segments. The computer program segments in the controller monitoring device 200 can be stored in a memory of a vehicle and executed by at least one processor to perform a controller monitoring function.
[0050] In an embodiment of the present application, the controller monitoring device 200 can be divided into a plurality of function modules according to the functions performed thereby. The function modules of the controller monitoring device 200 can include a setting module 201, a determination module 202, a collection module 203, a monitoring module 204 and a generation module 205. The modules in the embodiment of the present application refer to a series of computer program segments that can be executed by at least one processor and can complete a fixed function, which are stored in a memory.
[0051] The setting module 201 is configured to set the monitoring interface for the plurality of preset monitoring functions respectively.
[0052] The determination module 202 is configured to determine the target preset monitoring function corresponding to the abnormality based on the monitoring interface when the controller generates an abnormality in the running process.
[0053] The collection module 203 is configured to collect the abnormal information through the target preset monitoring function.
[0054] The monitoring module 204 is configured to monitor the running information of the controller.
[0055] The generation module 205 is configured to generate a monitoring record of the controller based on the abnormal information and the running information.
[0056] The embodiments of the present application also provide a vehicle 10. Referring to Figure 4 Fig. 1 is a schematic diagram of a hardware structure of a vehicle provided by an embodiment of the present application. The controller monitoring method provided by the embodiments of the present application is applied to the vehicle 10. The vehicle 10 includes, but is not limited to, a processor 110 and a memory 120 connected through a communication bus 130. Figure 4 The vehicle is only an example and does not constitute a corresponding limitation. In other embodiments, the vehicle can include more components than those shown in the figure.
[0057] The memory 120 can include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running in the background, and can also be used to store data of users and applications, etc. The random access memory can include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0058] The non-volatile memory can also store executable programs and store data of users and applications, etc., which can be loaded in advance into the random access memory for direct reading and writing by the processor 110. The non-volatile memory can include a magnetic disk storage device, a flash memory.
[0059] The memory 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include a plurality of instructions which, when executed by the processor 110, can implement the controller monitoring method executed on the vehicle 10.
[0060] In other embodiments, the vehicle 10 also includes an external memory interface for connecting an external memory to expand the storage capacity of the vehicle 10.
[0061] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0062] The processor 110 provides computing and control capabilities, for example, the processor 110 is used to execute the computer program stored in the memory 120 to realize the above-mentioned controller monitoring method.
[0063] The communication bus 130 is used to provide a communication channel between the memory 120 and the processor 110 in the vehicle 10.
[0064] It can be understood that the structure of the embodiment of the present application does not constitute a specific limitation of the vehicle 10. In other embodiments of the present application, the vehicle 10 can include more or fewer components than the illustration, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0065] The embodiment of the present application also provides a computer storage medium, and the computer storage medium stores computer instructions, when the computer instructions run on the vehicle 10, the vehicle 10 executes the above-mentioned related method steps to realize the controller monitoring method in the above-mentioned embodiment.
[0066] The embodiment of the present application also provides a computer program product, when the computer program product runs on the computer, the computer executes the above-mentioned related steps to realize the controller monitoring method in the above-mentioned embodiment.
[0067] In addition, the embodiment of the present application also provides a device, which can be a chip, a component or a module. The device can include a processor and a memory connected to each other; wherein the memory is used to store computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory to make the chip execute the controller monitoring method in the above-mentioned method embodiments.
[0068] Among them, the vehicle, computer storage medium, computer program product or chip provided by the embodiments of the present application are all used to execute the corresponding method provided above, so the beneficial effects that can be achieved are referable to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0069] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0070] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0071] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0072] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0073] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application or the essential part or all or part of the technical solutions that make contributions to the prior art can be embodied in the form of a software product, and the software product is stored in a storage medium, including a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A controller monitoring method, applied to a vehicle, characterized in that, The method includes: Configure monitoring interfaces for multiple preset monitoring functions; When an anomaly occurs during the operation of the controller, the target preset monitoring function corresponding to the anomaly is determined based on the monitoring interface; Abnormal information is collected through the target preset monitoring function; Monitor the operating information of the controller; The monitoring records of the controller are generated based on the anomaly information and the operational information.
2. The controller monitoring method as described in claim 1, characterized in that, The target preset monitoring function for determining the anomaly based on the monitoring interface includes: The monitoring interface is used to determine whether the corresponding preset monitoring function is triggered, and the preset monitoring function that is triggered is determined as the target preset monitoring function.
3. The controller monitoring method as described in claim 1, characterized in that, The multiple preset monitoring functions include the error hook function ErrorHook and the emergency hook function PanicHook. The collection of abnormal information through the target preset monitoring functions includes: The error hook function or the emergency hook function collects the abnormal task identifier, the task identifier that has exceeded the activation limit, and the abnormal information structure. The abnormal information structure includes the system service that triggered the abnormality, the error code, and the associated task identifier.
4. The controller monitoring method as described in claim 1, characterized in that, The multiple preset monitoring functions include a hardware error function (HardFault), a bus error function (BusFault), and a watchdog timeout function. The step of collecting abnormal information through the target preset monitoring function includes: The stack pointer register information, link register information, and program counter register information are collected through the hardware error function, the bus error function, or the watchdog timeout function.
5. The controller monitoring method as described in claim 1, characterized in that, The method further includes: Store the abnormal information in static random access memory (SRAM); or The abnormal information is stored in the Flash memory through a non-volatile storage interface, and the abnormal information is read through a data identifier or reported through a diagnostic fault code.
6. The controller monitoring method as described in claim 1, characterized in that, The operational information includes controller load information, and monitoring the operational information of the controller includes: Record the time taken for the controller to execute each task once, and determine the total time taken for each task within a preset time period; The controller load information for each task is determined based on the total time consumed by each task and the preset time period.
7. The controller monitoring method as described in claim 6, characterized in that, The operational information also includes task stack information, and monitoring the operational information of the controller further includes: Obtain the peak usage of the task stack for each task from initialization to the current time to obtain the task stack information.
8. The controller monitoring method as described in claim 1, characterized in that, The process of generating the controller's monitoring records based on the anomaly information and the operational information includes: The abnormal information and the operational information are packaged and converted into a preset file format to generate the monitoring record of the controller; The monitoring records are sent to the computer system for storage via the Serial Peripheral Interface (SPI).
9. A vehicle, characterized in that, The vehicle includes a memory and a processor: The memory is used to store program instructions; The processor is configured to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, cause the vehicle to perform the controller monitoring method as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The computer storage medium stores program instructions that, when executed on the vehicle, cause the vehicle's processor to perform the controller monitoring method as described in any one of claims 1 to 8.