A method, electronic device and storage medium for safety monitoring of a vehicle instrument system.
By monitoring registers, detecting interrupt frequency and priority, and identifying null interrupts, the problem of insufficient interrupt anomaly detection in vehicle instrument systems was solved, thus improving system security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA FAW CO LTD
- Filing Date
- 2023-04-03
- Publication Date
- 2026-06-30
AI Technical Summary
Existing vehicle instrument systems are inadequate in detecting interruptions and anomalies. Hardware or software watchdogs cannot effectively detect abnormal situations, which threatens system security.
By periodically monitoring registers, detecting the frequency of interrupts in the RAM area, determining interrupt priorities, and detecting empty interrupts, the existing interrupt resources of the instrument system are used for logical processing to prevent interrupt anomalies from causing system security problems.
It enables multi-dimensional safety monitoring of vehicle instrument systems, allowing for timely detection and handling of interruptions and anomalies, thereby improving system security.
Smart Images

Figure CN116610473B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a safety monitoring method, electronic device, and storage medium, and more particularly to a safety monitoring method, electronic device, and storage medium for a vehicle instrument system. Background Technology
[0002] With the development of vehicle intelligence, the amount of information that vehicle instrument panels provide to drivers regarding the operating status or parameters of various vehicle components has increased significantly. Vehicle instrument panel systems have also become increasingly complex. However, this increased complexity has not diminished the safety requirements for these systems. To ensure instrument panel system safety, a common practice is to implement software or hardware watchdogs to prevent system insecurity caused by software infinite loops or program crashes. On the one hand, system interruptions cannot be detected by watchdogs. On the other hand, system interrupt handling is often closely related to system functions, such as communication interruptions and memory interruptions. Ignoring the safety monitoring of system interruptions can lead to unpredictable problems such as communication interruptions and memory errors if an interrupt occurs. Therefore, the detection of system interrupt anomalies is also essential. As a crucial controller for drivers to understand vehicle status, the safety of the vehicle instrument panel is paramount. To ensure the safety of the instrument panel system, a common practice is to implement watchdogs to detect whether the system software has entered an infinite loop. However, the proper functioning of system interrupts is often overlooked. Summary of the Invention
[0003] The purpose of this invention is to provide a vehicle instrument system safety monitoring method, electronic device, and storage medium. The first technical problem to be solved is to use the existing system interrupt resources of the instrument system to perform relevant logical processing on interrupts, prevent interrupt abnormalities from causing system security problems, and make up for abnormal situations that cannot be detected by hardware or software watchdogs. The second technical problem to be solved is to ensure system security through four interrupt detection methods, thereby overcoming the shortcomings of existing technologies.
[0004] This invention provides the following solution:
[0005] A method for safety monitoring of a vehicle instrument system, specifically including:
[0006] The registers are periodically monitored, and any abnormal registers are notified to the interrupt system for appropriate handling.
[0007] Periodically check whether the frequency of interrupts recorded in a RAM region is normal;
[0008] The priority of the interrupt system is checked to determine whether an interrupt priority error has occurred, and corresponding fault response strategies are taken.
[0009] Check if any unused interrupt numbers are called in the interrupt service routine to determine if there is a phenomenon of triggering a null interrupt.
[0010] Furthermore, the periodic monitoring of the registers, and the notification of any abnormal registers to the interrupt system for appropriate handling, specifically involves:
[0011] The system polls and checks each relevant register at a certain frequency. When an error is detected, it notifies the interrupt system that a fault has occurred, and the system handles the situation accordingly.
[0012] Furthermore, the periodic detection of whether the interrupt frequency recorded in a RAM region is normal specifically involves writing the interrupt count and the last interrupt occurrence time to the RAM region when an interrupt occurs.
[0013] Furthermore, the memory layout of the RAM region includes: interrupt number, interrupt count, and timestamp.
[0014] Furthermore, the step of detecting the interrupt system priority, determining whether an interrupt priority error has occurred, and taking corresponding fault response strategies specifically involves:
[0015] When an interrupt occurs, it is determined whether a priority error has occurred. If a priority error has occurred, the interrupt routine writes the corresponding error flag to the specified memory space, and the interrupt monitoring timer performs periodic checks.
[0016] Furthermore, the step of detecting the interrupt system priority, determining whether an interrupt priority error has occurred, and taking corresponding fault response strategies specifically involves:
[0017] When an interrupt occurs, it is determined whether a higher-priority interrupt has occurred by checking if a higher-priority interrupt is set. If a higher-priority interrupt has occurred, it indicates a priority error, and an exception is logged.
[0018] Furthermore, the process of detecting whether unused interrupt numbers are called in the interrupt service routine, determining whether there is an interrupt error flag, and determining whether a null interrupt is triggered specifically involves:
[0019] When an empty interrupt is triggered, an error flag is recorded, and an interrupt monitoring timer is defined for a certain period to detect empty interrupt errors. When the recorded empty interrupt error flag is detected, the interrupt system is notified that a fault has occurred.
[0020] A vehicle instrument system safety monitoring system, specifically comprising:
[0021] The register monitoring module is used to periodically monitor the registers and notify the interrupt system to handle any abnormal register conditions.
[0022] The interrupt frequency detection module is used to periodically detect whether the interrupt occurrence frequency recorded in a RAM area is normal.
[0023] The interrupt priority error detection module is used to detect the priority of the interrupt system, determine whether an interrupt priority error has occurred, and take corresponding fault response strategies.
[0024] The empty interrupt detection module is used to detect whether an unused interrupt number is called in the interrupt service routine, and to determine whether an empty interrupt is triggered.
[0025] An electronic device includes: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described in any one of claims 1 to 7.
[0026] A computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the method.
[0027] Compared with the prior art, the present invention has the following advantages: The present invention periodically monitors the registers, periodically detects the frequency of interrupt occurrence in a RAM area, detects the priority of the interrupt system, and can also determine whether there is a phenomenon of triggering a null interrupt. It utilizes the existing system interrupt resources of the instrument system to perform relevant logic processing on the interrupt, prevents interrupt abnormalities from causing system security problems, and compensates for abnormal situations that cannot be detected by hardware or software watchdogs.
[0028] This invention provides four methods for ensuring system safety using interrupts: monitoring registers, interrupt frequency, interrupt priority, and null interrupts. These methods detect interrupt anomalies from multiple dimensions, including detecting whether interrupt frequency and interrupt priority are abnormal and whether null interrupts are triggered, thus achieving safety monitoring of the instrument system. Attached Figure Description
[0029] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a method for monitoring the safety of vehicle instrument systems.
[0031] Figure 2 This is an architecture diagram of the vehicle instrument system safety monitoring system.
[0032] Figure 3 This is a flowchart of the register monitoring program.
[0033] Figure 4 This is a flowchart of the program processing for periodically reading the frequency of interrupt occurrences using the interrupt monitoring timer.
[0034] Figure 5 This is a flowchart of the procedure for detecting priority errors.
[0035] Figure 6 This is a flowchart that notifies the interrupt system of a fault when a recorded empty interrupt error flag is detected.
[0036] Figure 7 This is a schematic diagram of the interrupt controller.
[0037] Figure 8 This is a schematic diagram of the electronic device. Detailed Implementation
[0038] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] like Figure 1 The vehicle instrument system safety monitoring method shown specifically includes:
[0040] Step S1: Periodically monitor the registers and notify the interrupt system to handle any abnormal registers.
[0041] Specifically, the system polls and checks each relevant register at a certain frequency. When an error is detected, it notifies the interrupt system that a fault has occurred, and the system handles the situation accordingly.
[0042] Step S2: Periodically check whether the frequency of interrupts recorded in a RAM region is normal;
[0043] When an interrupt occurs, the interrupt count and the last interrupt time are written to the RAM area.
[0044] Specifically, the memory layout of the RAM region includes: interrupt number, interrupt count, and timestamp.
[0045] For example: To monitor interrupt frequency, an interrupt monitoring timer with a 20ms period is defined. Its function is to periodically monitor the RAM area and make judgments. Note: Different interrupts have different normal trigger frequencies due to their different functions. For the monitored interrupts, the interrupt frequency occurrence time needs to be defined appropriately according to the interrupt task.
[0046] The number of interrupts is recorded when an interrupt occurs. The interrupt monitoring timer periodically reads the number of interrupts. If the time difference between two consecutive interrupts exceeds the defined reasonable occurrence frequency, an error is recorded, and the interrupt system is notified that a fault has occurred.
[0047] Step S3: Check the priority of the interrupt system to determine whether an interrupt priority error has occurred, and take corresponding fault response strategies.
[0048] Specifically, when an interrupt occurs, it is determined whether a priority error has occurred. If a priority error has occurred, the interrupt routine writes the corresponding error flag to the specified memory space, and the interrupt monitoring timer performs periodic checks.
[0049] Specifically, when an interrupt occurs, it is determined whether a higher-priority interrupt has occurred by checking if a higher-priority interrupt is set. If a higher-priority interrupt has occurred, it indicates a priority error, and an exception is recorded.
[0050] For example, when an interrupt occurs, the system checks whether a higher-priority interrupt is set to detect if a higher-priority interrupt has occurred. If a higher-priority interrupt has occurred, it indicates a priority error, and the exception is logged.
[0051] For example, an interrupt monitoring timer with a period of 20ms is defined to periodically check the priority error flag. When the flag is detected to be set, the interrupt system is notified that a fault has occurred.
[0052] Step S4: Check if any unused interrupt numbers are called in the interrupt service routine to determine if there is a phenomenon of triggering an empty interrupt.
[0053] Specifically, when an empty interrupt is triggered, an error flag is recorded, an interrupt monitoring timer is defined for a certain period to detect empty interrupt errors, and when the recorded empty interrupt error flag is detected, the interrupt system is notified that a fault has occurred.
[0054] For example, to prevent interrupt vector table errors, a null interrupt (Dummy ISR) is used to handle unused interrupt numbers. If the Dummy ISR is invoked, it indicates an error has occurred in the interrupt system. The Dummy ISR needs to write the corresponding error flag to the designated memory space, which is then periodically checked by the interrupt watch timer.
[0055] When a null interrupt is triggered, an error flag is recorded. An interrupt monitoring timer with a period of 20ms is defined to detect null interrupt errors. When a recorded null interrupt error flag is detected, the interrupt system is notified that a fault has occurred.
[0056] For the purpose of simplicity, the method steps disclosed in the above embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0057] Any flowchart or other description of a process or method can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed and implemented not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, or by executing computer instructions and implementing corresponding functions according to program structures such as loops, branches, etc., as will naturally be understood by those skilled in the art when practicing embodiments of the invention.
[0058] like Figure 2 The vehicle instrument system safety monitoring system shown specifically includes:
[0059] The register monitoring module is used to periodically monitor the registers and notify the interrupt system to handle any abnormal register conditions.
[0060] The interrupt frequency detection module is used to periodically detect whether the interrupt occurrence frequency recorded in a RAM area is normal.
[0061] The interrupt priority error detection module is used to detect the priority of the interrupt system, determine whether an interrupt priority error has occurred, and take corresponding fault response strategies.
[0062] The empty interrupt detection module is used to detect whether an unused interrupt number is called in the interrupt service routine, and to determine whether an empty interrupt is triggered.
[0063] It is worth noting that although only some basic functional modules are disclosed in the embodiments of this invention, it does not mean that the composition of this system is limited to the above-mentioned basic functional modules. On the contrary, what this embodiment intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. The fact that this embodiment only discloses a few basic functional modules should not be considered as the scope of protection of the claims of this invention being limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above device is described separately according to its functions as various units and modules. Of course, in implementing this invention, the functions of each unit and module can be implemented in one or more software and / or hardware.
[0064] The implementation methods of the system described above are merely illustrative. For example, the various functional modules, units, or subsystems within the system may or may not be physically separate, or they may or may not be physical units; that is, they may be located in the same place or distributed across multiple different systems and their subsystems or modules. Those skilled in the art can select some or all of the functional modules, units, or subsystems to achieve the objectives of the embodiments of the present invention according to actual needs. Those skilled in the art can understand and implement the above-described situations without any creative effort.
[0065] like Figure 3 As shown, in this embodiment, the correctness of the registers is monitored, and appropriate handling is performed when an anomaly is detected. The software polls and checks each relevant register at a frequency of 20ms. When an error is read, the interrupt system is notified that a fault has occurred, and the system performs corresponding handling.
[0066] like Figure 4 As shown, this embodiment monitors the frequency of critical interrupts to determine whether there are no interrupts, few interrupts, or too many interrupts. The software uses a RAM region to record the interrupt frequency. When an interrupt occurs, the interrupt count and the last interrupt occurrence time are written to the RAM region. The memory layout format is as follows:
[0067] Interruption number 1
[0068] 4-byte interrupt count
[0069] 4-byte: timestamp
[0070] Interruption number 2
[0071] 4-byte interrupt count
[0072] 4-byte: timestamp
[0073] ...
[0074] Interruption number N
[0075] 4-byte interrupt count
[0076] 4-byte: timestamp
[0077] Interruption number N
[0078] In this embodiment, to monitor the frequency of interrupt occurrences, a 20ms interrupt monitoring timer is defined. Its function is to periodically monitor the RAM area and make judgments. Note: Different interrupts have different normal trigger frequencies due to their different functions. For the monitored interrupts, the interrupt frequency occurrence time needs to be defined appropriately according to the interrupt task.
[0079] The number of interrupts is recorded when an interrupt occurs. The interrupt monitoring timer periodically reads the number of interrupts. If the time difference between two consecutive interrupts exceeds the defined reasonable occurrence frequency, an error is recorded, and the interrupt system is notified that a fault has occurred.
[0080] like Figure 5 As shown, to prevent errors in the interrupt system's priority, this embodiment checks for priority errors when an interrupt occurs. If an error occurs, the interrupt routine writes the corresponding error flag to a designated memory space, which is then periodically checked by the interrupt monitoring timer.
[0081] When an interrupt occurs, it is detected by checking if a higher-priority interrupt is set. If a higher-priority interrupt occurs, it indicates a priority error, and the exception is logged. For example, an interrupt monitoring timer with a period of 20ms is defined to periodically check the priority error flag. When the flag is detected as set, the interrupt system is notified that a fault has occurred.
[0082] like Figure 6 As shown, to prevent interrupt vector table errors, a null interrupt (Dummy ISR) is used to handle unused interrupt numbers. If the Dummy ISR is invoked, it indicates an error has occurred in the interrupt system. The Dummy ISR needs to write the corresponding error flag to a designated memory space, which is periodically checked by an interrupt watchdog timer. When a null interrupt is triggered, the error flag is recorded. A 20ms interrupt watchdog timer is defined to detect null interrupt errors. When a recorded null interrupt error flag is detected, the interrupt system is notified of a fault.
[0083] The significance of performing empty interrupt detection is that the priority of empty interrupts is set to the lowest. Interrupts with the lowest priority should not be executed in the first place. If they are executed, it means that an unexpected fault has occurred, such as static electricity, malfunction, etc., which can be used as an error flag to notify the interrupt system.
[0084] In summary, the above embodiments ensure that when an abnormal interrupt occurs, the instrumentation system is notified, so that the instrumentation system can take appropriate action, by monitoring four system interrupt states: register, interrupt frequency, interrupt priority, and no interrupt.
[0085] like Figure 7 As shown, in this embodiment, the vehicle instrument system safety monitoring method runs in the interrupt controller of the vehicle instrument system. The interrupt controller performs interrupt control on switch signals, CAN bus signals, watchdog timers and other vehicle electronic devices. To ensure the safe operation of the instrument system, it is necessary to monitor the registers, detect the interrupt frequency and interrupt priority, and monitor empty interrupts. This is used to detect interrupt anomalies from multiple dimensions, including the frequency of interrupt occurrence, whether the interrupt priority is abnormal, and whether an empty interrupt is triggered, thus realizing the safety monitoring of the instrument system.
[0086] like Figure 8 As shown, the present invention also discloses electronic devices and storage media corresponding to the vehicle instrument system safety monitoring method and system:
[0087] An electronic device includes: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of a vehicle instrument system safety monitoring method.
[0088] A computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a vehicle instrument system safety monitoring method.
[0089] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0090] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0091] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.
[0092] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.
[0093] Electronic devices can also obtain reset commands corresponding to the storage media. The reset commands corresponding to the storage media are provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and no restrictions are imposed here.
[0094] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.
[0095] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0096] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0097] Additionally, to simplify the description and discussion, and to avoid obscuring one or more embodiments of this specification, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be illustrated in block diagram form to avoid obscuring one or more embodiments of this specification, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which one or more embodiments of this specification will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that one or more embodiments of this specification may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0098] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.
[0099] It should be noted that certain terms are used in this specification and claims to refer to specific elements. Those skilled in the art will understand that different manufacturers or producers may use different terms to refer to the same element. This specification and claims do not distinguish elements based on differences in terminology, but rather on differences in function.
[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, any of the embodiments claimed in the claims can be used in any combination of embodiments of the invention.
[0102] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0103] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0104] All features disclosed in this specification, or steps in all disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps. Any feature disclosed in this specification, unless specifically stated otherwise, may be replaced by other equivalent or similar features. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features. Throughout this specification, the same reference numerals indicate the same elements.
[0105] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the corresponding claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the corresponding claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for safety monitoring of a vehicle instrument system, characterized in that, Specifically, it includes: The registers are periodically monitored, and any abnormal registers are notified to the interrupt system for appropriate handling. Periodically check whether the frequency of interrupts recorded in a RAM region is normal; The priority of the interrupt system is checked to determine whether an interrupt priority error has occurred, and corresponding fault response strategies are taken. Check if any unused interrupt numbers are called in the interrupt service routine to determine if there is a phenomenon of triggering a null interrupt; Specifically, the step of detecting the priority of the interrupt system, determining whether an interrupt priority error has occurred, and taking corresponding fault response strategies involves: When an interrupt occurs, it is determined whether a priority error has occurred. If a priority error has occurred, the interrupt routine writes the corresponding error flag to the specified memory space, and the interrupt monitoring timer performs periodic checks. The process of detecting the interrupt system's priority, determining whether an interrupt priority error has occurred, and taking appropriate fault response strategies involves: When an interrupt occurs, it is determined whether a higher-priority interrupt has occurred by checking if a higher-priority interrupt is set. If a higher-priority interrupt has occurred, it indicates a priority error, and an exception is logged.
2. The vehicle instrument system safety monitoring method according to claim 1, characterized in that, The periodic monitoring of registers, and the notification of abnormal register conditions to the interrupt system for appropriate handling, specifically includes: The system polls and checks each relevant register at a frequency of 20ms. When an error is detected, it notifies the interrupt system that a register fault has occurred, and the system will handle the situation accordingly.
3. The vehicle instrument system safety monitoring method according to claim 1, characterized in that, The periodic detection of whether the frequency of interrupts recorded in a segment of RAM is normal specifically involves writing the interrupt count and the last interrupt occurrence time into the RAM segment when an interrupt occurs.
4. The vehicle instrument system safety monitoring method according to claim 3, characterized in that, The memory layout of the RAM region includes: interrupt number, interrupt count, and timestamp.
5. The vehicle instrument system safety monitoring method according to claim 1, characterized in that, The method for detecting whether unused interrupt numbers are called in the interrupt service routine and determining whether a null interrupt is triggered specifically involves: When an empty interrupt is triggered, an error flag is recorded. An interrupt monitoring timer with a period of 20ms is defined to detect empty interrupt errors. When the recorded empty interrupt error flag is detected, the interrupt system is notified that a fault has occurred.
6. A vehicle instrument system safety monitoring system, characterized in that, The system is used to perform the vehicle instrument system safety monitoring method as described in any one of claims 1-5; The system specifically includes: The register monitoring module is used to periodically monitor the registers and notify the interrupt system to handle any abnormal register conditions. The interrupt frequency detection module is used to periodically detect whether the interrupt occurrence frequency recorded in a RAM area is normal. The interrupt priority error detection module is used to detect the priority of the interrupt system, determine whether an interrupt priority error has occurred, and take corresponding fault response strategies. The empty interrupt detection module is used to detect whether an unused interrupt number is called in the interrupt service routine, and to determine whether an empty interrupt is triggered.
7. An electronic device, characterized in that, include: The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the method according to any one of claims 1 to 5.