Oil amount display method based on float type liquid level sensor, vehicle, and medium
Patent Information
- Application Number
- CN202510219647.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2026-09-04
AI Technical Summary
[0003]当车辆的油箱采用浮子式液位传感器采集油量液位值时,由于浮子式液位传感器建构简单,其电阻变化为阶跃式,采集精度相对较低,当车辆行驶在颠簸路面或上下坡过程中,浮子会随着液位产生晃动,导致液位采集存在不准确,或存在频繁变动的问题,进而导致油量计算存在误差,影响驾驶员对油量信息的正常获取
[0052]In the above technical solution, when the vehicle controller is in a dormant state, the system waits for it to wake up and remain dormant for a certain period before making a judgment, which is consistent with the possibility of refueling or leaking oil after the vehicle has stopped. When the vehicle controller is not in a dormant state, the system combines vehicle speed conditions for judgment, adapting to different scenarios when the vehicle is in motion or parked, enabling the system to accurately identify the vehicle's operating status under various conditions. Distinguishing between the vehicle controller's dormant and non-dormant states and setting different judgment conditions for each avoids misjudgments that may result from a single factor, improving the accuracy and reliability of the judgment. By comprehensively considering multiple factors such as the vehicle controller's status, vehicle speed, and the difference and duration of the liquid level acquisition value compared to the liquid level reference value, the system can more accurately determine whether the vehicle is refueling or leaking oil.
Smart Images

