Vehicle fuel quantity display method, device and equipment and storage medium

By filtering and smoothing the vehicle oil volume signal through the average value of two different sampling rates, the problem of inaccurate oil volume display in the prior art is solved, and high-precision oil volume change display is achieved.

CN119688035APending Publication Date: 2025-03-25DONGFENG COMML VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411609415.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high-precision display of vehicle oil volume, which is limited by the step-by-step sudden change of segmented oil volume sensor signals and the jump in the oil volume display value caused by road bumps.

Method used

Through the average value of two different sampling rates, filtering and smoothing of the oil volume signal is achieved. The specific steps include collecting the oil quantity signal based on the set first sampling period and calculating its average value in real time, then obtaining the average value based on the second sampling period and calculating its average value again to achieve the purpose of smoothing processing.

Benefits of technology

High-precision smooth display of oil volume changes is achieved, reducing the problem of inaccurate oil volume display caused by road bumps and sudden sensor signal changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119688035A_ABST
    Figure CN119688035A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle oil quantity display method, device and equipment and a storage medium, and the method comprises the steps: collecting oil quantity signals in a vehicle driving process based on a set first sampling period, and calculating an average value of the oil quantity signals in real time; on the basis of a set second sampling period, the fuel quantity signal average value is obtained, and the average value of the fuel quantity signal average value is calculated in real time so that the fuel quantity signals can be smoothed; and determining whether to display the current fuel quantity value of the vehicle based on the smoothed fuel quantity signal. By means of the average value of two different sampling rates, filtering and smoothing processing of the oil quantity signals are achieved, and the purpose of smoothly displaying oil quantity changes in a high-precision mode is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle fuel quantity calculation, and in particular to a vehicle fuel quantity display method, device, equipment and storage medium. Background Art

[0002] As vehicles become more and more intelligent, the requirements for data accuracy are also getting higher and higher. For example, if the instrument oil level display accuracy is 1%, and the sensor uses a segmented sensor, it is necessary to achieve high-precision display of the oil level signal from the software. The segmented oil level sensor is composed of multiple resistors. The resistance value increases nonlinearly from bottom to top in a step-by-step manner. There is a certain gap between the resistors. When the oil level float floats up and down between the two resistors, the resistance value remains unchanged. At this time, the oil level sensor signal collected by the control is also unchanged. The sensor resistance value increases in a step-by-step manner, and the signal collected by the controller also presents a step-by-step mutation. The sudden change of the sensor signal, coupled with the bumps on the road, will cause the oil level display value to jump, which in turn leads to inaccurate oil level display results.

[0003] Therefore, how to achieve accurate display of vehicle fuel level is a technical problem that urgently needs to be solved. Summary of the invention

[0004] The main purpose of the present invention is to provide a vehicle fuel level display method, device, equipment and storage medium, which realizes filtering and smoothing of fuel level signals through the average value of two different sampling rates, so as to achieve the purpose of high-precision and smooth display of fuel level changes.

[0005] In a first aspect, the present application provides a method for displaying the fuel level of a vehicle, wherein the method comprises the steps of:

[0006] Based on a set first sampling period, the fuel level signal of the vehicle during driving is collected, and the average value of the fuel level signal is calculated in real time;

[0007] Based on the set second sampling period, the average value of the oil quantity signal is obtained, and the average value of the average values ​​of the oil quantity signal is calculated in real time to smooth the oil quantity signal;

[0008] Based on the smoothed fuel level signal, determine whether to display the current fuel level value of the vehicle.

[0009] In combination with the first aspect above, as an optional implementation, determining the state of the vehicle when refueling, the state including the vehicle powered on state and the vehicle not powered on state;

[0010] According to the state of the vehicle during refueling, the corresponding display strategy is executed.

[0011] In combination with the first aspect above, as an optional implementation, if the vehicle is not powered on during refueling, the fuel level signal en collected last time before power off is stored;

[0012] After the vehicle is powered on after refueling, the fuel level signal ex is collected, and the difference △e is calculated between the collected fuel level signal value and en;

[0013] The absolute value of △e is compared with the set judgment threshold △emax. When △e is greater than △emax, it is determined that the vehicle has been refueled and ex is sent as the display value. When △e is less than △emax, the fuel value after filtering before power off is sent. As display value;

