Vehicle diagnosis method and device, vehicle and storage medium

By reading the reset flag and target flag of the vehicle controller, power supply abnormalities can be identified and diagnosed, solving the problem of difficulty in identifying vehicle power supply abnormalities and ensuring the normal operation of the vehicle controller.

CN119087988BActive Publication Date: 2026-06-23GREAT WALL MOTOR CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2024-09-29
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the existing technology, vehicle power supply abnormalities are sporadic events with short durations, making them difficult to identify accurately and affecting the normal operation of the vehicle controller.

Method used

By reading the reset flag and target flag of the target controller, the status of the power supply pins can be determined, and power supply abnormalities can be identified and diagnosed.

Benefits of technology

It enables timely identification and diagnosis of abnormal vehicle power supply, ensuring the normal operation of the vehicle controller and preventing safety accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119087988B_ABST
    Figure CN119087988B_ABST
Patent Text Reader

Abstract

The application provides a vehicle diagnosis method and device, a vehicle and a storage medium. The method comprises the following steps: when a starting instruction of a target controller in the vehicle is detected, a reset flag bit of the target controller is acquired; whether the target controller is abnormal is determined based on the reset flag bit; if the target controller is abnormal, a target flag bit stored by the target controller is read; and a power supply pin of the target controller is diagnosed based on the target flag bit. The method can identify power supply abnormalities of the vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicles, and more specifically, to a vehicle diagnostic method, apparatus, vehicle, and storage medium in the field of vehicles. Background Technology

[0002] In the existing technology, vehicles are equipped with various controllers to realize the control functions of the vehicle; the normal operation of the controller requires the normal power supply of the vehicle; if a power supply abnormality occurs during the vehicle's operation, it will have a significant impact on the control function of the vehicle's controller; therefore, when a power supply abnormality occurs in the vehicle, it is necessary to identify and repair the power supply abnormality in a timely manner.

[0003] However, power supply anomalies are sporadic events with short durations, making them difficult to identify; therefore, how to identify power supply anomalies in vehicles is a technical problem that needs to be solved. Summary of the Invention

[0004] This application provides a vehicle diagnostic method, apparatus, vehicle, and storage medium. When an abnormality is detected in the vehicle's controller, the method determines the target power supply pin in the target controller that is in an abnormal state based on the target flag bit read from the target controller, thereby enabling the identification of power supply abnormalities in the vehicle.

[0005] Firstly, a vehicle diagnostic method is provided, the method comprising:

[0006] When a start command is detected from the target controller in the vehicle, the reset flag bit of the target controller is acquired; wherein, the reset flag bit is used to indicate the status information of the target controller;

[0007] Based on the reset flag, determine whether there is an anomaly in the target controller;

[0008] If the target controller has an anomaly, read the target flag bit stored in the target controller; the target flag bit is used to indicate the status of the power supply pin of the target controller.

[0009] Diagnose the power supply pins of the target controller based on the target flag bit.

[0010] In one implementation, the state information of the target controller includes whether the target controller is in a dormant state or in a running state.

[0011] In the embodiments of this application, when a start command of the target controller in the vehicle is detected, it is determined whether the target controller is in an abnormal state based on the reset flag bit of the target controller in the vehicle. Since the reset flag bit is used to indicate the status information of the target controller, including whether the target controller is in a sleep state or a running state, the status information of the target controller will change accordingly when the start command of the target controller is detected. Therefore, based on the status information of the target controller, it is possible to determine whether the target controller is abnormal. If the target controller is abnormal, it indicates that the target controller may have a power supply abnormality. Therefore, it is necessary to diagnose the power supply pins through the target flag bit to determine whether the target controller of the vehicle has a power supply abnormality. Since power supply abnormalities are intermittent events with short durations, they are difficult to identify accurately. Therefore, this solution diagnoses the power supply pins through the target flag bit, that is, it identifies the status of the power supply pins through the target flag bit, thereby determining whether the target controller has a power supply abnormality through the status of the power supply pins. That is, it realizes the identification of the vehicle's power supply abnormality; and when the target controller of the vehicle is abnormal, it diagnoses the power supply pin that caused the power supply abnormality based on the target flag bit.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the target flag is stored in the storage area of ​​the target controller, and before reading the target flag stored in the target controller, the following steps are also included:

[0013] Obtain the current voltage of the power supply pin of the target controller;

[0014] Determine whether the power supply pin is in an abnormal state based on the current voltage of the power supply pin;

[0015] If the power supply pin is in an abnormal state, the target flag bit corresponding to the power supply pin in the storage area will be set; different power supply pins correspond to different target flag bits in the storage area.

[0016] In the embodiments of this application, the current voltage of the power supply pin of the target controller is used to determine whether the power supply pin is in an abnormal state; if the power supply pin is in an abnormal state, the target flag bit corresponding to the power supply pin in the storage area is set; since the target flag bit of each power supply pin is different, the state of each power supply pin can be determined based on the target flag bit, thereby realizing the identification and diagnosis of vehicle power supply abnormalities.

[0017] Combining the first aspect and the above implementation methods, in some implementation methods of the first aspect, determining whether the power supply pin is in an abnormal state based on the current voltage of the power supply pin includes:

[0018] Determine the maximum and minimum voltage thresholds for the power supply pins;

[0019] If the current voltage of the power supply pin is less than the minimum voltage threshold or greater than the maximum voltage threshold, the power supply pin is determined to be in an abnormal state.

[0020] In the embodiments of this application, the power supply pin is used to supply power to the target controller. If the voltage of the power supply pin is abnormal, it will cause the vehicle's power supply to be abnormal. Since the maximum voltage threshold and minimum voltage threshold are different for different power supply pins, the state of the power supply pin is identified based on the current voltage of the power supply pin, the maximum voltage threshold and the minimum voltage threshold of the power supply pin. This ensures that the state of each power supply pin in the target controller can be accurately determined. When the current voltage of the power supply pin is detected to be less than the minimum voltage threshold or greater than the maximum voltage threshold, it is determined that the power supply pin is in an abnormal state.

[0021] In conjunction with the first aspect and the above implementation methods, some implementation methods of the first aspect also include:

[0022] Obtain the correspondence between each power supply pin and the target flag bit;

[0023] Based on the target flag bit, diagnose the power supply pins of the target controller, including:

[0024] Based on the value of the target flag bit, determine whether there is a power supply abnormality in the target controller;

