A fault code collection method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202311685762.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-12-08
AI Technical Summary
[0004]本发明提供了一种故障码采集方法、装置、电子设备和存储介质,以解决现有故障码采集方法中存在的因需要耗费大量定时器而导致采集成本和系统资源占用较高的问题
[0016]本发明实施例的技术方案,通过获取目标车辆对应不同采集周期的故障码集合,再根据不同采集周期的故障码集合对应的集合比对情况确定目标故障码的状态。本发明实施例通过比对不同采集周期的故障码集合中的故障码情况,即可确定对应目标故障码的状态,解决了现有故障码采集方法中存在的因需要耗费大量定时器而导致采集成本和系统资源占用较高的问题,无需分别为每个故障码配置单独的定时器以获取其对应的状态,简化了故障码的采集过程,降低了故障码采集成本,且无需占用更多的系统资源。
Smart Images

Figure CN117724440B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive technology, and in particular to a fault code acquisition method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of vehicle electronics technology, the structure of vehicle electronic systems is becoming increasingly complex, and the number of vehicle malfunctions caused by these complex systems is also increasing. Typically, when a vehicle malfunctions, the Electronic Control Unit (ECU) in the vehicle periodically sends fault information in the form of fault codes to the fault management unit, which is responsible for collecting the transmission time, end time, and duration of each fault code.
[0003] Current fault code acquisition methods typically employ a timer scheme. This involves starting a new timer for each received fault code, and if the fault code is not received again during the timeout period, it is considered to have disappeared. This method requires a separate timer for each new fault code acquisition, consuming a large number of timers and significantly increasing the cost of fault code acquisition, as well as depleting system resources. Summary of the Invention
[0004] This invention provides a fault code acquisition method, apparatus, electronic device, and storage medium to solve the problem of high acquisition cost and system resource consumption caused by the need for a large number of timers in existing fault code acquisition methods.
[0005] According to one aspect of the present invention, a fault code acquisition method is provided, the method comprising:
[0006] Obtain the set of fault codes for the target vehicle corresponding to different collection periods;
[0007] The status of the target fault code is determined by comparing the fault code sets corresponding to different acquisition cycles.
[0008] According to another aspect of the present invention, a fault code acquisition device is provided, the device comprising:
[0009] The fault code set acquisition module is used to acquire the fault code set of the target vehicle corresponding to different collection periods;
[0010] The fault code status determination module is used to determine the status of the target fault code based on the comparison of the fault code sets corresponding to different acquisition cycles.
[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0012] At least one processor; and
[0013] A memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the fault code acquisition method according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the fault code acquisition method according to any embodiment of the present invention.
[0016] The technical solution of this invention obtains fault code sets for a target vehicle corresponding to different acquisition periods, and then determines the status of the target fault code based on the comparison of the fault code sets corresponding to different acquisition periods. This invention determines the status of the corresponding target fault code by comparing the fault codes in the fault code sets of different acquisition periods, solving the problem of high acquisition costs and system resource consumption caused by the need for numerous timers in existing fault code acquisition methods. It eliminates the need to configure a separate timer for each fault code to obtain its corresponding status, simplifying the fault code acquisition process, reducing fault code acquisition costs, and minimizing the use of system resources.
[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a fault code acquisition method provided in Embodiment 1 of the present invention;
[0020] Figure 2 This is a flowchart of a fault code acquisition method provided in Embodiment 2 of the present invention;
[0021] Figure 3 This is a schematic diagram of a fault code set provided according to Embodiment 2 of the present invention;
[0022] Figure 4 This is a schematic diagram of a fault code set comparison according to Embodiment 2 of the present invention;
[0023] Figure 5 This is a flowchart of a fault code acquisition method provided in Embodiment 3 of the present invention;
[0024] Figure 6 This is a flowchart illustrating a fault code acquisition method according to Embodiment 3 of the present invention;
[0025] Figure 7 This is a schematic diagram of a fault code acquisition device according to Embodiment 4 of the present invention;
[0026] Figure 8 This is a schematic diagram of the structure of an electronic device that implements the fault code acquisition method of this invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] Example 1
[0030] Figure 1 This is a flowchart of a fault code acquisition method provided in Embodiment 1 of the present invention. This embodiment is applicable to fault code acquisition. The method can be executed by a fault code acquisition device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1As shown in the figure, the fault code acquisition method provided in this embodiment includes the following steps:
[0031] S110. Obtain the set of fault codes for the target vehicle corresponding to different collection periods.
[0032] The acquisition period can refer to the corresponding time period used to determine a fault code set of a preset duration. For example, the acquisition period can be set to 500 milliseconds, 1 second, etc., and can be determined according to actual business needs. This embodiment of the invention does not impose any restrictions on this. The fault code set can refer to the set of fault codes generated by all ECUs acquired within one acquisition period. Fault codes can be used to represent specific fault information of the target vehicle, and each fault code is globally unique. The representation of fault codes can be configured according to actual needs. For example, a single character or a combination of characters can be used to represent them. This embodiment of the invention does not impose any restrictions on this.
[0033] In this embodiment of the invention, all ECUs of the target vehicle can monitor various parameters of the target vehicle in real time according to a pre-configured diagnostic strategy. When an abnormality is detected, it will be stored in the memory of the corresponding ECU in the form of a fault code. At the same time, each ECU will periodically broadcast the fault codes it generates. Then, the fault code acquisition device can use a timer to obtain the set of fault codes collected in each acquisition cycle.
[0034] It should be understood that, during each acquisition cycle, even if the ECU of the target vehicle does not generate a fault code, it still needs to periodically broadcast a specific fault code used to identify the absence of a fault. At this time, the fault code can be represented in a specific fault code representation format, such as 00 or #001, etc. This embodiment of the invention does not limit this.
[0035] S120. Determine the status of the target fault code based on the comparison of the fault code sets corresponding to different acquisition cycles.
[0036] The set comparison can be understood as the comparison of fault codes corresponding to fault code sets in different acquisition cycles. Taking the first and second fault code sets in two adjacent acquisition cycles as an example, the set comparison can include at least the following three situations: the first fault code set is a subset of the second fault code set; the second fault code set is a subset of the first fault code set; and the first and second fault code sets are the same. The status of the target fault code can include the generation time, disappearance time, and duration of the target fault code.
[0037] In this embodiment of the invention, for each acquisition cycle, the fault codes in the fault code sets of all adjacent acquisition cycles can be compared sequentially to obtain the corresponding set comparison situation. Then, the state corresponding to each target fault code is determined using this set comparison situation. The state of the target fault code can include the generation time, disappearance time, and duration of the target fault code. In a specific embodiment, the method for determining the state of the target fault code based on the set comparison situation corresponding to the fault code sets of different acquisition cycles can be as follows: The fault codes in the fault code sets of all adjacent acquisition cycles are compared sequentially to determine which fault codes are newly generated and which have just disappeared. These fault codes whose states have changed are taken as target fault codes. The system time corresponding to the latter fault code set among the two fault code sets being compared is taken as the occurrence time or disappearance time of the corresponding target fault code. That is, if the target fault code is newly generated, the above system time is taken as the occurrence time of the target fault code; that is, if the target fault code has just disappeared, the above system time is taken as the disappearance time of the target fault code.
[0038] Furthermore, in order to improve the efficiency of fault code set comparison, before performing fault code set comparison, a deduplication operation can be performed on the fault codes in each fault code set to remove duplicate fault codes.
[0039] The technical solution of this invention obtains fault code sets for a target vehicle corresponding to different acquisition periods, and then determines the status of the target fault code based on the comparison of the fault code sets corresponding to different acquisition periods. This invention determines the status of the corresponding target fault code by comparing the fault codes in the fault code sets of different acquisition periods, solving the problem of high acquisition costs and system resource consumption caused by the need for numerous timers in existing fault code acquisition methods. It eliminates the need to configure a separate timer for each fault code to obtain its corresponding status, simplifying the fault code acquisition process, reducing fault code acquisition costs, and minimizing the use of system resources.
[0040] Example 2
[0041] Figure 2 This is a flowchart of a fault code acquisition method provided in Embodiment 2 of the present invention. It is further optimized and extended based on the above embodiments and can be combined with various optional technical solutions in the above embodiments. For example... Figure 2 As shown in the figure, the fault code acquisition method provided in this embodiment includes the following steps:
[0042] S210. For all electronic control units of the target vehicle, obtain the set of fault codes collected by the timer in each acquisition cycle according to the preset fault code sending interval.
[0043] The preset fault code transmission interval can refer to the time interval pre-configured for all ECUs of the target vehicle to send their own generated fault codes on time. The preset fault code transmission interval can be set to 20 milliseconds, 100 milliseconds, etc., and can be determined according to actual business needs. This embodiment of the invention does not impose any restrictions on this. The timer can refer to a device used to measure specific time intervals. In this embodiment of the invention, a timer can be used to determine each acquisition cycle.
[0044] In this embodiment of the invention, all ECUs of the target vehicle can broadcast their respective fault codes to the outside according to a preset fault code transmission interval. Then, the fault code acquisition device can use a timer to obtain the set of fault codes collected in each acquisition cycle, wherein the acquisition cycle must be greater than the preset fault code transmission interval.
[0045] Furthermore, based on the above embodiments of the invention, before executing S220, the method may further include: classifying the fault codes in the fault code set according to the type of electronic control unit, and removing duplicate fault codes from the classified fault code set.
[0046] In this embodiment of the invention, to facilitate subsequent fault monitoring of each ECU of the target vehicle, after acquiring the corresponding fault code set in each acquisition cycle, the fault code acquisition device can classify the fault codes in the fault code set according to the ECU type. The ECU type may include, but is not limited to: Engine Management System (EMS), Transmission Control Unit (TCU), Body Control Module (BCM), Electronic Stability Program (ESP), Battery Management System (BMS), and Vehicle Control Unit (VCU). To improve the efficiency of subsequent fault code set comparison, a deduplication operation can also be performed on the fault codes in each fault code set to remove duplicate fault codes.
[0047] Furthermore, based on the above embodiments, the fault code acquisition method provided in this embodiment further includes:
[0048] All electronic control units controlling the target vehicle broadcast their own fault codes through a preset communication protocol channel; the preset communication protocol channel includes at least a data distribution service protocol channel.
[0049] The preset communication protocol channel can refer to the pre-configured communication protocol channel used by each ECU to broadcast fault codes. The preset communication protocol channel can include at least: a Data Distribution Service (DDS) protocol channel. DDS can be a middleware protocol and application programming interface (API) standard based on the DCPS (Data-Centric Publish-Subscribe) model. It integrates the components of the system and provides the low-latency data connection, extremely high reliability and scalable architecture required by business and mission-critical IoT applications.
[0050] In this embodiment of the invention, after each ECU of the target vehicle performs its own fault diagnosis, it can broadcast the generated fault code to the fault code acquisition device through a preset communication protocol channel. The preset communication protocol channel includes at least a data distribution service protocol channel.
[0051] S220. Select the first fault code set and the second fault code set of adjacent acquisition cycles, and determine the set comparison situation based on the first fault code set and the second fault code set; wherein, the first system time corresponding to the first fault code set is less than the second system time corresponding to the second fault code set.
[0052] The first fault code set and the second fault code set can refer to the fault code sets collected in two adjacent acquisition cycles, respectively, and the first system time corresponding to the first fault code set is less than the second system time corresponding to the second fault code set. For example, such as... Figure 3 As shown, if the acquisition period is 1 second, the first fault code set can refer to the set of fault codes acquired during the acquisition period from 00:00:00 to 00:00:01 for the current time (i.e., 00:00:02), and the second fault code set can refer to the set of fault codes acquired during the acquisition period from 00:00:01 to 00:00:02. The first system time corresponding to the first fault code set is 00:00:01, and the first system time corresponding to the second fault code set is 00:00:02.
[0053] In this embodiment of the invention, for each acquisition cycle, the fault codes in the fault code sets of all adjacent acquisition cycles can be compared sequentially to obtain the corresponding set comparison results. The set comparison results can include at least three cases: the first fault code set is a subset of the second fault code set; the second fault code set is a subset of the first fault code set; and the first and second fault code sets are the same. By analyzing the set comparison results, it can be determined which fault codes are newly generated and which have just disappeared, thus allowing for the determination of the generation and disappearance times of each fault code.
[0054] Furthermore, based on the above embodiments of the invention, the specific process of determining the set comparison situation according to the first fault code set and the second fault code set in S220 includes the following steps:
[0055] S2201. Determine the intersection of the fault codes corresponding to the first fault code set and the second fault code set;
[0056] S2202. When the intersection of fault codes equals the first fault code set, and all elements in the intersection of fault codes belong to the second fault code set, the set comparison situation is determined to be that the first fault code set is a subset of the second fault code set.
[0057] S2203. When the intersection of fault codes equals the second fault code set, and all elements in the intersection of fault codes belong to the first fault code set, the set comparison is determined to be that the second fault code set is a subset of the first fault code set.
[0058] S2204. When the intersection of fault codes equals the first fault code set and the intersection of fault codes equals the second fault code set, the set comparison is determined to be the same as the first fault code set and the second fault code set.
[0059] In this embodiment of the invention, steps S2201 to S2204 can be executed to determine the set comparison situation based on the first fault code set and the second fault code set.
[0060] S230. When the set comparison shows that the first fault code set is a subset of the second fault code set, the newly added fault code in the second fault code set corresponding to the first fault code set is taken as the target fault code, and the second system time is taken as the occurrence time of the target fault code.
[0061] In this embodiment of the invention, if it is determined that the first fault code set is a subset of the second fault code set, then the fault code newly added to the second fault code set corresponding to the first fault code set can be determined as the target fault code (i.e. the newly generated fault code), and the second system time corresponding to the second fault code set can be taken as the occurrence time of the target fault code.
[0062] S240. When the set comparison shows that the second fault code set is a subset of the first fault code set, the fault code in the second fault code set that is reduced from the first fault code set is taken as the target fault code, and the second system time is taken as the disappearance time of the target fault code.
[0063] In this embodiment of the invention, if it is determined that the set comparison situation is that the second fault code set is a subset of the first fault code set, then the fault code that is reduced from the first fault code set in the second fault code set can be determined as the target fault code (i.e. the disappeared fault code), and the second system time corresponding to the second fault code set can be used as the disappearance time of the target fault code.
[0064] Furthermore, if the set comparison shows that the first fault code set is the same as the second fault code set, it indicates that the fault information is ongoing, with no new fault codes being generated and old fault codes disappearing. In this case, there is no need to perform the target fault code status determination process.
[0065] Furthermore, based on the above embodiments of the invention, for cases where the first fault code set and the second fault code set only partially overlap, steps S230 and S240 can be executed sequentially. Specifically, as follows... Figure 4 As shown, the first fault code set includes set I and set III, and the second fault code set includes set II and set III. The intersection of the first and second fault code sets is set III. For the second fault code set, the fault codes in set I represent fault codes that have just disappeared. In this case, the second system time corresponding to the second fault code set can be used as the disappearance time of the aforementioned disappeared fault codes. The fault codes in set II represent newly generated fault codes. In this case, the second system time corresponding to the second fault code set can be used as the occurrence time of the aforementioned newly generated fault codes. As for the fault codes in set III, it indicates that the corresponding fault information is continuously occurring, and no other operation is required.
[0066] Furthermore, based on the above embodiments of the invention, different fault codes in the fault code set are acquired by a timer.
[0067] In existing fault code acquisition schemes, a new timer is typically started for each fault code received, continuing until the fault code disappears to obtain its occurrence and disappearance times. It's clear that this approach consumes a large number of timers, increasing the cost of fault code acquisition and consuming more system resources. However, in this embodiment of the invention, only one timer needs to be configured to acquire all fault codes of the target vehicle (i.e., sharing a single timer). By comparing the fault code sets from different acquisition periods, the occurrence and disappearance times of each fault code can be determined. The entire fault code acquisition process is simple and fast, and does not require a large number of timers, reducing the cost of fault code acquisition and the consumption of system resources.
[0068] The technical solution of this invention involves acquiring fault code sets collected by a timer in each acquisition cycle for all electronic control units of a target vehicle according to a preset fault code transmission interval; selecting a first fault code set and a second fault code set from adjacent acquisition cycles; and determining a set comparison based on the first and second fault code sets; wherein the first system time corresponding to the first fault code set is less than the second system time corresponding to the second fault code set; when the set comparison shows that the first fault code set is a subset of the second fault code set, the fault code newly added to the second fault code set corresponding to the first fault code set is taken as the target fault code, and the second system time is taken as the occurrence time of the target fault code; when the set comparison shows that the second fault code set is a subset of the first fault code set, the fault code reduced from the second fault code set corresponding to the first fault code set is taken as the target fault code, and the second system time is taken as the disappearance time of the target fault code. This invention uses a timer to acquire all fault codes of a target vehicle in each acquisition cycle, and uses the set comparison of fault code sets in different acquisition cycles to determine the occurrence and disappearance time of each fault code. This solves the problem of high acquisition cost and system resource consumption caused by the need for a large number of timers in existing fault code acquisition methods. It eliminates the need to configure a separate timer for each fault code to obtain its corresponding status, simplifies the fault code acquisition process, and reduces fault code acquisition cost and system resource consumption.
[0069] Example 3
[0070] Figure 5 This is a flowchart of a fault code acquisition method provided in Embodiment 3 of the present invention. Based on the above embodiments, this embodiment provides an implementation method for fault code acquisition that can acquire all fault codes of a target vehicle using only a single timer, and determine the occurrence and disappearance times of each fault code by comparing the sets of fault codes from different acquisition periods. Figure 5As shown, the fault code acquisition method provided in Embodiment 3 of the present invention is applied to a fault management unit and specifically includes the following steps:
[0071] S310. Obtain the set of fault codes collected by the timer in each acquisition cycle.
[0072] The fault management unit can be understood as a software service configured in the system-on-chip (SOC) of the target vehicle. The fault management unit can collect all fault codes issued by the ECU with only a timer, form a fault code set after collection, and then classify the fault codes according to the set to determine the occurrence and end time of the fault codes.
[0073] In this embodiment of the invention, when each ECU of the target vehicle malfunctions, it will broadcast the generated fault code to the outside according to the preset fault code transmission interval. The fault management unit can use a timer to obtain the set of fault codes collected in each collection cycle, wherein the collection cycle must be greater than the preset fault code transmission interval.
[0074] S320. Classify the fault codes in each fault code set according to the ECU type, and perform a deduplication operation on the classified fault codes.
[0075] S330. For the fault code set obtained in each acquisition cycle, compare the fault codes in the fault code sets of all adjacent acquisition cycles in turn to obtain the corresponding set comparison results.
[0076] S340. Determine the occurrence and disappearance times of each fault code based on the set comparison results.
[0077] In embodiments of the present invention, such as Figure 6 As shown, taking any two adjacent acquisition cycles, the first fault code set A and the second fault code set B as an example, the set comparison can include at least the following three situations: the first fault code set is a subset of the second fault code set; the second fault code set is a subset of the first fault code set; and the first and second fault code sets are the same. Based on the set comparison, it can be determined which fault codes are newly generated and which fault codes have just disappeared. These fault codes whose states have changed are taken as target fault codes, and the system time corresponding to the second fault code set B is taken as the occurrence time or disappearance time of the aforementioned target fault codes.
[0078] S350 uploads the acquired fault codes and corresponding fault code information to the cloud-based fault monitoring platform.
[0079] In this embodiment of the invention, after obtaining fault code information such as occurrence time, disappearance time, and duration, the fault code and its corresponding information can be uploaded to a cloud-based fault monitoring platform. This platform is responsible for monitoring the fault codes of the target vehicle. Furthermore, the fault monitoring platform can analyze the uploaded fault codes, determine the vehicle's fault condition based on changes in relevant parameters, identify potential problems or intermittent faults, and eliminate false faults.
[0080] The technical solution of this invention involves acquiring fault code sets collected by a timer in each acquisition cycle; classifying the fault codes in each set according to the ECU type and performing deduplication on the classified fault codes; comparing the fault codes in all adjacent acquisition cycle sets sequentially to obtain the corresponding set comparison results; determining the occurrence and disappearance times of each fault code based on the set comparison results; and uploading the acquired fault codes and their corresponding information to a cloud-based fault monitoring platform. This invention solves the problem of high acquisition costs and system resource consumption caused by the need for numerous timers in existing fault code acquisition methods by using only one timer to acquire all fault codes of the target vehicle in each acquisition cycle and determining the occurrence and disappearance times of each fault code using the set comparison results of fault code sets from different acquisition cycles. This simplifies the fault code acquisition process and reduces the cost and system resource consumption of fault code acquisition.
[0081] Example 4
[0082] Figure 7 This is a schematic diagram of a fault code acquisition device provided in Embodiment 4 of the present invention. Figure 7 As shown, the device includes:
[0083] The fault code set acquisition module 41 is used to acquire the fault code set of the target vehicle corresponding to different collection periods;
[0084] The fault code status determination module 42 is used to determine the status of the target fault code based on the set comparison of fault code sets corresponding to different acquisition cycles.
[0085] The technical solution of this invention involves acquiring fault code sets for a target vehicle across different acquisition periods via a fault code set acquisition module, and then determining the status of the target fault code via a fault code status determination module based on a comparison of the fault code sets across different acquisition periods. This invention determines the status of the corresponding target fault code simply by comparing the fault codes in the fault code sets across different acquisition periods. This solves the problem of high acquisition costs and system resource consumption caused by the need for numerous timers in existing fault code acquisition methods. It eliminates the need to configure a separate timer for each fault code to obtain its corresponding status, simplifying the fault code acquisition process, reducing acquisition costs, and minimizing the use of system resources.
[0086] Furthermore, based on the above embodiments of the invention, the fault code set acquisition module 41 includes:
[0087] The fault code set acquisition unit is used to acquire the fault code set collected by the timer in each acquisition cycle for all electronic control units of the target vehicle according to the preset fault code sending interval.
[0088] Furthermore, based on the above embodiments of the invention, the fault code status determination module 42 includes:
[0089] The set comparison unit is used to select a first fault code set and a second fault code set in adjacent acquisition cycles, and determine the set comparison situation based on the first fault code set and the second fault code set; wherein, the first system time corresponding to the first fault code set is less than the second system time corresponding to the second fault code set.
[0090] The first fault code status determination unit is used to determine the target fault code when the set comparison shows that the first fault code set is a subset of the second fault code set, and to take the newly added fault code in the second fault code set corresponding to the first fault code set as the target fault code, and to take the second system time as the occurrence time of the target fault code.
[0091] The second fault code status determination unit is used to determine the target fault code when the set comparison shows that the second fault code set is a subset of the first fault code set, and to use the second system time as the disappearance time of the target fault code.
[0092] Furthermore, based on the above embodiments of the invention, determining the set comparison based on the first fault code set and the second fault code set includes:
[0093] Determine the intersection of the fault codes corresponding to the first fault code set and the second fault code set; when the intersection of the fault codes is equal to the first fault code set, and all elements in the intersection of the fault codes belong to the second fault code set, determine that the set comparison situation is that the first fault code set is a subset of the second fault code set;
[0094] When the intersection of fault codes equals the second fault code set, and all elements in the intersection of fault codes belong to the first fault code set, the set comparison is determined to be that the second fault code set is a subset of the first fault code set.
[0095] When the intersection of fault codes equals the first fault code set and the intersection of fault codes equals the second fault code set, the set comparison is determined to be the same as the first fault code set and the second fault code set.
[0096] Furthermore, based on the above embodiments of the invention, different fault codes in the fault code set are acquired by a timer.
[0097] Furthermore, based on the above embodiments of the invention, the fault code acquisition device further includes:
[0098] The fault code classification and deduplication module is used to classify fault codes in the fault code set according to the type of electronic control unit and remove duplicate fault codes from the classified fault code set.
[0099] Furthermore, based on the above embodiments of the invention, the fault code acquisition device further includes:
[0100] The fault code broadcasting module is used to control all electronic control units of the target vehicle to broadcast the fault codes they generate through a preset communication protocol channel; wherein, the preset communication protocol channel includes at least: a data distribution service protocol channel.
[0101] The fault code acquisition device provided in this embodiment of the invention can execute the fault code acquisition method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0102] Example 5
[0103] Figure 8A schematic diagram of an electronic device 50 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0104] like Figure 8 As shown, the electronic device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52 and a random access memory (RAM) 53, communicatively connected to the at least one processor 51. The memory stores computer programs executable by the at least one processor. The processor 51 can perform various appropriate actions and processes based on the computer program stored in the ROM 52 or loaded into the RAM 53 from storage unit 58. The RAM 53 can also store various programs and data required for the operation of the electronic device 50. The processor 51, ROM 52, and RAM 53 are interconnected via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.
[0105] Multiple components in electronic device 50 are connected to I / O interface 55, including: input unit 56, such as keyboard, mouse, etc.; output unit 57, such as various types of monitors, speakers, etc.; storage unit 58, such as disk, optical disk, etc.; and communication unit 59, such as network card, modem, wireless transceiver, etc. Communication unit 59 allows electronic device 50 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0106] Processor 51 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 51 performs the various methods and processes described above, such as fault code acquisition methods.
[0107] In some embodiments, the fault code acquisition method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 50 via ROM 52 and / or communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the fault code acquisition method described above may be performed. Alternatively, in other embodiments, processor 51 may be configured to perform the fault code acquisition method by any other suitable means (e.g., by means of firmware).
[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0109] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0110] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0113] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0114] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0115] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for collecting fault codes, characterized in that, The method includes: Obtain the set of fault codes for the target vehicle corresponding to different collection periods; The status of the target fault code is determined based on the comparison of the fault code sets corresponding to the different acquisition cycles.
2. The method according to claim 1, characterized in that, The acquisition of fault code sets for the target vehicle corresponding to different collection periods includes: For all electronic control units of the target vehicle, the set of fault codes collected by the timer in each collection cycle is obtained according to the preset fault code sending interval.
3. The method according to claim 1, characterized in that, The step of determining the state of the target fault code based on the comparison of fault code sets corresponding to different acquisition periods includes: A first fault code set and a second fault code set adjacent acquisition cycles are selected, and the set comparison situation is determined based on the first fault code set and the second fault code set; wherein, the first system time corresponding to the first fault code set is less than the second system time corresponding to the second fault code set. When the first fault code set is a subset of the second fault code set in the set comparison case, the newly added fault code in the second fault code set corresponding to the first fault code set is taken as the target fault code, and the second system time is taken as the occurrence time of the target fault code; When the set comparison is such that the second fault code set is a subset of the first fault code set, the fault code in the second fault code set that is reduced from the first fault code set is taken as the target fault code, and the second system time is taken as the disappearance time of the target fault code.
4. The method according to claim 3, characterized in that, Determining the set comparison based on the first fault code set and the second fault code set includes: Determine the intersection of the fault codes corresponding to the first fault code set and the second fault code set; When the intersection of the fault codes equals the first set of fault codes, and all elements in the intersection of the fault codes belong to the second set of fault codes, the set comparison is determined to be that the first set of fault codes is a subset of the second set of fault codes. When the intersection of the fault codes equals the second fault code set, and all elements in the intersection of the fault codes belong to the first fault code set, the set comparison is determined to be that the second fault code set is a subset of the first fault code set. When the intersection of the fault codes equals the first fault code set and the intersection of the fault codes equals the second fault code set, it is determined that the set comparison is the same as the first fault code set and the second fault code set.
5. The method according to claim 1, characterized in that, The different fault codes in the fault code set are collected by a timer.
6. The method according to claim 1, characterized in that, Also includes: The fault codes in the fault code set are classified according to the type of electronic control unit, and duplicate fault codes in the classified fault code set are removed.
7. The method according to claim 1, characterized in that, Also includes: All electronic control units controlling the target vehicle broadcast fault codes they generate through a preset communication protocol channel; wherein, the preset communication protocol channel includes at least a data distribution service protocol channel.
8. A fault code acquisition device, characterized in that, The device includes: The fault code set acquisition module is used to acquire the fault code set of the target vehicle corresponding to different collection periods; The fault code status determination module is used to determine the status of the target fault code based on the set comparison of the fault code sets corresponding to different acquisition cycles.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the fault code acquisition method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the fault code acquisition method according to any one of claims 1-7.
Citation Information
Patent Citations
Vehicle accident detection method and related equipment
CN111045875A
Vehicle running state monitoring method, system and equipment and storage medium
CN115837915A