[0014] If the vehicle is powered on during refueling, the fuel level signal ex is collected according to the set period, and when the difference △e between the fuel level signal ex collected according to the set period and the fuel level signal en collected last time before power off is greater than △emax, the fuel level display result is updated in real time according to the fuel level signal collected according to the set period;

[0015] If the difference △e between the oil level signal ex collected according to the set period and the oil level signal en collected for the last time before power-off is less than △emax, it is determined that the vehicle has not been refueled, and the oil level value before the last power-off is displayed.

[0016] In combination with the first aspect above, as an optional implementation manner, a first queue is created to store a plurality of oil quantity signal data;

[0017] Collecting a fuel level signal of the vehicle during the characterization process once at a first preset time interval, and storing the collected fuel level signal in the first queue;

[0018] The average values ​​of multiple oil quantity signals in the first queue are calculated to filter the oil level fluctuations, wherein the data in the first queue are updated according to the first-in-first-out principle, so that a new average value is generated at regular intervals.

[0019] In combination with the first aspect above, as an optional implementation, a second queue is created to store a plurality of oil quantity signal data;

[0020] At every second preset time interval, a data is obtained from the first queue and put into the second queue, and the average value of the average values ​​of the oil quantity signals in the second queue is calculated in real time.

[0021] In combination with the first aspect above, as an optional implementation method, if the current oil level signal after smoothing is The oil level signal after smoothing at the previous moment If the difference between the two is less than the set threshold, the current oil volume signal after smoothing is output. As the oil level real-time display result;

[0022] If the current oil level signal after smoothing The oil level signal after smoothing at the previous moment If the difference between them is greater than the set threshold, the smoothing operation will continue until the set threshold is met, and the result will be output and displayed.

[0023] In combination with the first aspect above, as an optional implementation method, it is determined whether the oil quantity signal value after smoothing is much greater than the oil quantity signal value calculated after smoothing in the previous cycle;

[0024] If so, the result after this smoothing process is discarded, and the oil quantity signal value calculated after the previous smoothing process is used as the current oil quantity display result.

[0025] In a second aspect, the present application provides a vehicle fuel level display device, the device comprising:

[0026] A calculation module, which is used to collect the fuel level signal of the vehicle during driving based on a set first sampling period, and calculate the average value of the fuel level signal in real time;

[0027] A processing module, which is used to obtain the average value of the oil quantity signal based on a set second sampling period, and calculate the average value of the average values ​​of the oil quantity signal in real time to perform smoothing processing on the oil quantity signal;

[0028] The display module determines whether to display the current fuel level value of the vehicle based on the fuel level signal after smoothing.

[0029] In a third aspect, the present application further provides an electronic device, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method described in any one of the first aspects is implemented.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium storing computer program instructions, which, when executed by a computer, enables the computer to execute any of the methods described in the first aspect.

[0031] The present application provides a vehicle fuel level display method, device, equipment and storage medium, wherein the method includes the following steps: based on a set first sampling period, collecting fuel level signals during vehicle driving, and calculating the fuel level signal average value in real time; based on a set second sampling period, obtaining the fuel level signal average value, and calculating the average value of the fuel level signal average value in real time to smooth the fuel level signal; based on the smoothed fuel level signal, determining whether to display the current fuel level value of the vehicle. The present application achieves filtering and smoothing of the fuel level signal through the average value of two different sampling rates, so as to achieve the purpose of high-precision smooth display of fuel level changes.

[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0034] Figure 1 A flow chart of a vehicle fuel level display method provided in an embodiment of the present application;

[0035] Figure 2 A schematic diagram of a vehicle fuel level display device provided in an embodiment of the present application;

[0036] Figure 3 This is a flowchart of the oil level display process provided in the embodiment of the present application;

[0037] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0038] Figure 5 A schematic diagram of a computer-readable program medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0040] Furthermore, the drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the blocks shown in the drawings are functional entities and do not necessarily correspond to physically or logically separate entities.

[0041] The embodiments of the present application provide a vehicle fuel level display method, device, equipment and storage medium, which implement filtering and smoothing of the fuel level signal through the average value of two different sampling rates, thereby achieving the purpose of high-precision and smooth display of fuel level changes.