[0025] If the target controller has a power supply abnormality, the target power supply pin in the target controller that is in an abnormal state is determined based on the correspondence and the target flag bit.

[0026] In the embodiments of this application, when determining a target power supply pin in an abnormal state, the correspondence between each power supply pin and a target flag bit is obtained; that is, each power supply pin corresponds to a target flag bit; since the target flag bit corresponding to the power supply pin in an abnormal state is set, it is possible to determine whether the target controller has a power supply abnormality based on the value of the target flag bit; if a power supply abnormality exists, the target power supply pin in an abnormal state is determined based on the correspondence and the target flag bit; thereby realizing the diagnosis of the power supply pins in the target controller.

[0027] In combination with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the target controller includes a register connected to a backup power supply;

[0028] Read the target flag bits stored in the target controller, including:

[0029] The target flag bit is read from the register of the target controller; the register is powered by a backup power supply.

[0030] In the embodiments of this application, the target flag bit stored in the register of the target controller is read; the target controller includes a register, and the register is connected to a backup power supply; the register is powered by the backup power supply to ensure that the target flag bit stored in the register is not lost when the vehicle is powered off or when there is a power supply abnormality in the target controller; the target flag bit stored in the register can be read; that is, it is ensured that when there is a power supply abnormality in the target controller, the target power supply pin that caused the power supply abnormality can be determined based on the target flag bit stored in the register.

[0031] Combining the first aspect and the above implementation methods, in some implementation methods of the first aspect, determining whether the target controller is in an abnormal state based on the reset flag bit includes:

[0032] If the reset flag indicates that the target controller is in sleep mode, determine the duration of the target controller's sleep mode; if the duration is longer than the preset duration, determine that the target controller is malfunctioning.

[0033] Alternatively, if the reset flag indicates that the target controller is in operation, it is determined that there is an abnormality in the target controller.

[0034] In the embodiments of this application, when the start command of the target controller is detected, the state of the target controller will change from the sleep state to the running state; therefore, if the reset flag indicates that the target controller is continuously in the sleep state and the duration of the sleep state is longer than the preset duration, it indicates that the target controller is abnormal; or, if the reset flag indicates that the target controller is in the running state, it is determined that the target controller is abnormal.

[0035] In conjunction with the first aspect and the above implementation methods, some implementation methods of the first aspect also include:

[0036] Determine the target number of power supply pins that are in an abnormal state.

[0037] Determine the alert level corresponding to the target quantity based on the target quantity;

[0038] Output the prompt message corresponding to the prompt level; the prompt message is used to report the target power supply pin that is in an abnormal state.

[0039] In the embodiments of this application, the target number of target power supply pins in an abnormal state is determined; and the warning level corresponding to the target number is determined; since the more target power supply pins there are, the greater the impact on the target controller; therefore, when determining the target power supply pins, the warning information corresponding to the warning level is output; to ensure that the power supply abnormality of the vehicle can be detected in a timely manner; and to output the corresponding warning information according to the severity of the power supply abnormality, so that the user can take corresponding measures according to the warning information to avoid vehicle safety accidents.

[0040] Secondly, a vehicle diagnostic device is provided, the device comprising:

[0041] The acquisition module is used to acquire the reset flag bit of the target controller when a start command of the target controller in the vehicle is detected; wherein, the reset flag bit is used to indicate the status information of the target controller;

[0042] The determination module is used to determine whether there is an anomaly in the target controller based on the reset flag bit;

[0043] The reading module is used to read the target flag bit stored in the target controller if there is an abnormality in the target controller; the target flag bit is used to indicate the status of the power supply pin of the target controller.

[0044] The diagnostic module is used to diagnose the power supply pins of the target controller based on the target flag bit.

[0045] Thirdly, a vehicle is provided, including a memory and a processor, the memory for storing executable program code, and the processor for calling and running the executable program code from the memory, causing the vehicle to perform the methods of the first aspect or any possible implementation thereof.

[0046] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0047] Fifthly, a computer-readable storage medium is provided that stores instructions which, when executed on a vehicle, cause the vehicle to perform the method described in the first aspect or any possible implementation thereof. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the main control chip of a controller provided in an embodiment of this application;

[0049] Figure 2 This is a schematic flowchart of a vehicle diagnostic method provided in an embodiment of this application;

[0050] Figure 3 This is a schematic flowchart of another vehicle diagnostic method provided in the embodiments of this application;

[0051] Figure 4 This is a schematic flowchart of another vehicle diagnostic method provided in the embodiments of this application;

[0052] Figure 5This is a schematic diagram of the structure of a vehicle diagnostic device provided in an embodiment of this application;

[0053] Figure 6 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation

[0054] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0055] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0056] In existing technologies, vehicles are equipped with various controllers to control the vehicle. The normal operation of these controllers requires a stable power supply from the vehicle. If a power supply anomaly occurs during vehicle operation, it will significantly impact the control functions of the vehicle's controllers. Therefore, when a power supply anomaly occurs, it is necessary to promptly identify and repair it. However, power supply anomalies are intermittent events with short durations, making accurate identification difficult. Therefore, how to identify vehicle power supply anomalies is a technical problem that needs to be solved.

[0057] In view of this, this application provides a vehicle diagnostic method, apparatus, vehicle, and storage medium. Through the embodiments of this application, when an abnormality is detected in the vehicle's controller, the target power supply pin in the target controller that is in an abnormal state is determined based on the target flag bit of the target controller read; thereby, the vehicle's power supply abnormality can be identified.

[0058] Figure 1 This is a schematic diagram of the main control chip of a controller provided in an embodiment of this application.

[0059] For example, such as Figure 1 As shown, the main control chip 100 of the vehicle is the core component of the controller in the vehicle; the main control chip 100 includes a register 101 and pins 102.

[0060] The main control chip 100 is used to process and control various functions in the vehicle; the register 101 is composed of a combination of flip-flops with storage function and is used to store binary code; the pin 102 is a connection port on an integrated circuit, microcontroller or other electronic component, used to exchange data with external devices, transmit control signals and perform other functions.

[0061] For example, each flip-flop in the register can store 1 bit of binary code, so a register that stores n bits of binary code needs to be constructed using n flip-flops; the n bits of binary code in the register correspond to the n target flag bits stored in the register.