Figure CN122689097A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicles, and more specifically, to a method for displaying fuel level based on a float-type liquid level sensor, a vehicle, and a medium in the field of vehicles. Background Technology
[0002] A float-type liquid level sensor uses a float that moves up and down with the liquid level to drive a connecting mechanism, converting changes in liquid level into electrical signals or other measurable outputs.
[0003] When a vehicle's fuel tank uses a float-type level sensor to collect fuel level values, the sensor's simple construction and step-like resistance change result in relatively low accuracy. When the vehicle is traveling on bumpy roads or going uphill or downhill, the float will sway with the fuel level, leading to inaccurate or frequent level measurements. This, in turn, causes errors in fuel quantity calculation, affecting the driver's ability to obtain accurate fuel level information.
[0004] Therefore, improving the accuracy and stability of fuel level display values in vehicles equipped with float-type liquid level sensors under different operating conditions is an urgent problem to be solved. Summary of the Invention
[0005] This application provides a fuel level display method, vehicle, and medium based on a float-type liquid level sensor. This method can improve the accuracy and stability of the fuel level display value of a vehicle equipped with a float-type liquid level sensor under different operating conditions.
[0006] Firstly, a method for displaying oil volume based on a float-type liquid level sensor is provided, the method comprising:
[0007] Determine the vehicle's operating status;
[0008] When the working state changes, it is determined whether the fuel level display value needs to be anti-shake based on the first working state and the second working state, where the first working state is the working state before the change and the second working state is the working state after the change.
[0009] If it is determined that the fuel level display value needs to be stabilized, the stabilization coefficient is determined based on the second working state;
[0010] Based on the anti-shake coefficient, the fuel level display value corresponding to the first working state is continuously processed and updated until the updated fuel level display value corresponds to the second working state.
[0011] In the above technical solution, the vehicle's operating status is monitored. When a change in the vehicle's operating status is detected, the system combines the operating status before and after the change to determine whether anti-shake processing of the fuel level display value is necessary. If anti-shake processing is required, the fuel level display value corresponding to the operating status before the change is continuously processed and updated based on the anti-shake coefficient corresponding to the changed operating status. The fuel level anti-shake processing ends when the updated fuel level display value corresponds to the changed operating status. By determining the vehicle's operating status and determining whether to perform anti-shake processing when the status changes, the system can effectively reduce misjudgments and fluctuations in the fuel level display value caused by changes in the vehicle's motion status, making the fuel level display more accurately reflect the actual fuel level. Furthermore, by determining the anti-shake coefficient based on different operating states to process and update the fuel level display value, the system can dynamically adjust the fuel level display according to the actual vehicle movement, further improving the accuracy and smoothness of the fuel level display.
[0012] In conjunction with the first aspect, in some possible implementations, upon detecting a change in the operating state, it is determined whether to perform anti-shake processing on the fuel level display value based on the first and second operating states, including:
[0013] In the event that a change in the operating status is detected;
[0014] If the first working state is a sensor fault state indicating that the float-type liquid level sensor has failed and therefore cannot work, and the second working state is a normal working state indicating that the float-type liquid level sensor is working under normal conditions, then it is determined that anti-shake processing is needed for the oil level display value.
[0015] If the first working state is a slope driving state used to indicate that the float-type liquid level sensor is working abnormally due to the vehicle driving on a slope, and the second working state is a normal working state, then it is determined that the fuel level display value needs to be de-shaken.
[0016] If the first working state is the normal working state, and the second working state is the refueling state where the float-type liquid level sensor is working abnormally due to the vehicle being refueled or the oil leakage state where the float-type liquid level sensor is working abnormally due to the vehicle being leaking oil, then it is determined that anti-shake processing is needed for the oil level display value.
[0017] In the above technical solution, when the vehicle switches from a sensor malfunction state or a slope driving state to a normal working state, and when the vehicle switches from a normal working state to a refueling state or a leaking state, it is determined that the fuel level display value needs to be anti-shake processing. This can avoid the possible jump phenomenon of the fuel level display value during the switching process between different driving conditions or working states. The anti-shake processing can eliminate the influence of sensor malfunction or vehicle tilt driving on the sensor measurement value, and can also achieve smooth display of fuel level display value during the switching process between different states, thereby improving the accuracy and stability of the fuel level display value.
[0018] Combining the first aspect and the above implementation methods, in some possible implementation methods, the working state of the vehicle is determined, including:
[0019] If the float-type liquid level sensor malfunctions or recovers to normal after malfunction and the normal duration is less than or equal to the second preset duration, the sensor malfunction state will be determined as the vehicle's working state.
[0020] When the vehicle speed is greater than the first preset speed, the vehicle gradient is greater than the preset gradient, and the duration of the vehicle gradient being greater than the preset gradient is greater than the third preset duration, the slope driving state is determined as the vehicle's working state.
[0021] The liquid level reference value is periodically updated based on the real-time liquid level acquisition value collected by the float-type liquid level sensor. When the difference between the liquid level acquisition value and the liquid level reference value is greater than a preset difference and the duration of the difference is greater than the preset difference reaches the fifth preset duration, the refueling state or the oil leakage state is determined as the working state of the vehicle.
[0022] When the vehicle's operating status is not in a sensor malfunction state, hill driving state, refueling state, or oil leak state, the normal operating status is determined as the vehicle's operating status.
[0023] In the above technical solution, the sensor fault state is determined by setting the conditions of the float-type liquid level sensor failure and the situation in a short period of time after the failure, which can timely and accurately identify whether the sensor is in an abnormal working state; the slope driving state is determined by comprehensively considering multiple factors such as vehicle speed, slope and slope duration, making the judgment of the vehicle driving on the slope more accurate and reliable; the refueling or leaking state is judged by comparing the liquid level value collected by the float-type liquid level sensor with the reference value and the duration of the difference, which can monitor the vehicle's fuel changes in real time and accurately; and the stability and reliability of the vehicle fuel level monitoring system are improved by clearly judging and correspondingly handling different working states.
[0024] In combination with the first aspect and the above implementation methods, in some possible implementations, the method further includes:
[0025] The fuel level display value is determined based on the vehicle's operating status.
[0026] The fuel level display value is determined based on the vehicle's operating status, including:
[0027] The liquid level reference value is periodically updated based on the real-time liquid level data collected by the float-type liquid level sensor.
[0028] If the vehicle's operating state is a sensor fault state indicating that the float-type liquid level sensor has malfunctioned and therefore cannot operate, the duration of the float-type liquid level sensor fault is determined. If the duration of the fault is less than or equal to a first preset duration, the fuel level display value is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before the fault. If the duration of the fault is greater than the first preset duration, the fuel consumption is determined based on the duration of the sensor fault state and the real-time fuel injection quantity of the engine. A first liquid level estimate is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before the fault and the fuel consumption. Alternatively, the first liquid level estimate is determined based on the liquid level reference value at the moment before the fault and the fuel consumption. The fuel level display value is then determined based on the first liquid level estimate.
[0029] If the vehicle is in a normal operating state, indicating that the float-type liquid level sensor is working under normal conditions, and the vehicle controller is not in a sleep state, the fuel level display value is determined based on the liquid level acquisition value collected by the float-type liquid level sensor. If the liquid level acquisition value changes and the fuel level display value needs to be updated, the fuel level display value before the update is continuously smoothed and updated based on a preset smoothing coefficient until the updated fuel level display value corresponds to the changed liquid level acquisition value. If the vehicle controller is in a sleep state and then switches to a wake-up state, the fuel level display value is determined based on the liquid level acquisition value just before the vehicle controller enters the sleep state, during the period from when the vehicle controller switches to the wake-up state until the duration of the wake-up state does not reach the sixth preset duration.
[0030] If the vehicle's operating state is an incline driving state that indicates the vehicle is driving on a slope, causing the float-type liquid level sensor to operate under abnormal conditions, the fuel consumption is determined based on the duration of the incline driving state and the real-time fuel injection quantity of the engine. A second liquid level estimate is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before entering the incline driving state and the fuel consumption, or the second liquid level estimate is determined based on the liquid level reference value at the moment before entering the incline driving state and the fuel consumption. The fuel level display value is determined based on the second liquid level estimate.
[0031] If the vehicle's operating status is either a refueling state (indicating the vehicle is refueling, causing the float-type liquid level sensor to malfunction) or an oil leak state (indicating the vehicle is leaking oil, causing the float-type liquid level sensor to malfunction), the oil level display value is determined based on the liquid level data collected by the float-type liquid level sensor.
[0032] In the above technical solution, different methods are used to determine the fuel level display value based on different operating states of the vehicle. The fuel level data collected by the float-type liquid level sensor is processed by considering relevant influencing factors under different operating states to determine the fuel level display value that matches the current operating state; this improves the flexibility of determining the fuel level display value under different operating states, thereby enhancing the accuracy of the fuel level display value.
[0033] Combining the first aspect and the above implementation methods, in some possible implementation methods, the first working state is a sensor fault state, the second working state is a normal working state, the anti-shake coefficient includes a first anti-shake coefficient, the anti-shake coefficient is determined based on the second working state, and the fuel level display value corresponding to the first working state is continuously subjected to anti-shake processing and updated based on the anti-shake coefficient until the updated fuel level display value corresponds to the second working state, including:
[0034] The first image stabilization factor is determined based on normal operating conditions or based on both sensor malfunction and normal operating conditions.
[0035] The fuel level display value at the switching moment is determined based on the sensor fault status;
[0036] The fuel level display value is continuously processed and updated based on the first anti-shake coefficient until the updated fuel level display value corresponds to the normal operating state.
[0037] In the above technical solution, when the float-type liquid level sensor recovers from a fault state to a normal working state, by determining an appropriate first anti-shake coefficient and performing anti-shake processing and updating on the fuel level display value at the time of fault recovery based on this coefficient, the fuel level display error caused by sensor fault and unstable factors in the early stage of recovery can be effectively eliminated. This allows the fuel level display value to gradually stabilize and accurately reflect the actual fuel level, avoiding sudden changes or inaccuracies in fuel level display caused by changes in sensor state, and improving the accuracy of fuel level display when the vehicle state changes.
[0038] Combining the first aspect and the above implementation methods, in some possible implementation methods, the first working state is a slope driving state, the second working state is a normal working state, the anti-shake coefficient includes a second anti-shake coefficient, the anti-shake coefficient is determined based on the second working state, and the fuel level display value corresponding to the first working state is continuously subjected to anti-shake processing and updated based on the anti-shake coefficient until the updated fuel level display value corresponds to the second working state, including:
[0039] The second stabilization factor is determined based on normal operating conditions or based on both hill driving conditions and normal operating conditions.
[0040] The fuel level displayed at the switching time is determined based on the slope driving status;
[0041] The fuel level display value is continuously processed and updated based on the second anti-shake coefficient until the updated fuel level display value corresponds to the normal operating state.
[0042] In the above technical solution, when the vehicle is driving on a slope, the measurement of the float-type liquid level sensor is affected due to the vehicle body tilt, resulting in a deviation in the fuel level display value. When the vehicle transitions from slope driving to normal operating state, by determining a second anti-shake coefficient and performing anti-shake processing and updating the fuel level display value at the moment of transition from slope driving to normal driving based on this coefficient, the fuel level display error caused by slope driving can be effectively eliminated, allowing the fuel level display value to gradually recover to an accurate state reflecting the actual fuel level; this avoids abrupt changes or inaccuracies in the fuel level display during state transitions, improving the accuracy of the fuel level display when the vehicle's state changes.
[0043] Combining the first aspect and the above implementation methods, in some possible implementation methods, the first working state is the normal working state, the second working state is the refueling state or the oil leak state, the anti-shake coefficient includes a third anti-shake coefficient, the anti-shake coefficient is determined based on the second working state, and the oil level display value corresponding to the first working state is continuously subjected to anti-shake processing and updated based on the anti-shake coefficient until the updated oil level display value corresponds to the second working state, including:
[0044] The third anti-shake coefficient is determined based on the refueling status or the oil leak status, or based on the normal working status and the refueling status, or based on the normal working status and the oil leak status.
[0045] The fuel level displayed at the switching point is determined based on the normal operating status;
[0046] The fuel level display value is continuously processed and updated based on the third anti-shake coefficient until the updated fuel level display value corresponds to the refueling status or the oil leak status.
[0047] In the above technical solution, when the vehicle is in normal operating condition, the fuel level display reflects the fuel level under normal driving conditions. When refueling or leaking, the fuel level in the tank changes rapidly, and the measurement value of the float-type level sensor fluctuates accordingly. By determining an appropriate third anti-shake coefficient and performing anti-shake processing and updating the fuel level display value at the moment of transition from normal operation to refueling or leaking based on this coefficient, the display error caused by state transition and rapid fuel level changes can be effectively eliminated. This allows the fuel level display value to more accurately reflect the actual fuel level changes during refueling or leaking, avoiding large fluctuations or inaccuracies in the display value, and improving the accuracy of the fuel level display when the vehicle's state changes.
[0048] Combining the first aspect and the above implementation methods, in some possible implementation methods, when the difference between the liquid level acquisition value and the liquid level reference value is greater than a preset difference and the duration of the difference exceeding the preset difference reaches a fifth preset duration, the refueling state or oil leakage state is determined as the vehicle's working state, including:
[0049] Determine whether the current state of the vehicle controller in the vehicle is sleep mode;
[0050] If the vehicle controller is currently in a sleep state, and then switches to a wake-up state, the difference between the liquid level acquisition value and the liquid level reference value at the same moment will be calculated in real time after the vehicle controller switches to a wake-up state and the wake-up state lasts for a period of six preset durations. If the difference between the two values is greater than a preset difference and the difference between the two values lasts for a period of five preset durations, then the refueling state or the oil leak state will be determined as the working state of the vehicle.
[0051] If the vehicle controller is not in a sleep state, the vehicle speed is acquired in real time. If the vehicle speed is less than or equal to the second preset speed and the duration of the speed being less than or equal to the second preset speed reaches the fourth preset duration, the difference between the liquid level acquisition value and the liquid level reference value at the same moment is calculated in real time. If the difference is greater than the preset difference and the duration of the difference being greater than the preset difference reaches the fifth preset duration, the refueling state or oil leakage state is determined as the working state of the vehicle.
[0052] In the above technical solution, when the vehicle controller is in a dormant state, the system waits for it to wake up and remain dormant for a certain period before making a judgment, which is consistent with the possibility of refueling or leaking oil after the vehicle has stopped. When the vehicle controller is not in a dormant state, the system combines vehicle speed conditions for judgment, adapting to different scenarios when the vehicle is in motion or parked, enabling the system to accurately identify the vehicle's operating status under various conditions. Distinguishing between the vehicle controller's dormant and non-dormant states and setting different judgment conditions for each avoids misjudgments that may result from a single factor, improving the accuracy and reliability of the judgment. By comprehensively considering multiple factors such as the vehicle controller's status, vehicle speed, and the difference and duration of the liquid level acquisition value compared to the liquid level reference value, the system can more accurately determine whether the vehicle is refueling or leaking oil.
[0053] Secondly, an oil level display device based on a float-type liquid level sensor is provided, the oil level display device comprising:
[0054] The status determination module is used to determine the operating status of the vehicle;
[0055] The anti-shake judgment module is used to determine whether the fuel level display value needs to be anti-shake processed based on the first working state and the second working state when the working state changes. The first working state is the working state before the change, and the second working state is the working state after the change.
[0056] The coefficient determination module is used to determine the anti-shake coefficient based on the second working state when it is determined that anti-shake processing of the fuel level display value is required.
[0057] The anti-shake processing module is used to continuously perform anti-shake processing on the fuel level display value corresponding to the first working state and update it based on the anti-shake coefficient until the updated fuel level display value corresponds to the second working state.
[0058] Thirdly, a vehicle is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the vehicle to perform the methods described in the first aspect or any possible implementation thereof.
[0059] 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.
[0060] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0061] Figure 1 This is a schematic diagram of the structure of a float-type liquid level sensor provided in an embodiment of this application;
[0062] Figure 2 This is a schematic flowchart of an oil level display method based on a float-type liquid level sensor provided in an embodiment of this application;
[0063] Figure 3 This is a schematic diagram of the working state of a vehicle and the anti-shake strategy of a float-type liquid level sensor provided in an embodiment of this application;
[0064] Figure 4 This is a schematic diagram of the structure of an oil level display device based on a float-type liquid level sensor provided in an embodiment of this application;
[0065] Figure 5 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Detailed Implementation
[0066] 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.
[0067] 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.
[0068] For some vehicles (such as heavy-duty trucks), float-type liquid level sensors are typically used to collect the oil level. Figure 1 This is a schematic diagram of the structure of a float-type liquid level sensor provided in an embodiment of this application. Figure 1As shown, the float-type liquid level sensor utilizes the principle of buoyancy, with the float 101 moving up and down in the liquid as the liquid level rises and falls. The float 101 is typically connected to a lever 102 or other similar mechanical device. Changes in the liquid level cause the float 101 to rise and fall, and this change is transmitted through the lever 102 to a sensing element 103, such as a potentiometer, reed switch, or encoder. The sensing element converts the mechanical movement of the float 102 into an electrical signal output, thereby reflecting the change in liquid level.
[0069] Compared to other types of liquid level sensors, float-type liquid level sensors have a simple structure and lower cost; however, the resistance change of float-type liquid level sensors is a step change, resulting in relatively low acquisition accuracy. Furthermore, for large vehicles such as heavy trucks with relatively large fuel tank volumes and heights, when the vehicle is driving on bumpy roads or uphill / downhill, the float will sway with the liquid level changes in the tank, leading to inaccurate liquid level acquisition and potentially causing errors in the calculated fuel quantity.
[0070] As the requirements for intelligence in heavy-duty trucks increase, the accuracy requirements for fuel level calculation are also gradually increasing. For hybrid heavy-duty trucks, errors in fuel level calculation can have a significant impact on the calculation and display of driving range, which may lead to users misjudging the vehicle's driving status.
[0071] In view of the problems existing in the prior art, this application provides a fuel level display method based on a float-type liquid level sensor. During vehicle operation, the vehicle's operating state is determined. When a change in the vehicle's operating state is detected, it is determined whether anti-shake processing is needed for the fuel level display value based on the first operating state before the change and the second operating state after the change. When it is determined that anti-shake processing is needed, an anti-shake coefficient corresponding to the second operating state is determined, and anti-shake processing and updates are continuously performed based on the anti-shake coefficient and the fuel level display value corresponding to the first operating state until the updated fuel level display value corresponds to the second operating state. This method can improve the accuracy and stability of the fuel level display value of a vehicle using a float-type liquid level sensor for fuel level acquisition under different operating conditions.
[0072] The following is combined with Figures 2 to 3 The oil level display method based on a float-type liquid level sensor provided in the embodiments of this application will be described in detail.
[0073] Figure 2 This is a schematic flowchart illustrating a fuel level display method based on a float-type liquid level sensor, provided in an embodiment of this application. It should be understood that this method can be applied to a vehicle; or, to a processor in a vehicle; or, to a chip within a processor in a vehicle.
[0074] For example, such as Figure 2As shown, the method 200 includes:
[0075] S201, Determine the vehicle's operating status.
[0076] For example, the operating states of various components within a vehicle change under different road conditions; the operating state of the float-type liquid level sensor in the vehicle's fuel tank also varies. During vehicle operation, parameters of relevant components can be monitored to determine the vehicle's operating state. This operating state can include sensor malfunction status, hill-climbing status, refueling status, oil leak status, and normal operating status, among others.
[0077] In one implementation, the process of determining the vehicle's operating state may specifically include:
[0078] If the float-type liquid level sensor malfunctions or recovers to normal after malfunction and the normal duration is less than or equal to the second preset duration, the sensor malfunction state will be determined as the vehicle's working state.
[0079] When the vehicle speed is greater than the first preset speed, the vehicle gradient is greater than the preset gradient, and the duration of the vehicle gradient being greater than the preset gradient is greater than the third preset duration, the slope driving state is determined as the vehicle's working state.
[0080] The liquid level reference value is periodically updated based on the real-time liquid level acquisition value collected by the float-type liquid level sensor. When the difference between the liquid level acquisition value and the liquid level reference value is greater than a preset difference and the duration of the difference is greater than the preset difference reaches the fifth preset duration, the refueling state or the oil leakage state is determined as the working state of the vehicle.
[0081] When the vehicle's operating status is not in a sensor malfunction state, hill driving state, refueling state, or oil leak state, the normal operating status is determined as the vehicle's operating status.
[0082] For example, during vehicle operation, if the float-type liquid level sensor in the fuel tank malfunctions, it will send a fault code to the vehicle controller. The vehicle controller can monitor the working status of the float-type liquid level sensor. When it receives the fault code sent by the float-type liquid level sensor, it can determine that the float-type liquid level sensor is faulty, and thus determine that the vehicle's current working state is a sensor fault state. Alternatively, when it is detected that the fault code of the float-type liquid level sensor is cleared (i.e., the float-type liquid level sensor returns to normal after malfunctioning), and the duration after the fault code is cleared (i.e., the normal duration) is less than or equal to a second preset duration (e.g., 10 seconds), it is determined that the vehicle's current working state is a sensor fault state.
[0083] For example, vehicle speed information, driving slope information and other parameters are obtained; when it is detected that the vehicle speed is greater than a first preset speed (e.g., 2 km / h), and the vehicle driving slope is greater than a preset slope (e.g., 1.5%, which means that the vertical height rises or falls by 1.5 meters for every 100 meters the vehicle travels), and the duration of the vehicle's slope being greater than the preset slope is greater than a third preset duration (e.g., 10 seconds), it indicates that the vehicle is in an uphill or downhill condition, and thus the vehicle's working state can be determined to be a slope driving state.
[0084] For example, a float-type liquid level sensor can collect liquid level data in real time, and the liquid level reference value can be updated periodically based on the collected liquid level data. For instance, the liquid level data acquired every 5 seconds can be determined as the current liquid level reference value. Since the liquid level data changes in real time, while the liquid level reference value changes once per cycle (e.g., 5 seconds), the difference between the two can be determined based on the collected liquid level data and the liquid level reference value. When the difference between the two is detected to be greater than a preset difference (e.g., 20L), and the duration of the difference being greater than the preset difference reaches a fifth preset duration (e.g., 3 seconds), it indicates that the vehicle's fuel level has changed significantly in a short period of time, and thus the vehicle's operating state can be determined as either refueling or leaking fuel.
[0085] For example, if the vehicle's operating state is not the aforementioned sensor malfunction state, hill driving state, refueling state, or oil leak state, then the vehicle's operating state can be determined to be a normal operating state.
[0086] In this embodiment, the sensor fault state is determined by setting the conditions of the float-type liquid level sensor malfunction and the short period after the malfunction is recovered, which can identify whether the sensor is in an abnormal working state in a timely and accurate manner; the slope driving state is determined by comprehensively considering multiple factors such as vehicle speed, slope, and slope duration, making the judgment of the vehicle driving on the slope more accurate and reliable; the refueling or leaking state is judged by comparing the liquid level value collected by the float-type liquid level sensor with the reference value and the duration of the difference, which can monitor the vehicle's fuel changes in real time and accurately; and the stability and reliability of the vehicle fuel level monitoring system are improved by clearly judging and correspondingly processing different working states.
[0087] In one implementation, the process of determining the refueling state or oil leak state as the vehicle's operating state when the difference between the liquid level acquisition value and the liquid level reference value is greater than a preset difference and the duration of the difference being greater than the preset difference reaches a fifth preset duration may specifically include:
[0088] Determine whether the current state of the vehicle controller in the vehicle is sleep mode;
[0089] If the vehicle controller is currently in a sleep state, and then switches to a wake-up state, the difference between the liquid level acquisition value and the liquid level reference value at the same moment will be calculated in real time after the vehicle controller switches to a wake-up state and the wake-up state lasts for a period of six preset durations. If the difference between the two values is greater than a preset difference and the difference between the two values lasts for a period of five preset durations, then the refueling state or the oil leak state will be determined as the working state of the vehicle.
[0090] If the vehicle controller is not in a sleep state, the vehicle speed is acquired in real time. If the vehicle speed is less than or equal to the second preset speed and the duration of the speed being less than or equal to the second preset speed reaches the fourth preset duration, the difference between the liquid level acquisition value and the liquid level reference value at the same moment is calculated in real time. If the difference is greater than the preset difference and the duration of the difference being greater than the preset difference reaches the fifth preset duration, the refueling state or oil leakage state is determined as the working state of the vehicle.
[0091] The aforementioned liquid level reference value can be either the liquid level reference value updated by the vehicle controller before entering the sleep state, or the liquid level reference value updated by the vehicle controller after entering the wake-up state.
[0092] For example, when the vehicle is in motion, the vehicle controller is in an awake state, and it performs real-time statistics and processing of various vehicle data. When the vehicle is parked, the vehicle controller is in a sleep state and does not update the vehicle data in real time. When the vehicle controller is currently in a sleep state, if it detects that the vehicle is starting or powered on, it switches from a sleep state to an awake state. After the awake state lasts for a sixth preset duration (e.g., 3 seconds), it calculates the difference between the current liquid level acquisition value and the liquid level reference value. It then determines the relationship between this difference and a preset difference (e.g., 20L). If the difference is greater than the preset difference, and the duration of this difference reaches a fifth preset duration (e.g., 3 seconds), it indicates a rapid change in the fuel level in the tank, thus determining whether the vehicle is in a refueling or leaking state. Additionally, it should be noted that the liquid level reference value at the moment after the vehicle controller has been in the wake-up state for a duration of six preset durations can be either the liquid level reference value stored by the vehicle controller before switching to the sleep state, or the liquid level reference value updated after the vehicle controller switches to the wake-up state.
[0093] For example, when the vehicle is powered on and running, the vehicle controller is in a non-sleep state, i.e., in a wake-up state. At this time, the real-time vehicle speed is acquired. When the current vehicle speed is detected to be less than or equal to the second preset speed (e.g., 0.2 km / h), and the duration of the speed being less than or equal to the second preset speed reaches the fourth preset duration (e.g., 15 seconds), the difference between the liquid level acquisition value and the liquid level reference value at each moment is calculated in real time. When the difference is greater than the preset difference (e.g., 20L), and the duration of the difference being greater than the preset difference reaches the fifth preset duration (e.g., 3 seconds), it indicates that the fuel level in the tank has changed significantly in a short period of time, and the vehicle's working state can be determined to be either refueling or leaking.
[0094] Specifically, when the liquid level collected is greater than the liquid level reference value, and the difference between the two is greater than a preset difference (e.g., 20L), and the duration of the difference being greater than the preset difference reaches the fifth preset duration, the vehicle's working state can be determined to be refueling state; when the liquid level collected is less than the liquid level reference value, and the difference between the two is greater than a preset difference (e.g., 20L), and the duration of the difference being greater than the preset difference reaches the fifth preset duration, the vehicle's working state can be determined to be leaking oil.
[0095] In this embodiment, when the vehicle controller is in a dormant state, the system waits for it to wake up and remain dormant for a certain period before making a judgment, which is consistent with the possibility of refueling or leaking oil after the vehicle has stopped. When the vehicle controller is not in a dormant state, the judgment is made in conjunction with vehicle speed, adapting to different scenarios when the vehicle is in motion or parked, enabling the system to accurately identify the vehicle's operating status under various conditions. Distinguishing between the dormant and non-dormant states of the vehicle controller and setting different judgment conditions for each avoids misjudgments that may result from a single factor, improving the accuracy and reliability of the judgment. By comprehensively considering multiple factors such as the vehicle controller status, vehicle speed, the difference between the collected liquid level value and the reference liquid level value, and the duration of the difference, the system can more accurately determine whether the vehicle is refueling or leaking oil.
[0096] S202, when the working state changes, determine whether the fuel level display value needs to be anti-shake processed based on the first working state and the second working state, wherein the first working state is the working state before the change and the second working state is the working state after the change.
[0097] The fuel level display value indicates the fuel level that needs to be sent to the vehicle's dashboard for display.
[0098] During vehicle operation, the vehicle's operating status may change. If the change in operating status does not cause a significant change in the fuel level display value, no processing is needed, and the collected data can be displayed directly. However, if the change in operating status may cause jumps or large errors in the fuel level display value, anti-shake processing can be applied to eliminate these issues. For example, the vehicle's operating status is monitored in real time. When a change in the vehicle's operating status is detected, the system determines whether anti-shake processing of the fuel level display value is necessary based on the first operating status before the change and the second operating status after the change.
[0099] In one implementation, the process of determining whether to perform anti-shake processing on the fuel level display value based on a first operating state and a second operating state when a change in operating state is detected may specifically include:
[0100] In the event that a change in the operating status is detected;
[0101] If the first working state is a sensor fault state indicating that the float-type liquid level sensor has failed and therefore cannot work, and the second working state is a normal working state indicating that the float-type liquid level sensor is working under normal conditions, then it is determined that anti-shake processing is needed for the oil level display value.
[0102] If the first working state is a slope driving state used to indicate that the float-type liquid level sensor is working abnormally due to the vehicle driving on a slope, and the second working state is a normal working state, then it is determined that the fuel level display value needs to be de-shaken.
[0103] If the first working state is the normal working state, and the second working state is the refueling state where the float-type liquid level sensor is working abnormally due to the vehicle being refueled or the oil leakage state where the float-type liquid level sensor is working abnormally due to the vehicle being leaking oil, then it is determined that anti-shake processing is needed for the oil level display value.
[0104] For example, when a change in the vehicle's operating state is detected, the operating states before and after the change are compared. Specifically, when the vehicle's operating state is detected as a sensor failure state caused by a malfunction of the float-type liquid level sensor, and the system switches to a normal operating state where the float-type liquid level sensor is functioning normally, the sensor cannot properly collect fuel level data during the malfunction state. Therefore, it is necessary to estimate the vehicle's fuel level data. When the sensor returns to normal, the estimated fuel level value needs to be changed to the actual collected fuel level value. During this process, there may be some jumps or errors in the fuel level display value before and after the state change, so anti-shake processing is required for the fuel level display value.
[0105] For example, when a vehicle is driving uphill or downhill, the liquid level in the fuel tank will also tilt due to the vehicle's tilt. The float-type liquid level sensor always floats on the liquid surface and needs to be estimated based on the liquid level data to determine the displayed fuel level. When the vehicle is detected to switch from driving on a slope to normal operation, the accuracy of the liquid level data is higher. In order to achieve a smooth transition between the estimated value and the collected value, the fuel level display value needs to be anti-shake processed.
[0106] For example, when a vehicle changes from normal operating state to refueling state or oil leak state, the rate of change of the fuel level display value may suddenly increase, causing the fuel level display value to jump before and after the state change. Therefore, it is also necessary to perform anti-shake processing on the fuel level display value to avoid the display value jumping and affecting the driver's correct acquisition of fuel level information.
[0107] In this embodiment, when the vehicle switches from a sensor malfunction state or a slope driving state to a normal operating state, and when the vehicle switches from a normal operating state to a refueling state or a leaking state, it is determined that the fuel level display value needs to be stabilized. This can avoid the possible jump in the fuel level display value during the switching process between different driving conditions or operating states. The stabilization process can eliminate the influence of sensor malfunction or vehicle tilting on the sensor measurement value, and can also achieve a smooth display of the fuel level display value during the switching process between different states, thereby improving the accuracy and stability of the fuel level display value.
[0108] S203, when it is determined that the fuel level display value needs to be stabilized, the stabilization coefficient is determined based on the second working state.
[0109] For example, after determining that the current fuel level display value needs to be stabilized based on the first working state and the second working state, the corresponding stabilization coefficient is determined based on the second working state.
[0110] Optionally, the correspondence between the working state and the image stabilization coefficient can be preset. After the second working state is determined, the image stabilization coefficient corresponding to the second working state can be determined according to the correspondence between the two.
[0111] For example, when the second working state is the normal working state, the corresponding anti-shake coefficient can be set to 0.25L / s to achieve a smooth transition from the estimated liquid level value to the collected liquid level value. When the second working state is the refueling state, the anti-shake coefficient can be set according to the rate of change of fuel volume during the normal refueling process. For example, taking an 800L fuel tank as an example, under normal circumstances, it takes about 11 minutes to fill an 800L fuel tank from empty to full, with a refueling rate of about 1.21L / s. Considering the differences in the fuel nozzle rate at different gas stations, for redundancy, the anti-shake coefficient corresponding to the refueling condition can be set to about twice the normal refueling rate, that is, 2.5L / s.
[0112] Optionally, two anti-shake coefficients can be preset for switching between operating states. When the vehicle's operating state changes, the corresponding anti-shake coefficient can be determined by combining the two operating states before and after the change.
[0113] For example, when a vehicle switches from a working state that requires liquid level estimation, such as a sensor malfunction state or a slope driving state, to a normal working state, the corresponding anti-shake coefficient can be determined to be 0.25L / s; when a vehicle switches from a normal working state to a refueling state or an oil leak state, the corresponding anti-shake coefficient can be determined to be 2.6L / s.
[0114] It should be noted that the setting of the stabilization coefficient needs to be combined with relevant parameters such as the vehicle's fuel tank parameters and the vehicle's driving performance. The above-mentioned stabilization coefficient values are all example figures; this application embodiment does not impose specific limitations on the setting of the stabilization coefficient value.
[0115] S204, based on the anti-shake coefficient, continuously performs anti-shake processing on the fuel level display value corresponding to the first working state and updates it until the updated fuel level display value corresponds to the second working state.
[0116] For example, during vehicle operation, driving data is continuously stored and updated. When a change in the vehicle's operating state is detected, the fuel level display value corresponding to the first operating state can be obtained. After determining the anti-shake coefficient corresponding to the second operating state, the fuel level display value corresponding to the first operating state can be continuously processed for anti-shake based on the anti-shake coefficient, and the current fuel level display value can be updated until the updated fuel level display value corresponds to the second operating state.
[0117] Optionally, the fuel level display value corresponding to the first working state can be the fuel level display value at any time when the vehicle is in the first working state; it can include the fuel level display value at the moment before the vehicle switches from the first working state to the second working state, and the fuel level display value at a certain moment before switching to the second working state.
[0118] Preferably, in order to improve the accuracy of the fuel level display, the fuel level display value corresponding to the first working state can be the fuel level display value at the moment before switching to the second working state.
[0119] In one implementation, the first operating state is a sensor fault state, and the second operating state is a normal operating state. The anti-shake coefficient includes a first anti-shake coefficient, the anti-shake coefficient is determined based on the second operating state, and the fuel level display value corresponding to the first operating state is continuously subjected to anti-shake processing and updated based on the anti-shake coefficient until the updated fuel level display value corresponds to the second operating state, including:
[0120] The first image stabilization factor is determined based on normal operating conditions or based on both sensor malfunction and normal operating conditions.
[0121] The fuel level display value at the switching moment is determined based on the sensor fault status;
[0122] The fuel level display value is continuously processed and updated based on the first anti-shake coefficient until the updated fuel level display value corresponds to the normal operating state.
[0123] For example, when the vehicle's operating state switches from a sensor malfunction state to a normal operating state, a corresponding anti-shake coefficient (e.g., 0.25L / s) can be determined based on the normal operating state, or based on both the sensor malfunction state and the normal operating state. Then, based on the sensor malfunction state, the fuel level display value at the moment of switching to the normal operating state can be determined. Finally, the fuel level display value at the moment of switching can be continuously processed and updated based on the first anti-shake coefficient until the updated fuel level display value corresponds to the fuel level value when the vehicle is in normal operating state.
[0124] For example, during vehicle operation, the fuel level in the tank is decreasing. Accordingly, during the process of stabilizing the fuel level display value based on the stabilization coefficient, it is necessary to subtract the product of the first stabilization coefficient and the stabilization duration from the fuel level display value corresponding to the first working state to obtain the updated fuel level display value.
[0125] The stabilization duration indicates the length of time the stabilization process takes. The stabilization duration has a range, which indicates the total time required from the start to the end of the stabilization process. During stabilization, the fuel level display can be updated according to a preset first update cycle, such as 1 second or 2 seconds.
[0126] For example, if the first anti-shake coefficient is 0.25L / s and the fuel level display value at the switching moment is 100.00L, then it can be determined that the fuel level display value corresponding to the first second when the vehicle switches from the sensor fault state to the normal fault state is 99.75L, the fuel level display value corresponding to the second second is 99.50L, the fuel level display value corresponding to the third second is 99.25L, and so on, until the fuel level display value corresponds to the normal fuel level value collected under normal working conditions.
[0127] In this embodiment, when the float-type liquid level sensor recovers from a fault state to a normal working state, by determining an appropriate first anti-shake coefficient and performing anti-shake processing and updating the fuel level display value at the time of fault recovery based on this coefficient, the fuel level display error caused by sensor fault and instability in the early stage of recovery can be effectively eliminated. This makes the fuel level display value gradually stabilize and accurately reflect the actual fuel level, avoiding the problem of sudden changes or inaccuracies in fuel level display caused by changes in sensor state, and improving the accuracy of fuel level display when the vehicle state changes.
[0128] In one implementation, the first operating state is a slope driving state, the second operating state is a normal operating state, the anti-shake coefficient includes a second anti-shake coefficient, the anti-shake coefficient is determined based on the second operating state, and the fuel level display value corresponding to the first operating state is continuously subjected to anti-shake processing and updated based on the anti-shake coefficient until the updated fuel level display value corresponds to the second operating state, including:
[0129] The second stabilization factor is determined based on normal operating conditions or based on both hill driving conditions and normal operating conditions.
[0130] The fuel level displayed at the switching time is determined based on the slope driving status;
[0131] The fuel level display value is continuously processed and updated based on the second anti-shake coefficient until the updated fuel level display value corresponds to the normal operating state.
[0132] For example, when the vehicle's operating state switches from a hill-climbing state to a normal operating state, a corresponding anti-shake coefficient (e.g., 0.25L / s) can be determined based on the normal operating state, or based on both the hill-climbing state and the normal operating state. Then, based on the hill-climbing state, the fuel level display value at the moment of switching to the normal operating state can be determined. Finally, the fuel level display value at the moment of switching can be continuously processed and updated based on the second anti-shake coefficient until the updated fuel level display value corresponds to the fuel level value when the vehicle is in the normal operating state.
[0133] In this embodiment, when the vehicle is driving on a slope, the measurement of the float-type liquid level sensor is affected due to the vehicle's tilt, resulting in a deviation in the fuel level display value. When the vehicle transitions from the slope driving state to the normal operating state, by determining a second anti-shake coefficient and performing anti-shake processing and updating the fuel level display value at the moment of transition from the slope driving to normal driving based on this coefficient, the fuel level display error caused by the slope driving can be effectively eliminated, allowing the fuel level display value to gradually recover to an accurate state reflecting the actual fuel level; this avoids abrupt changes or inaccuracies in the fuel level display during state transitions, improving the accuracy of the fuel level display when the vehicle's state changes.
[0134] For example, during vehicle operation, the fuel level in the tank tends to decrease. Accordingly, during the process of stabilizing the fuel level display value based on the stabilization factor, the fuel level display value corresponding to the first operating state needs to be subtracted from the product of the second stabilization factor and the stabilization duration to obtain the updated fuel level display value. The second stabilization factor can be the same as or different from the first stabilization factor.
[0135] In one implementation, the first working state is a normal working state, the second working state is a refueling state or an oil leak state, the anti-shake coefficient includes a third anti-shake coefficient, the anti-shake coefficient is determined based on the second working state, and the fuel level display value corresponding to the first working state is continuously subjected to anti-shake processing and updated based on the anti-shake coefficient until the updated fuel level display value corresponds to the second working state, including:
[0136] The third anti-shake coefficient is determined based on the refueling status or the oil leak status, or based on the normal working status and the refueling status, or based on the normal working status and the oil leak status.
[0137] The fuel level displayed at the switching point is determined based on the normal operating status;
[0138] The fuel level display value is continuously processed and updated based on the third anti-shake coefficient until the updated fuel level display value corresponds to the refueling status or the oil leak status.
[0139] For example, when the vehicle's operating state switches from normal operation to refueling or leaking, a corresponding anti-shake coefficient (e.g., 2.5L / s) can be determined based on the refueling or leaking state, or based on both the normal operation and refueling or leaking states. Then, based on the normal operation state, the fuel level display at the moment of switching to refueling or leaking can be determined. Finally, the fuel level display at the moment of switching can be continuously processed and updated based on the third anti-shake coefficient until the updated fuel level display corresponds to the fuel level when the vehicle is in refueling or leaking state. This avoids the problem of the fuel level display not updating in a timely manner during refueling or leaking.
[0140] For example, during the refueling process of a vehicle, the amount of fuel in the tank tends to increase. Accordingly, in the process of anti-shake processing of the fuel level display value according to the third anti-shake coefficient, it is necessary to add the product of the third anti-shake coefficient and the anti-shake duration to the fuel level display value corresponding to the first working state to obtain the updated fuel level display value.
[0141] For example, when there is a fuel leak in the vehicle's fuel tank, the fuel level in the tank is decreasing. Accordingly, during the process of stabilizing the fuel level display value according to the third stabilization coefficient, it is necessary to subtract the product of the third stabilization coefficient and the stabilization duration from the fuel level display value corresponding to the first working state to obtain the updated fuel level display value.
[0142] In this embodiment, when the vehicle is in normal operating condition, the fuel level display reflects the fuel level under normal driving conditions. When refueling or leaking, the fuel level in the tank changes rapidly, and the measurement value of the float-type level sensor fluctuates accordingly. By determining a suitable third anti-shake coefficient and performing anti-shake processing and updating the fuel level display value at the moment of transition from normal operation to refueling or leaking based on this coefficient, display errors caused by state transitions and rapid fuel level changes can be effectively eliminated. This allows the fuel level display value to more accurately reflect the actual fuel level changes during refueling or leaking, avoiding large fluctuations or inaccuracies in the display value, and improving the accuracy of the fuel level display when the vehicle's state changes.
[0143] When the vehicle's operating state remains unchanged, a strategy for determining the corresponding fuel level display value can be established based on the vehicle's current operating state, thereby determining the fuel level display value to be displayed. In one implementation, the fuel level display value is determined based on the vehicle's operating state; specifically, the process of determining the fuel level display value based on the vehicle's operating state may include:
[0144] The liquid level reference value is periodically updated based on the real-time liquid level data collected by the float-type liquid level sensor.
[0145] If the vehicle's operating state is a sensor fault state indicating that the float-type liquid level sensor has malfunctioned and cannot operate, the duration of the float-type liquid level sensor fault is determined. If the duration of the fault is less than or equal to a first preset duration, the fuel level display value is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before the fault. If the duration of the fault is greater than the first preset duration, the fuel consumption is determined based on the duration of the sensor fault state and the real-time fuel injection quantity of the engine. A first liquid level estimate is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before the fault and the fuel consumption. Alternatively, the first liquid level estimate is determined based on the liquid level reference value at the moment before the fault and the fuel consumption. The fuel level display value is then determined based on the first liquid level estimate.
[0146] For example, when the vehicle is in a sensor malfunction state, the float-type liquid level sensor cannot collect the liquid level value in the fuel tank, and the liquid level reference value cannot be updated. The liquid level reference value may be the same as or different from the liquid level value collected before the malfunction. If the duration of the malfunction is less than or equal to a first preset duration (e.g., 10 seconds), the vehicle's operating state has not yet stabilized, and the liquid level value collected by the float-type liquid level sensor before the malfunction can be determined as the fuel level display value. If the duration of the malfunction is longer than the first preset duration, it is necessary to adjust the fuel level display based on the vehicle's engine fuel injection. Fuel level is estimated. Specifically, based on the duration of the vehicle's sensor malfunction and the engine's real-time fuel injection volume, the engine's fuel consumption during that duration can be determined. Then, based on the level value collected by the float-type level sensor at the moment before the malfunction and the engine's fuel consumption, a first estimated level value for the current moment can be determined. The fuel level display value can then be determined based on the first estimated level value. Alternatively, based on the level reference value at the moment before the malfunction and the engine's fuel consumption, the first estimated level value for the current moment can be determined. The fuel level display value can then be determined based on the first estimated level value.
[0147] Optionally, a second update cycle can be set for the liquid level estimate, such as updating the liquid level estimate every 15 seconds.
[0148] For example, when determining the first fluid level estimate, the real-time fuel injection quantity of the engine can be integrated within each second update cycle (e.g., 15s) to obtain the fuel consumption of the engine within each second update cycle. Then, the fluid level acquisition value (or fluid level reference value) before the fault is used to subtract the fuel consumption within each second update cycle to obtain the first fluid level estimate at the current moment. For example, if the fault lasts for 30s and two second update cycles (e.g., 15s) have passed, then the first fluid level estimate at the current moment is the fluid level acquisition value (or fluid level reference value) before the fault is subtracted from the fuel consumption within these two second update cycles.
[0149] If the vehicle is in a normal operating state, indicating that the float-type liquid level sensor is working under normal conditions, and the vehicle controller is not currently in a sleep state, the fuel level display value is determined based on the liquid level acquisition value collected by the float-type liquid level sensor. If the liquid level acquisition value changes and the fuel level display value needs to be updated, the fuel level display value before the update is continuously smoothed and updated based on a preset smoothing coefficient until the updated fuel level display value corresponds to the changed liquid level acquisition value. If the vehicle controller is currently in a sleep state and then switches to a wake-up state, the fuel level display value is determined based on the liquid level acquisition value just before the vehicle controller enters the sleep state, within the time period from when the vehicle controller switches to the wake-up state until the duration of the wake-up state does not reach the sixth preset duration.
[0150] For example, when the vehicle is in full normal working condition and the working condition does not change, the characteristics of the float-type liquid level sensor itself will cause the liquid level to change abruptly. In order to keep the fuel level display value from jumping, it is necessary to use a smoothing coefficient to smooth the fuel level display value.
[0151] For example, the smoothing coefficient under normal operating conditions can be set based on the real-time fuel consumption rate of the engine during vehicle operation. For instance, the fuel consumption rate of a heavy-duty truck engine is normally between 0.02 L / s and 0.03 L / s. Considering that the engine fuel consumption rate will increase when the vehicle is under severe operating conditions, the smoothing coefficient can be set to approximately twice the normal engine fuel consumption rate, i.e., 0.05 L / s, for redundancy.
[0152] For example, when the vehicle is in normal operation, the vehicle controller may be in a sleep state (e.g., when the vehicle is off and powered off) or a wake-up state (e.g., when the vehicle is powered on). When the current state of the vehicle controller is not in a sleep state, the fuel level display value at any given time can be determined based on the liquid level acquisition value collected by the float-type liquid level sensor. Furthermore, when a change in the liquid level acquisition value is detected, the fuel level display value should also be updated accordingly. If the fuel level display value is updated directly based on the changed liquid level acquisition value, a jump in the fuel level display value will occur. Therefore, to prevent a jump in the fuel level display value, this application uses a preset smoothing coefficient to smooth and update the fuel level display value before the update when an update is required, until the updated fuel level display value is consistent with the changed liquid level acquisition value, thereby avoiding a jump in the fuel level display value. When the vehicle controller is currently in a sleep state, it will not analyze or process the relevant data of the fuel tank. If the vehicle controller is detected to switch from a sleep state to a wake-up state, the fuel level display value within the target time period can be determined based on the fuel level acquisition value at the moment before the vehicle controller enters the sleep state. The target time period indicates the time period between when the duration of the vehicle controller switching to the wake-up state and when the wake-up state does not reach the sixth preset duration (e.g., 3 seconds).
[0153] It is understandable that the time period between the vehicle controller switching to the wake-up state and the wake-up state not reaching the sixth preset time period can also be understood as the sixth preset time period after detecting that the user has turned the vehicle into the ON position.
[0154] Optionally, the liquid level acquisition value at the moment before the vehicle controller enters sleep mode can be stored in an electrically erasable programmable read-only memory (EEPROM).
[0155] Optionally, when the vehicle is in normal operating condition, the accuracy of the liquid level reading can be improved by enhancing the resistance acquisition accuracy of the float sensor from a hardware perspective, thereby improving the accuracy of the fuel level display.
[0156] If the vehicle's operating state is an incline driving state that indicates the vehicle is driving on a slope, causing the float-type liquid level sensor to operate under abnormal conditions, the fuel consumption is determined based on the duration of the incline driving state and the real-time fuel injection quantity of the engine. A second liquid level estimate is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before entering the incline driving state and the fuel consumption, or the second liquid level estimate is determined based on the liquid level reference value at the moment before entering the incline driving state and the fuel consumption. The fuel level display value is determined based on the second liquid level estimate.
[0157] For example, when the vehicle is in a hill-climbing state, the float-type liquid level sensor operates under abnormal conditions. It can determine the engine's fuel consumption in various time periods based on the duration of the vehicle's hill-climbing state and the engine's real-time fuel injection quantity. Then, it can determine a second liquid level estimate based on the liquid level and fuel consumption collected by the float-type liquid level sensor before entering the hill-climbing state, or based on the liquid level reference value and fuel consumption. After that, the fuel level display value to be displayed can be determined based on the second liquid level estimate value.
[0158] If the vehicle's operating status is either a refueling state (indicating the vehicle is refueling, causing the float-type liquid level sensor to malfunction) or an oil leak state (indicating the vehicle is leaking oil, causing the float-type liquid level sensor to malfunction), the oil level display value is determined based on the liquid level data collected by the float-type liquid level sensor.
[0159] For example, when a vehicle is detected to be refueling or leaking oil, in order to display the fuel level value according to the actual refueling or leaking rate, a float-type liquid level sensor can be used to collect the liquid level value of the fuel tank in real time, and then determine the fuel level display value based on the liquid level value.
[0160] For example, the process of determining the fuel level display value based on the data collected by a float-type liquid level sensor may include: the float of the float-type liquid level sensor is connected to a variable resistor; the up-and-down movement of the float causes the slider of the variable resistor to move; when the float approaches the top of the fuel tank, the slider on the variable resistor approaches the ground terminal, and the resistance decreases; as the liquid level in the tank drops, the float sinks, causing the slider to move, and the resistance gradually increases; the vehicle's electronic control unit provides voltage to the variable resistor; as the resistance value changes, the voltage drop returned to the electronic control unit also changes accordingly, thus converting the change in the float's position into an electrical signal; after receiving the electrical signal, the electronic control unit analyzes and processes the signal according to a preset program; based on the correspondence between the voltage drop and the fuel level, it calculates the fuel level display value and then sends the fuel level display value to the fuel level display device for display. For example, it may send it to a mechanical fuel gauge, which displays the fuel level scale using electromagnetic principles; or it may send it to an electronic display fuel gauge for display.
[0161] In this embodiment, different methods are used to determine the fuel level display value based on different operating states of the vehicle. The fuel level data collected by the float-type liquid level sensor is processed by considering relevant influencing factors under different operating states to determine the fuel level display value that matches the current operating state; this improves the flexibility of determining the fuel level display value under different operating states, thereby enhancing the accuracy of the fuel level display value.
[0162] It should be noted that all numerical values involved in this application can be calibrated and adjusted according to different float-type liquid level sensors and different oil tank configurations; the specific values of each parameter in the embodiments of this application are not limited.
[0163] In summary, in this embodiment, the vehicle's operating state is monitored. When a change in the vehicle's operating state is detected, the system combines the operating state before and after the change to determine whether anti-shake processing of the fuel level display value is necessary. If anti-shake processing is required, the fuel level display value corresponding to the operating state before the change is continuously processed and updated based on the anti-shake coefficient corresponding to the changed operating state. The fuel level anti-shake processing ends when the updated fuel level display value corresponds to the changed operating state. By determining the vehicle's operating state and determining whether to perform anti-shake processing when the state changes, misjudgments and fluctuations in the fuel level display value caused by changes in the vehicle's motion state can be effectively reduced, making the fuel level display more accurately reflect the actual fuel level. Determining the anti-shake coefficient based on different operating states to process and update the fuel level display value allows for dynamic adjustment of the fuel level display according to the actual vehicle movement, further improving the accuracy and smoothness of the fuel level display.
[0164] Figure 3This is a schematic diagram illustrating the operating state of a vehicle and the anti-shake strategy of a float-type liquid level sensor according to an embodiment of this application. It should be understood that this embodiment can be applied to a vehicle; or, to a processor in a vehicle; or, to a chip in a processor mounted in a vehicle.
[0165] For example, such as Figure 3 As shown, this embodiment 300 includes:
[0166] S301, the vehicle is in normal operating condition.
[0167] For example, when the float-type liquid level sensor in the vehicle is working normally, the vehicle's working state can be determined to be normal working state; or, when the vehicle is not in a sensor failure state, or in a slope driving state, or in a refueling state, or in an oil leak state, the vehicle can be determined to be in normal working state.
[0168] In one implementation, when the vehicle is in normal operating condition, a smoothing coefficient can be used to smooth the liquid level value collected by the float-type liquid level sensor in order to determine the vehicle's fuel level display value.
[0169] The smoothing coefficient can be set with reference to the real-time fuel consumption rate of the engine during normal vehicle operation. Under normal circumstances, the fuel consumption rate of a heavy truck engine is between 0.02 and 0.03 L / s. Considering that the engine fuel consumption rate will increase when the vehicle is under aggressive driving or other harsh conditions, the initial value setting needs to take redundancy into account. It can be taken as about twice the engine fuel consumption rate under normal conditions, that is, the smoothing coefficient can be 0.05 L / s.
[0170] For example, when the vehicle is driving under normal operating conditions, the fuel level display value is determined by the real-time fuel level data collected by a float-type liquid level sensor and updated according to a first update cycle. If the fuel level data changes and an update is needed, the smoothed fuel level display value is obtained by subtracting the product of a smoothing coefficient and a smoothing duration from the previous fuel level display value. During the smoothing process, the fuel level display value can be updated according to a preset first update cycle, such as 1 second or 2 seconds. The smoothing duration represents the length of the smoothing process. The smoothing duration has a range, indicating the total time required from the start of the smoothing process to its completion.
[0171] Alternatively, the implementation of S301 can be found in [reference needed]. Figure 2 The relevant description of S204 is not repeated here in the embodiments of this application.
[0172] S302, the vehicle's operating status is sensor fault state.
[0173] For example, when a fault code is detected from a float-type liquid level sensor in a vehicle, the vehicle's operating state can be determined to be a sensor malfunction state. When the float-type liquid level sensor malfunctions, the currently collected value is locked and no longer updated; when the float-type liquid level sensor recovers from the malfunction state to the normal state, the liquid level reference value is reset to restart recording and updating.
[0174] In one implementation, when a fault is detected in the float-type liquid level sensor, the duration of the fault is acquired. If the fault duration does not reach a preset confirmation time (e.g., 10 seconds), the fuel level display value can be determined based on the liquid level acquisition value obtained at the last moment when the float-type liquid level sensor was in normal operation. If the fault duration reaches the preset confirmation time, the vehicle's fuel consumption is determined based on the duration of the vehicle's sensor fault state and the real-time fuel injection quantity of the vehicle's engine. Then, the fuel level display value is determined based on the fuel consumption and the liquid level acquisition value at the moment before the operating state switched to the sensor fault state; or, the fuel level display value is determined based on the fuel consumption and the liquid level reference value at the moment before the operating state switched to the sensor fault state.
[0175] The liquid level reference value is obtained by periodically updating the liquid level collection value. The update period can be set to 5 seconds, etc., but this application embodiment does not limit this.
[0176] In one implementation, when the float-type liquid level sensor recovers from a fault state, the vehicle's operating state switches from the sensor fault state to the normal operating state; the duration of the vehicle switching to the normal operating state is acquired; if the duration does not reach a preset confirmation time (e.g., 10 seconds), the vehicle's fuel consumption can be determined based on the duration of the vehicle being in the sensor fault state and the real-time fuel injection quantity of the vehicle's engine; then, based on the fuel consumption and the liquid level acquisition value at the moment before the operating state switched to the sensor fault state, the fuel level display value is determined; when the duration reaches the preset confirmation time, the liquid level acquisition value acquired by the float-type liquid level sensor is subjected to anti-shake processing using a first anti-shake coefficient to determine the fuel level display value.
[0177] When the vehicle is in a sensor malfunction state, the fuel level display value is estimated from the liquid level sensor value, which may differ from the actual fuel level. When the vehicle switches to normal operating mode, the fuel level display value needs to be corrected to be determined by the liquid level sensor value. To handle the deviation during the switch from the estimated liquid level value to the actual liquid level value, a first anti-shake factor can be used for anti-shake processing. To achieve... Smooth transition from estimated values to collected values The initial value of the first stabilization factor must be greater than the stabilization factor under normal working conditions. The first stabilization factor can be 5 times the stabilization factor 3 under normal working conditions, that is, the first stabilization factor can be 0.25L / s.
[0178] Optionally, when the vehicle's operating status switches from normal operating status to sensor malfunction status, there is no need to perform anti-shake processing on the fuel level display value.
[0179] Alternatively, the implementation of S302 can be found in [reference needed]. Figure 2 The relevant description of S204 is not repeated here in the embodiments of this application.
[0180] S303, the vehicle is in the slope driving state.
[0181] The driving state on a slope can include uphill driving state and downhill driving state.
[0182] For example, the vehicle speed and the current road gradient are obtained; when the vehicle speed is greater than the preset speed (e.g., 2 km / h), the road gradient is greater than the preset gradient (e.g., 1.5%), and the driving time on the road with a gradient greater than the preset gradient is greater than the preset time (e.g., 10s), the vehicle's working state can be determined to be a slope driving state.
[0183] In one implementation, when the vehicle is driving on a slope, in order to avoid the problem of sudden changes and instability in the fuel level display value due to the fluctuation of the fuel level as the vehicle goes up or down the slope, the fuel level display value can be estimated based on the fuel level value collected at the moment before the vehicle enters the slope driving state and the fuel consumption of the engine when the vehicle is driving on the slope, so as to determine the fuel level display value of the vehicle.
[0184] In one implementation, when the vehicle travels from an uphill or downhill section to a flat section, the vehicle's operating state switches from hill driving state to normal operating state. At this time, the second anti-shake coefficient can be used to perform anti-shake processing on the fuel level collected at the last moment when the vehicle was in hill driving state, and the fuel level display value can be determined.
[0185] The initial value of the second stabilization factor must be greater than the stabilization factor under normal working conditions. The second stabilization factor can be 5 times the smoothing factor under normal working conditions. The second stabilization factor can be the same as or different from the first stabilization factor. In this application, the second stabilization factor is the same as the first stabilization factor, which is 0.25L / s.
[0186] Optionally, when the vehicle's operating state changes from normal operating state to hill driving state, there is no need to perform anti-shake processing on the fuel level display value.
[0187] Alternatively, the implementation of S303 can be found in [reference needed]. Figure 2 The relevant description of S204 is not repeated here in the embodiments of this application.
[0188] S304, the vehicle's operating status is either refueling or leaking oil.
[0189] For example, the refueling or oil leaking state of a vehicle can occur when the vehicle controller is not in a sleep state, or when the vehicle controller transitions from a sleep state to a wake-up state through a power-on process.
[0190] When the vehicle controller is not in sleep mode, if the vehicle speed is detected to be less than or equal to a preset speed (e.g., 0.2 km / h) for a preset duration (e.g., 15 seconds), the difference between the liquid level acquisition value and the liquid level reference value at the same moment can be determined in real time. When the liquid level acquisition value is greater than the liquid level reference value, and the difference between the two is greater than a preset difference (e.g., 20L), and the duration of the difference being greater than the preset difference is a preset duration (e.g., 3 seconds), the vehicle's working state can be determined to be refueling. When the liquid level acquisition value is less than the liquid level reference value, and the difference between the two is greater than a preset difference (e.g., 20L), and the duration of the difference being greater than the preset difference is a preset duration, the vehicle's working state can be determined to be leaking oil.
[0191] When the vehicle controller switches from sleep mode to wake-up mode, the system first retrieves the fluid level data stored in the EEPROM before the controller was in sleep mode. Within a preset time (e.g., 3 seconds) after the vehicle is turned on, the fuel level display value is determined based on the last recorded fluid level data. Then, the difference between the fluid level data and the reference fluid level value at the same moment is determined in real time. When the fluid level data is greater than the reference fluid level value, and the difference between the two is greater than a preset difference (e.g., 20L), and the duration of this difference reaches a preset time (e.g., 3 seconds), the vehicle's operating state can be determined as refueling mode. When the fluid level data is less than the reference fluid level value, and the difference between the two is greater than a preset difference (e.g., 20L), and the duration of this difference reaches a preset time (e.g., 3 seconds), the vehicle's operating state can be determined as leaking oil.
[0192] In one implementation, when the vehicle is detected to switch from normal operation to refueling or leaking, a third anti-shake coefficient can be used to stunt the collected liquid level value in order to quickly reflect the change in fuel level and avoid the fuel level display value not being updated in time during refueling or leaking.
[0193] The third anti-shake coefficient can be set with reference to the rate of change of fuel volume during normal refueling. For example, under normal circumstances, it takes about 11 minutes for an 800L fuel tank to go from empty to full, and the refueling rate is about 1.21L / s. Considering that the refueling rate of fuel nozzles at different gas stations is different, the initial value setting needs to take redundancy into account. The third anti-shake coefficient can be taken as about twice the refueling rate under normal circumstances, that is, the third anti-shake coefficient can be set to 2.5L / s.
[0194] Optionally, when the vehicle's operating status switches from refueling or leaking to normal operation, there is no need to perform anti-shake processing on the fuel level display.
[0195] Alternatively, the implementation of S304 can be found in [reference needed]. Figure 2 The relevant description of S204 is not repeated here in the embodiments of this application.
[0196] In summary, in this embodiment, by monitoring different operating states of the vehicle (normal operating state, sensor malfunction state, hill driving state, refueling state, and oil leakage state), different processing methods for the fuel level display value are determined under different operating states to improve the matching degree between the fuel level display value and the current operating state, thereby improving the accuracy of the fuel level display value; when a change in the vehicle's operating state is detected, the fuel level display value is anti-shake processing is performed based on the operating states before and after the change to avoid jumps and errors in the fuel level display value, ensuring the smoothness of the fuel level display value change process and avoiding causing driver panic.
[0197] The above text combined Figures 1 to 3 The oil level display method based on a float-type liquid level sensor provided in the embodiments of this application is described in detail below; the following will be combined with Figure 4 and Figure 5 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.
[0198] Figure 4 This is a schematic diagram of an oil level display device based on a float-type liquid level sensor provided in an embodiment of this application.
[0199] For example, such as Figure 4 As shown, the fuel level display device 400 includes:
[0200] Status determination module 401 is used to determine the working status of the vehicle;
[0201] The anti-shake judgment module 402 is used to determine whether the fuel level display value needs to be anti-shake processed based on the first working state and the second working state when the working state changes. The first working state is the working state before the change, and the second working state is the working state after the change.
[0202] The coefficient determination module 402 is used to determine the anti-shake coefficient based on the second working state when it is determined that anti-shake processing of the fuel quantity display value is required.
[0203] The anti-shake processing module 404 is used to continuously perform anti-shake processing on the fuel level display value corresponding to the first working state based on the anti-shake coefficient and update it until the updated fuel level display value corresponds to the second working state.
[0204] In one possible implementation, the anti-shake judgment module 402 is further configured to, upon detecting a change in the operating state: if the first operating state is a sensor fault state indicating that the float-type liquid level sensor is malfunctioning and therefore cannot operate, and the second operating state is a normal operating state indicating that the float-type liquid level sensor is operating under normal conditions, then it is determined that anti-shake processing of the fuel level display value is required; if the first operating state is a slope driving state indicating that the float-type liquid level sensor is operating under abnormal conditions due to the vehicle driving on a slope, and the second operating state is a normal operating state, then it is determined that anti-shake processing of the fuel level display value is required; if the first operating state is a normal operating state, and the second operating state is a refueling state indicating that the float-type liquid level sensor is operating under abnormal conditions due to the vehicle refueling or an oil leak state indicating that the float-type liquid level sensor is operating under abnormal conditions due to the vehicle leaking oil, then it is determined that anti-shake processing of the fuel level display value is required.
[0205] In one possible implementation, the state determination module 401 is further configured to: determine the sensor fault state as the vehicle's operating state when the float-type liquid level sensor malfunctions or recovers to normal operation after a malfunction and the normal operation duration is less than or equal to a second preset duration; determine the ramp driving state as the vehicle's operating state when the vehicle speed is greater than a first preset speed, the vehicle gradient is greater than a preset gradient, and the duration of the gradient being greater than the preset gradient is greater than a third preset duration; periodically update the liquid level reference value based on the real-time liquid level acquisition value collected by the float-type liquid level sensor, and determine the refueling state or oil leakage state as the vehicle's operating state when the difference between the liquid level acquisition value and the liquid level reference value is greater than a preset difference and the duration of the difference being greater than the preset difference reaches a fifth preset duration; and determine the normal operation state as the vehicle's operating state when the vehicle's operating state is not the sensor fault state, ramp driving state, refueling state, or oil leakage state.
[0206] In one possible implementation, the fuel level display device 400 is further configured to determine the fuel level display value based on the vehicle's operating status. Specifically, the fuel level display device 400 is configured to periodically update the liquid level reference value based on the real-time liquid level acquisition value collected by the float-type liquid level sensor. If the vehicle's operating status is a sensor fault state indicating that the float-type liquid level sensor has malfunctioned and cannot operate, the duration of the float-type liquid level sensor fault is determined. If the fault duration is less than or equal to a first preset duration, the fuel level display value is determined based on the liquid level acquisition value collected by the float-type liquid level sensor at the moment before the fault. If the fault duration is greater than the first preset duration... The following steps are taken: Fuel consumption is determined based on the duration of the sensor malfunction and the real-time fuel injection quantity of the engine. A first estimated fuel level is determined based on the fuel level value collected by the float-type level sensor at the moment before the malfunction and the fuel consumption; or, the first estimated fuel level is determined based on the fuel level reference value at the moment before the malfunction and the fuel consumption. The fuel level display value is then determined based on the first estimated fuel level value. If the vehicle is in a normal operating state (indicating the float-type level sensor is working under normal conditions), and the vehicle controller is not in a sleep state, the fuel level display value is determined based on the fuel level value collected by the float-type level sensor. The fuel level display value is updated when the fuel level value changes. In the case of the displayed value, the fuel level display value before the update is continuously smoothed and updated based on a preset smoothing coefficient until the updated fuel level display value corresponds to the changed liquid level acquisition value. If the vehicle controller is currently in sleep mode and subsequently switches to wake-up mode, the fuel level display value is determined based on the liquid level acquisition value just before the vehicle controller enters sleep mode, within the time period from when the vehicle controller switches to wake-up mode until the duration of wake-up mode does not reach the sixth preset duration. If the vehicle's operating state is a slope driving state used to indicate that the float-type liquid level sensor is operating abnormally due to the vehicle being driven on a slope, based on the slope... The fuel consumption is determined by the duration of the uphill driving state and the real-time fuel injection quantity of the engine. A second estimated value of the fuel level is determined based on the fuel level value collected by the float-type liquid level sensor at the moment before entering the uphill driving state and the fuel consumption, or based on the liquid level reference value at the moment before entering the uphill driving state and the fuel consumption. The fuel level display value is determined based on the second estimated value. If the vehicle's operating state is a refueling state that indicates the vehicle is refueling and causes the float-type liquid level sensor to operate abnormally, or an oil leak state that indicates the vehicle is leaking oil and causes the float-type liquid level sensor to operate abnormally, the fuel level display value is determined based on the liquid level value collected by the float-type liquid level sensor.
[0207] In one possible implementation, the first working state is a sensor fault state, the second working state is a normal working state, and the anti-shake coefficient includes a first anti-shake coefficient; the coefficient determination module 403 and the anti-shake processing module 404 are further used to determine the first anti-shake coefficient based on the normal working state or to determine the first anti-shake coefficient based on both the sensor fault state and the normal working state; determine the fuel level display value at the switching moment based on the sensor fault state; and continuously perform anti-shake processing on the fuel level display value and update it based on the first anti-shake coefficient until the updated fuel level display value corresponds to the normal working state.
[0208] In one possible implementation, the first working state is a slope driving state, the second working state is a normal working state, and the anti-shake coefficient includes a second anti-shake coefficient; the coefficient determination module 403 and the anti-shake processing module 404 are further used to determine the second anti-shake coefficient based on the normal working state or based on both the slope driving state and the normal working state; determine the fuel level display value at the switching time based on the slope driving state; and continuously perform anti-shake processing and update the fuel level display value based on the second anti-shake coefficient until the updated fuel level display value corresponds to the normal working state.
[0209] In one possible implementation, the first working state is a normal working state, the second working state is a refueling state or an oil leak state, and the anti-shake coefficient includes a third anti-shake coefficient; the coefficient determination module 403 and the anti-shake processing module 404 are further used to determine the third anti-shake coefficient based on the refueling state or the oil leak state, or based on the normal working state and the refueling state, or based on the normal working state and the oil leak state; determine the fuel level display value at the switching time based on the normal working state; and continuously perform anti-shake processing on the fuel level display value and update it based on the third anti-shake coefficient until the updated fuel level display value corresponds to the refueling state or the oil leak state.
[0210] In one possible implementation, the state determination module 401 is further used to determine whether the current state of the vehicle controller in the vehicle is a sleep state; if the current state of the vehicle controller is a sleep state, and the state of the vehicle controller is subsequently switched to a wake-up state, then after the state of the vehicle controller is switched to a wake-up state and the duration of the wake-up state reaches a sixth preset duration, the difference between the liquid level acquisition value and the liquid level reference value at the same moment is calculated in real time. If the difference is greater than a preset difference, and the duration of the difference being greater than the preset difference reaches a fifth preset duration, then the refueling state or the oil leakage state is determined as the working state of the vehicle; if the current state of the vehicle controller is not a sleep state, the vehicle speed is acquired in real time. If the vehicle speed is less than or equal to a second preset speed and the duration of the speed being less than or equal to the second preset speed reaches a fourth preset duration, then the difference between the liquid level acquisition value and the liquid level reference value at the same moment is calculated in real time. If the difference is greater than a preset difference, and the duration of the difference being greater than the preset difference reaches a fifth preset duration, then the refueling state or the oil leakage state is determined as the working state of the vehicle.
[0211] It should be noted that the aforementioned fuel level display device is implemented in the form of a functional unit. The term "module" here can be implemented in software and / or hardware, without specific limitations.
[0212] 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.
[0213] 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.
[0214] Figure 5 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.
[0215] For example, such as Figure 5As shown, the vehicle 500 includes a memory 501 and a processor 502. The memory 501 stores executable program code 503, and the processor 502 is used to call and execute the executable program code 503 to perform an oil level display method based on a float-type liquid level sensor.
[0216] Furthermore, this application also protects an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute the oil level display method based on a float-type liquid level sensor provided in this application.
[0217] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0218] When each functional module is divided according to its corresponding function, the device may further include a state determination module, a stabilization judgment module, a coefficient determination module, and a stabilization processing module. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.
[0219] It should be understood that the device provided in this embodiment is used to execute the above-described oil level display method based on a float-type liquid level sensor, and therefore can achieve the same effect as the above-described implementation method.
[0220] When using an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module can be used to control and manage the vehicle's movements. The storage module can be used to support the vehicle in executing relevant program code.
[0221] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0222] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the oil level display method based on a float-type liquid level sensor provided in the above embodiments.
[0223] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the oil level display method based on a float-type liquid level sensor provided in the above embodiment.
[0224] 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.
[0225] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to realize the oil level display method based on a float-type liquid level sensor provided in the above embodiment.
[0226] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0227] 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.
[0228] 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.
[0229] 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 method for displaying oil level based on a float-type liquid level sensor, characterized in that, The method includes: Determine the vehicle's operating status; If a change in the operating state is detected, it is determined whether the fuel level display value needs to be stabilized based on the first operating state and the second operating state, wherein the first operating state is the operating state before the change and the second operating state is the operating state after the change. If it is determined that the fuel level display value needs to be stabilized, the stabilization coefficient is determined based on the second working state; Based on the anti-shake coefficient, the fuel level display value corresponding to the first working state is continuously subjected to anti-shake processing and updated until the updated fuel level display value corresponds to the second working state.
2. The method according to claim 1, characterized in that, The step of determining whether to perform anti-shake processing on the fuel level display value based on the first and second operating states when a change in the operating state is detected includes: In the event that a change in the operating state is detected; If the first working state is a sensor fault state indicating that the float-type liquid level sensor has failed and therefore cannot work, and the second working state is a normal working state indicating that the float-type liquid level sensor works under normal conditions, then it is determined that anti-shake processing is needed for the oil level display value. If the first working state is a slope driving state used to indicate that the float-type liquid level sensor is working abnormally due to the vehicle driving on a slope, and the second working state is a normal working state, then it is determined that the fuel level display value needs to be anti-shake processed. If the first working state is the normal working state, and the second working state is the refueling state where the float-type liquid level sensor is working abnormally due to the vehicle being refueled or the oil leakage state where the float-type liquid level sensor is working abnormally due to the vehicle being leaking oil, then it is determined that anti-shake processing is needed for the oil level display value.
3. The method according to claim 2, characterized in that, Determining the vehicle's operating status includes: If the float-type liquid level sensor malfunctions or if the float-type liquid level sensor recovers to normal after malfunction and the normal duration is less than or equal to the second preset duration, the sensor malfunction state will be determined as the vehicle's working state. When the vehicle speed is greater than the first preset speed, the vehicle gradient is greater than the preset gradient, and the duration of the vehicle gradient being greater than the preset gradient is greater than the third preset duration, the slope driving state is determined as the vehicle's working state. Based on the real-time liquid level acquisition value collected by the float-type liquid level sensor, the liquid level reference value is periodically updated. When the difference between the liquid level acquisition value and the liquid level reference value is greater than a preset difference and the duration of the difference is greater than the preset difference reaches a fifth preset duration, the refueling state or the oil leakage state is determined as the working state of the vehicle. When the vehicle's operating state is not the sensor malfunction state, the slope driving state, the refueling state, or the oil leak state, the normal operating state is determined as the vehicle's operating state.
4. The method according to claim 1, characterized in that, The method further includes: The fuel level display value is determined based on the vehicle's operating status. Determining the fuel level display value based on the vehicle's operating status includes: The liquid level reference value is periodically updated based on the real-time liquid level data collected by the float-type liquid level sensor. If the vehicle's operating state is a sensor fault state indicating that the float-type liquid level sensor has malfunctioned and therefore cannot operate, the duration of the float-type liquid level sensor fault is determined. If the duration of the fault is less than or equal to a first preset duration, the fuel level display value is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before the fault. If the duration of the fault is greater than the first preset duration, the fuel consumption is determined based on the duration of the sensor fault state and the real-time fuel injection quantity of the engine. A first liquid level estimate is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before the fault and the fuel consumption. Alternatively, a first liquid level estimate is determined based on the liquid level reference value at the moment before the fault and the fuel consumption. The fuel level display value is then determined based on the first liquid level estimate. If the vehicle is in a normal operating state, indicating that the float-type liquid level sensor is working under normal conditions, and the vehicle controller is not currently in a sleep state, the fuel level display value is determined based on the liquid level acquisition value collected by the float-type liquid level sensor. If the liquid level acquisition value changes and the fuel level display value needs to be updated, the fuel level display value before the update is continuously smoothed and updated based on the preset smoothing coefficient until the updated fuel level display value corresponds to the changed liquid level acquisition value. If the vehicle controller is currently in a sleep state and then switches to a wake-up state, the fuel level display value is determined based on the liquid level acquisition value at the moment before the vehicle controller enters the sleep state, during the period from when the vehicle controller switches to the wake-up state until the duration of the wake-up state does not reach the sixth preset duration. If the vehicle's operating state is an incline driving state that indicates the vehicle is driving on a slope, causing the float-type liquid level sensor to operate under abnormal conditions, the fuel consumption is determined based on the duration of the incline driving state and the real-time fuel injection quantity of the engine. A second liquid level estimate is determined based on the liquid level value collected by the float-type liquid level sensor at the moment before entering the incline driving state and the fuel consumption, or a second liquid level estimate is determined based on the liquid level reference value at the moment before entering the incline driving state and the fuel consumption. The fuel level display value is determined based on the second liquid level estimate. If the vehicle's operating status is either a refueling state (indicating the vehicle is refueling, causing the float-type liquid level sensor to malfunction) or an oil leak state (indicating the vehicle is leaking oil, causing the float-type liquid level sensor to malfunction), the oil level display value is determined based on the liquid level value collected by the float-type liquid level sensor.
5. The method according to claim 2, characterized in that, The first operating state is a sensor fault state, the second operating state is a normal operating state, the anti-shake coefficient includes a first anti-shake coefficient, the step of determining the anti-shake coefficient based on the second operating state, and continuously performing anti-shake processing and updating the fuel level display value corresponding to the first operating state based on the anti-shake coefficient until the updated fuel level display value corresponds to the second operating state includes: The first image stabilization factor is determined based on the normal operating state or based on the sensor malfunction state and the normal operating state. The fuel level display value at the switching time is determined based on the sensor's fault status; Based on the first anti-shake coefficient, the fuel level display value is continuously processed and updated until the updated fuel level display value corresponds to the normal working state.
6. The method according to claim 2, characterized in that, The first operating state is a slope driving state, the second operating state is a normal operating state, the anti-shake coefficient includes a second anti-shake coefficient, the step of determining the anti-shake coefficient based on the second operating state, and continuously performing anti-shake processing and updating the fuel level display value corresponding to the first operating state based on the anti-shake coefficient until the updated fuel level display value corresponds to the second operating state includes: The second anti-shake coefficient is determined based on the normal operating state or based on the slope driving state and the normal operating state. The fuel level display value at the switching time is determined based on the slope driving status; The fuel level display value is continuously processed and updated based on the second anti-shake coefficient until the updated fuel level display value corresponds to the normal operating state.
7. The method according to claim 1, characterized in that, The first working state is a normal working state, the second working state is a refueling state or an oil leak state, the anti-shake coefficient includes a third anti-shake coefficient, the step of determining the anti-shake coefficient based on the second working state, and continuously performing anti-shake processing and updating the fuel level display value corresponding to the first working state based on the anti-shake coefficient until the updated fuel level display value corresponds to the second working state includes: The third anti-shake coefficient is determined based on the refueling state or the oil leakage state, or based on the normal working state and the refueling state, or based on the normal working state and the oil leakage state. The fuel level display value at the switching moment is determined based on the normal operating state. The fuel level display value is continuously stabilized and updated based on the third anti-shake coefficient until the updated fuel level display value corresponds to the refueling status or the oil leakage status.
8. The method according to claim 3, characterized in that, When the difference between the collected liquid level value and the reference liquid level value is greater than a preset difference and the duration of this difference reaches a fifth preset duration, determining the refueling state or the oil leakage state as the vehicle's operating state includes: Determine whether the current state of the vehicle controller in the vehicle is a sleep state; If the current state of the vehicle controller is in a sleep state, and the state of the vehicle controller is subsequently switched to a wake-up state, then after the state of the vehicle controller is switched to a wake-up state and the duration of the wake-up state reaches a sixth preset duration, the difference between the liquid level acquisition value and the liquid level reference value at the same moment is calculated in real time. If the difference between the two is greater than a preset difference, and the duration of the difference between the two is greater than the preset difference reaches a fifth preset duration, then the refueling state or the oil leakage state is determined as the working state of the vehicle. If the current state of the vehicle controller is not in a sleep state, the vehicle speed is acquired in real time. If the vehicle speed is less than or equal to a second preset speed and the duration of the vehicle speed being less than or equal to the second preset speed reaches a fourth preset duration, the difference between the liquid level acquisition value and the liquid level reference value at the same moment is calculated in real time. If the difference is greater than a preset difference and the duration of the difference being greater than the preset difference reaches a fifth preset duration, the refueling state or the oil leakage state is determined as the working state of the vehicle.
9. 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 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 7.