[0042] In order to achieve the above technical effects, the general idea of ​​this application is as follows:

[0043] A method for displaying the fuel level of a vehicle, the method comprising the steps of:

[0044] S101: Based on a set first sampling period, an oil level signal during vehicle driving is collected, and an average value of the oil level signal is calculated in real time.

[0045] S102: Based on a set second sampling period, an average value of the oil quantity signal is obtained, and an average value of the average values ​​of the oil quantity signal is calculated in real time to smooth the oil quantity signal.

[0046] S103: Based on the smoothed fuel level signal, determine whether to display the current fuel level value of the vehicle.

[0047] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

[0048] Reference Figure 1 , Figure 1 FIG. 1 is a flow chart of a vehicle fuel level display method provided by the present invention, as shown in FIG. Figure 1 As shown, the method comprises the steps of:

[0049] Step S101: Based on a set first sampling period, the fuel level signal of the vehicle during driving is collected, and the average value of the fuel level signal is calculated in real time.

[0050] It needs to be explained that, based on the set first sampling period, the oil level signal of the vehicle during driving is collected, and before the real-time calculation of the average value of the oil level signal, it includes: judging the state of the vehicle during refueling, the state including the vehicle powered on state and the vehicle not powered on state; executing the corresponding display strategy according to the state of the vehicle during refueling.

[0051] It is understandable that the vehicle is generally refueled when it is stationary, and the oil level will change greatly before and after refueling. The software records the last sampling data before the vehicle is powered off, and calculates the difference between the data collected after powering on and the last sampling data before the vehicle is powered off. If the absolute value of the difference is greater than the maximum change threshold set by the software, and the vehicle is stationary, it is considered that the vehicle is refueling, and the first collected data after powering on is displayed as the current oil level value, otherwise it is displayed according to the oil level value before the vehicle is powered off.

[0052] Specifically, if the vehicle is not powered on during refueling, the fuel level signal en collected last time before power off is stored;

[0053] After the vehicle is powered on after refueling, the fuel level signal ex is collected, and the difference △e is calculated between the collected fuel level signal value and en;

[0054] The absolute value of △e is compared with the set judgment threshold △emax. When △e is greater than △emax, it is determined that the vehicle has been refueled and ex is sent as the display value. When △e is less than △emax, the fuel value after filtering before power off is sent. As display value;

[0055] If the vehicle is powered on during refueling, the fuel level signal ex is collected according to the set period, and when the difference △e between the fuel level signal ex collected according to the set period and the fuel level signal en collected last time before power off is greater than △emax, the fuel level display result is updated in real time according to the fuel level signal collected according to the set period;

[0056] If the difference △e between the oil level signal ex collected according to the set period and the oil level signal en collected for the last time before power-off is less than △emax, it is determined that the vehicle has not been refueled, and the oil level value before the last power-off is displayed.

[0057] Specifically, a first queue is created to store a plurality of oil quantity signal data;

[0058] Collecting a fuel level signal of the vehicle during the characterization process once at a first preset time interval, and storing the collected fuel level signal in the first queue;

[0059] The average values ​​of multiple oil quantity signals in the first queue are calculated to filter the oil level fluctuations, wherein the data in the first queue are updated according to the first-in-first-out principle, so that a new average value is generated at regular intervals.

[0060] For easy understanding, let's take an example. A queue A is created, which can hold N data. The software collects sensor data e every T1 seconds and puts it into the queue. The queue data is updated according to the first-in-first-out principle, and the real-time average ê is calculated: ê = (e1+e2+......en) / N. The arithmetic mean ê reflects the trend in the data set and can effectively filter out the ups and downs of the oil signal caused by road bumps.

[0061] Optionally, when the vehicle is driving on a bumpy road, the fuel in the fuel tank will fluctuate up and down, driving the float of the fuel level sensor to float up and down, resulting in the fuel level sensor signal value collected by the controller to be inaccurate, and the collected value is distributed above and below the actual value. Collect the fuel level signal multiple times, period T2, form a queue of length N, calculate the average value, and obtain a fuel level signal close to the actual value. Thereby achieving the filtering effect of the oil level fluctuation. The queue continuously updates the fuel level signal value in the queue according to the first-in-first-out principle, and generates a new average value every once in a while.