[0062] For example, such as Figure 1 The main control chip shown includes multiple pins. According to the different functions of the pins, the pins of the main control chip can be divided into data pins, communication pins, and power supply pins, etc. Among them, data pins are used to transmit data signals, such as sensor data and control signals; communication pins are used to communicate with other devices; power supply pins are used to provide power, usually used to power electronic devices or modules.

[0063] It should be understood that the main control chip contains multiple power supply pins. When a power supply pin of the main control chip malfunctions, it will cause an abnormal power supply to the vehicle's controller; that is, the vehicle's controller will not function properly. Therefore, when a fault is detected in the vehicle's controller, it is necessary to identify the target power supply pin that is malfunctioning in order to identify and diagnose the vehicle's power supply abnormality. The following section will combine... Figures 2 to 4 The diagnostic method for vehicle power supply abnormalities provided in the embodiments of this application will be described in detail.

[0064] Figure 2 This is a schematic flowchart of a vehicle diagnostic method provided in an embodiment of this application.

[0065] For example, Figure 2 The method 200 shown can be derived from Figure 1 The main control chip in the system can execute the commands; or the vehicle with the aforementioned main control chip can execute the commands; or the processor in the vehicle can execute the commands.

[0066] like Figure 2 As shown, the vehicle diagnostic method 200 includes S210 to S240, which are described in detail below.

[0067] S210: When a start command for the target controller in the vehicle is detected, the reset flag bit of the target controller is acquired.

[0068] The reset flag is stored in a specific area of ​​the main control chip of the target controller and is used to indicate the status information of the target controller. The reset flag is a binary flag. When the reset flag is 0, it indicates that the vehicle's target controller is in a sleep state. When the reset flag is 1, it indicates that the vehicle's target controller is in a running state.

[0069] For example, the target controller is a controller in a vehicle that is responsible for managing specific functions or systems of the vehicle. The controllers achieve precise control of various parts of the vehicle through their respective hardware and software to ensure the normal operation of the vehicle. The target controller includes, but is not limited to: engine control unit, body control module, brake control unit, air conditioning control unit, seat control unit, headlight control unit, etc.

[0070] For example, different target controllers may trigger start commands in different ways; for instance, turning on the vehicle's ignition switch triggers a start command for the engine control unit; when a sensor detects rain, it triggers a start command for the wiper controller; when a user presses a specific button or switch, it triggers a start command for the headlight control unit and seat control unit; and when the door is unlocked wirelessly via the remote key, it triggers a start command for the door control unit.

[0071] It should be noted that this solution does not limit the method of triggering the start command of the target controller.

[0072] For example, when a start command is detected from the target controller in the vehicle, the reset flag of the target controller is obtained. That is, the reset flag of the target controller is read before the start command is detected and the target controller is started.

[0073] S220, based on the reset flag bit, determines whether there is an abnormality in the target controller.

[0074] In one implementation, determining whether the target controller is in an abnormal state based on a reset flag bit includes:

[0075] If the reset flag indicates that the target controller is in a sleep state, determine the duration of the sleep state; if the duration is longer than the preset duration, determine that the target controller is malfunctioning; or, if the reset flag indicates that the target controller is in a running state, determine that the target controller is malfunctioning.

[0076] For example, when the target controller is in a normal state, if a start command is detected, the target flag will change from a dormant state to an active state. Therefore, when a start command of the target controller in the vehicle is detected, if the reset flag indicates that the target controller remains in a dormant state and does not change to an active state within a preset time, it indicates that the target controller is abnormal. Alternatively, if the reset flag indicates that the target controller was in an active state before the target controller was started, it indicates that the target controller is abnormal.

[0077] For example, with a preset duration of 500ms, when a start command is detected from the target controller in the vehicle, the reset flag of the target controller is acquired before the target controller starts. If the acquired reset flag is 1, it indicates that the target controller is in running state, which means that the target controller is malfunctioning. If the acquired reset flag is 0, it indicates that the target controller is in sleep state. Then, it is further determined whether the reset flag of the target controller changes from 0 to 1 within 500ms after the start command is detected; that is, whether the target controller responds to the start command within 500ms and changes from sleep state to running state. If the target controller remains in sleep state for a duration longer than 500ms, it means that the target controller has not responded correctly to the start command, that is, the target controller is malfunctioning.

[0078] It should be noted that the above preset duration is for illustrative purposes only, and this application does not limit the setting of the preset duration.

[0079] In the embodiments of this application, when the start command of the target controller is detected, the state of the target controller will change from the sleep state to the running state; therefore, if the reset flag indicates that the target controller is continuously in the sleep state and the duration of the sleep state is longer than the preset duration, it indicates that the target controller is abnormal; or, if the reset flag indicates that the target controller is in the running state, it indicates that the target controller has not changed from the sleep state to the running state; therefore, it is determined that the target controller is abnormal.

[0080] S230, if the target controller has an abnormality, read the target flag bit stored in the target controller.

[0081] The target flag is stored in the storage area of ​​the target controller and is used to indicate the state of the power supply pin of the target controller. The target flag consists of multiple flag bits, which are equivalent to bits in the data. That is, the target flag consists of multiple bits. Each power supply pin corresponds to one bit in the target flag.

[0082] It should be noted that the bit is a binary number. When there is an abnormality in the power supply pin, the corresponding bit of the power supply pin is 1, and when there is no abnormality in the power supply pin, the corresponding bit of the power supply pin is 0.

[0083] For example, before reading the target flag stored in the target controller, the target flag needs to be generated first. The method for generating the target flag is described below.

[0084] In one implementation, before reading the target flag stored in the target controller, the following is also included:

[0085] Obtain the current voltage of the power supply pin of the target controller; based on the current voltage of the power supply pin, determine whether the power supply pin is in an abnormal state;

[0086] If the power supply pin is in an abnormal state, the target flag bit corresponding to the power supply pin in the storage area will be set; different power supply pins correspond to different target flag bits in the storage area.

[0087] For example, the current voltage of the power supply pin is used to determine whether the power supply pin is in an abnormal state. If the power supply pin is in an abnormal state, the target flag bit corresponding to the power supply pin in the storage area is set. Setting means setting the value of the target flag bit corresponding to the power supply pin from 0 to 1. Since different power supply pins correspond to different target flag bits in the storage area, that is, each power supply pin corresponds to one target flag bit, the power supply pin in an abnormal state can be determined based on the target flag bit, thereby realizing the identification and diagnosis of abnormal power supply in the vehicle.

