Reporting methods and devices, electronic equipment and storage media of vehicle controllers
By setting up a diagnostic driver at the kernel level and utilizing the first communication link to report kernel-level fault information to the control unit, the problem of kernel-level information not being able to be reported when application-level faults occur is solved, thereby improving system stability and the accuracy of fault information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CO WHEELS TECH CO LTD
- Filing Date
- 2023-04-07
- Publication Date
- 2026-05-26
AI Technical Summary
When problems occur at the application layer, the on-board controller diagnostic module based on the Linux system cannot perform fault diagnosis and report fault codes normally. This results in the failure to expose fault information of the kernel layer module in a timely manner, increasing the potential risks to the system and the difficulty of subsequent problem investigation.
A diagnostic driver is set up at the kernel level to report kernel-level fault information to the control unit through the first communication link, ensuring that the kernel level can independently perform fault diagnosis and information reporting when an application-level fault occurs.
When an application-layer failure occurs, the kernel layer can independently perform fault diagnosis and information reporting, improving system stability and the accuracy of fault information, and ensuring that system risks can be exposed and investigated in a timely manner.
Smart Images

Figure CN118770088B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of vehicle technology, and in particular to a reporting method and apparatus for an on-board controller, electronic equipment, and storage medium. Background Technology
[0002] Currently, the diagnostic module of a vehicle controller based on a Linux system generally runs at the application layer. This diagnostic module is used to receive error warnings from peripherals or the system. Because the diagnostic module is deployed at the application layer, when problems occur at the application layer, the diagnostic module cannot properly perform fault diagnosis and fault code reporting for each module. For example, when the kernel layer modules are diagnosed and fault codes are reported by the diagnostic module, if the application layer has a problem and the diagnostic module cannot operate normally, the fault information of the kernel layer modules cannot be diagnosed and reported. This results in the inability to expose potential system risks when problems occur at the application layer, and makes subsequent troubleshooting more difficult. Summary of the Invention
[0003] This disclosure provides a reporting method, apparatus, electronic device, and storage medium for an on-board controller. Its main purpose is to solve the problem that when application layer issues occur, the diagnostic module cannot properly perform fault diagnosis and report fault codes for each module.
[0004] According to a first aspect of this disclosure, a reporting method for an in-vehicle controller is provided, wherein the operating system of the in-vehicle controller includes an application layer and a kernel layer, the application layer includes a diagnostic service, the kernel layer includes a diagnostic driver, and a first communication link is established between the diagnostic driver and the control unit, the method comprising:
[0005] Based on the diagnostic driver set in the kernel layer, the first fault information of the target application module in the kernel layer at the first moment and the second fault information of the target system resources in the kernel layer at the first moment are collected.
[0006] If the diagnostic service is determined to be faulty based on the diagnostic driver, the first fault information and the second fault information are reported to the control unit via the first communication link.
[0007] Optionally, the method further includes:
[0008] If the application layer is determined to be fault-free based on the diagnostic driver, the third fault information of each application module in the application layer is collected at the first moment based on the diagnostic service set in the application layer.
[0009] Receive the first fault information and the second fault information collected by the diagnostic driver;
[0010] Based on the second communication link between the diagnostic service and the control unit, the third fault information, the first fault information, and the second fault information are reported to the control unit;
[0011] The third fault information, the first fault information, and the second fault information are recorded in the control unit.
[0012] Optionally, reporting the third fault information, the first fault information, and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit includes:
[0013] At the second moment, the fourth fault information of each application module in the application layer is collected based on the diagnostic service, and the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource are collected based on the diagnostic driver at the second moment. The second moment is after the first moment, and there is a first preset time interval between the two.
[0014] The fault information collected at the first time point is compared with the fault information collected at the second time point. The fault information collected at the first time point includes the first fault information, the second fault information and the third fault information. The fault information collected at the second time point includes the fourth fault information, the fifth fault information and the sixth fault information.
[0015] When it is determined that the similarity between the fault information collected at the first time point and the fault information collected at the second time point is greater than or equal to a preset similarity threshold, the fault information collected at the first time point is determined as the target fault information.
[0016] The target fault information is reported to the control unit.
[0017] Optionally, determining the fault information collected at the first time moment as the target fault information when the similarity between the fault information collected at the first time moment and the fault information collected at the second time moment is greater than or equal to a preset similarity threshold includes:
[0018] When the similarity between the third fault information and the fourth fault information, the similarity between the first fault information and the fifth fault information, and the similarity between the third fault information and the sixth fault information are all greater than or equal to a preset similarity threshold, the third fault information, the first fault information, and the second fault information are determined to be correct, and the correct third fault information, the first fault information, and the second fault information are determined as the target fault information.
[0019] Optionally, comparing the fault information collected at the first time point with the fault information collected at the second time point includes:
[0020] When comparing the fault information more than twice, the time interval between each two adjacent comparisons shall not be less than the second preset time interval.
[0021] Optionally, the collection of the second fault information of the target system resources in the kernel layer includes:
[0022] The diagnostic driver monitors the utilization rate of the target system resources; wherein, the target system resources include at least two types of system resources;
[0023] When it is determined that the occupancy rate of the first system resource is greater than a preset resource threshold, the second fault information of the first system resource is collected based on the diagnostic driver, wherein the first system resource is any one of the at least two types of system resources.
[0024] Optionally, before monitoring the resource utilization of the target system based on the diagnostic driver, the method further includes:
[0025] Configure the preset resource threshold in the diagnostic service of the application layer according to the business scenario of the vehicle controller;
[0026] The configured preset resource threshold is sent to the diagnostic driver in the kernel layer.
[0027] According to a second aspect of this disclosure, a reporting device for an in-vehicle controller is provided. The operating system of the in-vehicle controller includes an application layer and a kernel layer. The application layer includes a diagnostic service, and the kernel layer includes a diagnostic driver. A first communication link is established between the diagnostic driver and the control unit. The device includes:
[0028] The first acquisition unit is used to acquire, based on the diagnostic driver set in the kernel layer, the first fault information of the target application module in the kernel layer at the first moment and the second fault information of the target system resources in the kernel layer at the first moment;
[0029] The first reporting unit is used to report the first fault information and the second fault information to the control unit based on the first communication link when it is determined that the diagnostic service has failed based on the diagnostic driver.
[0030] Optionally, the device further includes:
[0031] The second acquisition unit is used to acquire third fault information of each application module in the application layer at the first moment, based on the diagnostic service set in the application layer, when it is determined that no fault has occurred in the application layer based on the diagnostic driver.
[0032] The receiving unit is used to receive the first fault information and the second fault information collected by the diagnostic driver;
[0033] The second reporting unit is used to report the third fault information, the first fault information, and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit.
[0034] A recording unit is used to record the third fault information, the first fault information, and the second fault information in the control unit.
[0035] Optionally, the second reporting unit includes:
[0036] The acquisition module is used to acquire the fourth fault information of each application module in the application layer based on the diagnostic service at the second time, and to acquire the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource based on the diagnostic driver at the second time. The second time is after the first time, and there is a first preset time interval between the two.
[0037] The comparison module is used to compare the fault information collected at the first time point with the fault information collected at the second time point. The fault information collected at the first time point includes the first fault information, the second fault information and the third fault information. The fault information collected at the second time point includes the fourth fault information, the fifth fault information and the sixth fault information.
[0038] The determination module is used to determine the fault information collected at the first time as the target fault information when the similarity between the fault information collected at the first time and the fault information collected at the second time is greater than or equal to a preset similarity threshold.
[0039] The reporting module is used to report the target fault information to the control unit.
[0040] Optionally, the determining module is further configured to:
[0041] When the similarity between the third fault information and the fourth fault information, the similarity between the first fault information and the fifth fault information, and the similarity between the third fault information and the sixth fault information are all greater than or equal to a preset similarity threshold, the third fault information, the first fault information, and the second fault information are determined to be correct, and the correct third fault information, the first fault information, and the second fault information are determined as the target fault information.
[0042] Optionally, the comparison module is also used for:
[0043] When comparing the fault information more than twice, the time interval between each two adjacent comparisons shall not be less than the second preset time interval.
[0044] Optionally, the acquisition module is further used for:
[0045] The diagnostic driver monitors the utilization rate of the target system resources; wherein, the target system resources include at least two types of system resources;
[0046] When it is determined that the occupancy rate of the first system resource is greater than a preset resource threshold, the second fault information of the first system resource is collected based on the diagnostic driver, wherein the first system resource is any one of the at least two types of system resources.
[0047] Optionally, the device further includes:
[0048] The configuration unit is used to configure the preset resource threshold in the diagnostic service of the application layer according to the business scenario of the vehicle controller;
[0049] The sending unit is used to send the configured preset resource threshold to the diagnostic driver in the kernel layer.
[0050] According to a third aspect of the present invention, a vehicle is provided, the vehicle including a controller diagnostic device as described in the second aspect above.
[0051] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:
[0052] At least one processor; and
[0053] A memory communicatively connected to the at least one processor; wherein,
[0054] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.
[0055] According to a fifth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect above.
[0056] According to a sixth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.
[0057] The reporting method, apparatus, electronic device, and storage medium for an on-board controller disclosed herein mainly include the following technical solutions: the operating system of the on-board controller includes an application layer and a kernel layer. The application layer contains a diagnostic service, and the kernel layer contains a diagnostic driver. A first communication link is established between the diagnostic driver and the control unit. Based on the diagnostic driver in the kernel layer, first fault information of a target application module and second fault information of a target system resource in the kernel layer at a first moment are collected. If the diagnostic driver determines that the diagnostic service has failed, the first fault information and the second fault information are reported to the control unit via the first communication link. Compared with related technologies, based on the first communication link between the diagnostic driver and the control unit, when a fault is determined in the application layer, the first fault information and the second fault information collected by the diagnostic driver can be reported to the control unit. That is, based on the diagnostic driver in the kernel layer, the kernel layer can independently diagnose and report fault information when a fault occurs in the application layer.
[0058] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0059] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0060] Figure 1 This is a flowchart illustrating a reporting method for an on-board controller provided in an embodiment of this disclosure;
[0061] Figure 2 This is a schematic diagram of an internal structural relationship provided in this disclosure;
[0062] Figure 3 This is another schematic diagram of the internal structural relationship provided in this disclosure;
[0063] Figure 4 This is another schematic diagram of the internal structural relationship provided in this disclosure;
[0064] Figure 5 This is another schematic diagram of the internal relationship structure provided in the embodiments of this disclosure;
[0065] Figure 6 A schematic diagram of the structure of a reporting device for an on-board controller provided in an embodiment of this disclosure;
[0066] Figure 7 A schematic diagram of the structure of another reporting device for an on-board controller provided in an embodiment of this disclosure;
[0067] Figure 8 A schematic block diagram of an example electronic device 300 provided for embodiments of this disclosure. Detailed Implementation
[0068] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0069] In the field of vehicle technology, the operations of Linux-based domain controllers are becoming increasingly centralized and complex. The demand for systemic stability assurance and accurate fault reporting is also growing. For example, the need to detect and report problems even when some system functions fail is increasing. Therefore, a stable and feasible reporting method, device, electronic equipment, and storage medium for vehicle controllers can efficiently and accurately identify and report system risks, thereby greatly improving system stability and providing necessary guarantees for the safe operation of the vehicle control domain and autonomous driving domain.
[0070] The following description, with reference to the accompanying drawings, details the reporting method and apparatus, electronic device, and storage medium of the vehicle controller according to embodiments of the present disclosure.
[0071] Figure 1 This is a flowchart illustrating a reporting method for an on-board controller provided in an embodiment of this disclosure.
[0072] like Figure 1 As shown, the method includes the following steps:
[0073] Step 101: Based on the diagnostic driver set in the kernel layer, collect the first fault information of the target application module in the kernel layer at the first time and the second fault information of the target system resources in the kernel layer at the first time.
[0074] It should be noted that the operating system of the vehicle controller in this embodiment includes an application layer and a kernel layer. The application layer is provided with a diagnostic service, and the kernel layer is provided with a diagnostic driver. A first communication link is provided between the diagnostic driver and the control unit.
[0075] As a refinement of step 101 above, the kernel layer is a low-level application in the system of this embodiment. It is characterized by high privileges and cannot be accessed arbitrarily. It also interfaces with the system hardware resource calls. By setting the diagnostic driver in the kernel layer, the diagnostic driver, a functional program module, can collect first fault information of the target application module in the kernel layer. That is, the diagnostic driver can be used to diagnose the fault status of the target application module in the kernel layer. The target application module can be any other functional program module. The first fault information is the fault information corresponding to the target application module. The first fault information is for distinguishing purposes only and does not constitute a limitation of this disclosure. Based on the diagnostic driver, second fault information of the target system resources in the kernel layer is collected. The second fault information is also for distinguishing purposes only and does not constitute a limitation of this disclosure. The target system resources include processor computing resources, memory resources, and link resources, etc. The second fault information refers to the occupancy status of the target system resources. Both the first and second fault information are fault information collected at a first moment.
[0076] Step 102: If the diagnostic service is found to be faulty based on the diagnostic driver, the first fault information and the second fault information are reported to the control unit based on the first communication link.
[0077] As a refinement of step 102 above, the application layer is an upper-layer application in the system of this embodiment. It is characterized by having lower privileges than the kernel layer and relying on the kernel layer when calling system hardware resources. In the event of a failure in the application layer, such as when the application layer freezes, the first and second fault information that the kernel layer would normally report through the application layer cannot be reported normally. In this case, the first and second fault information are reported to the control unit through the first communication link between the diagnostic driver of the kernel layer and the control unit. The first communication link is only used for differentiation and does not constitute a limitation of this disclosure. The control unit is the management center for fault information.
[0078] The reporting method for an on-board controller provided in this disclosure mainly includes the following technical solutions: the operating system of the on-board controller includes an application layer and a kernel layer. The application layer contains a diagnostic service, and the kernel layer contains a diagnostic driver. A first communication link is established between the diagnostic driver and the control unit. Based on the diagnostic driver in the kernel layer, first fault information of a target application module and second fault information of a target system resource in the kernel layer at a first time are collected. If the diagnostic driver determines that the diagnostic service has failed, the first fault information and the second fault information are reported to the control unit via the first communication link. Compared with related technologies, based on the first communication link between the diagnostic driver and the control unit, when a fault is determined in the application layer, the first fault information and the second fault information collected by the diagnostic driver can be reported to the control unit. That is, based on the diagnostic driver in the kernel layer, the kernel layer can independently diagnose and report fault information when a fault occurs in the application layer.
[0079] As a refinement of the above embodiments, the method may also adopt, but is not limited to, the following implementation: when it is determined based on the diagnostic driver that the application layer has no fault, based on the diagnostic service set in the application layer, the third fault information of each application module in the application layer at the first moment is collected; the first fault information and the second fault information generated by the diagnostic driver are received; based on the second communication link between the diagnostic service and the control unit, the third fault information, the first fault information and the second fault information are reported to the control unit; the third fault information, the first fault information and the second fault information are recorded in the control unit.
[0080] As a refinement of the above embodiments, in order to ensure the stability of the system, when it is determined that the application layer has not experienced a fault, that is, when the application layer can operate normally, based on the diagnostic service set in the application layer, the third fault information of each application module in the application layer at the first moment is collected. Here, the application layer has been mentioned in the above detailed description and will not be repeated here. The diagnostic service is the functional program module running in the application layer, and the application module is other functional program modules in the application layer. The diagnostic service is used to diagnose the fault information of the functional program modules in the application layer and report the fault information. The third fault information is only used for differentiation and does not constitute a limitation of this disclosure. The third fault information is the fault information of each application module in the application layer diagnosed by the diagnostic service. The diagnostic service also does not receive the first fault information and the second fault information collected by the diagnostic driver, and reports the third fault information, the first fault information and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit. The second communication link is only for differentiation and does not constitute a limitation of this disclosure. The first fault information, the second fault information and the third fault information transmitted to the control unit are recorded in the control unit.
[0081] To more clearly illustrate the relationships between the structures involved in this embodiment, Figure 2 This is a schematic diagram illustrating an internal structural relationship provided in an embodiment of this disclosure. Figure 2 As shown, where Figure 2 Taking a Linux system as an example, it includes an application layer and a kernel layer. The application layer includes module 1 and a diagnostic service. The kernel layer includes module 2, module 3, CPU resources, memory resources, link resources, and a diagnostic driver. It also includes a control unit. The diagnostic service and the diagnostic driver are connected to the control unit. This allows the kernel layer to communicate with the control unit when the application malfunctions.
[0082] Combination Figure 2 The above embodiments are described in a scenario-based manner. For example, a diagnostic driver is established at the Linux kernel level to collect system-level resource information. The diagnostic driver and the diagnostic service establish an asynchronous alarm triggering mechanism. The diagnostic driver and the control unit establish an independent fault information reporting path. When problems occur at the application layer, the diagnostic driver can also record the current error state of the system in a timely manner.
[0083] As a refinement of the above embodiments, when performing step 102, which involves reporting the third fault information, the first fault information, and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit, the method may also employ, but is not limited to, the following implementation methods: For example, at a second time point, the fourth fault information of each application module in the application layer is collected based on the diagnostic service, and at the second time point, the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource are collected based on the diagnostic driver. The second time point is after the first time point, and there is a first preset time interval between them; the fault information collected at the first time point is compared with the fault information collected at the second time point, wherein the fault information collected at the first time point includes the first fault information, the second fault information, and the third fault information, and the fault information collected at the second time point includes the fourth fault information, the fifth fault information, and the sixth fault information; when it is determined that the similarity between the fault information collected at the first time point and the fault information collected at the second time point is greater than or equal to a preset similarity threshold, the fault information collected at the first time point is determined as the target fault information; the target fault information is reported to the control unit.
[0084] As a refinement of the above embodiment, the process of collecting the first fault information, the second fault information, and the third fault information at the first moment is the same as that described above. At the second moment, the fourth fault information of each application module in the kernel layer, the fifth fault information of each application module in the kernel layer, and the sixth fault information of each system resource are collected. In short, the fault collection steps at the first moment are executed again at the second moment. After the fault information at the second moment is collected, the fault information collected at the second moment is compared with the fault information collected at the first moment. When it is determined that the similarity between the fault information collected at the first moment and the fault information collected at the second moment is greater than or equal to a preset similarity threshold, the fault information collected at the first moment is determined as the target fault information. The target fault information is reported to the control unit. In this embodiment, the value of the similarity threshold is not limited. The accuracy of the fault information collected at the first moment is determined by comparing the similarity between the fault information collected at the first moment and the fault information collected at the second moment.
[0085] As a refinement of the above embodiments, this embodiment provides a specific step for comparing the above fault information, for example: storing the third fault information collected at the first moment, the first fault information, and the second fault information in a register; collecting the fourth fault information of each application module in the application layer based on the diagnostic service at the second moment, and receiving the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource collected based on the diagnostic driver; storing the fourth fault information, the fifth fault information, and the sixth fault information in the register; comparing the fault information stored in the register at the first moment with the fault information stored at the second moment; when it is determined that the similarity between the fault information collected at the first moment and the fault information collected at the second moment is greater than or equal to a preset similarity threshold, determining the fault information collected at the first moment as the target fault information; and reporting the target fault information to the control unit.
[0086] As a refinement of the above embodiments, when determining that the similarity between the fault information collected at the first time moment and the fault information collected at the second time moment is greater than or equal to a preset similarity threshold, the fault information collected at the first time moment can be determined as the target fault information in the following ways, but not limited to: for example, when the similarity between the third fault information and the fourth fault information, the similarity between the first fault information and the fifth fault information, and the similarity between the third fault information and the sixth fault information are all greater than or equal to the preset similarity threshold, the third fault information, the first fault information, and the second fault information are determined to be correct, and the correct third fault information, the first fault information, and the second fault information are determined as the target fault information.
[0087] To more clearly illustrate the processing procedure of the above embodiments, Figure 3 Another internal structural relationship diagram provided for this embodiment, such as Figure 3As shown: After storing the third, first, and second fault information in the register, the system collects fourth fault information from each application module in the application layer based on the diagnostic service, and receives fifth fault information from each application module in the kernel layer and sixth fault information from each system resource based on the diagnostic driver. The fifth, fourth, and sixth fault information are only distinguished and do not constitute a limitation of this invention. Then, the fourth, fifth, and sixth fault information are stored in the register. The third, first, and second fault information in the register are compared with the fourth, fifth, and sixth fault information respectively. If the similarity between the third and fourth fault information, the first and fifth fault information, and the sixth fault information is all greater than or equal to... When a preset similarity threshold is reached, the third fault information is determined. Since both the first and second fault information are correct, the correct third fault information, the first fault information, and the second fault information are identified as target fault information. This target fault information is then reported to the control unit. This disclosure does not limit the reporting of fault information to only when the similarity between the third fault information and the sixth fault information is greater than or equal to the preset similarity threshold. If the similarity of any fault information exceeds the preset similarity threshold, that fault information can be reported. Furthermore, this embodiment does not limit each type of fault information to correspond to the same preset similarity threshold. For example, among the first, second, and third fault information, only the second fault information has a similarity greater than the preset similarity threshold with the sixth fault information corresponding to it. In this case, the second fault information is identified as target fault information, and the target fault information is reported to the control unit. By collecting and comparing fault information at different times, the accuracy of the fault information is ensured, thus solving the problem of hindering subsequent analysis when the reported fault information is incorrect.
[0088] As a refinement of the above embodiments, when comparing the fault information collected at the first time moment with the fault information collected at the second time moment, the following implementation methods can be adopted, but are not limited to: for example, when comparing the fault information more than twice, the time interval between each adjacent comparison is not less than a second preset time interval. Please refer to... Figure 3In order to prevent high-frequency similarity comparisons of the fault information, when comparing the fault information at the first moment with the fault information at the second moment multiple times, after the first fault information comparison is completed, a first preset time interval is required before the second fault information comparison is allowed. This disclosure does not limit the first preset time interval.
[0089] As a refinement of the above embodiments, this embodiment establishes independent diagnostic logic for important target application modules and performs dual verification of fault information for these important target application modules. The verification process is the same as described in the detailed explanation above. This ensures the accuracy of fault information for important target application modules.
[0090] As a refinement of the above embodiments, when collecting the second fault information of the target system resources in the kernel layer at the first moment in step 101, the following implementation methods can be adopted, but are not limited to: monitoring the occupancy rate of the target system resources based on the diagnostic driver; wherein, the target system resources include at least two types of system resources; when it is determined that the occupancy rate of the first system resource is greater than a preset resource threshold, the second fault information of the first system resource is collected based on the diagnostic driver, wherein the first system resource is any one of the at least two types of system resources.
[0091] Figure 4 This is another schematic diagram of the internal structural relationship provided in this disclosure. To more clearly illustrate the steps described in the detailed explanation above, combined with... Figure 4 To further explain the above, the diagnostic driver monitors the resource utilization of the target system, such as the utilization of processor computing resources, memory storage resources, and link transmission resources. When the utilization of any system resource exceeds a preset resource threshold, the diagnostic driver collects second fault information for that system resource. This second fault information is related to the system resource utilization exceeding the preset threshold. Finally, the second fault information is reported to the control unit and recorded.
[0092] As a refinement of the above embodiments, before the real-time monitoring of the resource occupancy of each system based on the diagnostic driver, the method may also adopt, but is not limited to, the following implementation methods, for example: configuring the preset resource threshold in the diagnostic service of the application layer according to the business scenario of the vehicle controller; and sending the configured preset resource threshold to the diagnostic driver of the kernel layer.
[0093] To more clearly illustrate the steps outlined above, combined with... Figure 4To further explain, the preset resource threshold is configured by the diagnostic service in the application layer. This preset resource threshold can also be dynamically adjusted based on different business scenarios. The configured preset resource threshold is then sent to the diagnostic driver in the kernel layer. For example, the preset resource threshold for file access can be increased during remote upgrades and decreased during normal operation. Dynamically adjusting monitoring based on system resource requirements in different business scenarios allows for better detection of system anomalies in various business situations.
[0094] To more clearly demonstrate the effects of this embodiment when an application layer failure occurs, Figure 5 Another internal relationship structure diagram provided for an embodiment of this disclosure, such as Figure 5 As shown, when the diagnostic service fails, the diagnostic driver communicates directly with the control unit. For example, in a scenario where an SPI bus communication link is established directly between the underlying kernel layer and the control unit, when an upper-layer application service experiences an anomaly, the underlying kernel layer can identify the anomaly and then activate the SPI direct communication line between the kernel layer and the control unit to report the necessary fault information to the system.
[0095] In summary, this embodiment achieves the following effects:
[0096] 1. Based on the diagnostic driver in the kernel layer, when a fault occurs in the application layer, the kernel layer can independently diagnose the fault and report the fault information based on the diagnostic driver.
[0097] 2. The kernel layer has added a diagnostic driver that can flexibly collect abnormal information from the underlying system. When an abnormality occurs, it can more comprehensively display the abnormal state of the system at that time and fully present the state of kernel system resources, providing comprehensive data reference for subsequent analysis of fault records.
[0098] 3. For hardware faults in the controller, dual checks can be performed at both the application layer and the kernel layer to ensure accurate reporting of hardware fault information and avoid misdiagnosis of hardware faults leading to subsequent incorrect replacement of parts.
[0099] 4. The kernel layer adds interfaces for setting thresholds for system CPU, memory, I / O, etc., which can dynamically change the preset resource thresholds according to different business scenarios. The preset resource thresholds can be adjusted to provide abnormal warnings for the system's dependence on system resources under different business scenarios, thereby capturing more system anomalies and enhancing the diagnostic effect.
[0100] Corresponding to the above-described reporting method for vehicle controllers, this invention also proposes a reporting device for vehicle controllers. Since the device embodiments of this invention correspond to the above-described method embodiments, details not disclosed in the device embodiments can be referred to the above-described method embodiments, and will not be repeated here.
[0101] Figure 6 This is a schematic diagram of the structure of a reporting device for an on-board controller provided in an embodiment of this disclosure, as shown below. Figure 6 As shown, it includes:
[0102] The first acquisition unit 21 is used to acquire first fault information of the target application module in the kernel layer and second fault information of the target system resources in the kernel layer at the first time, based on the diagnostic driver set in the kernel layer.
[0103] The first reporting unit 22 is used to report the first fault information and the second fault information to the control unit based on the first communication link when it is determined that the diagnostic service has failed based on the diagnostic driver.
[0104] The reporting device for an on-board controller provided in this disclosure mainly includes the following technical solution: the operating system of the on-board controller includes an application layer and a kernel layer. The application layer contains a diagnostic service, and the kernel layer contains a diagnostic driver. A first communication link is established between the diagnostic driver and the control unit. Based on the diagnostic driver in the kernel layer, first fault information of a target application module and second fault information of a target system resource in the kernel layer at a first time are collected. If the diagnostic driver determines that the diagnostic service has failed, the first fault information and the second fault information are reported to the control unit via the first communication link. Compared with related technologies, based on the first communication link between the diagnostic driver and the control unit, when a fault is determined in the application layer, the first fault information and the second fault information collected by the diagnostic driver can be reported to the control unit. That is, based on the diagnostic driver in the kernel layer, the kernel layer can independently diagnose and report fault information when a fault occurs in the application layer.
[0105] Figure 7 This is a schematic diagram of the structure of another vehicle controller reporting device provided in an embodiment of this disclosure. Further, in one possible implementation of this embodiment, as shown... Figure 7 As shown, the device further includes:
[0106] The second acquisition unit 23 is used to acquire the third fault information of each application module in the application layer at the first moment, based on the diagnostic service set in the application layer, when it is determined that there is no fault in the application layer based on the diagnostic driver.
[0107] Receiving unit 24 is used to receive the first fault information and the second fault information collected by the diagnostic driver;
[0108] The second reporting unit 25 is used to report the third fault information, the first fault information and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit;
[0109] Recording unit 26 is used to record the third fault information, the first fault information and the second fault information in the control unit.
[0110] Furthermore, in one possible implementation of this embodiment, such as Figure 7 As shown, the second reporting unit 25 includes:
[0111] The acquisition module 251 is used to acquire the fourth fault information of each application module in the application layer based on the diagnostic service at the second time, and to acquire the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource based on the diagnostic driver at the second time. The second time is after the first time, and there is a first preset time interval between the two.
[0112] The comparison module 252 is used to compare the fault information collected at the first time point with the fault information collected at the second time point. The fault information collected at the first time point includes the first fault information, the second fault information and the third fault information. The fault information collected at the second time point includes the fourth fault information, the fifth fault information and the sixth fault information.
[0113] The determination module 253 is used to determine the fault information collected at the first time as the target fault information when the similarity between the fault information collected at the first time and the fault information collected at the second time is greater than or equal to a preset similarity threshold.
[0114] The reporting module 254 is used to report the target fault information to the control unit.
[0115] Furthermore, in one possible implementation of this embodiment, such as Figure 7 As shown, the determining module 253 is further configured to:
[0116] When the similarity between the third fault information and the fourth fault information, the similarity between the first fault information and the fifth fault information, and the similarity between the third fault information and the sixth fault information are all greater than or equal to a preset similarity threshold, the third fault information, the first fault information, and the second fault information are determined to be correct, and the correct third fault information, the first fault information, and the second fault information are determined as the target fault information.
[0117] Furthermore, in one possible implementation of this embodiment, such as Figure 7 As shown, the comparison module 252 is further used for:
[0118] When comparing the fault information more than twice, the time interval between each two adjacent comparisons shall not be less than the second preset time interval.
[0119] Furthermore, in one possible implementation of this embodiment, such as Figure 7 As shown, the acquisition module 251 is also used for:
[0120] The diagnostic driver monitors the utilization rate of the target system resources; wherein, the target system resources include at least two types of system resources;
[0121] When it is determined that the occupancy rate of the first system resource is greater than a preset resource threshold, the second fault information of the first system resource is collected based on the diagnostic driver, wherein the first system resource is any one of the at least two types of system resources.
[0122] Furthermore, in one possible implementation of this embodiment, such as Figure 7 As shown, the device further includes:
[0123] Configuration unit 27 is used to configure the preset resource threshold in the diagnostic service of the application layer according to the business scenario of the vehicle controller;
[0124] The sending unit 28 is used to send the configured preset resource threshold to the diagnostic driver in the kernel layer.
[0125] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and the principle is the same, so it is not limited in this embodiment.
[0126] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0127] Figure 8A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0128] like Figure 8 As shown, device 300 includes a computing unit 301, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 302 or a computer program loaded from storage unit 308 into RAM (Random Access Memory) 303. RAM 303 can also store various programs and data required for the operation of device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via bus 304. I / O (Input / Output) interface 305 is also connected to bus 304.
[0129] Multiple components in device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of monitors, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0130] The computing unit 301 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as the reporting method of an in-vehicle controller. For example, in some embodiments, the reporting method of an in-vehicle controller may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the aforementioned reporting method of the vehicle controller by any other suitable means (e.g., by means of firmware).
[0131] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0132] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0133] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0135] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0136] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0137] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0138] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0139] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A reporting method for an on-board controller, characterized in that, The operating system of the vehicle controller includes an application layer and a kernel layer. The application layer contains a diagnostic service, and the kernel layer contains a diagnostic driver. A first communication link is established between the diagnostic driver and the control unit. The method includes: Based on the diagnostic driver set in the kernel layer, the first fault information of the target application module in the kernel layer at the first moment and the second fault information of the target system resources in the kernel layer at the first moment are collected. If the diagnostic service is determined to be faulty based on the diagnostic driver, the first fault information and the second fault information are reported to the control unit via the first communication link. The method further includes: If the application layer is determined to be fault-free based on the diagnostic driver, the third fault information of each application module in the application layer is collected at the first moment based on the diagnostic service set in the application layer. Receive the first fault information and the second fault information collected by the diagnostic driver; Based on the second communication link between the diagnostic service and the control unit, the third fault information, the first fault information, and the second fault information are reported to the control unit; The step of reporting the third fault information, the first fault information, and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit includes: At the second moment, the fourth fault information of each application module in the application layer is collected based on the diagnostic service, and the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource are collected based on the diagnostic driver at the second moment. The second moment is after the first moment, and there is a first preset time interval between the two. The fault information collected at the first time point is compared with the fault information collected at the second time point. The fault information collected at the first time point includes the first fault information, the second fault information and the third fault information. The fault information collected at the second time point includes the fourth fault information, the fifth fault information and the sixth fault information. When it is determined that the similarity between the fault information collected at the first time point and the fault information collected at the second time point is greater than or equal to a preset similarity threshold, the fault information collected at the first time point is determined as the target fault information. The target fault information is reported to the control unit.
2. The method according to claim 1, characterized in that, The method further includes: The third fault information, the first fault information, and the second fault information are recorded in the control unit.
3. The method according to claim 1, characterized in that, The step of determining the fault information collected at the first time moment as the target fault information when the similarity between the fault information collected at the first time moment and the fault information collected at the second time moment is greater than or equal to a preset similarity threshold includes: When the similarity between the third fault information and the fourth fault information, the similarity between the first fault information and the fifth fault information, and the similarity between the second fault information and the sixth fault information are all greater than or equal to a preset similarity threshold, then the third fault information, the first fault information, and the second fault information are determined to be correct, and the correct third fault information, the first fault information, and the second fault information are determined as the target fault information.
4. The method according to claim 1, characterized in that, Comparing the fault information collected at the first time point with the fault information collected at the second time point includes: When comparing the fault information more than twice, the time interval between each two adjacent comparisons shall not be less than the second preset time interval.
5. The method according to claim 1, characterized in that, The second fault information collected from the target system resources in the kernel layer includes: The diagnostic driver monitors the utilization rate of the target system resources; wherein, the target system resources include at least two types of system resources; When it is determined that the occupancy rate of the first system resource is greater than a preset resource threshold, the second fault information of the first system resource is collected based on the diagnostic driver, wherein the first system resource is any one of the at least two types of system resources.
6. The method according to claim 5, characterized in that, Before monitoring the resource utilization of the target system based on the diagnostic driver, the method further includes: Configure the preset resource threshold in the diagnostic service of the application layer according to the business scenario of the vehicle controller; The configured preset resource threshold is sent to the diagnostic driver in the kernel layer.
7. A reporting device for an on-board controller, characterized in that, The operating system of the vehicle controller includes an application layer and a kernel layer. The application layer contains a diagnostic service, and the kernel layer contains a diagnostic driver. A first communication link is established between the diagnostic driver and the control unit. The device includes: The first acquisition unit is used to acquire, based on the diagnostic driver set in the kernel layer, the first fault information of the target application module in the kernel layer at the first moment and the second fault information of the target system resources in the kernel layer at the first moment; The first reporting unit is used to report the first fault information and the second fault information to the control unit based on the first communication link when it is determined that the diagnostic service has failed based on the diagnostic driver. The device further includes: The second acquisition unit is used to acquire third fault information of each application module in the application layer at the first moment, based on the diagnostic service set in the application layer, when it is determined that no fault has occurred in the application layer based on the diagnostic driver. The receiving unit is used to receive the first fault information and the second fault information collected by the diagnostic driver; The second reporting unit is used to report the third fault information, the first fault information, and the second fault information to the control unit based on the second communication link between the diagnostic service and the control unit. The second reporting unit includes: The acquisition module is used to acquire the fourth fault information of each application module in the application layer based on the diagnostic service at the second time, and to acquire the fifth fault information of each application module in the kernel layer and the sixth fault information of each system resource based on the diagnostic driver at the second time. The second time is after the first time, and there is a first preset time interval between the two. The comparison module is used to compare the fault information collected at the first time point with the fault information collected at the second time point. The fault information collected at the first time point includes the first fault information, the second fault information and the third fault information. The fault information collected at the second time point includes the fourth fault information, the fifth fault information and the sixth fault information. The determination module is used to determine the fault information collected at the first time as the target fault information when the similarity between the fault information collected at the first time and the fault information collected at the second time is greater than or equal to a preset similarity threshold. The reporting module is used to report the target fault information to the control unit.
8. A vehicle, characterized in that, The reporting device includes the vehicle controller as described in claim 7.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.