[0062] It can be understood that the oil level fluctuation can be filtered by the above-mentioned method of calculating the average value.

[0063] Step S102: Based on the set second sampling period, the average value of the oil level signal is obtained, and the average value of the average values ​​of the oil level signal is calculated in real time to smooth the oil level signal.

[0064] Specifically, a second queue is created to store a plurality of oil level signal data; a data is obtained from the first queue at every second preset time interval and put into the second queue, and the average value of the average values ​​of the oil level signals in the second queue is calculated in real time.

[0065] For easier understanding, let's take an example. When the oil level sensor jumps from one gear to another, the signal collected by the sensor shows an obvious mutation. The dynamic averaging algorithm is used here to process it.

[0066] A queue B is created, which can hold M data. Every T2 time interval, a piece of data is obtained and put into the queue. The queue data is updated according to the first-in-first-out principle, and the real-time arithmetic mean is calculated at intervals. Data update: [ê1,ê2,ê3......êm]T2 time later [ê2,ê3,ê4......êm+1]

[0067] Arithmetic mean

[0068] Specifically, fast filtering: collect oil level signals multiple times, period T2, form a queue of length N, calculate the average value, and obtain an oil level signal close to the actual value. This achieves the filtering effect of oil level fluctuations. Smoothing filtering: Generate an average oil level signal value from the fast filtering queue every T3 (much greater than T2) time, form a queue of length M, and calculate the average value. Because the sampling interval of the smoothing filter stage is relatively long, there may be two stages of oil level sensor values ​​in the array. As the running time increases, the tank liquid level slowly decreases, the number of small oil level values ​​in the queue accounts for an increasing proportion, and the average value of the entire array becomes smaller and smaller, thereby achieving filtering of sudden changes in the oil level signal and making the oil level display smoother.

[0069] Step S103: Based on the smoothed fuel level signal, determine whether to display the current fuel level value of the vehicle.

[0070] Specifically, if the current oil level signal after smoothing is The oil level signal after smoothing at the previous moment If the difference between the two is less than the set threshold, the current oil volume signal after smoothing is output. As the oil level real-time display result;

[0071] If the current oil level signal after smoothing The oil level signal after smoothing at the previous moment If the difference between them is greater than the set threshold, the smoothing operation will continue until the set threshold is met, and the result will be output and displayed.

[0072] After the oil level signal is smoothed, it includes:

[0073] Determine whether the oil quantity signal value after smoothing is much greater than the oil quantity signal value calculated after smoothing in the previous cycle;

[0074] If yes, the result after this smoothing process is discarded, and the fuel level signal value calculated after the previous smoothing process is used as the current fuel level display result. It can be understood that 1) when the vehicle turns, due to the centrifugal force, the fuel level is concentrated on one side of the fuel tank, making the fuel level signal value larger.

[0075] 2) The addition of a larger fuel level signal value causes the software to obtain a larger fuel level value after fast filtering and smoothing filtering. This is because the fuel level signal value at this time is larger than the value calculated in the previous cycle. Considering that the fuel level value gradually decreases during driving, the software will discard this larger value and continue to display the value of the previous state.

[0076] Reference Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a vehicle fuel level display device provided by the present invention, such as Figure 2 As shown, the device comprises:

[0077] The calculation module 201 is used to collect the fuel level signal of the vehicle during driving based on a set first sampling period, and calculate the average value of the fuel level signal in real time.

[0078] The processing module 202 is used to obtain the average value of the oil quantity signal based on the set second sampling period, and calculate the average value of the average values ​​of the oil quantity signal in real time to smooth the oil quantity signal.

[0079] Display module 203: It is used to determine whether to display the current fuel level value of the vehicle based on the fuel level signal after smoothing.

[0080] Further, in a possible implementation manner, the processing module is further used to determine the state of the vehicle during refueling, wherein the state includes a vehicle powered-on state and a vehicle unpowered state;

[0081] According to the state of the vehicle during refueling, the corresponding display strategy is executed.

[0082] Furthermore, in a possible implementation manner, the processing module is further configured to store the fuel level signal en collected last time before power is turned off if the vehicle is not powered on during refueling;

[0083] After the vehicle is powered on after refueling, the fuel level signal ex is collected, and the difference △e is calculated between the collected fuel level signal value and en;