[0088] It should be understood that different power supply pins correspond to different target flag bits; since the target controller includes multiple power supply pins, the multiple target flag bits in the target controller constitute a flag bit set.

[0089] For example, a target flag value of 0 indicates that the power supply pin is in a normal state, and a target flag value of 1 indicates that the power supply pin is in an abnormal state. The target controller has 5 power supply pins, namely {pin 1, pin 2, pin 3, pin 4, pin 5}. If none of the 5 power supply pins of the target controller are fault-free, then the target flag bit corresponding to each power supply pin is "0"; that is, the set of flag bits corresponding to the power supply pins is "00000". Each pin corresponds to one target flag bit. If pin 1 is in an abnormal state, then the target flag bit corresponding to pin 1 is set, resulting in a set of flag bits of "10000". If pins 2 and 4 are in an abnormal state, then the target flag bits corresponding to pins 2 and 4 are set, resulting in a set of flag bits of "01010".

[0090] It should be noted that the above are examples illustrating the number and state of power supply pins, and this application does not limit them.

[0091] It should be understood that each power supply pin corresponds to one target flag bit; the number of power supply pins and the number of target flag bits can be the same; if the number of power supply pins and the number of target flag bits are the same, then there is a one-to-one correspondence between the power supply pins and the target flag bits; the number of power supply pins and the number of target flag bits can also be different; that is, the number of flag bits is greater than the number of power supply pins.

[0092] For example, the target controller has 5 power supply pins, and the flag set contains 6 flag bits {bit1, bit2, bit3, bit4, bit5, bit6}. Among them, bit6 is used to determine whether there is a power supply pin in the target controller that is in an abnormal state. If it exists, the value of bit6 is set to 1; if it does not exist, the value of bit6 is 0. Bits 1 to 5 correspond to the 5 power supply pins of the target controller in turn. Therefore, if pins 1 and 5 in the target controller are abnormal, the target flag bit of the target controller will be "100011".

[0093] In one implementation, determining whether a power supply pin is in an abnormal state based on its current voltage includes:

[0094] Determine the maximum and minimum voltage thresholds for the power supply pins;

[0095] If the current voltage of the power supply pin is less than the minimum voltage threshold or greater than the maximum voltage threshold, the power supply pin is determined to be in an abnormal state.

[0096] For example, since different power supply pins have different voltage thresholds, when determining whether a power supply pin is in an abnormal state, it is necessary to first obtain the maximum and minimum voltage thresholds corresponding to the power supply pin. If the voltage of the power supply pin is greater than the maximum voltage threshold or less than the minimum voltage threshold, it indicates that the voltage of the power supply pin is abnormal, that is, the power supply pin is in an abnormal state.

[0097] For example, the target controller has five power supply pins: {pin 1, pin 2, pin 3, pin 4, pin 5}. Pin 1 is a 5V pin with a minimum voltage threshold of 4V and a maximum voltage threshold of 6V. When the current voltage of pin 1 is detected to be greater than 6V or less than 4V, pin 1 is determined to be in an abnormal state, and the target flag bit corresponding to pin 1 is set to 1. Pin 3 is a 3.3V pin with a maximum voltage threshold of 4.0V and a minimum voltage threshold of 3.0V. When the current voltage of pin 3 is detected to be less than 3.0V or greater than 4.0V, pin 3 is determined to be in an abnormal state, and the target flag bit corresponding to pin 3 is set to 1.

[0098] It should be noted that the above are examples illustrating the power supply pins, maximum voltage threshold, and minimum voltage threshold, and this application does not limit them.

[0099] It should be understood that the process of detecting the status of the power supply pin and obtaining the target flag bit is performed in real time; this ensures that when there is an abnormality in the power supply pin, the abnormality of the power supply pin can be captured and identified in a timely manner, and the abnormal status of the power supply pin can be stored in the target controller in the form of a target flag bit; this ensures that when there is an abnormality in the vehicle's target controller, the target flag bit stored in the target controller can be read.

[0100] In the embodiments of this application, the power supply pin is used to supply power to the target controller. If the voltage of the power supply pin is abnormal, it will cause the vehicle's power supply to be abnormal. Since the maximum voltage threshold and minimum voltage threshold are different for different power supply pins, when determining whether the power supply pin is in an abnormal state based on the current voltage of the power supply pin, the maximum voltage threshold and minimum voltage threshold corresponding to the power supply pin are determined. When the current voltage of the power supply pin is less than the minimum voltage threshold or greater than the maximum voltage threshold, it indicates that the voltage of the power supply pin is abnormal, ensuring that the state of the power supply pin can be judged according to the different voltage thresholds corresponding to different power supply pins.

[0101] In one implementation, the target controller includes a register connected to a backup power supply;

[0102] The above-mentioned reading of the target flag bit stored in the target controller includes:

[0103] The target flag bit is read from the register of the target controller; the register is powered by a backup power supply.

[0104] For example, the target flag bit stored in the target controller's register is read; such as Figure 1As shown, the register is located in the main control chip of the target controller and is used to store the target flag bit of the binary code. The register is connected to a backup power supply to power it. Since the target flag bit stored in the register is used to diagnose power supply abnormalities in the target controller, a power supply abnormality in the target controller may cause a power outage, i.e., a power outage in the main control chip of the target controller. If the register is not connected to a backup power supply, the target flag bit stored in the register may be affected by the power supply abnormality, resulting in data loss of the target flag bit. Therefore, by powering the register through the backup power supply connected to it, it is ensured that when the vehicle's target controller has a power supply abnormality or the vehicle is powered off, the target flag bit stored in the register will not be lost; the target flag bit stored in the register can be read; and thus, when the target controller has a power supply abnormality, the target power supply pin causing the power supply abnormality can be determined based on the target flag bit stored in the register.

[0105] S240 diagnoses the power supply pins of the target controller based on the target flag bit.

[0106] For example, diagnosing the power supply pins of the target controller means identifying the value of the target flag bit and determining whether there are any power supply pins in an abnormal state based on the value of the target flag bit, thereby achieving the diagnosis of the power supply pins of the target controller.

[0107] In one implementation, the correspondence between each power supply pin and the target flag bit is obtained;

[0108] Based on the target flag bit, diagnose the power supply pins of the target controller, including:

[0109] Based on the value of the target flag bit, determine whether there is a power supply abnormality in the target controller;

[0110] If the target controller has a power supply abnormality, the target power supply pin in the target controller that is in an abnormal state is determined based on the correspondence and the target flag bit.

[0111] For example, the correspondence between each power supply pin and the target flag bit is obtained; when diagnosing the power supply pins of the target controller, the value of the target flag bit is used to determine whether there is a power supply abnormality in the target controller; for example, if the value of the target flag bit is 0, it means that the power supply pin is normal, and the value of the target flag bit is 1, it means that there is a power supply abnormality; then it is determined whether there is a target flag bit with a value of 1; if there is, it means that there is a power supply abnormality in the target controller; and based on the correspondence and the target flag bit, the target power supply pin in the abnormal state is determined; if the value of the target flag bit is 0, it means that the power supply pins in the target controller are all in the normal state, that is, there is no power supply abnormality in the target controller of the vehicle.

[0112] For example, the target controller has 5 power supply pins, namely {pin 1, pin 2, pin 3, pin 4, pin 5}; each power supply pin corresponds to a target flag bit; when diagnosing the power supply pins, the set of flag bits corresponding to the target flag bits of the power supply pins is obtained as "00101"; the target flag bits with a value of 1 are determined to be the 3rd target flag bit and the 5th target flag bit; then, based on the correspondence between the target flag bits and the power supply pins, pins 3 and 5 are determined to be power supply pins in an abnormal state; that is, pins 3 and 5 are determined to be target power supply pins.

[0113] It should be noted that the above is an example of the power supply pin and the target flag bit, and this application does not limit them.

[0114] In one implementation, the method further includes: determining the target number of target power supply pins in an abnormal state; determining the alert level corresponding to the target number based on the target number; and outputting alert information corresponding to the alert level; wherein the alert information is used to report the target power supply pins in an abnormal state.

[0115] For example, the target number of power supply pins in an abnormal state is determined; and the corresponding warning level is determined. Since the more target power supply pins there are, the greater the impact on the vehicle's target controller, when determining the target power supply pins, a warning message corresponding to the warning level is output to ensure that the vehicle's power supply abnormality can be detected in a timely manner. The warning message is output according to the severity of the power supply abnormality so that the user can take corresponding measures based on the warning message to avoid vehicle safety accidents.

[0116] For example, the target controller has five power supply pins, namely {pin 1, pin 2, pin 3, pin 4, pin 5}. When the number of target power supply pins in an abnormal state is less than or equal to two, a level one prompt message is output; when the number of target power supply pins detected is three, a level two prompt message is output; and when the number of target power supply pins detected is greater than or equal to four, a level three prompt message is output. The prompt messages are used to report the target power supply pins. The urgency of the different levels of prompt messages varies. The output prompt messages include, but are not limited to, message prompts, pop-up prompts on the vehicle display screen, and voice prompts. This application does not limit the form of the output prompt messages.

[0117] In the embodiments of this application, a prompt message is output based on the number of target power supply pins in an abnormal state, ensuring that the user is promptly alerted when an abnormality is detected in the power supply pin; rather than diagnosing the power supply abnormality only when the target controller fails to start, ensuring that the user can promptly detect the vehicle's power supply abnormality.

[0118] In the above embodiments, specifically in the embodiments of this application, when a start command for the target controller in the vehicle is detected, it is determined whether the target controller is in an abnormal state based on the reset flag bit of the target controller in the vehicle. Since the reset flag bit is used to indicate the status information of the target controller, including whether the target controller is in a sleep state or a running state, the status information of the target controller will change accordingly when a start command for the target controller is detected. Therefore, based on the status information of the target controller, it is possible to determine whether the target controller is abnormal. If the target controller is abnormal, it indicates that the target controller may have a power supply abnormality. Therefore, it is necessary to diagnose the power supply pins through the target flag bit to determine whether the vehicle's target controller has a power supply abnormality. Since power supply abnormalities are intermittent events with short durations, they are difficult to accurately identify. Therefore, this solution diagnoses the power supply pins through the target flag bit, that is, it identifies the status of the power supply pins through the target flag bit, thereby determining whether the target controller has a power supply abnormality through the status of the power supply pins. This achieves the identification of power supply abnormalities in the vehicle and, when the vehicle's target controller is abnormal, it can diagnose the power supply pins that cause the power supply abnormality.

[0119] Figure 3 This is a schematic flowchart of another vehicle diagnostic method provided in the embodiments of this application.

[0120] Figure 3 The method 300 shown can be derived from Figure 1 The main control chip in the system can execute the commands; or the vehicle with the aforementioned main control chip can execute the commands; or the processor in the vehicle can execute the commands.

[0121] like Figure 3 As shown, the vehicle diagnostic method 300 includes S301 to S310, which are described in detail below.

[0122] S301, A start command for the target controller has been detected.

[0123] For example, the target controllers achieve precise control of various parts of the vehicle through their respective hardware and software to ensure the normal operation of the vehicle; the target controllers include, but are not limited to: engine control unit, body control module, brake control unit, air conditioning control unit, seat control unit, headlight control unit, etc.

[0124] For example, a start command is used to activate the target controller, causing it to change from a dormant state to an active state. Different target controllers trigger start commands in different ways. For instance, when the vehicle's ignition switch is turned on, a start command is triggered for the engine control unit; when a sensor detects rain, a start command is triggered for the wiper controller; when a user presses a specific button or switch, a start command is triggered for the headlight control unit or seat control unit; and when the door is unlocked wirelessly via the remote key, a start command is triggered for the door control unit.

[0125] S302, obtain the reset flag bit of the target controller.

[0126] For example, the reset flag is stored in a specific area of ​​the main control chip of the target controller to indicate the status information of the target controller; the reset flag of the target controller can be obtained by reading the main control chip of the target controller.

[0127] Alternatively, the implementation methods of S301 and S302 can be found in [reference needed]. Figure 2 The relevant description of S210 will not be repeated here.

[0128] S303, Is the target controller in sleep mode? If yes, proceed to S304; otherwise, proceed to S305.

[0129] For example, determine whether the target controller is in a sleep state; if the target controller is in a sleep state, determine whether the sleep state duration is greater than a preset duration; if the target controller is not in a running state, the target controller has an anomaly.

[0130] S304, whether the duration of the hibernation state is greater than the preset duration.

