Risk control method and device of control domain and vehicle
By acquiring and analyzing operating information in the vehicle control domain, conducting risk analysis and automatically repairing it, the problem of low reliability of the control domain in the early design was solved, efficient risk control and repair was achieved, and shutdowns caused by abnormal conditions were avoided.
Patent Information
- Application Number
- CN202410814912.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-11
AI Technical Summary
When the vehicle control domain was designed in the early stages, functional implementation was more important than others, resulting in low reliability of the control domain and the inability to effectively handle abnormal situations, which usually required after-sales maintenance.
By obtaining information about the operating system, interrupts, tasks, applications, and storage areas during the operation of the vehicle's control domain, risk analysis is performed, repair strategies are determined, and automatic repair processing is performed to improve the reliability of the control domain.
It achieves comprehensive monitoring and automatic repair of the control domain, improves repair efficiency, reduces unnecessary waste and delays, and avoids the situation where the control domain cannot work due to abnormal conditions.
Smart Images

Figure CN118759906A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to vehicle technology, and in particular to a risk control method, device, vehicle, computer-readable storage medium and computer program product for a control domain. Background Art
[0002] The control domain is an important concept in the vehicle's electronic and electrical architecture. It refers to the collection of electronic and electrical architectures that control a certain functional module of the vehicle. Each control domain is uniformly controlled by a domain controller. For example, the vehicle's electronic and electrical architecture can be divided into five domains, namely the power domain, chassis domain, body domain, cockpit domain, and autonomous driving domain. The domain controller architecture helps to improve the integration, reliability, and safety of the vehicle's electronic systems, and also provides a foundation for the development of vehicle intelligence and networking.
[0003] When designing the vehicle control domain in the early stage, the focus was on the function implementation itself, and functional safety and reliability were not fully considered. This resulted in low reliability of the control domain, and when abnormalities occurred, it usually had to rely on after-sales maintenance. Summary of the invention
[0004] The present application provides a risk control method, device, vehicle, computer-readable storage medium and computer program product for a control domain, which can improve the reliability of the control domain.
[0005] The technical solution of this application is implemented as follows:
[0006] The present application provides a risk control method for a control domain, comprising:
[0007] Acquiring control domain operation information during the operation of the control domain of the vehicle; wherein the control domain operation information includes operating system information, interrupt information, task information, application information and storage area information;
[0008] Perform risk analysis according to the control domain operation information to obtain control domain risk items of the control domain;
[0009] A repair strategy is determined according to the control domain risk item, and the control domain is repaired according to the repair strategy.
[0010] The present application provides a risk control device for a control domain, comprising:
[0011] An acquisition module, used to acquire control domain operation information during the operation of the control domain of the vehicle; wherein the control domain operation information includes operating system information, interrupt information, task information, application information and storage area information;
[0012] An analysis module, configured to perform risk analysis based on the control domain operation information to obtain control domain risk items of the control domain;
[0013] A repair module is used to determine a repair strategy according to the control domain risk item, and perform repair processing on the control domain according to the repair strategy.
[0014] The present application provides a vehicle, comprising:
[0015] A memory for storing executable instructions;
[0016] The processor is used to implement the risk control method of the control domain provided in the present application when executing the executable instructions stored in the memory.
[0017] The present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the risk control method for the control domain provided by the present application.
[0018] The present application provides a computer program product, which includes executable instructions for causing a processor to execute and implement the risk control method for the control domain provided by the present application.
[0019] This application has the following beneficial effects:
[0020] The present application obtains control domain operation information during the operation of the vehicle's control domain, wherein the control domain operation information includes operating system information, interrupt information, task information, application information, and storage area information; performs risk analysis based on the control domain operation information to obtain control domain risk items of the control domain; determines a repair strategy based on the control domain risk items, and repairs the control domain based on the repair strategy. The present application can comprehensively monitor various information generated during the operation of the control domain, and analyze whether there are risks. When there are risks, it can automatically repair according to the corresponding repair strategy, which can improve repair efficiency, reduce unnecessary waste and delays, and avoid the control domain being in an abnormal state and unable to work. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 It is a schematic diagram of the architecture of the control domain provided in an embodiment of the present application;
[0023] Figure 2 is a structural schematic diagram of a vehicle provided in an embodiment of the present application;
[0024] Figure 3It is a first flow chart of the risk control method of the control domain provided in the embodiment of the present application;
[0025] Figure 4 This is a flow chart of obtaining control domain operation information provided by an embodiment of the present application;
[0026] Figure 5 This is a flow chart of obtaining control domain risk items through risk analysis provided by an embodiment of the present application;
[0027] Figure 6 It is a second flow chart of the risk control method of the control domain provided in the embodiment of the present application;
[0028] Figure 7 This is a third flow chart of the risk control method for the control domain provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0030] In the following description, reference is made to "some embodiments", which describes a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. In the following description, reference is made to the term "multiple" to mean at least two.
[0031] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0033] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0034] 1) Control domain: It is an important concept in the vehicle's electronic and electrical architecture. It refers to the collection of electronic and electrical architectures that control a certain functional module of the vehicle. Each control domain is uniformly controlled by a domain controller.
[0035] 2) Operating system: It is the core software part of the vehicle control domain architecture. It is a collection of programs that control and manage vehicle hardware and software resources. It can be used to implement resource management, task scheduling, communication management, security management and other functions.
[0036] 3) Interrupt: An important mechanism in computer systems for handling external or internal events that may interrupt the normal execution flow of the central processing unit (CPU). In the vehicle control domain, interrupts may come from various sensors, actuators, or other hardware components, which trigger interrupts when they require the attention or processing of the CPU. The interrupt mechanism ensures that the control domain can handle various events from the hardware in a timely manner, such as sensor data updates, actuator status changes, etc., thereby ensuring the safety and stability of the vehicle.
[0037] 4) Task: refers to a series of operations or calculations defined by software that need to be performed by the CPU. These tasks may include the execution of control algorithms, data processing, communication protocol processing, etc. The task mechanism achieves precise control of various systems or components of the vehicle by executing various control algorithms, data processing and other operations. The correct execution of tasks is crucial to ensuring the performance, safety and stability of the vehicle.
[0038] 5) Application: refers to a set of tasks or modules with specific functions. These applications may be navigation applications, in-vehicle entertainment applications, etc. Applications are the top-level part of the vehicle control domain. They implement various specific functions by calling the underlying tasks or modules. The existence of applications provides users with a richer functional experience.
[0039] 6) Hardware exception: Also known as HardFault exception, it is a hardware fault type of interrupt. Hardware exception is not maskable, that is, no matter what state the current control domain is in, once the hardware exception is triggered, it will respond immediately. At the same time, hardware exception is one of the highest priority interrupts in the control domain.
[0040] The embodiments of the present application provide a risk control method, device, vehicle, computer-readable storage medium, and computer program product for a control domain, which can improve the reliability of the control domain and automatically repair it when an abnormality occurs.
[0041] See also Figure 1 , Figure 11 is a schematic diagram of an architecture of a control domain provided in an embodiment of the present application. The vehicle 100 operates with multiple control domains. For ease of explanation, Figure 1 Only one control domain, control domain 200, is shown.
[0042] like Figure 1 As shown, the vehicle 100 obtains the control domain operation information during the operation of the control domain 200; wherein the control domain operation information includes operating system information, interruption information, task information, application information and storage area information; risk analysis is performed based on the control domain operation information to obtain the control domain risk items of the control domain 200; a repair strategy is determined based on the control domain risk items, and the control domain 200 is repaired based on the repair strategy. In this way, by analyzing the risks existing in the control domain 200 in real time and automatically repairing according to the appropriate repair strategy, the reliability of the control domain 200 can be improved, and the control domain 200 can be prevented from being in an abnormal state and unable to work.
[0043] It is worth noting that the above operations may be performed by the control domain 200 itself, or may be performed by other devices in the vehicle 100 that are different from the control domain 200 .
[0044] In some embodiments, the vehicle 100 can implement the risk control method of the control domain provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP, and the small program can be controlled to run or closed by the user. In short, the above-mentioned computer program can be any form of application, module or plug-in.
[0045] See also Figure 2 , Figure 2 is a schematic diagram of the structure of a vehicle 100 provided in an embodiment of the present application, Figure 2 The vehicle 100 shown includes: at least one processor 110, a memory 150, at least one network interface 120 and a user interface 130. The various components in the vehicle 100 are coupled together via a bus system 140. It is understood that the bus system 140 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 140 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 140 is not described in detail. Figure 2 Various buses are labeled as bus system 140 .
[0046] The processor 110 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0047] The user interface 130 includes one or more output devices 131 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 130 also includes one or more input devices 132, including user interface components that facilitate user input, such as a touch screen display, other input buttons and controls.
[0048] The memory 150 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 150 may optionally include one or more storage devices that are physically remote from the processor 110.
[0049] The memory 150 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 150 described in the embodiments of the present application is intended to include any suitable type of memory.
[0050] In some embodiments, the memory 150 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0051] Operating system 151, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0052] A network communication module 152, used to reach other electronic devices via one or more (wired or wireless) network interfaces 120, exemplary network interfaces 120 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;
[0053] a presentation module 153 for enabling presentation of information via one or more output devices 131 (e.g., display screen, speaker, etc.) associated with the user interface 130 (e.g., a user interface for operating peripherals and displaying content and information);
[0054] The input processing module 154 is configured to detect one or more user inputs or interactions from one of the one or more input devices 132 and to translate the detected inputs or interactions.
[0055] In some embodiments, the risk control device for the control domain provided in the embodiments of the present application can be implemented in a software manner. Figure 2 The risk control device 155 of the control domain stored in the memory 150 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an acquisition module 1551, an analysis module 1552, and a repair module 1553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0056] The risk control method for the control domain provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the vehicle provided in the embodiment of the present application.
[0057] See also Figure 3 , Figure 3 This is a flow chart of the risk control method for the control domain provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.
[0058] In step 101, control domain operation information is obtained during the operation of the control domain of the vehicle; wherein the control domain operation information includes operating system information, interrupt information, task information, application information and storage area information.
[0059] Here, during the operation of the vehicle's control domain, operating system information, interrupt information, task information, application information, and storage area information are obtained, so that the state of the control domain can be monitored in real time to ensure the safe operation of the vehicle; at the same time, the information obtained covers all aspects of the control domain, and the risks existing in the control domain can be accurately analyzed. For the sake of convenience, the operating system information, interrupt information, task information, application information, and storage area information are collectively referred to as the control domain operation information.
[0060] In some embodiments, step 101 may be continuously performed during the operation of the control domain to ensure the real-time nature of the control domain operation information.
[0061] In some embodiments, the above-mentioned acquisition of control domain operation information during the operation of the control domain of the vehicle can be achieved in the following way: the following processing is performed during the operation of the control domain: the operating system information of the operating system is acquired when the operating system is initialized; the interrupt entry time is recorded when entering an interrupt, and the interrupt exit time is recorded when exiting an interrupt; wherein the interrupt information includes the interrupt entry time and the interrupt exit time; the task entry time is recorded when entering a task, and the task exit time is recorded when exiting a task; wherein the task information includes the task entry time and the task exit time; the application information is recorded when executing an application; and the storage area information is recorded when the task is switched.
[0062] As an example, the present application embodiment provides the following Figure 4 A flow chart of obtaining control domain operation information during the operation of the control domain of the vehicle is shown, combined with Figure 4 , you can perform the following steps while the control domain is running.
[0063] In step 201, operating system information of the operating system is obtained when the operating system is initialized.
[0064] For example, operating system information includes core number, task preemption mode, number of tasks, number of interrupts, main stack starting address, and main stack length, etc., wherein the core number is used to indicate the core that executes the program in a multi-core processor, and the task preemption mode is used to indicate whether the task is preemptive or non-preemptive.
[0065] In step 202, the interruption entry time is recorded when entering the interruption, and the interruption exit time is recorded when exiting the interruption.
[0066] The interrupt entry time and interrupt exit time here do not constitute a limitation on the interrupt information. More information can also be recorded, such as interrupt priority, interrupt number, interrupt stack start address, interrupt stack length, interrupt processing time, current usage rate of interrupt stack, historical maximum usage rate of interrupt stack, and nested interrupt status, etc. This information can be collectively referred to as interrupt information. When exiting the interrupt, the recorded interrupt information can be stored in a structure (called interrupt structure for easy distinction), and each interrupt structure is a node in the interrupt information linked list, thereby ensuring the orderliness and traceability of the interrupt information.
[0067] In some embodiments, when the number of interrupt structures in the interrupt information linked list exceeds the interrupt structure number threshold, the earliest stored interrupt structure in the interrupt information linked list is deleted until the number of interrupt structures in the interrupt information linked list is equal to the interrupt structure number threshold. Among them, the interrupt structure number threshold can be set according to the actual application scenario, for example, set to 16, that is, only the most recent 16 interrupt structures are saved at most. By limiting the number of interrupt structures in the interrupt information linked list, the real-time performance of the interrupt structures in the interrupt information linked list can be guaranteed, which helps to accurately analyze risks in the subsequent period, and can also reduce storage pressure.
[0068] In step 203, the task entry time is recorded when entering the task, and the task exit time is recorded when exiting the task.
[0069] The task entry time and task exit time here do not constitute a limitation on the task information. More information can also be recorded, such as task priority, task number, task stack start address, task stack length, task processing time, current usage rate of task stack, historical maximum usage rate of task stack, etc. This information can be collectively referred to as task information. When exiting a task, the recorded task information can be stored in a structure (called a task structure for easy distinction), and each task structure is a node in the task information linked list, thereby ensuring the orderliness and traceability of the task information.
[0070] In some embodiments, when the number of task structures in the task information linked list exceeds the task structure number threshold, the earliest stored task structure in the task information linked list is deleted until the number of task structures in the task information linked list is equal to the task structure number threshold. Among them, the task structure number threshold can be set according to the actual application scenario, for example, set to 16, that is, only the most recent 16 task structures are saved at most. By limiting the number of task structures in the task information linked list, the real-time performance of the task structures in the task information linked list can be guaranteed, which helps to accurately analyze risks later and can also reduce storage pressure.
[0071] In step 204, application information is recorded when the application is executed.
[0072] The application information here may be application self-check information, such as application parameter error, application return error, application execution error, etc.
[0073] In step 205, the storage area information is recorded when the task is switched.
[0074] The storage area here generally refers to the storage area required for the normal operation of the control domain. For example, the storage area information may include the 32-byte content of the top and bottom of each stack, the 32-byte content of the head and tail of each heap area, the status of each lock, the number of mailboxes, the number of queue messages, etc. It is worth noting that the reason for recording when switching tasks is that only the key information when entering and exiting the task is recorded, and some unimportant information during the task execution is ignored (this information may change during the task execution, so there is no need to record it).
[0075] It is worth noting that the execution order of the above steps 201 to 205 is not limited.
[0076] like Figure 4 As shown, the embodiments of the present application exemplarily provide the specific content of each type of information and the specific time to record each type of information, which can comprehensively and accurately monitor the operation of the control domain and help improve the accuracy of subsequent risk analysis.
[0077] Continue to combine Figure 3 To explain, Figure 3 In step 102 shown, risk analysis is performed based on the control domain operation information to obtain control domain risk items of the control domain.
[0078] Based on the operating system, interrupt, task, application and storage area, multiple control domain risk items can be preset. On the basis of obtaining the control domain operation information, risk analysis is performed according to the control domain operation information to determine the control domain risk items that the control domain currently meets from the preset multiple control domain risk items. It is worth noting that the number of control domain risk items that the control domain currently meets may be one or more, and there is no limitation on this.
[0079] In some embodiments, step 102 may be performed periodically (eg, once every 1 ms) during the operation of the control domain, so as to timely analyze the control domain risk items that the control domain currently complies with.
[0080] In some embodiments, the control domain risk items of the control domain may be stored so as to perform step 103 later. The storage here may refer to non-volatile storage, that is, the control domain risk items of the control domain are stored in a non-volatile storage area (such as EEPROM), so as to avoid data loss due to power failure and ensure that data is persistently available. Compared with the control domain operation information, the amount of information in the control domain risk items is smaller and more critical, so it can effectively reduce storage pressure.
[0081] In some embodiments, the above-mentioned risk analysis based on the control domain operation information can be implemented in the following manner to obtain the control domain risk items of the control domain: determine whether there are control domain risk items related to the stack area based on the operating system information, interrupt information, task information and storage area information; determine whether there are control domain risk items related to the heap area based on the storage area information; determine whether there are control domain risk items related to the task based on the operating system information and task information; determine whether there are control domain risk items related to the interrupt based on the interrupt information; determine whether there are control domain risk items related to the system usage rate based on the interrupt information and task information; determine whether there are control domain risk items related to the application based on the application information.
[0082] As an example, the present application embodiment provides the following Figure 5 The schematic diagram of a flow chart of obtaining the control domain risk items of the control domain by risk analysis based on the control domain operation information is shown in FIG. Figure 5 The steps shown are explained.
[0083] In step 301, it is determined whether there is a control domain risk item related to the stack area according to the operating system information, interrupt information, task information and storage area information.
[0084] Here, based on the information related to the stack area in the operating system information, interrupt information, task information, and storage area information, it is determined whether there are any control domain risk items related to the stack area. For example, the main stack, interrupt stack, and task stack are traversed to determine whether there are any control domain risk items such as the stack area is about to be used up, the stack area is illegally tampered with, etc.
[0085] In step 302, it is determined whether there is a control domain risk item related to the heap area according to the storage area information.
[0086] Here, based on the information related to the heap area in the storage area information, it is determined whether there are any control domain risk items related to the heap area, such as whether there are any control domain risk items such as the heap area is about to be used up or the heap area is illegally tampered with.
[0087] In step 303, it is determined whether there is a control domain risk item related to the task according to the operating system information and the task information.
[0088] Here, based on the task-related information in the operating system information and the task information, determine whether there are control domain risk items related to the task, such as whether there are control domain risk items such as the task processing time is too long, the task is preempted multiple times, and the task should be executed but is not executed.
[0089] In step 304, it is determined whether there is a control domain risk item related to the interruption according to the interruption information.
[0090] For example, control domain risk items related to interrupts include interrupt processing taking too long, interrupts being nested multiple times, etc.
[0091] In step 305, it is determined whether there is a control domain risk item related to the system usage rate according to the interruption information and the task information.
[0092] Here, based on the interruption information and the information related to the usage rate in the task information, it is determined whether there is a control domain risk item related to the system usage rate, such as the system usage rate being too high.
[0093] In step 306, it is determined whether there is a control domain risk item related to the application according to the application information.
[0094] For example, control domain risk items related to applications include application parameter errors, application return errors, and application execution errors.
[0095] like Figure 5 As shown, the embodiments of the present application provide some examples of risk analysis, and risk analysis can be performed from the aspects of stack area, heap area, tasks, interrupts, system usage, applications, etc., which can refine the granularity of risk analysis and accurately detect possible risks in the control domain.
[0096] Continue to combine Figure 3 To explain, Figure 3 In step 103 shown, a repair strategy is determined according to the risk item of the control domain, and the control domain is repaired according to the repair strategy.
[0097] For each preset control domain risk item, a corresponding repair strategy is also preset. Therefore, after determining the control domain risk item that the control domain currently meets, the control domain is repaired according to the repair strategy corresponding to the control domain risk item, which can improve the accuracy and effectiveness of the repair process and avoid ineffective resource waste.
[0098] It is worth noting that if the control domain currently meets multiple control domain risk items, a repair strategy needs to be determined based on each of the control domain risk items. Of course, the possibility that different control domain risk items correspond to the same repair strategy is not excluded.
[0099] In some embodiments, the above-mentioned determination of the repair strategy based on the control domain risk item and the repair processing of the control domain according to the repair strategy can be implemented in the following manner: determining the risk level of the control domain risk item among multiple risk levels; wherein the multiple risk levels correspond to different repair strategies respectively; and repairing the control domain according to the repair strategy corresponding to the risk level of the control domain risk item.
[0100] For example, the risk levels can be divided into level 1, level 2, and level 3, with the risk degree increasing. Among them, the control domain risk items belonging to level 1 include tasks being preempted multiple times, interrupts being nested multiple times, application parameter errors, and application return errors; the control domain risk items belonging to level 2 include the stack area is about to run out, the heap area is about to run out, the task processing time is too long, the interrupt processing time is too long, the system utilization rate is too high, and application execution errors; the control domain risk items belonging to level 3 include the stack area being illegally tampered with, the heap area being illegally tampered with, and the task being executed but not being executed.
[0101] In addition, the repair strategy corresponding to level 1 is reporting the control domain risk item; the repair strategy corresponding to level 2 includes core reset and reporting the control domain risk item; the repair strategy corresponding to level 3 includes control domain reset, task reset, application self-recovery and reporting the control domain risk item. The reset involved in the embodiment of the present application refers to restart or initialization.
[0102] It is worth noting that, compared with the control domain operation information, the control domain risk items have a smaller amount of information and are more critical, so reporting the control domain risk items can effectively reduce the communication burden. In addition, the reporting involved in the embodiment of the present application refers to reporting to the cloud (such as a cloud server), which is convenient for relevant personnel to analyze the cause of the abnormality and optimize the control domain.
[0103] It is worth noting that the control domain reset, core reset and task reset must be performed when the car is stopped to avoid interfering with the normal driving of the vehicle, that is, to avoid causing accidents.
[0104] The above method can determine the repair strategy that matches the risk level by dividing the risk level, thereby improving the accuracy and effectiveness of the repair process.
[0105] In some embodiments, when the number of control domain risk items that the control domain currently complies with is multiple, the multiple control domain risk items are sorted according to the weight coefficients corresponding to the multiple control domain risk items, and the sorted multiple control domain risk items are recorded and / or reported.
[0106] Here, the weight coefficients of different control domain risk items can be pre-set according to their risk levels. For example, the weight coefficient of the control domain risk item belonging to level 1 is set to 1, the weight coefficient of the control domain risk item belonging to level 2 is set to 1.5, and the weight coefficient of the control domain risk item belonging to level 3 is set to 2.
[0107] Based on this, the multiple control domain risk items that the control domain currently meets can be sorted according to the weight coefficient from large to small, and the sorted multiple control domain risk items can be recorded and / or reported. In this way, the order of the control domain risk items can reflect their risk level, which is helpful for subsequent analysis.
[0108] It is worth noting that if multiple control domain risk items all correspond to the same weight coefficient, the multiple control domain risk items are sorted in order of appearance time from latest to earliest, so as to give priority to the most recently appearing control domain risk item.
[0109] In some embodiments, the above-mentioned determination of the repair strategy based on the control domain risk items and the repair processing of the control domain according to the repair strategy can be implemented in the following way: during the execution of the idle task of the control domain, the repair strategy is determined based on the control domain risk items, and the control domain is repaired according to the repair strategy.
[0110] Here, the idle task is the IDLE task, which is the lowest priority task in the operating system and will be executed only when there are no other tasks to be executed in the operating system. When the idle task is executed, it proves that the control domain is in an idle state at this time. Therefore, the repair strategy is determined according to the risk item of the control domain, and the control domain is repaired according to the repair strategy. The above method limits the operations of determining the repair strategy and repair processing to the execution process of the idle task, which can avoid interfering with the normal operation of the control domain, improve vehicle safety, and automatically complete the repair without the user's perception.
[0111] like Figure 3 As shown, the embodiment of the present application obtains control domain operation information during the operation of the control domain of the vehicle, wherein the control domain operation information includes operating system information, interrupt information, task information, application information, and storage area information; performs risk analysis based on the control domain operation information to obtain control domain risk items of the control domain; determines a repair strategy based on the control domain risk items, and repairs the control domain based on the repair strategy. Based on this, the embodiment of the present application can comprehensively monitor various information generated during the operation of the control domain, and analyze whether there are risks. When there are risks, automatic repairs are performed according to the corresponding repair strategy, which can improve repair efficiency, reduce unnecessary waste and delays, and avoid the control domain being in an abnormal state and unable to work.
[0112] In some embodiments, see Figure 6 , Figure 6 is a flow chart of a risk control method for a control domain provided in an embodiment of the present application. Figure 3 Between any of the steps shown ( Figure 6 In the example of step 103, in step 104, when the control domain enters a hardware abnormality, a control domain reset is performed.
[0113] Here, when the control domain enters a hardware exception, that is, a HardFault exception, a control domain reset is performed to repair the hardware exception problem.
[0114] In some embodiments, before executing a control domain reset, the risk control method of the control domain also includes: obtaining register information in a status register corresponding to a hardware exception; performing risk analysis based on the register information to obtain register risk items of the control domain; determining target risk items from the control domain risk items and the register risk items; and storing and reporting the target risk items.
[0115] Here, the status register corresponding to the hardware exception, namely the Hardware Fault Status Register (HFSR), can provide key information to determine the cause of the hardware exception. Therefore, the register information in the status register corresponding to the hardware exception is obtained, and risk analysis is performed based on the register information to obtain the register risk item that the control domain currently meets. For example, the values of the VECTBL, FORCED, and DEBUGEVT bits in the status register corresponding to the hardware exception are obtained. When the value of the VECTBL bit is 1, the vector acquisition failure error is recorded as a register risk item; when the value of the FORCED bit is 1, each bit in UFSR, BFSR, and MFSR is analyzed again. When the value of any bit in UFSR, BFSR, and MFSR is 1, the corresponding error is recorded as a register risk item; when the value of the DEBUGEVT bit is 1, each bit of DFSR is analyzed again, and when the value is 1, the corresponding error is recorded as a register risk item.
[0116] Since the control domain risk items have been determined in step 102, the target risk items can be determined from the control domain risk items and the register risk items, and the target risk items can be stored and reported, wherein the target risk items are the most critical and most likely to be true risk items among the control domain risk items and the register risk items. Storing and reporting only the target risk items can reduce storage pressure and communication burden, and can also further improve the accuracy of risk analysis. Among them, the control domain risk items used to determine the target risk items can be the N control domain risk items that have appeared recently, so as to improve their reference value and avoid referring to control domain risk items that are too old and have lost their practical significance.
[0117] In some embodiments, the above-mentioned determination of target risk items from control domain risk items and register risk items can be achieved in the following manner: multiple candidate risk items are sorted according to weight coefficients corresponding to the multiple candidate risk items; wherein the candidate risk items represent control domain risk items or register risk items; and the sorted multiple candidate risk items are sequentially selected to obtain target risk items until the number of target risk items reaches a risk item number threshold.
[0118] Here, for the sake of convenience, the control domain risk items and register risk items are both referred to as candidate risk items. Then, the multiple candidate risk items can be sorted according to the weight coefficients corresponding to the multiple candidate risk items currently met by the control domain (in descending order of weight coefficients), and the sorted multiple candidate risk items are selected in sequence to obtain target risk items (i.e., candidate risk items with larger weight coefficients are preferentially selected as target risk items), until the number of target risk items reaches the risk item number threshold. Subsequently, the multiple target risk items can also be stored and reported in descending order of weight coefficients.
[0119] It is worth noting that the weight coefficients of different candidate risk items can be pre-set according to their risk levels. For example, for control domain risk items, the weight coefficient of control domain risk items belonging to level 1 is set to 1, the weight coefficient of control domain risk items belonging to level 2 is set to 1.5, and the weight coefficient of control domain risk items belonging to level 3 is set to 2; for register risk items, the weight coefficient of VECTBL errors is set to 2, the weight coefficient of FORCED errors is set to 4, and the weight coefficient of DEBUGEVT errors is set to 3, wherein the above-mentioned VECTBL errors, FORCED errors, and DEBUGEVT errors are all register risk items.
[0120] It is worth noting that if multiple candidate risk items all correspond to the same weight coefficient, the multiple candidate risk items are sorted in order of appearance time from latest to earliest, so as to give priority to the latest candidate risk item.
[0121] It is worth noting that the risk item quantity threshold can be set according to the actual application scenario, such as being set to 10. In addition, when the number of candidate risk items is less than or equal to the risk item quantity threshold, there is no need to perform sequential selection processing.
[0122] The above method comprehensively considers the control domain risk items and the register risk items, and through the sorting processing method, the order of the candidate risk items can intuitively reflect their risk levels; multiple candidate risk items are further screened through the sequential selection processing method to screen out the most critical information.
[0123] In some embodiments, when any control domain risk item is the same as any register risk item, any control domain risk item and any register risk item are merged into the same candidate risk item, and the weight coefficient of any control domain risk item and the weight coefficient of any register risk item are fused to obtain the weight coefficient of the same candidate risk item.
[0124] Here, taking the control domain risk item A and the register risk item B as an example, when the control domain risk item A is the same as the register risk item B (for example, both are that the stack area is about to run out), it is proved that there is a high probability that it is the real cause of the abnormality. Therefore, the control domain risk item A and the register risk item B are merged into the same candidate risk item, and the weight coefficient of the control domain risk item A and the weight coefficient of the register risk item B are fused to obtain the weight coefficient of the same candidate risk item. Among them, the fusion processing is such as direct summation or weighted summation, which is not limited. The above method comprehensively considers the control domain risk item and the register risk item, which can more accurately locate the real cause of the abnormality, and can also reduce the redundancy of the data.
[0125] In some embodiments, before executing a control domain reset, the risk control method of the control domain also includes: when the last task executed before the control domain enters a hardware exception is a task, storing and reporting the function call order in the task stack of the last task executed; when the last interrupt executed before the control domain enters a hardware exception is an interrupt, storing and reporting the function call order in the interrupt stack of the last interrupt executed.
[0126] Here, the last executed position before the control domain enters the hardware exception can be located. When the last executed task before the control domain enters the hardware exception is a task, the function call sequence in the task stack of the last executed task is obtained, and stored and reported; when the last executed interrupt before the control domain enters the hardware exception is an interrupt, the function call sequence in the interrupt stack of the last executed interrupt is obtained, and stored and reported. In this way, in the subsequent analysis process, it is possible to analyze which function or functions caused the hardware exception based on the function call sequence, and optimize the control domain accordingly based on the analysis results.
[0127] like Figure 6 As shown, the embodiment of the present application repairs the hardware exception problem by executing a control domain reset when the control domain enters a hardware exception; in addition, the most critical target risk items can be screened out from the control domain risk items and the register risk items, and the target risk items can be stored and reported to locate the real cause of the exception; in addition, the function call sequence can also be stored and reported to locate the real cause of the exception from the function level.
[0128] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0129] With the rapid development of vehicle intelligence and networking, the control domains of vehicles are becoming increasingly complex, and complex control domain programs are more prone to problems. When a control domain has problems, some functions will be abnormal, and in severe cases, the vehicle control domain will be unable to be controlled, causing serious accidents.
[0130] In view of this, the embodiment of the present application provides a monitoring and risk analysis system, which can achieve the following functions:
[0131] 1) System monitoring: used to collect information on the operating system, tasks, interrupts, applications, important storage areas, etc. during the operation of the control domain.
[0132] 2) Risk analysis: After the above-mentioned system monitors and collects information, a logical analysis is performed on each piece of information, and the control domain risk items that are considered to be at risk after analysis are stored and reported; when a HardFault exception occurs, the control domain risk items and register risk items are comprehensively considered, and the target risk items are screened out for storage and reporting in order to locate the real cause of the exception.
[0133] 3) System repair: According to different risk items, select repair strategies such as reporting, task reset, core reset, control domain reset, etc. to repair the control domain.
[0134] As an example, the present application embodiment provides the following Figure 7 The risk control method of the control domain shown in the figure is a flow chart, which will be combined with Figure 7 Describe the monitoring and risk analysis system.
[0135] Step 1: Start the monitoring system after the operating system is initialized, and the monitoring system obtains the operating system information.
[0136] Step 2: When entering the interruption, the monitoring system records the interruption entry time, and when exiting the interruption, the monitoring system records the interruption exit time. When a nested interruption occurs, the monitoring system records the nested interruption situation. The information recorded in step 2 is collectively referred to as interruption information.
[0137] Step 3: The monitoring system records the task entry time when entering the task, and records the task exit time when exiting the task. In addition, the monitoring system calculates the task processing time in combination with the interruption logic, that is, if an interruption occurs during the task operation, the duration of the interruption is not included in the task processing time. The information recorded in step 3 is collectively referred to as task information.
[0138] Step 4: When the application is executed, the monitoring system records the application information (application self-check information).
[0139] Step 5: The monitoring system records the information of important storage areas when the task is switched.
[0140] Step 6: Risk analysis is performed through periodic tasks, that is, the risk analysis system periodically performs risk analysis based on the information recorded in steps 1 to 5 to obtain control domain risk items. Control domain risk items can be stored in a non-volatile storage area, and whether to report them is determined based on the risk level.
[0141] Step 7: In the IDLE task, determine the repair strategy according to the risk level to which the control domain risk item belongs, and execute the repair strategy to achieve the repair.
[0142] Step 8: When entering the HardFault exception, the risk analysis system performs risk analysis based on the values in the HFSR to obtain the register risk items, determines the target risk items from the control domain risk items and the register risk items, and stores and reports the target risk items; at the same time, it also obtains the function call sequence in the last task or interrupt executed before entering the HardFault exception, and stores and reports the function call sequence.
[0143] Step 9: Perform a control domain reset after step 8 to fix the HardFault exception.
[0144] The embodiments of the present application can at least achieve the following beneficial effects:
[0145] 1) The monitoring system can comprehensively monitor various information during the operation of the control domain, effectively improve the richness of the monitored information, and analyze more comprehensive risk items.
[0146] 2) An innovative and complete risk analysis system is designed. Instead of directly reporting the monitored information, it obtains more accurate risk items by analyzing information related to the operating system, interrupts, tasks, applications, important storage areas, and registers. It only stores and reports risk items, which can reduce storage pressure and communication burden.
[0147] 3) Comprehensively considering the control domain risk items and register risk items in the risk analysis system can more accurately locate the real cause of the abnormality.
[0148] The following is a description of an exemplary structure of the risk control device 155 of the control domain provided in the embodiment of the present application implemented as a software module. In some embodiments, for example, Figure 2 As shown, the software modules in the risk control device 155 of the control domain stored in the memory 150 may include: an acquisition module 1551, used to acquire control domain operation information during the operation of the control domain of the vehicle; wherein the control domain operation information includes operating system information, interrupt information, task information, application information and storage area information; an analysis module 1552, used to perform risk analysis based on the control domain operation information to obtain control domain risk items of the control domain; a repair module 1553, used to determine a repair strategy based on the control domain risk items, and perform repair processing on the control domain according to the repair strategy.
[0149] In some embodiments, the risk control device 155 of the control domain further includes an exception module for executing a control domain reset when the control domain enters a hardware exception.
[0150] In some embodiments, the exception module is also used to: obtain register information in the status register corresponding to the hardware exception; perform risk analysis based on the register information to obtain register risk items of the control domain; determine target risk items from the control domain risk items and register risk items; and store and report the target risk items.
[0151] In some embodiments, the exception module is also used to: sort multiple candidate risk items according to the weight coefficients corresponding to the multiple candidate risk items; wherein the candidate risk items represent control domain risk items or register risk items; and sequentially select and process the sorted multiple candidate risk items to obtain target risk items until the number of target risk items reaches a risk item number threshold.
[0152] In some embodiments, the exception module is also used to: when any control domain risk item is the same as any register risk item, merge any control domain risk item and any register risk item into the same candidate risk item, and fuse the weight coefficient of any control domain risk item and the weight coefficient of any register risk item to obtain the weight coefficient of the same candidate risk item.
[0153] In some embodiments, the exception module is also used to: when the last task executed before the control domain enters the hardware exception is a task, store and report the function call order in the task stack of the last task executed; when the last interrupt executed before the control domain enters the hardware exception is an interrupt, store and report the function call order in the interrupt stack of the last interrupt executed.
[0154] In some embodiments, the acquisition module 1551 is also used to: perform the following processing during the operation of the control domain: obtain the operating system information of the operating system when the operating system is initialized; record the interrupt entry time when entering the interrupt, and record the interrupt exit time when exiting the interrupt; wherein the interrupt information includes the interrupt entry time and the interrupt exit time; record the task entry time when entering the task, and record the task exit time when exiting the task; wherein the task information includes the task entry time and the task exit time; record the application information when executing the application; record the storage area information when the task switches.
[0155] In some embodiments, the analysis module 1552 is also used to: determine whether there are control domain risk items related to the stack area based on the operating system information, interrupt information, task information and storage area information; determine whether there are control domain risk items related to the heap area based on the storage area information; determine whether there are control domain risk items related to the task based on the operating system information and task information; determine whether there are control domain risk items related to the interrupt based on the interrupt information; determine whether there are control domain risk items related to the system usage rate based on the interrupt information and task information; determine whether there are control domain risk items related to the application based on the application information.
[0156] In some embodiments, the repair module 1553 is also used to: determine the risk level of the control domain risk item among multiple risk levels; wherein the multiple risk levels correspond to different repair strategies; and repair the control domain according to the repair strategy corresponding to the risk level of the control domain risk item.
[0157] In some embodiments, the repair module 1553 is further used to: during the execution of the idle task of the control domain, determine a repair strategy according to the risk item of the control domain, and perform repair processing on the control domain according to the repair strategy.
[0158] The embodiment of the present application provides a computer program product or a computer program, which includes executable instructions stored in a computer-readable storage medium. A processor of a vehicle reads the executable instructions from the computer-readable storage medium, and the processor executes the executable instructions, so that the vehicle executes the risk control method of the control domain described in the embodiment of the present application.
[0159] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the risk control method of the control domain provided in the embodiment of the present application.
[0160] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0161] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0162] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0163] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A risk control method for a control domain, characterized in that: include: Acquiring control domain operation information during the operation of the control domain of the vehicle; wherein the control domain operation information includes operating system information, interrupt information, task information, application information and storage area information; Perform risk analysis according to the control domain operation information to obtain control domain risk items of the control domain; A repair strategy is determined according to the control domain risk item, and the control domain is repaired according to the repair strategy.
2. The method according to claim 1, characterized in that The method further comprises: When the control domain enters a hardware exception, a control domain reset is performed.
3. The method according to claim 2, characterized in that Before the execution control domain is reset, the method further includes: Get the register information in the status register corresponding to the hardware exception; Perform risk analysis according to the register information to obtain register risk items of the control domain; Determining a target risk item from the control domain risk item and the register risk item; The target risk items are stored and reported.
4. The method according to claim 3, characterized in that The determining of a target risk item from the control domain risk item and the register risk item includes: Sorting the plurality of candidate risk items according to weight coefficients respectively corresponding to the plurality of candidate risk items; wherein the candidate risk item represents the control domain risk item or the register risk item; The sorted candidate risk items are selected in sequence to obtain target risk items until the number of target risk items reaches a risk item number threshold.
5. The method according to claim 4, characterized in that The method further comprises: When any control domain risk item is the same as any register risk item, the any control domain risk item and the any register risk item are merged into the same candidate risk item, and the weight coefficient of the any control domain risk item and the weight coefficient of the any register risk item are fused to obtain the weight coefficient of the same candidate risk item.
6. The method according to claim 2, characterized in that Before the execution control domain is reset, the method further includes: When the last task executed before the control domain enters the hardware exception is a task, the function call sequence in the task stack of the last task executed is stored and reported; When the last thing executed before the control domain enters the hardware exception is an interrupt, the function call sequence in the interrupt stack of the last executed interrupt is stored and reported.
7. The method according to claim 1, characterized in that The obtaining of control domain operation information during the operation of the control domain of the vehicle includes: The following processing is performed during the operation of the control domain: Acquiring operating system information of the operating system when the operating system is initialized; Recording the interrupt entry time when entering the interrupt, and recording the interrupt exit time when exiting the interrupt; wherein the interrupt information includes the interrupt entry time and the interrupt exit time; Recording the task entry time when entering the task, and recording the task exit time when exiting the task; wherein the task information includes the task entry time and the task exit time; Record application information when executing the application; Record storage area information when switching tasks.
8. The method according to claim 1, characterized in that The performing risk analysis according to the control domain operation information to obtain the control domain risk item of the control domain includes: Determine whether there is a control domain risk item related to the stack area according to the operating system information, the interrupt information, the task information and the storage area information; Determining whether there is a control domain risk item related to the heap area according to the storage area information; Determining whether there is a control domain risk item related to the task according to the operating system information and the task information; Determining whether there is a control domain risk item related to the interruption according to the interruption information; Determining whether there is a control domain risk item related to system usage rate according to the interruption information and the task information; It is determined whether there is a control domain risk item related to the application according to the application information.
9. The method according to claim 1, characterized in that: The determining of a repair strategy according to the control domain risk item, and performing repair processing on the control domain according to the repair strategy, includes: Determining the risk level of the control domain risk item among multiple risk levels; wherein the multiple risk levels correspond to different repair strategies respectively; The control domain is repaired according to a repair strategy corresponding to the risk level of the control domain risk item.
10. The method according to claim 1, characterized in that The determining of a repair strategy according to the control domain risk item, and performing repair processing on the control domain according to the repair strategy, includes: During the execution of the idle task of the control domain, a repair strategy is determined according to the risk item of the control domain, and the control domain is repaired according to the repair strategy.
11. A risk control device for a control domain, characterized in that: include: An acquisition module, used to acquire control domain operation information during the operation of the control domain of the vehicle; wherein the control domain operation information includes operating system information, interrupt information, task information, application information and storage area information; An analysis module, configured to perform risk analysis based on the control domain operation information to obtain control domain risk items of the control domain; A repair module is used to determine a repair strategy according to the control domain risk item, and perform repair processing on the control domain according to the repair strategy.
12. A vehicle, characterized in that: include: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.
13. A computer-readable storage medium, characterized in that: Executable instructions are stored, and when executed by a processor, the method described in any one of claims 1 to 10 is implemented.
14. A computer program product, characterized in that The method comprises executable instructions for implementing the method according to any one of claims 1 to 10 when executed by a processor.