[0084] The absolute value of △e is compared with the set judgment threshold △emax. When △e is greater than △emax, it is determined that the vehicle has been refueled and ex is sent as the display value. When △e is less than △emax, the fuel value after filtering before power off is sent. As display value;

[0085] If the vehicle is powered on during refueling, the fuel level signal ex is collected according to the set period, and when the difference △e between the fuel level signal ex collected according to the set period and the fuel level signal en collected last time before power off is greater than △emax, the fuel level display result is updated in real time according to the fuel level signal collected according to the set period;

[0086] If the difference △e between the oil level signal ex collected according to the set period and the oil level signal en collected for the last time before power-off is less than △emax, it is determined that the vehicle has not been refueled, and the oil level value before the last power-off is displayed.

[0087] Furthermore, in a possible implementation manner, the processing module is further used to create a first queue to store a plurality of oil quantity signal data;

[0088] Collecting a fuel level signal of the vehicle during the characterization process once at a first preset time interval, and storing the collected fuel level signal in the first queue;

[0089] The average values ​​of multiple oil quantity signals in the first queue are calculated to filter the oil level fluctuations, wherein the data in the first queue are updated according to the first-in-first-out principle, so that a new average value is generated at regular intervals.

[0090] Furthermore, in a possible implementation manner, the display module is also used to display the current oil level signal after smoothing. The oil level signal after smoothing at the previous moment If the difference between the two is less than the set threshold, the current oil volume signal after smoothing is output. As the oil level real-time display result;

[0091] If the current oil level signal after smoothing The oil level signal after smoothing at the previous moment If the difference between them is greater than the set threshold, the smoothing operation will continue until the set threshold is met, and the result will be output and displayed.

[0092] Furthermore, in a possible implementation manner, the processing module is further used to determine whether the fuel quantity signal value after smoothing is much greater than the fuel quantity signal value calculated after smoothing in the previous cycle;

[0093] If so, the result after this smoothing process is discarded, and the oil quantity signal value calculated after the previous smoothing process is used as the current oil quantity display result.

[0094] Reference Figure 3 , Figure 3 The figure shows the oil quantity display processing flow chart provided by the present invention, as shown in FIG. Figure 3 As shown:

[0095] If the vehicle is powered on during refueling, the fuel level signal ex is collected according to the set period (T1), and when the difference △e between the fuel level signal ex collected according to the set period and the fuel level signal en collected for the last time before power off is greater than △emax, the fuel level display result (fuel level E=ex) is updated in real time according to the fuel level signal collected according to the set period.

[0096] If the difference △e between the fuel level signal ex collected according to the set period and the fuel level signal en collected last time before power off is less than △emax, it is determined that the vehicle has not been refueled, and the fuel level value before the last power off is displayed (fuel level where is the final displayed value after filtering).

[0097] Then determine whether the vehicle is started. If not, return to the step of collecting the fuel sensor signal ex, sampling period T1. If yes, collect the fuel sensor signal e, sampling period T2, and put the collected fuel signal into queue A to calculate the fuel level fluctuation filter:

[0098] ê=(e0+e1+...en-1+en) / N. Periodically obtain the average value of the oil volume signal ê, and put ê into queue B with a period of T3 to perform dynamic smoothing filtering: If the current oil level signal after smoothing The oil level signal after smoothing at the previous moment If the difference between the two is less than the set threshold, the current oil volume signal after smoothing is output. The result is displayed in real time as oil level.

[0099] Refer to the following Figure 4 An electronic device 400 according to this embodiment of the present invention will be described. Figure 4 The electronic device 400 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0100] like Figure 4 As shown, the electronic device 400 is in the form of a general computing device. The components of the electronic device 400 may include but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).

[0101] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 executes the steps according to various exemplary embodiments of the present invention described in the above “Embodiment Method” section of this specification.

[0102] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .

[0103] The storage unit 420 may also include a program / utility 424 having a set (at least one) of program modules 425, such program modules 425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0104] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0105] The electronic device 400 may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0106] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0107] According to the solution of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present invention described in the above "Exemplary Method" section of the present specification.

[0108] refer to Figure 5 As shown, a program product 500 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0109] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0110] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0111] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0112] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0113] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0114] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

[0115] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

Claims