[0131] For example, it is determined whether the duration of the sleep state is greater than a preset duration; if the duration is greater than the preset duration, it means that the target controller has not switched from the sleep state to the running state; it is determined that there is an abnormality in the target controller; if the duration is less than the preset duration, it means that when a start command is detected for the target controller, the target controller switches from the sleep state to the running state, and it is determined that there is no abnormality in the target controller.

[0132] S305, an anomaly has been detected in the target controller.

[0133] For example, if the target controller is in a normal state, a reset flag needs to be set to indicate that the target controller is in a sleep state, and when the target controller starts up, the target controller will switch from the sleep state to the running state. If the reset flag indicates that the target controller remains in a sleep state and does not switch to the running state within a preset time, it indicates that the target controller is malfunctioning; or if the reset flag indicates that the target controller is in the running state before it starts up, it indicates that the target controller is malfunctioning.

[0134] S306, Read the target flag bit stored in the target controller.

[0135] The target flag is used to indicate the status of the power supply pin; the power supply pin is used to supply power to the target controller; when there is an abnormality in the power supply pin, it will cause a power supply abnormality in the vehicle's target controller.

[0136] For example, when it is determined that the target controller is abnormal, it indicates that the target controller may have a power supply abnormality; therefore, the target flag bit stored in the target controller is read; the target flag bit is used to determine whether the target controller has a power supply abnormality.

[0137] S307 determines whether there is a power supply abnormality based on the value of the target flag bit.

[0138] For example, a target flag value of 0 indicates that the power supply pin is normal, and a target flag value of 1 indicates that the power supply is abnormal. Then, determine whether there is a target flag with a value of 1. If there is, it means that the target controller has a power supply abnormality. Based on the correspondence and the target flag, determine the target power supply pin in the abnormal state. If the target flag values ​​are all 0, it means that the power supply pins in the target controller are all in the normal state, that is, the vehicle's target controller does not have a power supply abnormality.

[0139] S308 identifies the target power supply pin that is in an abnormal state.

[0140] For example, if the target controller has a power supply abnormality, the target power supply pin in the abnormal state is identified. Since the target flag bit corresponding to the power supply pin is set when the abnormal state of the power supply pin is detected, the target power supply pin in the abnormal state can be identified based on the target flag bit.

[0141] S309 determines the target number of target power supply pins.

[0142] For example, the target number of target power supply pins is determined. Since there are multiple power supply pins in the target controller, when there is a power supply abnormality in the target controller, multiple power supply pins in the target controller may be in an abnormal state. The number of target power supply pins in an abnormal state is different, and the degree of impact on the target controller is also different. Therefore, the target number of target power supply pins is determined, and a prompt message is output based on the target number.

[0143] S310 outputs a prompt message based on the target quantity.

[0144] Alternatively, the implementation of S310 can be found in [reference needed]. Figure 2 The relevant description of the output prompt information in S240 will not be repeated here.

[0145] In the embodiments of this application, when a start command of the target controller in the vehicle is detected, it is determined whether the target controller is in an abnormal state based on the reset flag bit of the target controller in the vehicle. Since the reset flag bit is used to indicate the status information of the target controller, the status information of the target controller will change accordingly when the start command of the target controller is detected. Therefore, based on the status information of the target controller, it is possible to determine whether the target controller is abnormal. If the target controller is abnormal, the target power supply pin in the target controller that is in an abnormal state is determined based on the target flag bit of the target controller. Since the target flag bit is used to indicate the state of the power supply pin, when the target controller has a power supply abnormality, the target power supply pin in an abnormal state can be determined based on the target flag bit, that is, the target power supply pin that causes the power supply abnormality of the target controller can be determined among the power supply pins of the target controller; thereby realizing the identification and diagnosis of the power supply abnormality of the vehicle.

[0146] Figure 4 This is a schematic flowchart of another vehicle diagnostic method provided in the embodiments of this application.

[0147] Figure 4 The method 400 shown can be derived from Figure 1 The main control chip in the system can execute the commands; or the vehicle with the aforementioned main control chip can execute the commands; or the processor in the vehicle can execute the commands.

[0148] like Figure 4 As shown, the vehicle diagnostic method 400 includes S401 to S408, and S401 to S408 are described in detail below.

[0149] S401, obtain the current voltage of the power supply pin of the target controller.

[0150] For example, the current voltage of the power supply pin of the target controller is obtained; and the current voltage obtained in real time is used to determine whether the power supply pin is in an abnormal state.

[0151] S402 determines the maximum and minimum voltage thresholds corresponding to the power supply pins.

[0152] For example, since the target controller of the vehicle includes multiple power supply pins, and the voltage values ​​of different power supply pins are different, the corresponding maximum voltage threshold and minimum voltage threshold are also different; therefore, the maximum voltage threshold and minimum voltage threshold corresponding to the power supply pin are determined; thereby, the state of the power supply pin can be accurately judged based on the maximum voltage threshold and minimum voltage threshold corresponding to the power supply pin.

[0153] For example, pin 1 in the target controller is a 5V power supply pin; the maximum voltage threshold corresponding to pin 1 is 6V and the minimum voltage threshold is 4V; pin 2 in the target controller is a 3.3V power supply pin; the maximum voltage threshold corresponding to pin 2 is 4V and the minimum voltage threshold is 3V.

[0154] It should be noted that the above are examples illustrating the maximum and minimum voltage thresholds of the power supply pins, and this application does not impose any limitations on them.

[0155] S403, is the current voltage less than the minimum voltage threshold or greater than the maximum voltage threshold?

[0156] For example, it is determined whether the current voltage of the power supply pin is less than the minimum voltage threshold or greater than the maximum voltage threshold; if so, it indicates that there is an abnormality in the power supply pin; therefore, the target flag bit corresponding to the power supply pin is determined and the target flag bit of the target pin is set; if not, it indicates that there is no abnormality in the power supply pin, and the target flag bit remains unchanged.

[0157] S404 determines the target flag bit corresponding to the power supply pin.

[0158] For example, the target controller has multiple power supply pins; each power supply pin corresponds to one of the target flag bits; the number of power supply pins and the number of target flag bits can be the same; if the number of power supply pins and the number of target flag bits are the same, then the power supply pins and target flag bits correspond one-to-one; the number of power supply pins and the number of target flag bits can also be different; that is, the number of target flag bits is greater than the number of power supply pins.

