Fault Information Processing Method, Device, Computer Equipment and Storage Medium
By generating the target fault code and updating it from the temporary memory to the permanent memory when the vehicle is powered off, the problem of the failure information of multiple vehicle parts in the prior art is solved, and the optimization of storage space and the integrity of fault information are achieved.
Patent Information
- Application Number
- CN202310350915.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-04-04
AI Technical Summary
The prior art cannot effectively process the fault information of multiple vehicle components, especially due to the UDS limit on the number of fault codes, which cannot meet the fault information processing requirements of multiple vehicle components.
By receiving the fault level, component type and fault type of the vehicle components, a target fault code is generated and stored in a temporary memory when the vehicle is powered on. When the vehicle is powered off, the fault code of the temporary memory is updated to the permanent memory, and the temporary memory is cleared, and the permanent memory is used for fault information processing.
The memory footprint is reduced, the fault information is lost, and the fault information of multiple vehicle components is effectively processed, and the problem of insufficient fault information processing in the prior art is solved.
Smart Images

Figure CN116486510B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle control, and particularly to a method, device, computer device, storage medium, and computer program product for processing fault information. Background Art
[0002] In the face of the increasing number of electronic components, it is urgent to uniformly store and process the fault information of the electronic components assembled in the whole vehicle. Limited by the limitation of the number of fault codes in UDS (Unified Diagnostic Services), traditional methods cannot meet the processing requirements of the fault information of various vehicle components. Therefore, there is an urgent need for a method capable of processing the fault information of various vehicle components. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a fault information processing method, device, computer device, computer-readable storage medium, and computer program product capable of processing the fault information of various vehicle components.
[0004] In a first aspect, the present application provides a fault information processing method. The method includes:
[0005] Receiving the current fault information reported by each of multiple vehicle components, where the current fault information includes the fault level, component type, and fault type corresponding to the respective vehicle component;
[0006] Determining a target fault code according to the fault level, component type, and fault type;
[0007] Updating the fault codes stored in the temporary memory according to the target fault code;
[0008] When it is detected that the vehicle is powered off, updating the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clearing the temporary memory. The fault codes stored in the permanent memory are used for fault information processing.
[0009] In one of the embodiments, determining a target fault code according to the fault level, component type, and fault type includes:
[0010] Determining the fault level bit of the target fault code according to the fault level;
[0011] Determining the component type bit of the target fault code according to the component type;
[0012] Determining the fault type bit of the target fault code according to the fault type;
[0013] Determining the target fault code according to the fault type bit, component type bit, and fault type bit.
[0014] In one embodiment, each fault code stored in the temporary memory includes a first fault bit and a first count bit;
[0015] Updating the fault codes stored in the temporary memory according to the target fault code includes:
[0016] Traversing each fault code stored in the temporary memory;
[0017] When the first fault bit in the currently traversed fault code is consistent with the target fault code, updating the first count bit in the current fault code;
[0018] When the first fault bit in each currently traversed fault code is inconsistent with the target fault code, determining the updated fault code according to the target fault code and a preset value; adding the updated fault code to the temporary memory.
[0019] In one embodiment, each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit;
[0020] Updating the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory includes:
[0021] Traversing each fault code stored in the permanent memory;
[0022] When the second fault bit in the currently traversed fault code is consistent with the first fault bit in the fault code stored in the temporary memory, obtaining the sum of the corresponding second count bit and the corresponding first count bit; updating the second count bit to the sum value;
[0023] When the second fault bit in each currently traversed fault code is inconsistent with the first fault bit in the fault code stored in the temporary memory, using the corresponding fault code stored in the temporary memory as the updated fault code, and adding the updated fault code to the permanent memory.
[0024] In one embodiment, adding the updated fault code to the permanent memory includes:
[0025] Obtaining the stored quantity, the stored cut-off bit of the fault codes stored in the permanent memory, and the target quantity of the updated fault code;
[0026] When the stored quantity is less than the preset full storage quantity, determining the remaining quantity according to the stored quantity and the preset full storage quantity;
[0027] When the remaining quantity is greater than or equal to the target quantity, adding the updated fault code to the space starting from the next bit of the stored cut-off bit in the permanent memory;
[0028] When the remaining quantity is less than the target quantity, the fault codes in the updated fault codes that match the remaining quantity are used as the first fault codes to be stored, and the first fault codes to be stored are added to the space in the permanent memory starting from the next bit of the stored cut-off position; the remaining fault codes in the updated fault codes except the first fault codes to be stored are used as the second fault codes to be stored, and the second fault codes to be stored are added to the space in the permanent memory starting from the starting address;
[0029] When the stored quantity is equal to the preset full storage quantity, the updated fault codes are added to the space in the permanent memory starting from the starting address.
[0030] In one embodiment, after determining the target fault code according to the fault level, component type and fault type, it further includes:
[0031] Empty the target memory, where the target memory is used to store the fault information to be displayed;
[0032] Save the target fault code in the emptied target memory;
[0033] Parse the fault codes stored in the emptied target memory to obtain the parsed fault information, and use the parsed fault information as the fault information to be displayed;
[0034] Send the fault information to be displayed to the display device, and control the display device to display the fault information to be displayed.
[0035] In a second aspect, the present application further provides a fault information processing device. The device includes:
[0036] A receiving module, configured to receive the current fault information reported by each of multiple vehicle components, where the current fault information includes the fault level, component type and fault type corresponding to the respective vehicle components;
[0037] A determining module, configured to determine the target fault code according to the fault level, component type and fault type;
[0038] A first updating module, configured to update the fault codes stored in the temporary memory according to the target fault code;
[0039] A second updating module, configured to update the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory when detecting that the vehicle is powered off, and empty the temporary memory, where the fault codes stored in the permanent memory are used for fault information processing.
[0040] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0041] Receiving current fault information reported by multiple vehicle components respectively, where the current fault information includes a fault level, a component type, and a fault type corresponding to the respective vehicle component;
[0042] Determining a target fault code according to the fault level, the component type, and the fault type;
[0043] Updating the fault codes stored in the temporary memory according to the target fault code;
[0044] When it is detected that the vehicle is powered off, updating the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clearing the temporary memory. The fault codes stored in the permanent memory are used for fault information processing.
[0045] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0046] Receiving current fault information reported by multiple vehicle components respectively, where the current fault information includes a fault level, a component type, and a fault type corresponding to the respective vehicle component;
[0047] Determining a target fault code according to the fault level, the component type, and the fault type;
[0048] Updating the fault codes stored in the temporary memory according to the target fault code;
[0049] When it is detected that the vehicle is powered off, updating the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clearing the temporary memory. The fault codes stored in the permanent memory are used for fault information processing.
[0050] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0051] Receiving current fault information reported by multiple vehicle components respectively, where the current fault information includes a fault level, a component type, and a fault type corresponding to the respective vehicle component;
[0052] Determining a target fault code according to the fault level, the component type, and the fault type;
[0053] Updating the fault codes stored in the temporary memory according to the target fault code;
[0054] When it is detected that the vehicle is powered off, update the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clear the temporary memory. The fault codes stored in the permanent memory are used for fault information processing.
[0055] The above-mentioned fault information processing method, device, computer device, storage medium and computer program product receive the current fault information reported by each of multiple vehicle components. The current fault information includes the fault level, component type and fault type corresponding to the respective vehicle component. Determine the target fault code according to the fault level, component type and fault type. Update the fault codes stored in the temporary memory according to the target fault code. When it is detected that the vehicle is powered off, update the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clear the temporary memory. The fault codes stored in the permanent memory are used for fault information processing. This method of generating corresponding target fault codes for the current fault information of multiple vehicle components only needs to save the target fault codes, which reduces the occupied space of the memory compared with directly saving the corresponding fault information, and is conducive to processing the fault information of multiple vehicle components. At the same time, when the vehicle is in the powered-on state, the target fault codes are updated in the temporary memory. When the vehicle is powered off, the fault codes stored in the temporary memory are updated to the permanent memory, avoiding the problem of missing fault information caused by the loss of the fault codes stored in the temporary memory when the vehicle is powered off, and is conducive to processing the fault information of multiple vehicle components. Description of the Drawings
[0056] Figure 1 It is an application environment diagram of the fault information processing method in an embodiment;
[0057] Figure 2 It is a schematic flowchart of the fault information processing method in an embodiment;
[0058] Figure 3 It is a schematic sub-flowchart of S206 in an embodiment;
[0059] Figure 4 It is a schematic diagram of the format of the fault codes stored in the temporary memory in an embodiment;
[0060] Figure 5 It is a schematic overall flowchart of the fault information processing method in an embodiment;
[0061] Figure 6 It is a structural block diagram of the fault information processing device in an embodiment;
[0062] Figure 7 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments
[0063] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] The fault information processing method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, data interaction occurs between the controller 102, the temporary memory 104, and the permanent memory 106. The controller 102 receives the current fault information reported by each of a plurality of vehicle components. The current fault information includes the fault level, component type, and fault type corresponding to the corresponding vehicle component; determines a target fault code according to the fault level, component type, and fault type; updates the fault codes stored in the temporary memory 104 according to the target fault code; and when it is detected that the vehicle is powered off, updates the fault codes stored in the permanent memory 106 according to the fault codes stored in the temporary memory 104, and clears the temporary memory 104. The fault codes stored in the permanent memory 106 are used for fault information processing. Among them, the controller 102 can be an electronic control unit (ECU) or a vehicle controller (VCU). The controller 102 can be, but is not limited to, various personal computers, laptop computers, smartphones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.
[0065] In one embodiment, as Figure 2 shown, a fault information processing method is provided. Taking the method applied to the Figure 1 controller 102 as an example, the method includes the following steps:
[0066] S202: Receive the current fault information reported by each of a plurality of vehicle components. The current fault information includes the fault level, component type, and fault type corresponding to the corresponding vehicle component.
[0067] Among them, the current fault information is the current moment fault information reported by each of a plurality of vehicle components received by the controller at preset time intervals. The fault level refers to the level of the fault. The component type includes, but is not limited to, a motor controller, an electric power steering controller, an electric air pump controller, a DCDC (direct current chopper) controller, a high-voltage box controller, a battery controller, a power battery, an electronic water pump, or an air-conditioning panel, etc. Each component type has its own corresponding fault type. For example, the fault types of the power battery include single-cell overvoltage or excessive feedback current, etc. Therefore, the current fault information includes the component type, fault level, and fault type corresponding to each of a plurality of vehicle components.
[0068] S204. Determine the target fault code according to the fault level, component type, and fault type.
[0069] Among them, the target fault code refers to the binary code representing the corresponding fault information. The controller converts the fault level, component type, and fault type information into the corresponding target fault code according to certain protocol specifications. For example, when the component type is the power battery, the fault level is 2, and the fault type is excessive feedback current, the corresponding target fault code is 0x43022001.
[0070] S206. Update the fault code stored in the temporary memory according to the target fault code.
[0071] Among them, the temporary memory refers to the memory that stores the fault code when the vehicle is powered on. Usually, when the vehicle is powered off, the data stored in the temporary memory will be cleared. Exemplarily, the temporary memory can be a random access memory RAM. For the target fault codes reported by each vehicle component, the controller writes the target fault code into the temporary memory, and updates the fault code stored in the temporary memory according to the target fault code and the stored fault code in the temporary memory.
[0072] S208. When it is detected that the vehicle is powered off, update the fault code stored in the permanent memory according to the fault code stored in the temporary memory, and clear the temporary memory. The fault code stored in the permanent memory is used for fault information processing.
[0073] Among them, the vehicle being powered off means that the vehicle loses power. For example, it can be the vehicle being powered off due to the ignition key switch being turned off. The permanent memory refers to the memory whose stored data is not lost after a power failure. For example, the permanent memory can be an EEPROM (Electrically Erasable Programmable Read Only Memory).
[0074] When it is detected that the vehicle is powered off, the controller writes the fault code stored in the temporary memory into the permanent memory, and updates the fault code stored in the permanent memory according to the fault code stored in the temporary memory and the stored fault code in the permanent memory.
[0075] When the vehicle is powered off, after the fault code stored in the temporary memory is written into the permanent memory, the controller clears the temporary memory, which is beneficial for writing the target fault code into the temporary memory again when the vehicle is powered on next time, and avoiding abnormal data being written into the permanent memory due to the data in the temporary memory before the vehicle is powered on.
[0076] The fault codes stored in the permanent memory are used for fault information processing. For example, an external device can read the fault codes stored in the permanent memory and process the fault information according to the fault codes. Processing the fault information based on the fault codes stored in the permanent memory can avoid relying on the power-on state of the vehicle. The fault codes stored in the permanent memory include the fault information of each vehicle component, solving the problems that the existing fault detection system cannot store a large number of fault codes and cannot process the fault information of multiple components.
[0077] In the above-mentioned fault information processing method, by receiving the current fault information reported by multiple vehicle components respectively, the current fault information includes the fault level, component type, and fault type corresponding to the respective vehicle components, and the target fault code is determined according to the fault level, component type, and fault type. According to the target fault code, the fault codes stored in the temporary memory are updated. When it is detected that the vehicle is powered off, according to the fault codes stored in the temporary memory, the fault codes stored in the permanent memory are updated, and the temporary memory is emptied. The fault codes stored in the permanent memory are used for fault information processing. This method of generating the corresponding target fault code from the current fault information of multiple vehicle components only needs to save the target fault code, which reduces the occupied space of the memory compared with directly saving the corresponding fault information, and is beneficial to processing the fault information of multiple vehicle components. At the same time, when the vehicle is in the power-on state, the target fault code is updated in the temporary memory. When the vehicle is powered off, the fault codes stored in the temporary memory are updated to the permanent memory, avoiding the problem of missing fault information caused by the loss of the fault codes stored in the temporary memory when the vehicle is powered off, and is beneficial to processing the fault information of multiple vehicle components.
[0078] In one embodiment, determining the target fault code according to the fault level, component type, and fault type includes: determining the fault level bit of the target fault code according to the fault level; determining the component type bit of the target fault code according to the component type; determining the fault type bit of the target fault code according to the fault type; and determining the target fault code according to the fault type bit, component type bit, and fault type bit.
[0079] Among them, the target fault code includes a fault level bit, a component type bit, and a fault type bit. The controller determines the fault level bit of the target fault code according to the fault level; determines the component type bit of the target fault code according to the component type; and determines the fault type bit of the target fault code according to the fault type. For example, the target fault code is a 24-bit binary code, where bits 0-2 are the fault level bits, bits 3-7 are the component type bits, and bits 8-23 are the fault type bits.
[0080] The controller composes the fault type bit, component type bit, and fault type bit into the target fault code.
[0081] In this embodiment, the fault level bit of the target fault code is determined through the fault level, the component type bit of the target fault code is determined according to the component type, and the fault type bit of the target fault code is determined according to the fault type, so as to determine the target fault code composed of the fault type bit, the component type bit, and the fault type bit. The target fault code can represent the fault level, component type, and fault type in the fault information. Only the target fault code needs to be saved, which reduces the occupied space of the memory compared with directly saving the corresponding fault information and is beneficial to processing the fault information of multiple vehicle components.
[0082] In one embodiment, as Figure 3 shown, each fault code stored in the temporary memory includes a first fault bit and a first count bit;
[0083] Updating the fault codes stored in the temporary memory according to the target fault code includes:
[0084] S302, traverse each fault code stored in the temporary memory.
[0085] S304, when the first fault bit in the currently traversed fault code is the same as the target fault code, update the first count bit in the current fault code.
[0086] S306, when the first fault bit in each currently traversed fault code is not the same as the target fault code, determine the updated fault code according to the target fault code and a preset value; add the updated fault code to the temporary memory.
[0087] Among them, the fault codes stored in the temporary memory are binary coded. Each fault code stored in the temporary memory includes a first fault bit and a first count bit. The number of bits of the first fault bit is the same as that of the target fault code. The code stored in the first fault bit is used to represent the corresponding fault information, and the first count bit is used to represent the count value of the corresponding fault code. As Figure 4 shown is a schematic diagram of the format of the fault codes stored in the temporary memory. Among them, the fault codes stored in the temporary memory are 32-bit binary codes. The first fault bit includes a fault level bit SPN3, a component type bit SPN5, a first fault type bit SPN11, and a second fault type bit FMI. The first count bit includes a target count bit OC and a reserved bit CM. SPN3 includes 3 binary bits, SPN5 includes 5 binary bits, SPN11 includes 11 binary bits, FMI includes 5 binary bits, CM includes 1 binary bit, and OC includes 7 binary bits.
[0088] The controller traverses each fault code stored in the temporary memory. Compare the first fault bit of each currently traversed fault code with the target fault code respectively.
[0089] When the first fault bit in the currently traversed fault code is the same as the target fault code, update the first count bit in the current fault code. Thus, when the target fault code has been stored in the temporary memory, only the first count bit in the current fault code needs to be updated, and there is no need to write the target fault code that has appeared in the temporary memory into the temporary memory again, which helps to save the occupied space of the temporary memory. Updating the first count bit in the current fault code, in some embodiments, may specifically be incrementing the first count bit in the current fault code by one.
[0090] When the first fault bit in each currently traversed fault code is not the same as the target fault code, determine the updated fault code according to the target fault code and a preset value, and add the updated fault code to the temporary memory. Specifically, the target fault code may be written into the fault bit of the updated fault code, and the preset value may be written into the count bit of the updated fault code. Thus, the target fault code that has not appeared in the temporary memory is written into the temporary memory. At the same time, the updated fault code includes the target fault code and the count value of the target fault code, which helps to count the number of times the same target fault code appears.
[0091] In this embodiment, by traversing each fault code stored in the temporary memory, for the target fault code that has appeared in the temporary memory, only the count value of the corresponding fault code is updated, and for the target fault code that has not appeared in the temporary memory, it is written into the temporary memory, which helps to store the fault codes of each vehicle component and process the fault information of multiple vehicle components.
[0092] In one embodiment, each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit; updating the fault code stored in the permanent memory according to the fault code stored in the temporary memory includes: traversing each fault code stored in the permanent memory; when the second fault bit in the currently traversed fault code is the same as the first fault bit in the fault code stored in the temporary memory, obtain the sum of the corresponding second count bit and the corresponding first count bit; update the second count bit to the sum value; when the second fault bit in each currently traversed fault code is not the same as the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0093] Among them, the fault codes stored in the temporary memory are binary coded. Each fault code stored in the temporary memory includes a first fault bit and a first count bit. The fault codes stored in the permanent memory are binary coded. Each fault code stored in the permanent memory includes a second fault bit and a second count bit. The number of bits of the second fault bit is the same as the number of bits of the target fault code. The code stored in the second fault bit is used to represent the corresponding fault information, and the second count bit is used to represent the count value of the corresponding fault code. Reference Figure 4 , the format of the fault codes stored in the permanent memory is the same as the format of the fault codes stored in the temporary memory.
[0094] For each fault code stored in the temporary memory, the controller traverses each fault code stored in the permanent memory, and compares the second fault bit in the currently traversed fault code with the first fault bit in the fault code stored in the temporary memory.
[0095] When the second fault bit in the currently traversed fault code is consistent with the first fault bit in the fault code stored in the temporary memory, obtain the sum value of the corresponding second count bit and the corresponding first count bit, and update the second count bit to the sum value.
[0096] When the second fault bit in each currently traversed fault code is not consistent with the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0097] In this embodiment, when there is a fault code in the permanent memory that is consistent with the first fault bit, only the corresponding second count bit is updated, and it is not necessary to write the entire fault code into the permanent memory, which is beneficial to saving the occupied space of the permanent memory and is beneficial to processing the fault information of multiple vehicle components. At the same time, updating the second count bit to the sum value is beneficial to accumulating the count values of the same fault information received at each moment, and can reflect the total count value of the occurrence of the fault information. When there is no fault code in the permanent memory that is consistent with the first fault bit, writing the corresponding fault code stored in the temporary memory into the permanent memory is beneficial to saving the fault codes of each component and is beneficial to processing the fault information of multiple vehicle components.
[0098] In one embodiment, adding the updated fault codes to the permanent memory includes: obtaining the stored quantity, stored cut-off position of the fault codes stored in the permanent memory, and the target quantity of the updated fault codes; when the stored quantity is less than the preset full storage quantity, determining the remaining quantity according to the stored quantity and the preset full storage quantity; when the remaining quantity is greater than or equal to the target quantity, adding the updated fault codes to the space starting from the next position after the stored cut-off position in the permanent memory; when the remaining quantity is less than the target quantity, taking the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and adding the first fault codes to be stored to the space starting from the next position after the stored cut-off position in the permanent memory; taking the remaining fault codes in the updated fault codes except the first fault codes to be stored as the second fault codes to be stored, and adding the second fault codes to be stored to the space starting from the starting address in the permanent memory; when the stored quantity is equal to the preset full storage quantity, adding the updated fault codes to the space starting from the starting address in the permanent memory.
[0099] Among them, in the process of adding the updated fault codes to the permanent memory, it is also necessary to comprehensively consider the stored quantity, stored cut-off position of the fault codes stored in the permanent memory, and the target quantity of the updated fault codes. Among them, the stored cut-off position refers to the cut-off position of the stored space in the permanent memory. The stored quantity is used to represent the quantity of the fault codes stored in the permanent memory. The preset full storage quantity is used to represent the storage capacity of the permanent memory.
[0100] The controller compares the stored quantity with the preset full storage quantity. If the stored quantity is less than the preset full storage quantity, it indicates that the permanent memory is not full yet and there is still remaining space. If the stored quantity is equal to the preset full storage quantity, it indicates that the permanent memory is already full.
[0101] The controller takes the difference between the preset full storage quantity and the stored quantity as the remaining quantity. The remaining quantity is compared with the target quantity.
[0102] When the remaining quantity is greater than or equal to the target quantity, add the updated fault codes to the space starting from the next position after the stored cut-off position in the permanent memory.
[0103] When the remaining quantity is less than the target quantity, take the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and add the first fault codes to be stored to the space starting from the next position after the stored cut-off position in the permanent memory. Take the remaining fault codes in the updated fault codes except the first fault codes to be stored as the second fault codes to be stored, and add the second fault codes to be stored to the space starting from the starting address in the permanent memory.
[0104] When the existing quantity is equal to the preset full storage quantity, the updated fault code is added to the space starting from the starting address in the permanent memory. This is beneficial for adding the fault code corresponding to the latest fault information to the permanent memory and for processing the fault information of multiple vehicle components.
[0105] In this embodiment, by judging whether the permanent memory is full, when the permanent memory is not full, further according to the size relationship between the permanent memory and the target quantity, it is determined whether to directly add the updated fault code to the permanent memory, or add a part of the updated fault code to the remaining space of the permanent memory and another part to the space starting from the starting address of the permanent memory. When the permanent memory is full, the updated fault code is added to the space starting from the starting address in the permanent memory. The multiple storage methods are beneficial for writing the fault codes corresponding to the fault information of multiple vehicle components into the permanent memory and for processing the fault information of multiple vehicle components.
[0106] In one embodiment, after determining the target fault code according to the fault level, component type, and fault type, it further includes: clearing the target memory, where the target memory is used to store the fault information to be displayed; saving the target fault code in the cleared target memory; parsing the fault code stored in the cleared target memory to obtain the parsed fault information, and using the parsed fault information as the fault information to be displayed; sending the fault information to be displayed to the display device and controlling the display device to display the fault information to be displayed.
[0107] Among them, the target memory can be the memory that stores the fault code when the vehicle is powered on. When the vehicle is powered off, the data stored in the target memory is likely to be lost. After each time the current fault information is obtained and the current fault information is converted into the corresponding target fault code, the controller clears the target memory, which is beneficial for saving the target fault code corresponding to the latest fault information in the target memory. The target memory is used to store the fault information to be displayed.
[0108] The controller saves the target fault code in the cleared target memory, parses the fault code stored in the cleared target memory to obtain the parsed fault information, and uses the parsed fault information as the fault information to be displayed. The controller sends the fault information to be displayed to the display device and controls the display device to display the fault information to be displayed. This is beneficial for displaying the latest fault information of each vehicle component on the display device.
[0109] In this embodiment, after each time the current fault information is obtained and converted into the corresponding target fault code, the target memory is cleared, and the target fault code is stored in the cleared target memory, so as to parse the fault code and display the corresponding fault information on the display device. The target memory stores the target fault code corresponding to the currently received fault information, and the display device displays the corresponding latest fault information, which can realize the processing of the fault information of multiple vehicle components.
[0110] To illustrate the fault information processing method and effect in this solution in detail, the following uses a most detailed embodiment for illustration. Among them, the temporary memory and the target memory can both be caches, and the permanent memory can be an EEPROM:
[0111] The controller receives the current fault information reported by each of multiple vehicle components. The current fault information includes the fault level, component type, and fault type corresponding to the corresponding vehicle component. As Figure 5 shown in the overall flowchart of the fault information processing method. Among them, T15 represents the ignition switch.
[0112] The controller determines the target fault code according to the fault level, component type, and fault type. Specifically, according to the fault level, the fault level bit of the target fault code is determined, according to the component type, the component type bit of the target fault code is determined, according to the fault type, the fault type bit of the target fault code is determined, and according to the fault type bit, component type bit, and fault type bit, the target fault code is determined.
[0113] Each fault code stored in the temporary memory includes a first fault bit and a first count bit. Each fault code stored in the permanent memory includes a second fault bit and a second count bit.
[0114] The controller traverses each fault code stored in the temporary memory. In the case where the first fault bit in the currently traversed fault code is consistent with the target fault code, the first count bit in the current fault code is updated. In the case where the first fault bit in each currently traversed fault code is inconsistent with the target fault code, according to the target fault code and a preset value, the updated fault code is determined, and the updated fault code is added to the temporary memory.
[0115] When it is detected that the vehicle is powered off, the controller updates the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, clears the temporary memory, and the fault codes stored in the permanent memory are used for fault information processing. The vehicle power-off can be caused by the vehicle key switch being turned off. Among them, the controller updates the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, including traversing each fault code stored in the permanent memory. When the second fault bit in the currently traversed fault code is the same as the first fault bit in the fault code stored in the temporary memory, obtain the sum value of the corresponding second count bit and the corresponding first count bit, and update the second count bit to the sum value. When the second fault bit in each currently traversed fault code is not the same as the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0116] The controller adds the updated fault code to the permanent memory, including: obtaining the stored quantity, stored cut-off bit of the fault codes stored in the permanent memory, and the target quantity of the updated fault code. When the stored quantity is less than the preset full storage quantity, determine the remaining quantity according to the stored quantity and the preset full storage quantity. When the remaining quantity is greater than or equal to the target quantity, add the updated fault code to the space starting from the next bit after the stored cut-off bit in the permanent memory. When the remaining quantity is less than the target quantity, use the fault code in the updated fault code that matches the remaining quantity as the first fault code to be stored, and add the first fault code to be stored to the space starting from the next bit after the stored cut-off bit in the permanent memory; use the fault codes in the updated fault code except the first fault code to be stored as the second fault code to be stored, and add the second fault code to be stored to the space starting from the starting address in the permanent memory. When the stored quantity is equal to the preset full storage quantity, add the updated fault code to the space starting from the starting address in the permanent memory.
[0117] In addition, after the controller determines the target fault code according to the fault level, component type and fault type, it also includes: the controller clears the target memory, and the target memory is used to store the fault information to be displayed. Save the target fault code in the cleared target memory, parse the fault codes stored in the cleared target memory to obtain the parsed fault information, and use the parsed fault information as the fault information to be displayed. Send the fault information to be displayed to the display device, and control the display device to display the fault information to be displayed.
[0118] The above-mentioned fault information processing method receives the current fault information reported by multiple vehicle components respectively. The current fault information includes the fault level, component type, and fault type corresponding to the respective vehicle components. According to the fault level, component type, and fault type, a target fault code is determined. Based on the target fault code, the fault codes stored in the temporary memory are updated. When it is detected that the vehicle is powered off, according to the fault codes stored in the temporary memory, the fault codes stored in the permanent memory are updated, and the temporary memory is emptied. The fault codes stored in the permanent memory are used for fault information processing. This method of generating corresponding target fault codes for the current fault information of multiple vehicle components only needs to save the target fault codes. Compared with directly saving the corresponding fault information, it reduces the occupied space of the memory and is beneficial to the processing of the fault information of multiple vehicle components. At the same time, when the vehicle is in the powered-on state, the target fault code is updated in the temporary memory. When the vehicle is powered off, the fault codes stored in the temporary memory are updated to the permanent memory, avoiding the problem of missing fault information caused by the loss of the fault codes stored in the temporary memory when the vehicle is powered off, which is beneficial to the processing of the fault information of multiple vehicle components. At the same time, each vehicle component identifies the fault information according to its own fault identification strategy and reports it to the controller at regular intervals. The controller receives the fault information reported by each component at regular intervals. If the current fault information is identified, the target fault code is saved to the cache according to the packaging protocol and reported to the display device. When the vehicle key switch is powered off, the controller first checks whether the fault codes stored in the cache have been saved. If they have been saved, only the count value is updated. If the fault code has not been saved and there are free bytes in the EEProm, the fault code is saved. If the EEProm is full, it is overwritten and saved again from the zero index of the EEProm fault storage area. This method solves the problem that the diagnostic protocols of vehicle component controllers are not unified at present and it is impossible to store a large number of fault codes based on the existing UDS, and can save a large number of fault codes reported by components in real time.
[0119] It should be understood that although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps is not strictly restricted by order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0120] Based on the same inventive concept, an embodiment of the present application further provides a fault information processing device for implementing the fault information processing method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the fault information processing device provided below can refer to the limitations on the fault information processing method in the above text, and will not be elaborated here.
[0121] In one embodiment, as Figure 6 shown, a fault information processing device 100 is provided, including: a receiving module 120, a determining module 140, a first updating module 160, and a second updating module 180, where:
[0122] The receiving module 120 is configured to receive the current fault information reported by each of a plurality of vehicle components. The current fault information includes the fault level, component type, and fault type corresponding to the corresponding vehicle component;
[0123] The determining module 140 is configured to determine a target fault code according to the fault level, component type, and fault type;
[0124] The first updating module 160 is configured to update the fault codes stored in the temporary memory according to the target fault code;
[0125] The second updating module 180 is configured to, when detecting that the vehicle is powered off, update the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clear the temporary memory. The fault codes stored in the permanent memory are used for fault information processing.
[0126] The above-mentioned fault information processing device receives the current fault information reported by each of a plurality of vehicle components. The current fault information includes the fault level, component type, and fault type corresponding to the corresponding vehicle component, and determines a target fault code according to the fault level, component type, and fault type. According to the target fault code, the fault codes stored in the temporary memory are updated. When detecting that the vehicle is powered off, the fault codes stored in the permanent memory are updated according to the fault codes stored in the temporary memory, and the temporary memory is cleared. The fault codes stored in the permanent memory are used for fault information processing. This method of generating corresponding target fault codes for the current fault information of multiple vehicle components only needs to save the target fault codes, which reduces the occupied space of the memory compared with directly saving the corresponding fault information, and is beneficial to the processing of the fault information of multiple vehicle components. At the same time, when the vehicle is in the powered-on state, the target fault code is updated in the temporary memory. When the vehicle is powered off, the fault codes stored in the temporary memory are updated to the permanent memory, avoiding the problem of missing fault information caused by the loss of the fault codes stored in the temporary memory when the vehicle is powered off, and is beneficial to the processing of the fault information of multiple vehicle components.
[0127] In one embodiment, according to the fault level, component type, and fault type, a target fault code is determined. The determining module 140 is further configured to: determine the fault level bit of the target fault code according to the fault level; determine the component type bit of the target fault code according to the component type; determine the fault type bit of the target fault code according to the fault type; and determine the target fault code according to the fault type bit, component type bit, and fault type bit.
[0128] In one embodiment, each fault code stored in the temporary memory includes a first fault bit and a first count bit; according to the target fault code, the fault codes stored in the temporary memory are updated. The first updating module 160 is further configured to: traverse each fault code stored in the temporary memory; when the first fault bit in the currently traversed fault code is consistent with the target fault code, update the first count bit in the current fault code; when the first fault bit in each currently traversed fault code is inconsistent with the target fault code, determine the updated fault code according to the target fault code and a preset value; and add the updated fault code to the temporary memory.
[0129] In one embodiment, each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit; according to the fault codes stored in the temporary memory, the fault codes stored in the permanent memory are updated. The second updating module 180 is further configured to: traverse each fault code stored in the permanent memory; when the second fault bit in the currently traversed fault code is consistent with the first fault bit in the fault code stored in the temporary memory, obtain the sum value of the corresponding second count bit and the corresponding first count bit; update the second count bit to the sum value; when the second fault bit in each currently traversed fault code is inconsistent with the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0130] In one embodiment, the updated fault codes are added to the permanent memory. The second update module 180 is further configured to: obtain the stored quantity, the stored cut-off bit of the fault codes stored in the permanent memory, and the target quantity of the updated fault codes; when the stored quantity is less than the preset full storage quantity, determine the remaining quantity according to the stored quantity and the preset full storage quantity; when the remaining quantity is greater than or equal to the target quantity, add the updated fault codes to the space starting from the next bit of the stored cut-off bit in the permanent memory; when the remaining quantity is less than the target quantity, use the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and add the first fault codes to be stored to the space starting from the next bit of the stored cut-off bit in the permanent memory; use the remaining fault codes in the updated fault codes except the first fault codes to be stored as the second fault codes to be stored, and add the second fault codes to be stored to the space starting from the starting address in the permanent memory; when the stored quantity is equal to the preset full storage quantity, add the updated fault codes to the space starting from the starting address in the permanent memory.
[0131] In one embodiment, after determining the target fault codes according to the fault level, component type, and fault type, the determination module 140 is further configured to: clear the target memory, where the target memory is used to store the fault information to be displayed; save the target fault codes in the cleared target memory; parse the fault codes stored in the cleared target memory to obtain the parsed fault information, and use the parsed fault information as the fault information to be displayed; send the fault information to be displayed to the display device, and control the display device to display the fault information to be displayed.
[0132] Each module in the above fault information processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.
[0133] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 7As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a fault information processing method.
[0134] Those skilled in the art can understand that Figure 7 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0135] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0136] Receive the current fault information reported by each of multiple vehicle components. The current fault information includes the fault level, component type, and fault type corresponding to the corresponding vehicle component; determine the target fault code according to the fault level, component type, and fault type; update the fault code stored in the temporary memory according to the target fault code; when it is detected that the vehicle is powered off, update the fault code stored in the permanent memory according to the fault code stored in the temporary memory, and clear the temporary memory. The fault code stored in the permanent memory is used for fault information processing.
[0137] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0138] Determine the fault level bit of the target fault code according to the fault level; determine the component type bit of the target fault code according to the component type; determine the fault type bit of the target fault code according to the fault type; determine the target fault code according to the fault type bit, the component type bit, and the fault type bit.
[0139] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0140] Each fault code stored in the temporary memory includes a first fault bit and a first count bit; traverse each fault code stored in the temporary memory; when the first fault bit in the currently traversed fault code is consistent with the target fault code, update the first count bit in the current fault code; when the first fault bit in each currently traversed fault code is inconsistent with the target fault code, determine the updated fault code according to the target fault code and a preset numerical value; add the updated fault code to the temporary memory.
[0141] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0142] Each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit; traverse each fault code stored in the permanent memory; when the second fault bit in the currently traversed fault code is consistent with the first fault bit in the fault code stored in the temporary memory, obtain the sum value of the corresponding second count bit and the corresponding first count bit; update the second count bit to the sum value; when the second fault bit in each currently traversed fault code is inconsistent with the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0143] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0144] Obtain the stored quantity, stored cut-off bit of the fault codes stored in the permanent memory, and the target quantity of the updated fault codes; when the stored quantity is less than the preset full storage quantity, determine the remaining quantity according to the stored quantity and the preset full storage quantity; when the remaining quantity is greater than or equal to the target quantity, add the updated fault codes to the space starting from the next bit of the stored cut-off bit in the permanent memory; when the remaining quantity is less than the target quantity, use the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and add the first fault codes to be stored to the space starting from the next bit of the stored cut-off bit in the permanent memory; use the remaining fault codes in the updated fault codes except the first fault codes to be stored as the second fault codes to be stored, and add the second fault codes to be stored to the space starting from the starting address in the permanent memory; when the stored quantity is equal to the preset full storage quantity, add the updated fault codes to the space starting from the starting address in the permanent memory.
[0145] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0146] Clear the target memory, where the target memory is used to store the fault information to be displayed; save the target fault code in the cleared target memory; parse the fault codes stored in the cleared target memory to obtain the parsed fault information, and use the parsed fault information as the fault information to be displayed; send the fault information to be displayed to the display device, and control the display device to display the fault information to be displayed.
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0148] Receive the current fault information reported by each of multiple vehicle components, where the current fault information includes the fault level, component type, and fault type corresponding to the respective vehicle component; determine the target fault code according to the fault level, component type, and fault type; update the fault codes stored in the temporary memory according to the target fault code; when it is detected that the vehicle is powered off, update the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clear the temporary memory, where the fault codes stored in the permanent memory are used for fault information processing.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0150] Determine the fault level bit of the target fault code according to the fault level; determine the component type bit of the target fault code according to the component type; determine the fault type bit of the target fault code according to the fault type; determine the target fault code according to the fault type bit, component type bit, and fault type bit.
[0151] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0152] Each fault code stored in the temporary memory includes a first fault bit and a first count bit; traverse each fault code stored in the temporary memory; when the first fault bit in the currently traversed fault code is the same as the target fault code, update the first count bit in the current fault code; when the first fault bit in each currently traversed fault code is not the same as the target fault code, determine the updated fault code according to the target fault code and a preset value; add the updated fault code to the temporary memory.
[0153] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0154] Each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit; traverse each fault code stored in the permanent memory; when the second fault bit in the currently traversed fault code is consistent with the first fault bit in the fault code stored in the temporary memory, obtain the sum value of the corresponding second count bit and the corresponding first count bit; update the second count bit to the sum value; when the second fault bit in each currently traversed fault code is not consistent with the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0156] Obtain the stored quantity, stored cut-off bit of the fault codes stored in the permanent memory, and the target quantity of the updated fault codes; when the stored quantity is less than the preset full storage quantity, determine the remaining quantity according to the stored quantity and the preset full storage quantity; when the remaining quantity is greater than or equal to the target quantity, add the updated fault codes to the space starting from the next bit of the stored cut-off bit in the permanent memory; when the remaining quantity is less than the target quantity, use the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and add the first fault codes to be stored to the space starting from the next bit of the stored cut-off bit in the permanent memory; use the remaining fault codes in the updated fault codes except the first fault codes to be stored as the second fault codes to be stored, and add the second fault codes to be stored to the space starting from the starting address in the permanent memory; when the stored quantity is equal to the preset full storage quantity, add the updated fault codes to the space starting from the starting address in the permanent memory.
[0157] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0158] Empty the target memory, where the target memory is used to store the fault information to be displayed; save the target fault codes in the emptied target memory; parse the fault codes stored in the emptied target memory to obtain the parsed fault information, and use the parsed fault information as the fault information to be displayed; send the fault information to be displayed to the display device, and control the display device to display the fault information to be displayed.
[0159] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0160] Receive the current fault information reported by multiple vehicle components respectively. The current fault information includes the fault level, component type, and fault type corresponding to the respective vehicle components. Determine the target fault code according to the fault level, component type, and fault type. Update the fault code stored in the temporary memory according to the target fault code. When it is detected that the vehicle is powered off, update the fault code stored in the permanent memory according to the fault code stored in the temporary memory, and clear the temporary memory. The fault code stored in the permanent memory is used for fault information processing.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0162] Determine the fault level bit of the target fault code according to the fault level. Determine the component type bit of the target fault code according to the component type. Determine the fault type bit of the target fault code according to the fault type. Determine the target fault code according to the fault type bit, component type bit, and fault type bit.
[0163] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0164] Each fault code stored in the temporary memory includes a first fault bit and a first count bit. Traverse each fault code stored in the temporary memory. When the first fault bit in the current fault code being traversed is consistent with the target fault code, update the first count bit in the current fault code. When the first fault bit in each current fault code being traversed is not consistent with the target fault code, determine the updated fault code according to the target fault code and a preset value. Add the updated fault code to the temporary memory.
[0165] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0166] Each fault code stored in the temporary memory includes a first fault bit and a first count bit. Each fault code stored in the permanent memory includes a second fault bit and a second count bit. Traverse each fault code stored in the permanent memory. When the second fault bit in the current fault code being traversed is consistent with the first fault bit in the fault code stored in the temporary memory, obtain the sum value of the corresponding second count bit and the corresponding first count bit. Update the second count bit to the sum value. When the second fault bit in each current fault code being traversed is not consistent with the first fault bit in the fault code stored in the temporary memory, use the corresponding fault code stored in the temporary memory as the updated fault code, and add the updated fault code to the permanent memory.
[0167] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0168] Obtain the stored quantity of fault codes stored in the permanent memory, the stored cut-off position, and the target quantity of the updated fault codes; when the stored quantity is less than the preset full storage quantity, determine the remaining quantity according to the stored quantity and the preset full storage quantity; when the remaining quantity is greater than or equal to the target quantity, add the updated fault codes to the space starting from the next position after the stored cut-off position in the permanent memory; when the remaining quantity is less than the target quantity, use the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and add the first fault codes to be stored to the space starting from the next position after the stored cut-off position in the permanent memory; use the fault codes remaining after removing the first fault codes to be stored in the updated fault codes as the second fault codes to be stored, and add the second fault codes to be stored to the space starting from the starting address in the permanent memory; when the stored quantity is equal to the preset full storage quantity, add the updated fault codes to the space starting from the starting address in the permanent memory.
[0169] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:
[0170] Empty the target memory, where the target memory is used to store the fault information to be displayed; save the target fault codes in the emptied target memory; parse the fault codes stored in the emptied target memory to obtain the parsed fault information, and use the parsed fault information as the fault information to be displayed; send the fault information to be displayed to the display device, and control the display device to display the fault information to be displayed.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0172] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. 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), magnetoresistive 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 be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0173] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.
[0174] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for processing fault information, characterized in that, The method includes: Receiving current fault information reported by each of a plurality of vehicle components, where the current fault information includes a fault level, a component type, and a fault type corresponding to the corresponding vehicle component; Determining a target fault code according to the fault level, the component type, and the fault type; Updating the fault codes stored in the temporary memory according to the target fault code; When it is detected that the vehicle is powered off, updating the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory, and clearing the temporary memory, where the fault codes stored in the permanent memory are used for fault information processing; Each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit; the updating the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory includes: Traversing each fault code stored in the permanent memory; When the second fault bit in each current fault code traversed is inconsistent with the first fault bit in the fault code stored in the temporary memory, using the corresponding fault code stored in the temporary memory as the updated fault code, and adding the updated fault code to the permanent memory; The adding the updated fault code to the permanent memory includes: Obtaining the stored quantity, the stored cut-off bit of the fault codes stored in the permanent memory, and the target quantity of the updated fault code; When the stored quantity is less than a preset full storage quantity, determining a remaining quantity according to the stored quantity and the preset full storage quantity; When the remaining quantity is greater than or equal to the target quantity, adding the updated fault code to the space starting from the next bit of the stored cut-off bit in the permanent memory; When the remaining quantity is less than the target quantity, using the fault code in the updated fault code that matches the remaining quantity as the first fault code to be stored, and adding the first fault code to be stored to the space starting from the next bit of the stored cut-off bit in the permanent memory; using the remaining fault codes in the updated fault code except the first fault code to be stored as the second fault code to be stored, and adding the second fault code to be stored to the space starting from the starting address in the permanent memory; When the stored quantity is equal to the preset full storage quantity, adding the updated fault code to the space starting from the starting address in the permanent memory.
2. The method according to claim 1, characterized in that, The determining a target fault code according to the fault level, the component type, and the fault type includes: Determining a fault level bit of the target fault code according to the fault level; Determining a component type bit of the target fault code according to the component type; Determining a fault type bit of the target fault code according to the fault type; Determining the target fault code according to the fault level bit, the component type bit, and the fault type bit.
3. The method according to claim 1, wherein Each fault code stored in the temporary memory includes a first fault bit and a first count bit; Updating the fault codes stored in the temporary memory according to the target fault code includes: Traversing each fault code stored in the temporary memory; When the first fault bit in the currently traversed fault code is the same as the target fault code, updating the first count bit in the current fault code; When the first fault bit in each currently traversed fault code is not the same as the target fault code, determining the updated fault code according to the target fault code and a preset value; adding the updated fault code to the temporary memory.
4. The method according to claim 1, characterized in that, The method further includes: When the second fault bit in the currently traversed fault code is the same as the first fault bit in the fault code stored in the temporary memory, obtaining the sum of the corresponding second count bit and the corresponding first count bit; updating the second count bit to the sum value.
5. The method according to claim 1, wherein After determining the target fault code according to the fault level, the component type, and the fault type, it further includes: Clearing the target memory, where the target memory is used to store the fault information to be displayed; Storing the target fault code in the cleared target memory; Parsing the fault codes stored in the cleared target memory to obtain the parsed fault information, and using the parsed fault information as the fault information to be displayed; Sending the fault information to be displayed to the display device and controlling the display device to display the fault information to be displayed.
6. A fault information processing device, characterized in that, The device includes: A receiving module, configured to receive the current fault information reported by multiple vehicle components respectively, where the current fault information includes the fault level, the component type, and the fault type corresponding to the corresponding vehicle component; A determining module, configured to determine the target fault code according to the fault level, the component type, and the fault type; A first update module, configured to update the fault codes stored in the temporary memory according to the target fault code; A second update module, configured to update the fault codes stored in the permanent memory according to the fault codes stored in the temporary memory when detecting that the vehicle is powered off, and clear the temporary memory, where the fault codes stored in the permanent memory are used for fault information processing; Each fault code stored in the temporary memory includes a first fault bit and a first count bit; each fault code stored in the permanent memory includes a second fault bit and a second count bit; the second update module is further configured to traverse each fault code stored in the permanent memory; when the second fault bit in each currently traversed fault code is not the same as the first fault bit in the fault code stored in the temporary memory, using the corresponding fault code stored in the temporary memory as the updated fault code, and adding the updated fault code to the permanent memory; The second update module is further configured to obtain the stored quantity of fault codes stored in the permanent memory, the stored cut-off bit, and the target quantity of the updated fault codes; in the case that the stored quantity is less than a preset full storage quantity, determine the remaining quantity according to the stored quantity and the preset full storage quantity; in the case that the remaining quantity is greater than or equal to the target quantity, add the updated fault codes to the space in the permanent memory starting from the next bit after the stored cut-off bit; in the case that the remaining quantity is less than the target quantity, use the fault codes in the updated fault codes that match the remaining quantity as the first fault codes to be stored, and add the first fault codes to be stored to the space in the permanent memory starting from the next bit after the stored cut-off bit; use the remaining fault codes in the updated fault codes except the first fault codes to be stored as the second fault codes to be stored, and add the second fault codes to be stored to the space in the permanent memory starting from the starting address; in the case that the stored quantity is equal to the preset full storage quantity, add the updated fault codes to the space in the permanent memory starting from the starting address.
7. A computer device, comprising a memory and a processor, the memory storing 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 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Automatic train fault information display method
CN105015565A
method for writing data when engine is stop
KR1020010058214A