Vehicle snapshot information storage method and device
By monitoring the vehicle gear signal to determine the vehicle's power off intention, the ECU obtains and updates the snapshot information when the vehicle switches to the target gear, solving the problem that the ECU cannot save bus information when the vehicle is powered off, and realizing that the nearest vehicle snapshot information can be obtained when the bus fails, simplifying the troubleshooting process.
Patent Information
- Application Number
- CN202411931004.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-13
AI Technical Summary
When the vehicle is powered off, the ECU cannot save the bus information in time, resulting in the bus failure during the next power on, and the valid information of the last vehicle cannot be obtained, which increases the difficulty of troubleshooting.
By monitoring the vehicle gear signal, it is determined whether the vehicle switches to the target gear (such as parking gear or neutral gear) as a trigger condition for storing vehicle snapshot information. When the vehicle switches to the target gear, the ECU acquires the current snapshot information from the bus and compares it with the stored snapshot information. If it is inconsistent, the storage will be updated.
Ensure that the snapshot information can be effectively stored before the vehicle is powered off. Even if a bus failure occurs during the next power-on, the snapshot information of the vehicle closest to the time of failure can be obtained from the ECU to help after-sales service troubleshooting.
Smart Images

Figure CN119988312A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle information processing, and in particular to a method and device for storing vehicle snapshot information. Background Art
[0002] The ECU (Electronic Control Unit) receives and stores vehicle information through the bus. The vehicle information stored in the ECU can also be called snapshot information, which can be viewed when the vehicle fails. For an ECU that is only connected to the ON position, the ECU directly loses its power source when the vehicle is powered off, and the ECU does not have time to save the information on the bus. If a bus signal failure occurs at the beginning of the next vehicle power-on, the most recent valid information of the vehicle cannot be obtained from the ECU, which will increase the difficulty of vehicle troubleshooting. Therefore, how to store snapshot information in the ECU to provide valid information when a bus failure occurs becomes a technical problem that needs to be solved. Summary of the invention
[0003] In view of this, the present application provides a method and device for storing vehicle snapshot information, in which switching the vehicle to a target gear is used as a trigger condition for storing vehicle snapshot information. When a bus fault occurs when the vehicle is powered on, the ECU can provide valid vehicle snapshot information.
[0004] In a first aspect, an embodiment of the present invention provides a method for storing vehicle snapshot information, the method comprising:
[0005] Obtain vehicle gear position signal;
[0006] determining whether the vehicle is switched to a target gear according to the vehicle gear signal;
[0007] In response to the vehicle being switched to the target gear, acquiring current snapshot information of the vehicle from the bus;
[0008] Determining whether the current snapshot information is consistent with the snapshot information already stored in the electronic control unit ECU;
[0009] In response to the current snapshot information being inconsistent with the snapshot information already stored in the ECU, the current snapshot information is updated and stored in the ECU.
[0010] In some embodiments, the target gear is a parking gear or a neutral gear.
[0011] In some embodiments, judging whether the vehicle is switched to a target gear according to the vehicle gear signal includes:
[0012] Determining whether the vehicle gear position signal is normal;
[0013] In response to the vehicle gear position signal being normal, determining whether the vehicle is switched to a target gear position according to the vehicle gear position signal.
[0014] In some embodiments, the method further comprises:
[0015] In response to the vehicle gear position signal being abnormal, current snapshot information of the vehicle is acquired from the bus to store the current snapshot information.
[0016] In some embodiments, the vehicle gear position signal abnormality includes one or more of the following situations:
[0017] The message containing the vehicle gear position signal times out;
[0018] The checksum error of the message containing the vehicle gear position signal;
[0019] The cycle count of the message containing the vehicle gear position signal is wrong;
[0020] The vehicle gear position signal is in an inactive state.
[0021] In some embodiments, after acquiring the current snapshot information of the vehicle from the bus and before determining whether the current snapshot information is consistent with the snapshot information already stored by the ECU, the method further includes:
[0022] Determine whether the current snapshot information obtained from the bus is normal;
[0023] In response to the current snapshot information acquired from the bus being normal, it is determined whether the current snapshot information is consistent with the snapshot information already stored in the ECU.
[0024] In some embodiments, the method further comprises:
[0025] In response to the current snapshot information obtained from the bus being abnormal, determining whether valid snapshot information has been stored in the vehicle memory since the ECU was powered on last time until the current time;
[0026] If valid snapshot information has been stored in the vehicle memory, the valid snapshot information closest to the current time in the vehicle memory is used as the current snapshot information.
[0027] In a second aspect, an embodiment of the present invention provides a storage device for vehicle snapshot information, wherein the storage device is deployed in an ECU and includes: an acquisition module, a judgment module, and a storage module, wherein:
[0028] The acquisition module is used to acquire the vehicle gear position signal;
[0029] The judging module is used to judge whether the vehicle is switched to the target gear according to the vehicle gear signal;
[0030] The acquisition module is further configured to acquire current snapshot information of the vehicle from the bus in response to the vehicle switching to the target gear position;
[0031] The judging module is further used to judge whether the current snapshot information is consistent with the snapshot information already stored in the ECU;
[0032] The storage module is used for updating the current snapshot information to the storage information of the ECU in response to the inconsistency between the current snapshot information and the snapshot information already stored in the ECU.
[0033] In a third aspect, an embodiment of the present invention provides a storage device for vehicle snapshot information, comprising: a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the storage device for vehicle snapshot information executes the method described in the first aspect or any one of the first aspects.
[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the method described in the first aspect or any one of the first aspects.
[0035] The method and device for storing vehicle snapshot information according to the embodiment of the present invention at least have the following features:
[0036] Beneficial effects:
[0037] In an embodiment of the present invention, switching the vehicle to the target gear position is used as a trigger condition for obtaining the vehicle snapshot information. When the condition is met, it can be predicted that the vehicle intends to power off the entire vehicle, that is, the current snapshot information of the vehicle is obtained from the bus, and the current snapshot information of the vehicle is compared with the snapshot information already stored in the ECU. If the current snapshot information of the vehicle is inconsistent with the snapshot information already stored in the ECU, the snapshot information in the ECU is updated so that the latest snapshot information of the vehicle is stored in the ECU. Through the method of the embodiment of the present invention, the snapshot information before the vehicle is powered off can be stored. If a bus fault occurs as soon as the vehicle is powered on next time, the vehicle snapshot information closest to the fault time can still be obtained from the ECU, which provides assistance for after-sales troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flow chart of a method for storing vehicle snapshot information provided by an embodiment of the present invention;
[0039] Figure 2 A flow chart of a method for storing vehicle snapshot information provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a storage device for vehicle snapshot information provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the structure of a storage device for vehicle snapshot information provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0043] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0044] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0045] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0046] As shown in Table 1, according to the different power supply methods, the ECU nodes in the vehicle can be roughly divided into KL30 nodes and KL15 nodes. The KL30 node is connected to the normal power of the battery and the ON power of the whole vehicle. The KL15 node is further divided into the node connected to the normal power of the battery and the node only connected to the ON power of the whole vehicle. For the KL30 node and the KL15 node connected to the normal power of the battery, the battery can still maintain the charged state for a period of time after the ON power is disconnected, so there is enough time to save the bus information after the ON power is disconnected. For the KL15 node that is only connected to the ON power of the whole vehicle, it is dormant when the power is off, and there is no time to save the bus information after the ON power is turned off.
[0047]
[0048] Table 1 Classification of vehicle node power supply methods
[0049] When a vehicle fails, it is necessary to record the vehicle information at the time of the failure while recording the fault code, which is called a fault snapshot. The vehicle information in the fault snapshot is transmitted through the bus signal. If the bus fails, the ECU cannot obtain the vehicle information at the time of the failure. The ECU is required to record the vehicle information most recently from the time of the failure for reference when after-sales troubleshooting. For an ECU that is only connected to the ON gear, the ECU directly loses the power source when the vehicle is powered off, and the ECU has no time to save the bus information. If the vehicle has a bus failure at the beginning of the next power-on, the ECU cannot obtain the most recent vehicle information. The fault code generated at this time has no snapshot information, which increases the difficulty of after-sales analysis. The solution strategies proposed in the relevant technology include: the snapshot information is filled with all 0xFF fault values, the bus information is saved in real time at intervals, or a large capacitor is added to the ECU. However, the use of all 0xFF fault values is equivalent to a snapshot without a fault code, which cannot provide effective information for troubleshooting vehicle faults. The interval time in the real-time bus information saving strategy is difficult to grasp. If the interval time is too long, the desired effect will not be achieved. If the interval time is too short, the ECU will be frequently updated, affecting the life of the ECU. Adding a large capacitor inside the ECU involves hardware changes, which not only increases the cost of parts, but also requires a series of tests and verifications, extending the project cycle.
[0050] To solve the above technical problems, an embodiment of the present invention provides a method for storing vehicle snapshot information. The method of the embodiment of the present invention utilizes the logic operation of the existing bus signal of the vehicle, and realizes the storage of vehicle snapshot information by increasing the monitoring of the bus signal and its own judgment logic of the ECU without changing the ECU hardware.
[0051] The following first describes the design ideas of the method of the embodiment of the present invention:
[0052] Normally, when a vehicle breaks down, in addition to recording the fault code, the ECU also needs to record vehicle information, including voltage, speed, mileage, and time. Among them, except for the voltage, which is collected by the ECU through its own hard wires, other information comes from the bus message. When a bus failure occurs, the information from the bus may be lost, invalid, or erroneous. The ECU needs to record the valid information of the vehicle closest to the failure time to provide assistance for after-sales maintenance. In order to prevent a bus failure from occurring as soon as the vehicle is powered on, the ECU is required to store the bus information every time the power is turned off to ensure that the vehicle information can be retrieved normally when the vehicle is powered on next time. Therefore, for the ECU that cannot save the bus information when it is powered off, it is necessary to find a trigger condition that is closest to the power off of the entire vehicle so that it can store the bus information.
[0053] Combined with the vehicle usage habits, there is usually a gear switching operation before the vehicle is powered off after use, so the ECU can predict the power-off status of the vehicle by monitoring the gear signal from the bus. When the ECU detects that the vehicle has switched to the target gear, it determines that the vehicle has the intention to power off the entire vehicle, and at this time the vehicle's voltage, speed, mileage and other information are also relatively stable. Based on this, the strategy for storing vehicle snapshot information in an embodiment of the present invention includes: switching the vehicle to the target gear as a trigger condition for storing bus information. When this condition is met, the ECU obtains the current snapshot information of the vehicle from the bus for comparison and storage.
[0054] See also Figure 1 , is a flow chart of a method for storing vehicle snapshot information provided by an embodiment of the present invention. Figure 1 As shown, the method of the embodiment of the present invention executed after the ECU is powered on includes:
[0055] 101, obtaining a vehicle gear position signal. Optionally, the ECU may obtain a vehicle gear position signal from the bus at a certain time interval.
[0056] 102, judging whether the vehicle has switched to the target gear according to the vehicle gear signal. The target gear may be the parking gear (P gear) or the neutral gear (N gear). If the vehicle switches to the P gear or the N gear, it indicates that the vehicle intends to power off the vehicle, and then executing step 103; if the vehicle has not switched to the target gear, then continue to monitor the vehicle gear signal and obtain the vehicle gear signal at a certain time interval.
[0057] 103, obtaining the current snapshot information of the vehicle from the bus.
[0058] 104, determine whether the current snapshot information of the vehicle is consistent with the snapshot information already stored in the ECU. If the current snapshot information of the vehicle is consistent with the snapshot information already stored in the ECU, there is no need to update the snapshot information already stored in the ECU, and the ECU continues to monitor the vehicle gear position signal and obtains the vehicle gear position signal at a certain time interval. If the current snapshot information of the vehicle is inconsistent with the snapshot information already stored in the ECU, execute step 105.
[0059] 105, update and store the current snapshot information in the ECU.
[0060] 106, determine whether the ECU is powered off. If the ECU is powered off, the method ends; if the ECU is not powered off, continue to monitor the vehicle gear position signal and obtain the vehicle gear position signal at a certain time interval.
[0061] In an embodiment of the present invention, switching the vehicle to the target gear position is used as a trigger condition for obtaining the vehicle snapshot information. When the condition is met, it can be predicted that the vehicle intends to power off the entire vehicle, that is, the current snapshot information of the vehicle is obtained from the bus, and the current snapshot information of the vehicle is compared with the snapshot information already stored in the ECU. If the current snapshot information of the vehicle is inconsistent with the snapshot information already stored in the ECU, the snapshot information in the ECU is updated so that the latest snapshot information of the vehicle is stored in the ECU. Through the method of the embodiment of the present invention, the snapshot information before the vehicle is powered off can be stored. If a bus fault occurs as soon as the vehicle is powered on next time, the vehicle snapshot information closest to the fault time can still be obtained from the ECU, which provides assistance for after-sales troubleshooting.
[0062] Moreover, this method of the embodiment of the present invention does not require the modification of ECU hardware, thus reducing development costs. Furthermore, the method of the embodiment of the present invention stores vehicle snapshot information based on the situation closest to the actual power-off situation, which minimizes the repeated writing of the ECU and can increase the service life of the ECU. The method of the embodiment of the present invention unifies the snapshot information storage strategy of various ECU nodes in the vehicle, providing consistency support for after-sales troubleshooting.
[0063] In an embodiment of the present invention, the ECU predicts the power-off state of the vehicle by monitoring the vehicle gear signal. When the vehicle switches to P gear or N gear, it indicates that the vehicle intends to power off the entire vehicle. In some embodiments, for automatic transmission models, switching the vehicle from a non-P gear to a P gear is used as a trigger condition for the ECU to store the vehicle snapshot information. In some embodiments, for manual transmission models, switching the vehicle from a non-N gear to an N gear is used as a trigger condition for the ECU to store the vehicle snapshot information. When the conditions are met, the ECU executes the storage process of the vehicle snapshot information.
[0064] The following will take the automatic transmission model as an example to explain the storage method of vehicle snapshot information. Figure 2 As shown, the processing steps of the method of the embodiment of the present invention executed after the ECU is powered on include:
[0065] 201, obtaining a vehicle gear position signal.
[0066] 202, determine whether the vehicle gear position signal is normal.
[0067] After acquiring the vehicle gear position signal, the embodiment of the present invention first determines whether the vehicle gear position signal is normal. Only when the vehicle gear position signal is normal, the process of storing snapshot information triggered by the vehicle gear position signal is meaningful.
[0068] The vehicle gear position signal being normal includes: the message containing the vehicle gear position signal being normal, the message validity being valid, and the message checksum and rolling counter being correct.
[0069] Among them, the abnormal vehicle gear position signal includes one or more of the following situations:
[0070] The message containing the vehicle gear position signal has timed out, the checksum of the message containing the vehicle gear position signal is wrong, the cycle count of the message containing the vehicle gear position signal is wrong, or the vehicle gear position signal is in an invalid state.
[0071] In the embodiment of the present invention, when the vehicle gear position signal is normal, step 203 is continued. When the vehicle gear position signal is abnormal, since it is impossible to determine the current state of the vehicle gear position, in order to minimize the risk of information loss, the abnormal vehicle gear position signal is defined as being equivalent to power off. That is, when the vehicle gear position signal is abnormal, the ECU immediately performs a storage operation of the vehicle fault information, that is, executes step 204.
[0072] 203, in response to the vehicle gear position signal being normal, determine whether the vehicle is switched from a non-P gear to a P gear according to the vehicle gear position signal. If the vehicle is switched from a non-P gear to a P gear, execute step 204. If the vehicle is not switched from a P gear to a P gear, continue to monitor the vehicle gear position signal, and obtain the vehicle gear position signal at a certain time interval.
[0073] 204, obtaining the current snapshot information of the vehicle from the bus.
[0074] 205 , determining whether the current snapshot information of the vehicle obtained from the bus is normal.
[0075] In the embodiment of the present invention, the current snapshot information of the vehicle may include vehicle speed, mileage or time, etc. The abnormality of the current snapshot information of the vehicle includes: the message containing the vehicle speed, mileage or time, etc. is abnormal. The abnormality of the message containing the vehicle speed, mileage or time, etc. includes: message timeout, message checksum error, message cycle count error, message invalid state, etc.
[0076] In the embodiment of the present invention, after obtaining the current snapshot information of the vehicle from the bus, it is first necessary to determine whether the current snapshot information of the vehicle is normal. If the current snapshot information of the vehicle is normal, then continue to execute step 207. If the current snapshot information of the vehicle is abnormal, it is necessary to handle it according to the situation, and the details can refer to the description of step 206.
[0077] 206 , in response to the current snapshot information obtained from the bus being abnormal, determining whether valid snapshot information has been stored in the vehicle memory since the ECU was last powered on until the current time.
[0078] If the vehicle memory has stored valid snapshot information, the valid snapshot information closest to the current time in the vehicle memory is used as the current snapshot information and the process jumps to step 207. If the vehicle memory has not stored valid snapshot information, the vehicle gear signal continues to be monitored and the vehicle gear signal is acquired at a certain time interval.
[0079] 207 , determining whether the current snapshot information of the vehicle is consistent with the snapshot information already stored in the ECU.
[0080] If the current snapshot information of the vehicle is consistent with the snapshot information already stored in the ECU, there is no need to update the snapshot information already stored in the ECU. The ECU continues to monitor the vehicle gear position signal and obtains the vehicle gear position signal at a certain time interval.
[0081] If the current snapshot information of the vehicle is inconsistent with the snapshot information already stored in the ECU, step 208 is executed.
[0082] 208, update and store the current snapshot information in the ECU.
[0083] 209, determine whether the ECU is powered off. If the ECU is powered off, the method ends; if the ECU is not powered off, continue to monitor the vehicle gear position signal and obtain the vehicle gear position signal at a certain time interval.
[0084] The method of the embodiment of the present invention can realize effective storage of bus information, and can solve the problem that effective snapshot information of the vehicle cannot be obtained when a bus fault occurs as soon as the vehicle is powered on.
[0085] Figure 2 The method shown takes an automatic transmission vehicle as an example to illustrate the storage method of the vehicle snapshot information. For a manual transmission vehicle, the judgment condition of step 203 is modified as follows: judging whether the vehicle is switched from a non-N gear to an N gear, if so, executing step 204; if not, continuing to monitor the vehicle gear position signal, and obtaining the vehicle gear position signal at a certain time interval. For other steps, refer to the execution steps of the automatic transmission vehicle.
[0086] Corresponding to the above method, an embodiment of the present invention provides a storage device for vehicle snapshot information, such as Figure 3 As shown, the device includes: an acquisition module 301, a judgment module 302 and a storage module 303, wherein:
[0087] The acquisition module 301 is used to acquire a vehicle gear position signal.
[0088] The judgment module 302 is used to judge whether the vehicle is switched to the target gear according to the vehicle gear signal.
[0089] The acquisition module 301 is further configured to acquire current snapshot information of the vehicle from the bus in response to the vehicle switching to the target gear.
[0090] The judgment module 302 is further used to judge whether the current snapshot information is consistent with the snapshot information already stored in the ECU.
[0091] The storage module 303 is used to update the current snapshot information to the storage information of the ECU in response to the inconsistency between the current snapshot information and the snapshot information already stored in the ECU.
[0092] The storage device for vehicle snapshot information of the embodiment of the present invention can execute the storage method for vehicle snapshot information of the embodiment shown above. For the parts not described in detail in the embodiment of the present invention, reference can be made to the relevant description of the method embodiment. The execution process and technical effects of the technical solution can be referred to the description in the method embodiment, which will not be repeated here.
[0093] See also Figure 4 , is a schematic diagram of a storage device for vehicle snapshot information provided by an embodiment of the present invention. The storage device for vehicle snapshot information may be an ECU in a vehicle. Figure 4 As shown, the storage device 400 for the vehicle snapshot information may include: a processor 401, a memory 402, and a communication unit 403. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the storage device for the vehicle snapshot information shown in the figure does not constitute a limitation on the embodiment of the present application. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0094] The communication unit 403 is used to establish a communication channel so that the storage device for the vehicle snapshot information can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0095] The processor 401 is the control center of the storage device for the vehicle snapshot information. It uses various interfaces and lines to connect the various parts of the entire device, and executes various functions and / or processes data of the storage device for the vehicle snapshot information by running or executing software programs, instructions, and / or modules stored in the memory 402, and calling the data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 401 may include a central processing unit (CPU), a microcontroller unit (MCU), etc.
[0096] The memory 402 is used to store the execution instructions of the processor 401. The memory 402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 402 are executed by the processor 401, the storage device 400 of the vehicle snapshot information can execute the storage method of the vehicle snapshot information in the embodiment of the present invention.
[0097] In a specific implementation, the present application also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all steps of the method for storing vehicle snapshot information provided by the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0098] In a specific implementation, the present application also provides a computer program product, wherein the computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer executes part or all of the steps of the method for storing vehicle snapshot information provided by the present application.
[0099] The embodiment of the present application also provides a non-temporary computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the vehicle snapshot information storage method provided in the embodiment of the present application.
[0100] The above-mentioned non-temporary computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read Only Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (ErasableProgrammable Read Only Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0101] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0102] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. A method for storing vehicle snapshot information, characterized in that: The method comprises: Obtain vehicle gear position signal; determining whether the vehicle is switched to a target gear according to the vehicle gear signal; In response to the vehicle being switched to the target gear, acquiring current snapshot information of the vehicle from the bus; Determining whether the current snapshot information is consistent with the snapshot information already stored in the electronic control unit ECU; In response to the current snapshot information being inconsistent with the snapshot information already stored in the ECU, the current snapshot information is updated and stored in the ECU.
2. The method according to claim 1, characterized in that The target gear position is a parking gear position or a neutral gear.
3. The method according to claim 1, characterized in that The step of determining whether the vehicle is switched to a target gear according to the vehicle gear signal includes: Determining whether the vehicle gear position signal is normal; In response to the vehicle gear position signal being normal, determining whether the vehicle is switched to a target gear position according to the vehicle gear position signal.
4. The method according to claim 3, characterized in that The method further comprises: In response to the vehicle gear position signal being abnormal, current snapshot information of the vehicle is acquired from the bus to store the current snapshot information.
5. The method according to claim 3 or 4, characterized in that: The vehicle gear position signal abnormality includes one or more of the following situations: The message containing the vehicle gear position signal times out; The checksum error of the message containing the vehicle gear position signal; The cycle count of the message containing the vehicle gear position signal is wrong; The vehicle gear position signal is in an inactive state.
6. The method according to claim 1, characterized in that After acquiring the current snapshot information of the vehicle from the bus, and before determining whether the current snapshot information is consistent with the snapshot information already stored in the ECU, the method further includes: Determine whether the current snapshot information obtained from the bus is normal; In response to the current snapshot information acquired from the bus being normal, it is determined whether the current snapshot information is consistent with the snapshot information already stored in the ECU.
7. The method according to claim 6, characterized in that The method further comprises: In response to the current snapshot information obtained from the bus being abnormal, determining whether valid snapshot information has been stored in the vehicle memory since the ECU was powered on last time until the current time; If valid snapshot information has been stored in the vehicle memory, the valid snapshot information closest to the current time in the vehicle memory is used as the current snapshot information.
8. A storage device for vehicle snapshot information, characterized in that: The storage device is deployed in the ECU, and includes: an acquisition module, a judgment module and a storage module, wherein: The acquisition module is used to acquire the vehicle gear position signal; The judging module is used to judge whether the vehicle is switched to the target gear according to the vehicle gear signal; The acquisition module is further configured to acquire current snapshot information of the vehicle from the bus in response to the vehicle switching to the target gear position; The judging module is further used to judge whether the current snapshot information is consistent with the snapshot information already stored in the ECU; The storage module is used for updating the current snapshot information to the storage information of the ECU in response to the inconsistency between the current snapshot information and the snapshot information already stored in the ECU.
9. A storage device for vehicle snapshot information, characterized in that: include: A memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the storage device for the vehicle snapshot information executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.