[0159] S405 sets the target flag bit corresponding to the power supply pin.

[0160] For example, if the power supply pin is in an abnormal state, the target flag bit corresponding to the power supply pin is set; where setting means setting the target flag bit corresponding to the power supply pin from 0 to 1.

[0161] For example, if an abnormality occurs on the 5V power supply pin in the target controller, the values ​​of bits 16 and 28 in the register are set to 1; if an abnormality occurs on the 3.3V power supply pin, the values ​​of bits 16 and 24 in the register are set to 1. Bit 28 is the target flag bit corresponding to the 5V power supply pin; bit 24 is the target flag bit corresponding to the 3.3V power supply pin; bit 16 is used to indicate whether there is a power supply pin in the target controller that is in an abnormal state; if there is at least one power supply pin in an abnormal state, the value of bit 16 is 1; if there is no power supply pin in an abnormal state, the value of bit 16 is 0.

[0162] It should be noted that the above is an example of the power supply pin and the target flag bit corresponding to the power supply pin.

[0163] S406 stores the target flag bit in the register of the target controller.

[0164] The register is located in the main control chip of the target controller and is used to store the target flag bit of the binary code; the register is also connected to the backup power supply to power the register.

[0165] For example, the target flag stored in the register is used to diagnose power supply abnormalities of the target controller; when there is a power supply abnormality in the target controller, it may cause the target controller to lose power; if the register is not connected to a backup power supply, the target flag stored in the register may be affected by the power supply abnormality, resulting in the loss of the target flag data; therefore, the register is powered by the backup power supply connected to it to ensure that when there is a power supply abnormality in the vehicle's target controller, the target flag stored in the register will not be lost.

[0166] S407: When an anomaly is detected in the target controller, the target flag bit is read.

[0167] For example, when an anomaly is detected in the target controller, the target flag bit stored in the register is read.

[0168] Optionally, the implementation method for detecting anomalies in the target controller can be found in [reference needed]. Figure 3 The implementation methods of S303 to S305 are not detailed here.

[0169] S408 determines the target power supply pin with an anomaly based on the target flag bit.

[0170] For example, the target power supply pin with an abnormality is determined based on the read target flag bit; since the target flag bit of the power supply pin with an abnormality is set when an abnormality is detected in real time; therefore, the presence of a power supply abnormality can be determined by reading the target flag bit; and when a power supply abnormality exists, the target power supply pin in the abnormal state is identified.

[0171] In the embodiments of this application, if the voltage of the power supply pin is abnormal, it will cause the vehicle's power supply to be abnormal. Since the maximum voltage threshold and minimum voltage threshold are different for different power supply pins, the maximum voltage threshold and minimum voltage threshold corresponding to the power supply pin are determined. Based on the current voltage of the power supply pin, the minimum voltage threshold, and the voltage greater than the maximum voltage threshold, it is accurately determined whether the power supply pin is in an abnormal state. When the power supply pin is abnormal, the target flag bit corresponding to the power supply pin is set. Since the flag bit is set for the power supply pin in an abnormal state, the target power supply pin in an abnormal state is determined by reading the target flag bit and based on the correspondence between the target flag bit and the power supply pin. This enables the diagnosis of the power supply pin in the target controller.

[0172] The above text combined Figures 1 to 4 The vehicle diagnostic method provided in the embodiments of this application has been described in detail; the following will be combined with Figure 5 and Figure 6 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0173] Figure 5 This is a schematic diagram of the structure of a vehicle diagnostic device provided in an embodiment of this application.

[0174] For example, such as Figure 5 As shown, the vehicle diagnostic device 500 includes:

[0175] The acquisition module 510 is used to acquire the reset flag bit of the target controller when a start command of the target controller in the vehicle is detected; wherein, the reset flag bit is used to indicate the status information of the target controller;

[0176] The determination module 520 is used to determine whether there is an abnormality in the target controller based on the reset flag bit;

[0177] The reading module 530 is used to read the target flag bit stored in the target controller if there is an abnormality in the target controller; wherein, the target flag bit is used to indicate the state of the power supply pin of the target controller;

[0178] The diagnostic module 540 is used to diagnose the power supply pins of the target controller based on the target flag bit.

[0179] Optionally, as an embodiment, it also includes a setting module, and the determining module 520 is further configured to: obtain the current voltage of the power supply pin of the target controller; determine whether the power supply pin is in an abnormal state based on the current voltage of the power supply pin; if the power supply pin is in an abnormal state, set the target flag bit corresponding to the power supply pin in the storage area; wherein, different power supply pins correspond to different target flag bits in the storage area.

[0180] Optionally, as an embodiment, the determining module 520 is further configured to: determine the maximum voltage threshold and the minimum voltage threshold corresponding to the power supply pin;

[0181] If the current voltage of the power supply pin is less than the minimum voltage threshold or greater than the maximum voltage threshold, the power supply pin is determined to be in an abnormal state.

[0182] Optionally, as an embodiment, the diagnostic 540 is specifically used to: obtain the correspondence between each power supply pin and the target flag bit; determine whether the target controller has a power supply abnormality based on the value of the target flag bit; if the target controller has a power supply abnormality, determine the target power supply pin in the target controller that is in an abnormal state based on the correspondence and the target flag bit.

[0183] Optionally, as an embodiment, the reading module 530 is specifically used to: read the target flag bit stored in the register of the target controller; wherein the register is powered by a backup power supply.

[0184] Optionally, as an embodiment, the determining module 520 is specifically used to: if the reset flag indicates that the target controller is in a sleep state, determine the duration of the target controller being in a sleep state; if the duration is longer than a preset duration, determine that the target controller has an abnormality; or, if the reset flag indicates that the target controller is in a running state, determine that the target controller has an abnormality.

[0185] Optionally, as an embodiment, it further includes a prompting module; the output module is used to: determine the target number of target power supply pins in an abnormal state; determine the prompting level corresponding to the target number based on the target number; and output prompting information corresponding to the prompting level; wherein the prompting information is used to report the target power supply pins in an abnormal state.

[0186] It should be noted that the aforementioned vehicle diagnostic device is embodied in the form of functional units. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0187] For example, a "module" can be a software program, hardware circuit, or a combination of both that implements the above functions. Hardware circuits may include application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.

[0188] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0189] Figure 6 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.

[0190] For example, vehicle 600 includes processor 610, memory 620 and executable program code 630.

