Fault detection method and device for controlled device in vehicle, computer equipment and medium
By setting the time information of controlled devices under the ECU in the vehicle and obtaining the task processing time, the problem of precise positioning in vehicle fault detection is solved, and the accuracy of fault detection is improved.
Patent Information
- Application Number
- CN202411395369.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-10-08
AI Technical Summary
When a vehicle fails in operation, it becomes a difficult problem to accurately determine the functional module that fails, especially because the time information of different controlled devices is different, resulting in a complex fault detection process.
By uniformly setting the time information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle, and when the time information is unified, the task processing time of the controlled device to be tested is obtained to determine whether there is a fault in the controlled device to be tested.
This method can accurately determine the controlled devices that have failed in the vehicle, improve the accuracy of fault detection, and simplify the fault location process.
Smart Images

Figure CN120010431A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, computer equipment and medium for detecting faults of controlled components in a vehicle. Background Art
[0002] With the rapid development of vehicle technology, the functions of vehicles are increasing, and accordingly, the number of functional modules (i.e. controlled devices) used to implement the corresponding functions in vehicles is also increasing. Different functional modules are used to process different data to implement different functions.
[0003] Based on this, when a vehicle fails, how to find the faulty functional module becomes a big problem. In addition, the time information of different controlled devices in the vehicle is different, which also brings difficulties to the process of finding the faulty functional module. Therefore, how to accurately determine the faulty controlled device in the vehicle is a problem that needs to be solved urgently. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and medium for detecting faults of controlled components in a vehicle, which can accurately determine whether a fault occurs in a controlled component in the vehicle, in order to address the above technical problems.
[0005] In a first aspect, the present application provides a method for detecting a fault of a controlled device in a vehicle, comprising:
[0006] uniformly setting time information of at least one controlled device under at least one electronic control unit (ECU) in a target vehicle;
[0007] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0008] Determine whether the controlled device under test has a fault based on the task processing time.
[0009] In one embodiment, the time information of at least one controlled device under at least one ECU in the target vehicle is uniformly set, including:
[0010] Uniformly set the time information of at least one ECU in the target vehicle;
[0011] Among them, each controlled device under the ECU shares the time information of the ECU to which it belongs.
[0012] In one embodiment, the time information of at least one ECU in the target vehicle is uniformly set, including:
[0013] Uniformly set the time reference information of at least one ECU in the target vehicle;
[0014] The time information includes time reference information.
[0015] In one embodiment, the time information of at least one ECU in the target vehicle is uniformly set, including:
[0016] Obtain the current standard time from a preset clock source, and uniformly set the current time information of at least one ECU in the target vehicle to the current standard time;
[0017] The time information includes current time information.
[0018] In one embodiment, obtaining a task processing time of a controlled device to be tested in at least one controlled device to process a task to be tested includes:
[0019] Control the controlled device to be tested to execute the task to be tested, and prohibit the controlled device to be tested from responding to the access behavior of other controlled devices during the execution of the task to be tested;
[0020] Obtain the task processing time fed back by the controlled device under test when the task under test is completed.
[0021] In one embodiment, controlling the controlled device to be tested to execute the task to be tested, and prohibiting the controlled device to be tested from responding to access behaviors of other controlled devices during the execution of the task to be tested, includes:
[0022] Setting the priority of the controlled device to be tested in at least one controlled device to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to access behaviors of other controlled devices;
[0023] Accordingly, after obtaining the task processing time fed back by the controlled device under test when the task under test is completed, the method further includes:
[0024] Cancel the preset priority setting for the controlled device under test.
[0025] In one embodiment, obtaining a task processing time of a controlled device to be tested in at least one controlled device to process a task to be tested includes:
[0026] Control and shut down the interruption function of the vehicle control system of the target vehicle;
[0027] When the interrupt function is successfully disabled, the controlled device to be tested is controlled to execute the task to be tested;
[0028] Obtain the task processing time of the controlled device under test processing the task under test.
[0029] In a second aspect, the present application also provides a controlled device fault detection device in a vehicle, comprising:
[0030] A time setting module, used for uniformly setting time information of at least one controlled device under at least one electronic control unit ECU in a target vehicle;
[0031] A duration acquisition module, used for acquiring the task processing duration of the controlled device to be tested in at least one controlled device for processing the task to be tested when the time information is successfully unified;
[0032] The fault determination module is used to determine whether there is a fault in the controlled device under test according to the task processing time.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle;
[0035] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0036] Determine whether the controlled device under test has a fault based on the task processing time.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0038] Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle;
[0039] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0040] Determine whether the controlled device under test has a fault based on the task processing time.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle;
[0043] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0044] Determine whether the controlled device under test has a fault based on the task processing time.
[0045] The above-mentioned method, device, computer equipment and medium for detecting faults of controlled devices in vehicles, before obtaining the task processing time of the controlled device to be tested in at least one controlled device to process the task to be tested, uniformly set the time information of at least one controlled device under at least one ECU in the target vehicle, and on the premise that the time information is successfully unified, input the task to be tested into the corresponding controlled device to be tested, obtain the corresponding task processing time, and then determine whether the controlled device to be tested has a fault based on the task processing time. In the above process, before performing fault detection on the controlled device in the vehicle, the time information of at least one controlled device under each ECU is unified, so that the determined task processing time is more accurate, thereby improving the accuracy of fault detection of the controlled device. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is a flow chart of a method for detecting faults of a controlled device in a vehicle in one embodiment;
[0048] Figure 2 A schematic diagram of a flow chart of a time information unification step in an embodiment;
[0049] Figure 3 A schematic diagram of a flow chart of a time information unification step in another embodiment;
[0050] Figure 4 A flowchart of a task processing duration acquisition step in one embodiment;
[0051] Figure 5 A flowchart of a step of obtaining task processing duration in another embodiment;
[0052] Figure 6 is a flow chart of a method for detecting faults of a controlled device in a vehicle in another embodiment;
[0053] Figure 7 is a structural block diagram of a controlled device fault detection device in a vehicle in one embodiment;
[0054] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] Before introducing the controlled device fault detection method in a vehicle provided by the embodiment of the present application, it should be noted that time management technology has become an indispensable part of modern computer science. Especially in embedded systems, accurate time measurement is of great significance for system performance optimization and fault diagnosis. The AUTOSAR (Automotive Open System Architecture) architecture is an open system architecture for automotive electronic systems, which provides a standardized method for developing and integrating ECUs. In the AUTOSAR architecture, execution time statistics of functional modules (i.e., controlled devices) is a key technical requirement, especially in application scenarios that require high-precision time measurement, such as autonomous driving, advanced infotainment systems, etc.
[0057] In the existing technology, a solution based on hardware counters is usually used to measure function execution time. The basic idea of this solution is to use hardware counters to record the time interval between the start and end of a function, thereby calculating the execution time of the function. In addition, there are some software solutions, such as using a timestamp application programming interface (Application Programming Interface, API) or a timer function provided by the operating system to measure the function execution time, and then determine whether the corresponding controlled device is faulty based on the execution time. This application improves the accuracy of fault detection of controlled devices in vehicles by improving the accuracy of determining the execution time.
[0058] In one embodiment, Figure 1 As shown, a method for detecting faults of controlled components in a vehicle is provided. This embodiment uses the method applied to a vehicle controller as an example. It can be understood that the method can also be applied to a vehicle terminal, and can also be applied to a system including a vehicle terminal and a vehicle controller, and is implemented through the interaction between the vehicle terminal and the vehicle controller. In this embodiment, the method includes the following steps:
[0059] S110, uniformly setting time information of at least one controlled device under at least one ECU in the target vehicle.
[0060] Among them, the target vehicle can be a vehicle with a need for controlled device fault detection. The target vehicle can be an electric vehicle, a gasoline vehicle, or a gasoline-electric hybrid vehicle. This application does not impose any limitation on the vehicle type of the target vehicle.
[0061] There are multiple ECUs in the target vehicle, and each ECU is equipped with different controlled devices. Different controlled devices are independently responsible for specific functions to perform vehicle operation tasks. These ECUs not only control the operation of key systems such as the target vehicle's engine, transmission, and brakes, but also include a dedicated engine control unit, transmission control module, remote communication control module, and suspension control module, etc. Each module controls different systems to achieve various functions of the vehicle. It is understandable that the controlled devices under the ECU can be functional modules or hardware controls, and this application does not make any restrictions on this.
[0062] It should be noted that different controlled devices in the vehicle correspond to different time information. For example, the time bases of controlled device A and controlled device B are different. For example, controlled device A uses 1 ms as the time base, and controlled device B uses 0.5 ms as the time base. In this embodiment, in order to facilitate fault detection of controlled devices in the vehicle, the time information of at least one controlled device in the target vehicle can be unified.
[0063] In an optional embodiment, a clock source may be set for the target vehicle, and all controlled devices may be controlled to determine their own time information based on the clock source. For example, the controlled devices may be controlled to periodically obtain time information fed back by the clock source, and use the time information as the current time of the controlled devices.
[0064] In an optional embodiment, the time information of each controlled device is the same as the time information of the ECU to which the controlled device belongs. A clock source can be set for the target vehicle, and all ECUs can be controlled to determine their own time information based on the clock source, and synchronize their own time information to each controlled device it controls as the time information of each controlled device.
[0065] S120, when the time information is successfully unified, obtaining a task processing time length of processing of the task to be tested by the controlled device to be tested in at least one controlled device.
[0066] Among them, different controlled devices have different functions, and accordingly, different controlled devices can process different data. Therefore, in this embodiment, different controlled devices correspond to different tasks to be tested.
[0067] For example, in this embodiment, for any controlled device, the task to be tested corresponding to the controlled device can be determined in advance according to the function of the controlled device, and the corresponding relationship between different controlled devices and corresponding tasks to be tested can be determined.
[0068] In an optional implementation, the controlled device to be tested may be one, and accordingly, the task to be tested corresponding to the controlled device to be tested may be determined from the corresponding relationship. Further, the task to be tested may be input into the controlled device to be tested, and the task processing time may be fed back after the controlled device to be tested completes the task to be tested.
[0069] In an optional implementation, the number of controlled devices to be tested may not be unique. For example, in the case of a regular fault inspection of a target vehicle, the controlled devices to be tested may be all controlled devices of the target vehicle. Accordingly, the tasks to be tested corresponding to each controlled device to be tested may be determined from the corresponding relationship. Further, each task to be tested may be input into the corresponding controlled device to be tested, and the task processing time fed back by each controlled device to be tested after completing the corresponding task to be tested may be accepted.
[0070] It should be noted that, in this embodiment, the number of times the task to be tested is input to the controlled device to be tested for processing may be once or multiple times. In the case of multiple processing, at least two task processing durations fed back by the controlled device may be obtained.
[0071] S130, determining whether the controlled device to be tested has a fault according to the task processing time.
[0072] In an optional implementation, when the task processing time is one, it can be determined whether the controlled device under test has a fault when the task processing time exceeds a preset time threshold. The preset time threshold can be determined based on manual experience or through a large number of experiments, and this application does not impose any limitation on this.
[0073] In an optional implementation, when there are multiple task processing durations, each task processing duration can be processed to obtain a task processing statistical duration, and whether the controlled device to be tested has a fault can be determined based on the task processing statistical duration. Exemplarily, the average value, minimum value, and maximum value of each task processing duration can be determined, as well as statistical indicators such as the standard deviation and variance corresponding to each task processing duration, and each statistical indicator is used as the task processing statistical duration, and the task processing statistical duration and the controlled device identifier to be tested are input into a pre-trained fault detection model to obtain a fault detection result of the controlled device to be tested.
[0074] Among them, the fault detection model can be constructed based on a common neural network, which will not be described in detail here. Furthermore, when training the fault detection model, the sample statistical duration and the sample controlled device identification can be input into the fault detection model to obtain the fault detection result of the sample controlled device, and according to the difference between the fault detection result and the fault label of the corresponding sample controlled device, the model parameters of the fault detection model are adjusted to obtain a trained fault detection model.
[0075] It should be noted that, in this embodiment, in order to facilitate the user to understand the task processing effect of the controlled device to be tested, after obtaining the task processing statistical duration, these indicators can be presented in the form of a chart using a data visualization tool. For example, a histogram can be used to display the distribution of task processing duration, so that the trend and characteristics of the data are clear at a glance. Through intuitive visualization, it can help users quickly grasp the measurement results, thereby providing a basis for subsequent decision-making.
[0076] In the above-mentioned method for detecting faults of controlled devices in vehicles, before obtaining the task processing time of the controlled device to be tested in at least one controlled device to process the task to be tested, the time information of at least one controlled device under at least one ECU in the target vehicle is uniformly set, and on the premise that the time information is successfully unified, the task to be tested is input into the corresponding controlled device to be tested, and the corresponding task processing time is obtained, and then it is determined whether the controlled device to be tested has a fault based on the task processing time. In the above process, before performing fault detection on the controlled device in the vehicle, the time information of at least one controlled device under each ECU is unified, so that the determined task processing time is more accurate, thereby improving the accuracy of fault detection of the controlled device.
[0077] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the process of uniformly setting the time information of at least one controlled device under at least one ECU in the target vehicle is described in detail.
[0078] See also Figure 2 The steps for unifying the time information shown include:
[0079] S210, uniformly setting time information of at least one ECU in the target vehicle.
[0080] Among them, each controlled device under the ECU shares the time information of the ECU to which it belongs, that is, for any ECU, the time information of each controlled device under the ECU is the same as the time information of the ECU.
[0081] In an optional implementation, a clock source may be set for the target vehicle, and all ECUs may be controlled to determine their own time information based on the clock source, so as to uniformly set the time information of each ECU in the target vehicle.
[0082] In an optional embodiment, each ECU of the target vehicle, including the main ECU and other ECUs, can set a clock source for the target vehicle, and control the main ECU to periodically determine its own time information based on the clock source. At the same time, the main ECU is controlled to synchronize its own time information to other ECUs to uniformly set the time information of each ECU in the target vehicle.
[0083] Exemplarily, the main ECU is controlled to send a time acquisition request to the clock source of the target vehicle, the main ECU receives the current time fed back by the clock source, and the main ECU is controlled to determine the current time of the main ECU according to the current time and communication delay, and adjust the main ECU's own clock according to the current time. Afterwards, the main ECU is controlled to synchronize the current time of its own clock to other ECUs, for example, it can be broadcast to other ECUs to adjust the current time information of other ECUs. Thus, the time information of at least one ECU in the target vehicle is uniformly set.
[0084] In an optional embodiment, the current standard time can be obtained from a preset clock source, and the current time information of at least one ECU in the target vehicle can be uniformly set as the current standard time; wherein the time information includes the current time information. Exemplarily, a random ECU in the target vehicle can be controlled to obtain the current standard time from the preset clock source, and the current standard time can be used as the current time information of the ECU. Further, the ECU is controlled to synchronize the current time information of its own clock to other ECUs, for example, it can be broadcast to other ECUs to adjust the current time information of other ECUs, thereby uniformly setting the time information of at least one ECU in the target vehicle.
[0085] In the above embodiment, the process of uniformly setting the time information of at least one controlled device under at least one ECU in the target vehicle is described in detail. Specifically, it is not necessary to unify the time information of all controlled devices, but only to unify the time information of each ECU in the target vehicle, so as to achieve the effect of unifying the time information of all controlled devices, which lays a foundation for improving the accuracy of fault detection of controlled devices in the vehicle.
[0086] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, another method of uniformly setting the time information of at least one controlled device under at least one ECU in the target vehicle is provided and described in detail.
[0087] See also Figure 3 The steps for unifying the time information shown include:
[0088] S310, uniformly setting time reference information of at least one ECU in the target vehicle.
[0089] The time information includes time reference information, which is the basic unit of time and can represent the frequency of a clock. For example, the basic unit of time of a clock is 1 second.
[0090] It should be noted that, since different ECUs in a vehicle process different types of data and have different timeliness of data processing, the time reference information of different ECUs in a vehicle may be different. Therefore, in order to uniformly set the time information of at least one controlled device under at least one ECU in a target vehicle, it is necessary to unify the time reference information of at least one ECU in the target vehicle.
[0091] Exemplarily, in this embodiment, a time reference information adjustment instruction may be sent to each ECU in the target vehicle to instruct each ECU to adjust the time reference information of its own clock. The time reference information adjustment instruction carries preset time reference information, i.e., time tick. The preset time reference information may be determined based on manual experience or through a large number of experiments. This application does not impose any limitation on this. For example, a preset clock source may be pre-set, and the time reference information of the clock source may be used as the preset time reference information. Exemplarily, the preset time reference information may be 1ms or 0.5ms.
[0092] In the above embodiment, another method of uniformly setting the time information of at least one controlled device under at least one ECU in the target vehicle is provided. Specifically, by uniformly setting the time reference information of at least one ECU in the target vehicle, the time information of at least one controlled device under at least one ECU in the target vehicle is made the same, which lays a foundation for improving the accuracy of fault detection of controlled devices in the vehicle.
[0093] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, a specific implementation method for obtaining the task processing time length of processing the task to be tested by the controlled device to be tested in at least one controlled device is provided.
[0094] See also Figure 4 The steps for obtaining the task processing duration shown include:
[0095] S410, controlling the controlled device to be tested to execute the task to be tested, and prohibiting the controlled device to be tested from responding to access behaviors of other controlled devices during the execution of the task to be tested.
[0096] It should be noted that in order to make the task processing time fed back by the controlled device under test when the task under test is completed better reflect the actual time taken by the controlled device under test to execute the task under test, that is, to make the task processing time more accurate, it is necessary to ensure that the controlled device under test will not be interfered with by other tasks during the execution of the task under test.
[0097] In an optional implementation, a prohibit access instruction may be sent to other controlled devices, thereby prohibiting the controlled device under test from responding to access actions of other controlled devices during the process of the controlled device under test performing the task under test. The prohibit access instruction is used to instruct other controlled devices to prohibit access to the controlled device under test.
[0098] In an optional implementation, the priority of the controlled device to be tested in at least one controlled device is set to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to the access behavior of other controlled devices; illustratively, the priority of the controlled device to be tested can be set to the highest priority to ensure that the controlled device to be tested will not be affected by other controlled devices during the execution of the task to be tested, thereby improving the accuracy of the task processing time. Accordingly, after obtaining the task processing time fed back by the controlled device to be tested when the task to be tested is completed, the preset priority setting for the controlled device to be tested is canceled.
[0099] Optionally, in this embodiment, before fault detection is performed on the controlled components in the vehicle, each controlled component in the target vehicle may be preset with a corresponding priority. In this case, after the fault detection of the controlled component to be tested is completed, the priority of the controlled component to be tested can be restored to the original priority. Of course, before fault detection is performed on the controlled components in the vehicle, each controlled component in the target vehicle may not be set with a priority. In this case, after the fault detection of the controlled component to be tested is completed, the priority setting of the controlled component to be tested can be canceled.
[0100] S420, obtaining the task processing time fed back by the controlled device under test when the task under test is completed.
[0101] Optionally, when only one fault detection is performed on the controlled device under test, the task processing duration fed back by the controlled device under test when the task under test is completed can be used as the final task processing duration. When multiple fault detections are performed on the controlled device under test, the task processing duration fed back by the controlled device under test when each task under test is completed can be used as a candidate processing duration, and the task processing duration fed back by the controlled device under test when the task under test is completed is determined based on each candidate processing duration.
[0102] Exemplarily, the moment when the task to be tested is input into the controlled device to be tested may be recorded, and the task completion time fed back by the controlled device to be tested when the task to be tested is completed may be obtained to determine the task processing duration.
[0103] In the above embodiment, a specific implementation method for obtaining the task processing time of the controlled device under test in at least one controlled device to process the task under test is provided. Specifically, the accuracy of the task processing time is improved by prohibiting the controlled device under test from responding to the access behavior of other controlled devices during the execution of the task under test.
[0104] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, another specific implementation method of obtaining the task processing time length of the under-test controlled device in at least one controlled device processing the under-test task is provided.
[0105] See also Figure 5 The steps for obtaining the task processing duration shown include:
[0106] S510, controlling and disabling the interruption function of the vehicle control system of the target vehicle.
[0107] Specifically, in this embodiment, the interruption function of the vehicle control system of the target vehicle can be controlled to be turned on to avoid interruption of the controlled device under test during the execution of the task under test, thereby improving the accuracy of the task processing time.
[0108] S520, when the interrupt function is successfully disabled, controlling the controlled device to be tested to execute the task to be tested.
[0109] S530, obtaining a task processing time for the controlled device under test to process the task under test.
[0110] In the above embodiment, another specific implementation method for obtaining the task processing time of the at least one controlled device to process the task to be tested is provided. Specifically, the accuracy of the task processing time is improved by controlling the interrupt function of the vehicle control system of the target vehicle to be turned off.
[0111] It should be noted that in this embodiment, in order to further improve the accuracy of the task processing time, it is also possible to prohibit the controlled device under test from responding to the access behavior of other controlled devices during the execution of the task under test, and to improve the accuracy of the task processing time by controlling the interrupt function of the vehicle control system of the target vehicle.
[0112] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the method for detecting faults of controlled components in a vehicle provided by the present application is introduced in detail.
[0113] See also Figure 6 The method for detecting faults of controlled devices in a vehicle shown includes:
[0114] S610, setting the time ticks of multiple ECUs to preset ticks;
[0115] S620, controlling the main ECU to send a time acquisition request to a preset clock source, and determining the current time information of the main ECU according to the current time fed back by the preset clock source;
[0116] S630, controlling the main ECU to synchronize current time information to other ECUs;
[0117] S640, inputting the task to be tested into the controlled device to be tested, and obtaining the start time of the controlled device to be tested processing the task to be tested;
[0118] S650, the end time fed back by the controlled device under test when the task under test is completed;
[0119] S660, determining the task processing time of this fault detection according to the start time and the end time;
[0120] S670, counting task processing time of multiple fault detections, calculating statistical indicators, and displaying the statistical indicators in the form of graphs.
[0121] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0122] Based on the same inventive concept, the embodiment of the present application also provides a vehicle controlled device fault detection device for implementing the above-mentioned vehicle controlled device fault detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more vehicle controlled device fault detection device embodiments provided below can refer to the limitations of the vehicle controlled device fault detection method above, and will not be repeated here.
[0123] In an exemplary embodiment, Figure 7 As shown, a controlled component fault detection device in a vehicle is provided, comprising: a time setting module 710, a duration acquisition module 720 and a fault determination module 730, wherein:
[0124] The time setting module 710 is used to uniformly set the time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle.
[0125] The duration acquisition module 720 is used to acquire the task processing duration of the controlled device to be tested in at least one controlled device for processing the task to be tested when the time information is successfully unified.
[0126] The fault determination module 730 is used to determine whether there is a fault in the controlled device to be tested according to the task processing time.
[0127] In one embodiment, the time setting module 710 is specifically used to uniformly set the time information of at least one ECU in the target vehicle; wherein each controlled device under the ECU shares the time information of the ECU to which it belongs.
[0128] In one embodiment, the time setting module 710 is specifically used to uniformly set the time reference information of at least one ECU in the target vehicle; wherein the time information includes the time reference information.
[0129] In one embodiment, the time setting module 710 is specifically used to obtain the current standard time from a preset clock source, and uniformly set the current time information of at least one ECU in the target vehicle as the current standard time; wherein the time information includes the current time information.
[0130] In one embodiment, the duration acquisition module 720 includes a task processing unit, which is used to control the controlled device under test to execute the task under test, and prohibit the controlled device under test from responding to the access behavior of other controlled devices during the execution of the task under test; a first acquisition unit, which is used to obtain the task processing duration fed back by the controlled device under test when the task under test is completed.
[0131] In one embodiment, the task processing unit includes a priority setting subunit, which is used to set the priority of the controlled device to be tested in at least one controlled device to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to the access behavior of other controlled devices; and also includes a cancellation setting subunit, which is used to cancel the preset priority setting of the controlled device to be tested.
[0132] In one embodiment, the duration acquisition module 720 includes a function shutdown unit, which is used to control the shutdown of the interrupt function of the vehicle control system of the target vehicle; a task execution unit, which is used to control the controlled device under test to execute the task under test when the interrupt function is successfully shut down; and a duration acquisition unit, which is used to obtain the task processing duration of the controlled device under test to process the task under test.
[0133] Each module in the above-mentioned controlled device fault detection device in a vehicle can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0134] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a controlled device fault detection in a vehicle is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0135] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0137] Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle;
[0138] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0139] Determine whether the controlled device under test has a fault based on the task processing time.
[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0141] Uniformly set the time information of at least one ECU in the target vehicle;
[0142] Among them, each controlled device under the ECU shares the time information of the ECU to which it belongs.
[0143] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0144] Uniformly set the time reference information of at least one ECU in the target vehicle;
[0145] The time information includes time reference information.
[0146] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0147] Obtain the current standard time from a preset clock source, and uniformly set the current time information of at least one ECU in the target vehicle to the current standard time;
[0148] The time information includes current time information.
[0149] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0150] Control the controlled device to be tested to execute the task to be tested, and prohibit the controlled device to be tested from responding to the access behavior of other controlled devices during the execution of the task to be tested;
[0151] Obtain the task processing time fed back by the controlled device under test when the task under test is completed.
[0152] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0153] Setting the priority of the controlled device to be tested in at least one controlled device to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to access behavior of other controlled devices;
[0154] Accordingly, after obtaining the task processing time fed back by the controlled device under test when the task under test is completed, the method further includes:
[0155] Cancel the preset priority setting for the controlled device under test.
[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0157] Control and shut down the interruption function of the vehicle control system of the target vehicle;
[0158] When the interrupt function is successfully turned off, the controlled device to be tested is controlled to execute the task to be tested;
[0159] Obtain the task processing time of the controlled device under test processing the task under test.
[0160] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0161] Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle;
[0162] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0163] Determine whether the controlled device under test has a fault based on the task processing time.
[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0165] Uniformly set the time information of at least one ECU in the target vehicle;
[0166] Among them, each controlled device under the ECU shares the time information of the ECU to which it belongs.
[0167] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0168] Uniformly set the time reference information of at least one ECU in the target vehicle;
[0169] The time information includes time reference information.
[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0171] Obtain the current standard time from a preset clock source, and uniformly set the current time information of at least one ECU in the target vehicle to the current standard time;
[0172] The time information includes current time information.
[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0174] Control the controlled device to be tested to execute the task to be tested, and prohibit the controlled device to be tested from responding to the access behavior of other controlled devices during the execution of the task to be tested;
[0175] Obtain the task processing time fed back by the controlled device under test when the task under test is completed.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0177] Setting the priority of the controlled device to be tested in at least one controlled device to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to access behavior of other controlled devices;
[0178] Accordingly, after obtaining the task processing time fed back by the controlled device under test when the task under test is completed, the method further includes:
[0179] Cancel the preset priority setting for the controlled device under test.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] Control and shut down the interruption function of the vehicle control system of the target vehicle;
[0182] When the interrupt function is successfully turned off, the controlled device to be tested is controlled to execute the task to be tested;
[0183] Obtain the task processing time of the controlled device under test processing the task under test.
[0184] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0185] Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle;
[0186] When the time information is successfully unified, obtaining a task processing time of processing the task to be tested by the controlled device to be tested in at least one controlled device;
[0187] Determine whether the controlled device under test has a fault based on the task processing time.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0189] Uniformly set the time information of at least one ECU in the target vehicle;
[0190] Among them, each controlled device under the ECU shares the time information of the ECU to which it belongs.
[0191] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0192] Uniformly set the time reference information of at least one ECU in the target vehicle;
[0193] The time information includes time reference information.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Obtain the current standard time from a preset clock source, and uniformly set the current time information of at least one ECU in the target vehicle to the current standard time;
[0196] The time information includes current time information.
[0197] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0198] Control the controlled device to be tested to execute the task to be tested, and prohibit the controlled device to be tested from responding to the access behavior of other controlled devices during the execution of the task to be tested;
[0199] Obtain the task processing time fed back by the controlled device under test when the task under test is completed.
[0200] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0201] Setting the priority of the controlled device to be tested in at least one controlled device to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to access behavior of other controlled devices;
[0202] Accordingly, after obtaining the task processing time fed back by the controlled device under test when the task under test is completed, the method further includes:
[0203] Cancel the preset priority setting for the controlled device under test.
[0204] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0205] Control and shut down the interruption function of the vehicle control system of the target vehicle;
[0206] When the interrupt function is successfully disabled, the controlled device to be tested is controlled to execute the task to be tested;
[0207] Obtain the task processing time of the controlled device under test processing the task under test.
[0208] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0209] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0210] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting faults of controlled devices in a vehicle, characterized in that: include: Uniformly set time information of at least one controlled device under at least one electronic control unit ECU in the target vehicle; When the time information is unified successfully, obtaining a task processing time length of processing of the task to be tested by the controlled device to be tested in the at least one controlled device; Determine whether the controlled device to be tested has a fault according to the task processing time.
2. The method according to claim 1, characterized in that The method of uniformly setting the time information of at least one controlled device under at least one ECU in the target vehicle includes: uniformly setting time information of at least one ECU in the target vehicle; Wherein, each of the controlled devices under the ECU shares the time information of the ECU to which it belongs.
3. The method according to claim 2, characterized in that The step of uniformly setting the time information of at least one ECU in the target vehicle includes: uniformly setting time reference information of at least one ECU in the target vehicle; The time information includes the time reference information.
4. The method according to claim 2, characterized in that: The step of uniformly setting the time information of at least one ECU in the target vehicle includes: Acquire the current standard time from a preset clock source, and uniformly set the current time information of at least one ECU in the target vehicle to the current standard time; The time information includes the current time information.
5. The method according to any one of claims 1 to 4, characterized in that The obtaining of the task processing time length of the controlled device to be tested in the at least one controlled device for processing the task to be tested comprises: Controlling the controlled device to be tested to execute the task to be tested, and prohibiting the controlled device to be tested from responding to access behaviors of other controlled devices during the execution of the task to be tested; The task processing time length fed back by the controlled device under test when the task under test is completed is obtained.
6. The method according to claim 5, characterized in that The controlling the controlled device to be tested to execute the task to be tested, and prohibiting the controlled device to be tested from responding to access behaviors of other controlled devices during the execution of the task to be tested, includes: Setting the priority of the controlled device to be tested in the at least one controlled device to a preset priority; wherein the controlled device under the preset priority is prohibited from responding to access behavior of other controlled devices; Correspondingly, after obtaining the task processing time fed back by the controlled device under test when the task under test is completed, the method further includes: The preset priority setting for the controlled device to be tested is canceled.
7. The method according to any one of claims 1 to 4, characterized in that The obtaining of the task processing time length of the controlled device to be tested in the at least one controlled device for processing the task to be tested comprises: Controlling to shut down the interruption function of the vehicle control system of the target vehicle; When the interrupt function is successfully disabled, controlling the controlled device to be tested to execute the task to be tested; Obtaining a task processing time for the controlled device to be tested to process the task to be tested.
8. A controlled device fault detection device in a vehicle, characterized in that: The device comprises: A time setting module, used for uniformly setting time information of at least one controlled device under at least one electronic control unit ECU in a target vehicle; A duration acquisition module, used for acquiring a task processing duration of the controlled device to be tested in the at least one controlled device for processing the task to be tested when the time information is successfully unified; The fault determination module is used to determine whether the controlled device to be tested has a fault according to the task processing time.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data sensor coordination using time synchronization in a multi-bus controller area network system
CN102571251A
Fault reason positioning method, device and equipment and computer readable storage medium
CN117369411A
Vehicle-mounted application abnormal state processing method and device, electronic equipment and medium
CN117762665A
Vehicle function test method and device, computer equipment and storage medium
CN118500749A
Electronic control units for controlling in-vehicle devices using time-dependent data and vehicle control system integrating such units for real-time distributed control
US20070213888A1