Methods, devices, computer equipment and media for detecting faults in controlled components in vehicles
By standardizing the methods for obtaining time information and task processing time under the vehicle ECU, the accuracy problem of fault detection of controlled devices in the vehicle is solved, and the accuracy and reliability of detection are improved.
Patent Information
- Application Number
- CN202411395369.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-10-08
AI Technical Summary
In vehicles, how to accurately identify the malfunctioning controlled device, especially when the timing information of controlled devices under different ECUs is inconsistent, in order to improve the accuracy of fault detection.
By uniformly setting the time information of controlled devices under at least one ECU in the target vehicle, the task processing time of the controlled device under test in handling the task under test is obtained, and the fault is determined based on the task processing time. This includes using a clock source to synchronize time information, prohibiting the controlled device under test from responding to access by other controlled devices, and disabling the interrupt function of the whole vehicle control system.
It improves the accuracy of fault detection in controlled devices, ensures the accuracy of task processing time, and enhances the reliability of fault detection.
Smart Images

Figure CN120010431B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a method, apparatus, computer equipment, and medium for detecting faults in controlled devices in a vehicle. Background Technology
[0002] With the rapid development of vehicle technology, vehicles are becoming increasingly multifunctional, and correspondingly, the number of functional modules (i.e., controlled devices) within vehicles to achieve these functions is also increasing. Different functional modules process different data to accomplish different tasks.
[0003] Therefore, locating the faulty functional module becomes a major challenge when a vehicle malfunctions. Furthermore, the different timing information of various controlled devices within the vehicle further complicates the process of identifying the faulty module. Thus, accurately identifying the faulty controlled device within the vehicle is a problem that urgently needs to be solved. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, and medium for detecting faults in controlled devices in a vehicle, which can accurately determine whether a controlled device in a vehicle has malfunctioned, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for detecting faults in controlled devices in a vehicle, including:
[0006] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0007] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0008] Based on the task processing time, determine whether the controlled device under test has a fault.
[0009] In one embodiment, the timing information of at least one controlled device under at least one ECU in the target vehicle is uniformly set, including:
[0010] Set the time information of at least one ECU in the target vehicle in a unified manner;
[0011] In this system, each controlled device under the ECU shares the time information of its respective ECU.
[0012] In one embodiment, the time information of at least one ECU in the target vehicle is uniformly set, including:
[0013] Set the time reference information for at least one ECU in the target vehicle in a unified manner;
[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 the current time.
[0018] In one embodiment, obtaining the task processing time of at least one controlled device for processing the task under test includes:
[0019] Control the device under test (DUT) to perform the task under test, and prohibit the DUT from responding to access behavior of other controlled devices during the execution of the task under test;
[0020] Obtain the task processing time reported by the device under test (DUT) after the task under test is completed.
[0021] In one embodiment, controlling the device under test (DUT) to perform a task under test, and prohibiting the DUT from responding to access behaviors of other controlled devices during the execution of the task under test, includes:
[0022] Set the priority of the controlled device under test in at least one controlled device to a preset priority; wherein, the controlled device with the preset priority is prohibited from responding to the access behavior of other controlled devices;
[0023] Accordingly, after obtaining the task processing time reported by the device under test (DUT) upon completion of the task under test, the method further includes:
[0024] Cancel the preset priority setting for the controlled device under test.
[0025] In one embodiment, obtaining the task processing time of at least one controlled device for processing the task under test includes:
[0026] Controls the shutdown function of the target vehicle's overall vehicle control system;
[0027] If the interrupt function is successfully disabled, the device under test (DUT) is controlled to perform the test task.
[0028] Obtain the task processing time of the controlled device under test (DUT) for processing the task under test.
[0029] Secondly, this application also provides a fault detection device for controlled devices in a vehicle, comprising:
[0030] The time setting module 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.
[0031] The duration acquisition module is used to acquire the task processing time of at least one controlled device in the test device when the time information is successfully unified.
[0032] The fault determination module is used to determine whether the controlled device under test has a fault based on the task processing time.
[0033] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0034] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0035] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0036] Based on the task processing time, determine whether the controlled device under test has a fault.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0038] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0039] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0040] Based on the task processing time, determine whether the controlled device under test has a fault.
[0041] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0042] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0043] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0044] Based on the task processing time, determine whether the controlled device under test has a fault.
[0045] The aforementioned method, apparatus, computer equipment, and medium for detecting faults in controlled devices in a vehicle, before acquiring the task processing time of at least one controlled device under test for processing a test task, uniformly sets the time information of at least one controlled device under at least one ECU in the target vehicle. Under the premise that the time information is successfully unified, the test task is input to the corresponding controlled device under test to obtain the corresponding task processing time, and then the presence of a fault in the controlled device under test is determined based on the task processing time. In this process, before performing fault detection on the controlled devices in the vehicle, the time information of at least one controlled device under each ECU is unified, making the determined task processing time more accurate, thereby improving the accuracy of controlled device fault detection. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating a method for detecting faults in controlled devices in a vehicle, as shown in one embodiment.
[0048] Figure 2 This is a flowchart illustrating the time information unification steps in one embodiment;
[0049] Figure 3 This is a flowchart illustrating the time information unification steps in another embodiment;
[0050] Figure 4 This is a flowchart illustrating the steps for obtaining task processing time in one embodiment;
[0051] Figure 5 This is a flowchart illustrating the task processing time acquisition step in another embodiment;
[0052] Figure 6 This is a flowchart illustrating a method for detecting faults in controlled devices in a vehicle, as described in another embodiment.
[0053] Figure 7 This is a structural block diagram of a controlled device fault detection device in a vehicle in one embodiment;
[0054] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0056] Before introducing the method for detecting faults in controlled devices in a vehicle provided in this 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 crucial for system performance optimization and fault diagnosis. AUTOSAR (Automotive Open System Architecture) is an open system architecture for automotive electronic systems, providing a standardized approach to developing and integrating ECUs. In the AUTOSAR architecture, the execution time statistics of functional modules (i.e., controlled devices) are a key technical requirement, especially in applications requiring high-precision time measurement, such as autonomous driving and advanced infotainment systems.
[0057] In existing technologies, a hardware counter-based solution is typically used to measure function execution time. The basic idea of this approach is to use a hardware counter to record the time interval between the start and end of a function's execution, thereby calculating the function's execution time. In addition, there are software solutions, such as using a timestamp application programming interface (API) or timer functions provided by the operating system to measure function execution time, and then using this execution time to determine whether the corresponding controlled device is faulty. This application aims to improve the accuracy of fault detection in controlled devices within a vehicle by increasing the accuracy of this execution time determination.
[0058] In one embodiment, such as Figure 1 As shown, a method for fault detection of controlled devices in a vehicle is provided. This embodiment illustrates the application of this method to a vehicle controller. It is understood that this method can also be applied to an in-vehicle terminal, or to a system including both an in-vehicle terminal and a vehicle controller, and is implemented through the interaction between the in-vehicle terminal and the vehicle controller. In this embodiment, the method includes the following steps:
[0059] S110, uniformly sets the time information of at least one controlled device under at least one ECU in the target vehicle.
[0060] The target vehicle can be a vehicle that requires fault detection of controlled devices. The target vehicle can be an electric vehicle, a gasoline vehicle, or a hybrid electric vehicle. This application does not limit the type of vehicle for the target vehicle.
[0061] The target vehicle is equipped with multiple ECUs, each with corresponding controlled devices. These controlled devices independently perform specific functions to execute vehicle operation tasks. These ECUs not only control the operation of critical systems such as the engine, transmission, and brakes, but also include dedicated engine control units, transmission control modules, remote communication control modules, and suspension control modules. Each module controls different systems to achieve various vehicle functions. It is understood that the controlled devices under an ECU can be functional modules or hardware controls; this application does not impose any limitations on this.
[0062] It should be noted that different controlled devices in a vehicle have different time information. For example, controlled device A and controlled device B have different time bases; for instance, controlled device A uses a 1ms time base, while controlled device B uses a 0.5ms time base. In this embodiment, 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 one alternative embodiment, a clock source can be set for the target vehicle, and all controlled devices can be controlled to determine their own time information based on this clock source. For example, the controlled devices can periodically acquire time information fed back from the clock source and use this time information as their current time.
[0064] In one 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 they control as the time information of each controlled device.
[0065] S120, if the time information is successfully unified, obtain the task processing time of the controlled device under test in at least one controlled device for processing the task under test.
[0066] Different controlled devices have different functions, and correspondingly, different controlled devices can process different data. Therefore, in this embodiment, different controlled devices correspond to different test tasks.
[0067] For example, in this embodiment, for any controlled device, the corresponding task under test can be determined in advance based on the function of the controlled device. The correspondence between different controlled devices and their respective tasks under test can also be determined.
[0068] In one alternative implementation, the device under test can be a single device. Correspondingly, the task under test corresponding to the device under test can be determined from the correspondence. Further, the task under test is input into the device under test, and the task processing time is fed back after the device under test completes the task under test.
[0069] In one alternative implementation, the number of controlled devices under test (DUTs) may not be unique. For example, when performing periodic fault checks on a target vehicle, the DUTs may be all controlled devices of the target vehicle. Accordingly, the DUT tasks corresponding to each DUT can be determined from this correspondence. Furthermore, each DUT task is input into the corresponding DUT, and the processing time reported by each DUT after completing its corresponding DUT task is received.
[0070] It should be noted that in this embodiment, the number of times the task to be tested is input to the controlled device under test for processing can be once or multiple times. In the case of multiple processing, at least two task processing times fed back by the controlled device can be obtained.
[0071] S130, determine whether the controlled device under test has a fault based on the task processing time.
[0072] In one optional implementation, when the task processing time is one, it can be determined whether the controlled device under test is faulty if the task processing time exceeds a preset time threshold. The preset time threshold can be determined based on human experience or through extensive experimentation; this application does not impose any limitations on it.
[0073] In one optional implementation, when there are multiple task processing times, each task processing time can be processed to obtain a statistical task processing time. The presence of a fault in the controlled device under test can then be determined based on this statistical task processing time. For example, the average, minimum, and maximum values of each task processing time can be determined, along with statistical indicators such as the standard deviation and variance corresponding to each task processing time. These statistical indicators are then used as the statistical task processing time. The statistical task processing time and the identifier of the controlled device under test are input into a pre-trained fault detection model to obtain the fault detection result of the controlled device under test.
[0074] The fault detection model can be built based on common neural networks, which will not be elaborated here. Furthermore, when training the fault detection model, the sample statistical duration and the identifier of the controlled device can be input into the model to obtain the fault detection results of the controlled device. Based on the difference between the fault detection results and the corresponding fault labels of the controlled devices, the model parameters are adjusted to obtain the trained fault detection model.
[0075] It should be noted that, in this embodiment, to facilitate users' understanding of the task processing performance of the controlled device under test, after obtaining the task processing statistics, these indicators can be presented in the form of charts using data visualization tools. For example, a histogram can be used to display the distribution of task processing time, making the trends and characteristics of the data immediately apparent. Intuitive visualization helps users quickly grasp the measurement results, thereby providing a basis for subsequent decision-making.
[0076] In the aforementioned method for detecting faults in controlled devices in a vehicle, before obtaining the task processing time of the controlled device under test (DUT) for processing the task, the time information of at least one controlled device under at least one ECU in the target vehicle is uniformly set. Under the premise that the time information is successfully unified, the task under test is input to the corresponding DUT to obtain the corresponding task processing time. Then, based on the task processing time, it is determined whether the DUT has a fault. In this process, before performing fault detection on the controlled devices in the vehicle, the time information of at least one controlled device under each ECU is unified, making the determined task processing time more accurate, thereby improving the accuracy of controlled device fault detection.
[0077] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the process of uniformly setting the timing information of at least one controlled device under at least one ECU in the target vehicle is described in detail.
[0078] See Figure 2 The time information unification steps shown include:
[0079] S210, uniformly sets the time information of at least one ECU in the target vehicle.
[0080] In this system, each controlled device under an ECU shares the time information of its respective ECU. In other words, for any given ECU, the time information of each controlled device under that ECU is the same as the time information of that ECU.
[0081] In one alternative implementation, 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, so as to uniformly set the time information of each ECU in the target vehicle.
[0082] In one optional implementation, each ECU of the target vehicle, including the main ECU and other ECUs, can be configured with a clock source. The main ECU is controlled 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] For example, the main control ECU sends a time acquisition request to the clock source of the target vehicle. The main ECU receives the current time from the clock source, determines its own current time based on this current time and the communication delay, and adjusts its own clock accordingly. Then, the main control ECU synchronizes its current time with other ECUs, for example, by broadcasting it to other ECUs to adjust their current time information. This uniformly sets the time information of at least one ECU in the target vehicle.
[0084] In one optional implementation, 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 to the current standard time; wherein, the time information includes current time information. For example, one random ECU in the target vehicle can be controlled to obtain the current standard time from the preset clock source and use this current standard time as its current time information. Further, this ECU can be controlled to synchronize its own clock's current time information to other ECUs, for example, by broadcasting it to other ECUs to adjust their current time information, thereby uniformly setting the time information of at least one ECU in the target vehicle.
[0085] The above embodiments provide a detailed description of the process for uniformly setting the time information of at least one controlled device under at least one ECU in the target vehicle. Specifically, it is not necessary to unify the time information of all controlled devices; unifying only the time information of each ECU in the target vehicle is sufficient to achieve the effect of unifying the time information of all controlled devices, thus laying the foundation for improving the accuracy of fault detection of controlled devices in the vehicle.
[0086] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, another method for uniformly setting the timing information of at least one controlled device under at least one ECU in the target vehicle is provided, and the method is described in detail.
[0087] See Figure 3 The time information unification steps shown include:
[0088] S310, uniformly sets the time reference information of at least one ECU in the target vehicle.
[0089] The time information includes time base information, which is the basic unit of time and can represent the frequency of the clock. For example, the basic unit of time for a clock is 1 second.
[0090] It should be noted that because different ECUs in a vehicle process different types of data, and the timeliness of data processing also varies, the time reference information of different ECUs in the vehicle may differ. Therefore, in order to uniformly set the time information of at least one controlled device under at least one ECU in the target vehicle, it is necessary to unify the time reference information of at least one ECU in the target vehicle.
[0091] For example, in this embodiment, a time reference information adjustment command can be sent to each ECU in the target vehicle to instruct each ECU to adjust its own clock's time reference information. The time reference information adjustment command carries preset time reference information, i.e., a time tick. This preset time reference information can be determined based on human experience or through extensive experimentation; this application does not impose any limitations on this. For example, a preset clock source can be pre-set, and the time reference information of this clock source can be used as the preset time reference information. For example, the preset time reference information can be 1ms or 0.5ms.
[0092] The above embodiments provide another method for uniformly setting the time information of at least one controlled device under at least one ECU in a target vehicle. Specifically, by uniformly setting the time reference information of at least one ECU in a target vehicle, the time information of at least one controlled device under at least one ECU in a target vehicle is made the same, laying the foundation for improving the accuracy of fault detection of controlled devices in the vehicle.
[0093] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, a specific implementation method is provided for obtaining the task processing time of the controlled device under test (DUT) in at least one controlled device for processing the task under test.
[0094] See Figure 4 The steps for obtaining task processing time shown include:
[0095] S410 controls the device under test (DUT) to perform the task under test and prohibits the DUT from responding to access behaviors of other controlled devices during the execution of the task under test.
[0096] It should be noted that, in order for the task processing time reported by the device under test (DUT) after the completion of the task under test to better reflect the actual time taken by the DUT to execute the task under test, that is, to make the task processing time more accurate, it is necessary to ensure that the DUT is not interfered with by other tasks during the execution of the task under test.
[0097] In one alternative implementation, an access denial command can be sent to other controlled devices to prevent the device under test (DUT) from responding to access requests from other controlled devices while the DUT is performing its task. The access denial command instructs other controlled devices to prohibit access to the DUT.
[0098] In one optional implementation, the priority of the controlled device under test (DUT) among at least one controlled device is set to a preset priority; wherein, the controlled device with the preset priority is prohibited from responding to access behaviors of other controlled devices; for example, the priority of the DUT can be set to the highest priority to ensure that the DUT is not affected by other controlled devices during the execution of the task under test, thereby improving the accuracy of task processing time. Accordingly, after obtaining the task processing time returned by the DUT after the completion of the task under test, the preset priority setting of the DUT is canceled.
[0099] Optionally, in this embodiment, before fault detection is performed on the controlled devices in the vehicle, each controlled device in the target vehicle may have a preset priority. In this case, after the fault detection of the controlled device under test is completed, the priority of the controlled device under test can be restored to its original priority. Of course, before fault detection is performed on the controlled devices in the vehicle, each controlled device in the target vehicle may not have a priority set. In this case, after the fault detection of the controlled device under test is completed, the priority setting of the controlled device under test can be cancelled.
[0100] S420: Obtain the task processing time reported by the device under test (DUT) after the task under test is completed.
[0101] Optionally, when performing a fault detection only once on the controlled device under test (DDT), the task processing time reported by the DDT upon completion of that test can be used as the final task processing time. When performing multiple fault detections on the DDT, the task processing time reported by the DDT upon completion of each test can be used as candidate processing times, and the final task processing time reported by the DDT upon completion of the test can be determined based on these candidate processing times.
[0102] For example, the moment when the task under test is input to the device under test can be recorded, and the task completion time fed back by the device under test when the task under test is completed can be obtained to determine the task processing time.
[0103] The above embodiments provide a specific implementation method for obtaining the task processing time of the controlled device under test (DUT) in at least one controlled device for processing a task under test. Specifically, by prohibiting the DUT from responding to access behaviors of other controlled devices during the execution of the task under test, the accuracy of the task processing time is improved.
[0104] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, another specific implementation method is provided for obtaining the task processing time of the controlled device under test (DUT) in at least one controlled device for processing the task under test.
[0105] See Figure 5 The steps for obtaining task processing time shown include:
[0106] S510 is a function that controls the shutdown 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 turned on to avoid interruption during the execution of the test task by the controlled device under test, thereby improving the accuracy of the task processing time.
[0108] The S520, when the interrupt function is successfully disabled, controls the device under test to perform the task under test.
[0109] S530: Obtain the task processing time of the controlled device under test (DUT) for processing the task under test.
[0110] The above embodiments provide another specific implementation method for obtaining the task processing time of at least one controlled device in the device under test (DUT) for processing the task under test. Specifically, the accuracy of the task processing time is improved by controlling and disabling the interrupt function of the vehicle control system of the target vehicle.
[0111] It should be noted that, in this embodiment, in order to further improve the accuracy of task processing time, the accuracy of task processing time can also be improved by both prohibiting the controlled device under test from responding to the access behavior of other controlled devices during the execution of the task under test, and by controlling the shutdown of the interrupt function of the vehicle control system of the target vehicle.
[0112] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the method for detecting faults in controlled devices in a vehicle provided by this application will be described in detail.
[0113] See Figure 6 The method for detecting faults in controlled devices in a vehicle, as shown, includes:
[0114] S610, set the time tick of multiple ECUs to the preset tick;
[0115] S620 controls the main ECU to send a time acquisition request to a preset clock source, and determines the current time information of the main ECU based on the current time fed back by the preset clock source;
[0116] S630 controls the main ECU to synchronize the current time information to other ECUs;
[0117] S640, input the task under test to the controlled device under test, and obtain the start time of the controlled device under test processing the task under test;
[0118] S650 is the end time reported by the device under test (DUT) after the task under test has been completed.
[0119] S660, determine the task processing time for this fault detection based on the start and end times;
[0120] S670 calculates the task processing time for multiple fault detections, displays the statistical indicators in a graphical format, and tracks the results.
[0121] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0122] Based on the same inventive concept, this application also provides a vehicle controlled device fault detection device for implementing the above-described vehicle controlled device fault detection method. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more vehicle controlled device fault detection device embodiments provided below can be found in the limitations of the vehicle controlled device fault detection method described above, and will not be repeated here.
[0123] In one exemplary embodiment, such as Figure 7 As shown, a fault detection device for controlled devices 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 time of at least one controlled device in the controlled device under test for processing the task under test, provided that the time information is successfully unified.
[0126] The fault determination module 730 is used to determine whether the controlled device under test has a fault based on 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 its respective ECU.
[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 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 to 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 for controlling the device under test to execute the task under test and prohibiting the device under test from responding to access behaviors of other controlled devices during the execution of the task under test; and a first acquisition unit for acquiring the task processing duration fed back by the device under test when the task under test is completed.
[0131] In one embodiment, the task processing unit includes a priority setting subunit for setting the priority of at least one controlled device under test 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 further includes a cancellation setting subunit for canceling the preset priority setting of the controlled device under test.
[0132] In one embodiment, the duration acquisition module 720 includes a function shutdown unit for controlling the shutdown of the interrupt function of the vehicle control system of the target vehicle; a task execution unit for controlling the device under test to execute the task under test when the interrupt function is successfully shut down; and a duration acquisition unit for acquiring the task processing time of the device under test in processing the task under test.
[0133] Each module in the controlled device fault detection device in the aforementioned vehicle can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0134] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements fault detection of controlled devices in a vehicle. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0135] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0136] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0137] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0138] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0139] Based on the task processing time, determine whether the controlled device under test has a fault.
[0140] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0141] Set the time information of at least one ECU in the target vehicle in a unified manner;
[0142] In this system, each controlled device under the ECU shares the time information of its respective ECU.
[0143] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0144] Set the time reference information for at least one ECU in the target vehicle in a unified manner;
[0145] The time information includes time reference information.
[0146] In one embodiment, the processor, when executing a computer program, also performs 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 the current time.
[0149] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0150] Control the device under test (DUT) to perform the task under test, and prohibit the DUT from responding to access behavior of other controlled devices during the execution of the task under test;
[0151] Obtain the task processing time reported by the device under test (DUT) after the task under test is completed.
[0152] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0153] Set the priority of the controlled device under test in at least one controlled device to a preset priority; wherein, the controlled device with the preset priority is prohibited from responding to the access behavior of other controlled devices;
[0154] Accordingly, after obtaining the task processing time reported by the device under test (DUT) upon completion of the task under test, the following is also included:
[0155] Cancel the preset priority setting for the controlled device under test.
[0156] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0157] Controls the shutdown function of the target vehicle's overall vehicle control system;
[0158] If the interrupt function is successfully disabled, the device under test (DUT) is controlled to perform the test task.
[0159] Obtain the task processing time of the controlled device under test (DUT) for processing the task under test.
[0160] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0161] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0162] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0163] Based on the task processing time, determine whether the controlled device under test has a fault.
[0164] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0165] Set the time information of at least one ECU in the target vehicle in a unified manner;
[0166] In this system, each controlled device under the ECU shares the time information of its respective ECU.
[0167] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0168] Set the time reference information for at least one ECU in the target vehicle in a unified manner;
[0169] The time information includes time reference information.
[0170] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[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 the current time.
[0173] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0174] Control the device under test (DUT) to perform the task under test, and prohibit the DUT from responding to access behavior of other controlled devices during the execution of the task under test;
[0175] Obtain the task processing time reported by the device under test (DUT) after the task under test is completed.
[0176] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0177] Set the priority of the controlled device under test in at least one controlled device to a preset priority; wherein, the controlled device with the preset priority is prohibited from responding to the access behavior of other controlled devices;
[0178] Accordingly, after obtaining the task processing time reported by the device under test (DUT) upon completion of the task under test, the following is also included:
[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, it also performs the following steps:
[0181] Controls the shutdown function of the target vehicle's overall vehicle control system;
[0182] If the interrupt function is successfully disabled, the device under test (DUT) is controlled to perform the test task.
[0183] Obtain the task processing time of the controlled device under test (DUT) for processing the task under test.
[0184] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0185] The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set;
[0186] If the time information is successfully unified, obtain the task processing time of at least one controlled device in the controlled device under test for processing the task under test.
[0187] Based on the task processing time, determine whether the controlled device under test has a fault.
[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0189] Set the time information of at least one ECU in the target vehicle in a unified manner;
[0190] In this system, each controlled device under the ECU shares the time information of its respective ECU.
[0191] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0192] Set the time reference information for at least one ECU in the target vehicle in a unified manner;
[0193] The time information includes time reference information.
[0194] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[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 the current time.
[0197] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0198] Control the device under test (DUT) to perform the task under test, and prohibit the DUT from responding to access behavior of other controlled devices during the execution of the task under test;
[0199] Obtain the task processing time reported by the device under test (DUT) after the task under test is completed.
[0200] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0201] Set the priority of the controlled device under test in at least one controlled device to a preset priority; wherein, the controlled device with the preset priority is prohibited from responding to the access behavior of other controlled devices;
[0202] Accordingly, after obtaining the task processing time reported by the device under test (DUT) upon completion of the task under test, the following is also included:
[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, it also performs the following steps:
[0205] Controls the shutdown function of the target vehicle's overall vehicle control system;
[0206] If the interrupt function is successfully disabled, the device under test (DUT) is controlled to perform the test task.
[0207] Obtain the task processing time of the controlled device under test (DUT) for processing the task under test.
[0208] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0209] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0210] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting faults in controlled devices in a vehicle, characterized in that, include: The timing information of at least one controlled device under at least one electronic control unit (ECU) in the target vehicle is uniformly set; If the time information is successfully unified, the task processing time of the controlled device under test in the at least one controlled device for processing the task under test is obtained. Based on the task processing time, determine whether the controlled device under test is faulty; The step of obtaining the task processing time of the controlled device under test (DUT) in the at least one controlled device for processing the task under test includes: Controlling the device under test (DUT) to execute the task under test, and prohibiting the DUT from responding to access behaviors of other controlled devices during the execution of the task under test; obtaining the task processing time reported by the DUT upon completion of the task under test; and / or, Control the shutdown of the interrupt function of the vehicle control system of the target vehicle; if the interrupt function is successfully shut down, control the device under test to execute the task under test; obtain the task processing time of the device under test in processing the task under test.
2. The method according to claim 1, characterized in that, The unified setting of time information for at least one controlled device under at least one ECU in the target vehicle includes: The time information of at least one ECU in the target vehicle is uniformly set; In this context, each controlled device under the ECU shares the time information of its respective ECU.
3. The method according to claim 2, characterized in that, The unified setting of time information for at least one ECU in the target vehicle includes: The time reference information of at least one ECU in the target vehicle is uniformly set; The time information includes the time reference information.
4. The method according to claim 2, characterized in that, The unified setting of time information for at least one ECU in the target vehicle includes: 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; The time information includes the current time information.
5. The method according to claim 1, characterized in that, The control over the device under test (DUT) to execute the task under test, and prohibiting the DUT from responding to access behaviors of other controlled devices during the execution of the task under test, includes: The priority of the controlled device under test in the 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; Accordingly, after obtaining the task processing time reported by the device under test (DUT) upon completion of the task under test, the method further includes: Cancel the preset priority setting for the device under test.
6. The method according to claim 1, characterized in that, The target vehicle is a vehicle that requires fault detection of controlled devices.
7. The method according to claim 3, characterized in that, The time reference information represents the frequency of the clock.
8. A fault detection device for controlled components in a vehicle, characterized in that, The device includes: The time setting module 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. The duration acquisition module is used to acquire the task processing time of the controlled device under test in the at least one controlled device when the time information is successfully unified. The fault determination module is used to determine whether the controlled device under test has a fault based on the task processing time. The duration acquisition module includes a task processing unit for controlling the device under test (DUT) to execute the task under test and prohibiting the DUT from responding to access behaviors of other controlled devices during the execution of the task under test; a first acquisition unit for acquiring the task processing duration fed back by the DUT when the task under test is completed; and / or, the duration acquisition module includes a function shutdown unit for controlling the shutdown of the interrupt function of the vehicle control system of the target vehicle; a task execution unit for controlling the DUT to execute the task under test when the interrupt function is successfully disabled; and a duration acquisition unit for acquiring the task processing duration of the DUT in processing the task under test.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.
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