[0191] For example, vehicle 600 includes one or more processors 610 that can support vehicle diagnostic methods in the method embodiments of vehicle 600. Processor 610 can be a general-purpose processor or a special-purpose processor. For example, processor 610 can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0192] For example, processor 610 can be used to control vehicle 600, execute software programs, and process data from the software programs. Vehicle 600 may also include a communication unit for receiving and transmitting signals.

[0193] For example, the vehicle 600 may include one or more memories 620, on which executable program code 630 is stored. The executable program code 630 can be run by the processor 610 to generate instructions, causing the processor 610 to execute the vehicle diagnostic method described in the above method embodiments according to the instructions.

[0194] Optionally, the memory 620 may also store data. Optionally, the processor 610 may also read data stored in the memory 620, which may be stored at the same memory address as the executable program code 630, or the data may be stored at a different memory address than the executable program code 630.

[0195] For example, the processor 610 and memory 620 can be configured separately or integrated together, for example, integrated on a system-on-chip (SOC) of the terminal device.

[0196] For example, the memory 620 can be used to store related programs of the vehicle diagnostic method provided in the embodiments of this application, and the processor 620 can be used to call the executable program code 630 stored in the memory 620 when controlling the vehicle to execute the vehicle diagnostic method of the embodiments of this application; for example, when a start command of the target controller in the vehicle is detected, the reset flag bit of the target controller is obtained; wherein, the reset flag bit is used to indicate the status information of the target controller; based on the reset flag bit, it is determined whether the target controller is abnormal; if the target controller is abnormal, the target flag bit stored in the target controller is read; wherein, the target flag bit is used to indicate the status of the power supply pin of the target controller; based on the target flag bit, the power supply pin of the target controller is diagnosed.

[0197] This application also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the vehicle diagnostic method of any of the foregoing embodiments.

[0198] The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROM), microdrives, and magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), dynamic random access memory (DRAM), video random access memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0199] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a vehicle diagnostic method as described in the above embodiments.

[0200] In addition, the vehicle provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip perform a vehicle diagnostic method in the above embodiments.

[0201] The vehicle, computer-readable storage medium, computer program product or chip provided in this application are all used to execute the corresponding vehicle diagnostic method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding vehicle diagnostic method provided above, and will not be repeated here.

[0202] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0203] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0204] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A vehicle diagnostic method, characterized in that, The method includes: When a start command for the target controller in the vehicle is detected, the reset flag bit of the target controller is acquired; wherein, the target controller includes multiple power supply pins, and the reset flag bit is used to indicate the status information of the target controller, the status information including a sleep state or a running state; Based on the reset flag, determine whether the target controller is malfunctioning; If the target controller malfunctions, the target flag bit stored in the target controller's register is read. The register is connected to a backup power supply, which supplies power to the register when the target controller malfunctions or the vehicle is powered off. This allows the target flag bit stored in the register to be read when the target controller malfunctions or the vehicle is powered off. The target flag bit indicates the state of the target controller's power supply pins; different power supply pins correspond to different target flag bits in the storage area. Based on the target flag bit, the power supply pin of the target controller is diagnosed; The step of determining whether the target controller is abnormal based on the reset flag bit includes: If the reset flag indicates that the target controller is in a sleep state, determine the duration of the target controller being in the sleep state; if the duration is longer than a preset duration, determine that the target controller is malfunctioning. Alternatively, if the reset flag indicates that the target controller was in the running state before the target controller was started, it is determined that the target controller is abnormal.

2. The method according to claim 1, characterized in that, The target flag is stored in the storage area of ​​the target controller. Before reading the target flag stored in the target controller, the method further includes: Obtain the current voltage of the power supply pin of the target controller; Based on the current voltage of the power supply pin, determine whether the power supply pin is in an abnormal state; If the power supply pin is in the abnormal state, the target flag bit corresponding to the power supply pin in the storage area is set.

3. The method according to claim 2, characterized in that, Determining whether the power supply pin is in the abnormal state based on the current voltage of the power supply pin includes: Determine the maximum and minimum voltage thresholds corresponding to the power supply pin; If the current voltage of the power supply pin is less than the minimum voltage threshold or greater than the maximum voltage threshold, the power supply pin is determined to be in the abnormal state.

4. The method according to claim 2, characterized in that, Also includes: Obtain the correspondence between each of the power supply pins and the target flag bit; The diagnostic process for the power supply pins of the target controller based on the target flag bit includes: Based on the value of the target flag bit, determine whether the target controller has a power supply abnormality; If the target controller has the power supply abnormality, the target power supply pin in the target controller that is in an abnormal state is determined based on the correspondence and the target flag bit.

5. The method according to any one of claims 1 to 4, characterized in that, Also includes: Determine the target number of power supply pins that are in an abnormal state among the power supply pins; Determine the alert level corresponding to the target quantity based on the target quantity; Output the prompt information corresponding to the prompt level; wherein, the prompt information is used to report the target power supply pin that is in the abnormal state.

6. A vehicle diagnostic device, characterized in that, The device includes: The acquisition module is used to acquire the reset flag bit of the target controller when a start command of the target controller in the vehicle is detected; wherein the target controller includes multiple power supply pins, and the reset flag bit is used to indicate the status information of the target controller, including a sleep state or a running state; The determination module is used to determine whether the target controller has an anomaly based on the reset flag bit; A reading module is used to read the target flag bit stored in the register of the target controller if the target controller has an anomaly; wherein, the register is connected to a backup power supply, and the backup power supply is used to supply power to the register when the target controller has a power supply anomaly or the vehicle is powered off, so that the target flag bit stored in the register can be read when the target controller has an anomaly or the vehicle is powered off. The target flag bit is used to indicate the state of the power supply pin of the target controller, and different power supply pins correspond to different target flag bits in the storage area; A diagnostic module is used to diagnose the power supply pin of the target controller based on the target flag bit; The determining module is specifically used to: if the reset flag indicates that the target controller is in a sleep state, determine the duration of the target controller being in the sleep state; if the duration is longer than a preset duration, determine that the target controller has an abnormality; or, if the reset flag indicates that the target controller was in the running state before the target controller was started, determine that the target controller has an abnormality.

7. A vehicle, characterized in that, The vehicles include: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the vehicle to perform the method as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a vehicle, cause the vehicle to perform the method as described in any one of claims 1 to 5.