1. A method for displaying the fuel level of a vehicle, characterized in that: include: Based on a set first sampling period, the fuel level signal of the vehicle during driving is collected, and the average value of the fuel level signal is calculated in real time; Based on the set second sampling period, the average value of the oil quantity signal is obtained, and the average value of the average values ​​of the oil quantity signal is calculated in real time to smooth the oil quantity signal; Based on the smoothed fuel level signal, determine whether to display the current fuel level value of the vehicle.

2. The method according to claim 1, characterized in that: The method of collecting the fuel quantity signal during the driving process of the vehicle based on the set first sampling period and calculating the average value of the fuel quantity signal in real time includes: Determining the state of the vehicle during refueling, wherein the state includes a vehicle powered on state and a vehicle not powered on state; According to the state of the vehicle during refueling, the corresponding display strategy is executed.

3. The method according to claim 2, characterized in that The method of executing a corresponding fuel level display strategy according to the state of the vehicle during refueling includes: If the vehicle is not powered on during refueling, the fuel level signal en collected last time before power off will be stored; After the vehicle is powered on after refueling, the fuel level signal ex is collected, and the difference △e is calculated between the collected fuel level signal value and en; The absolute value of △e is compared with the set judgment threshold △emax. When △e is greater than △emax, it is determined that the vehicle has been refueled and ex is sent as the display value. When △e is less than △emax, the fuel value after filtering before power off is sent as the display value. As display value; If the vehicle is powered on during refueling, the fuel level signal ex is collected according to the set period, and when the difference △e between the fuel level signal ex collected according to the set period and the fuel level signal en collected last time before power off is greater than △emax, the fuel level display result is updated in real time according to the fuel level signal collected according to the set period; If the difference △e between the oil level signal ex collected according to the set period and the oil level signal en collected for the last time before power-off is less than △emax, it is determined that the vehicle has not been refueled, and the oil level value before the last power-off is displayed.

4. The method according to claim 1, characterized in that The method of collecting the fuel level signal of the vehicle during driving based on the set first sampling period and calculating the fuel level signal average value in real time includes: Creating a first queue to store a plurality of oil quantity signal data; Collecting a fuel level signal of the vehicle during the characterization process once at a first preset time interval, and storing the collected fuel level signal in the first queue; The average values ​​of multiple oil quantity signals in the first queue are calculated to filter the oil level fluctuations, wherein the data in the first queue are updated according to the first-in-first-out principle, so that a new average value is generated at regular intervals.

5. The method according to claim 1, characterized in that The step of obtaining the average value of the oil quantity signal based on the set second sampling period, and calculating the average value of the average value of the oil quantity signal in real time, includes: Creating a second queue to store multiple oil quantity signal data; At every second preset time interval, a data is obtained from the first queue and put into the second queue, and the average value of the average values ​​of the oil quantity signals in the second queue is calculated in real time.

6. The method according to claim 1, characterized in that The step of determining whether to display the current fuel level value of the vehicle based on the fuel level signal after smoothing includes: If the current oil level signal after smoothing The oil level signal after smoothing at the previous moment If the difference between the two is less than the set threshold, the current oil volume signal after smoothing is output. As the oil level real-time display result; If the current oil level signal after smoothing The oil level signal after smoothing at the previous moment If the difference between them is greater than the set threshold, the smoothing operation will continue until the set threshold is met, and the result will be output and displayed.

7. The method according to claim 1, characterized in that After the oil quantity signal is smoothed, the method includes: Determine whether the oil quantity signal value after smoothing is much greater than the oil quantity signal value calculated after smoothing in the previous cycle; If so, the result after this smoothing process is discarded, and the oil quantity signal value calculated after the previous smoothing process is used as the current oil quantity display result.

8. A vehicle fuel level display device, characterized in that: include: A calculation module, which is used to collect the fuel level signal of the vehicle during driving based on a set first sampling period, and calculate the average value of the fuel level signal in real time; A processing module, which is used to obtain the average value of the oil quantity signal based on a set second sampling period, and calculate the average value of the average values ​​of the oil quantity signal in real time to perform smoothing processing on the oil quantity signal; The display module is used to determine whether to display the current fuel level value of the vehicle based on the fuel level signal after smoothing.

9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer program instructions are stored therein, and when the computer program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 7.