Residual oil quantity detection method and device, storage medium, vehicle controller and vehicle
By detecting the stability of the fuel resistance after power-starting the vehicle and calculating the remaining oil volume, the problem of inaccurate oil volume display caused by unstable oil volume detection circuit is solved, and the accuracy and user experience of oil volume detection are improved.
Patent Information
- Application Number
- CN202411536426.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-07
AI Technical Summary
In the early stage of vehicle power-up, the oil quantity detection circuit is unstable, resulting in large errors in fuel resistance value and inaccurate residual oil displayed by the car instrument, which affects the user's car experience.
After the vehicle is powered on, first check whether the resistance value of the fuel resistance is stable. By sampling the resistance value during the preset period, determine the stability of the resistance value, and calculate the remaining oil volume after determining the stability.
The accuracy of oil quantity detection is ensured through stable detection, which avoids the problem of inaccurate residual oil quantity detection caused by unstable oil quantity detection circuit, and improves the effect and user experience of residual oil quantity detection.
Smart Images

Figure CN119573838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle control technology, and in particular to a method and device for detecting remaining fuel, a storage medium, a vehicle controller and a vehicle. Background Art
[0002] Automobile instruments are composed of various instruments and indicators, especially warning lights and alarms for drivers, which provide the driver with the required information on automobile operating parameters. For car drivers and passengers, the correct display of fuel level is an important basis for correctly indicating driving behavior and choosing a suitable refueling point for refueling. At present, the detection of the remaining fuel level of a bicycle is mainly realized through a fuel level detection circuit. A fuel resistor is set in the fuel level detection circuit. The fuel resistor is a sliding resistor, and its resistance changes with the change of the fuel level in the fuel tank. By real-time monitoring the resistance change of the fuel resistor, the real-time remaining fuel level in the fuel tank can be calculated.
[0003] However, in the initial stage of vehicle power-on, due to the different charging speeds of various circuit components in the fuel level detection circuit, for example, components such as capacitors charge slowly. At this time, the fuel level detection circuit is in an unstable state, and the resistance value of the obtained fuel resistor has a large error, causing the car instrument to display an incorrect remaining fuel level, seriously affecting the user's car experience. Summary of the invention
[0004] Based on this, the present invention provides a remaining fuel amount detection method, device, storage medium, vehicle controller and vehicle. By adopting the remaining fuel amount detection method, when the vehicle is powered on and started, it is possible to first detect whether the resistance value of the fuel resistor is stable, and after determining that the resistance value of the fuel resistor is stable, calculate the remaining fuel amount according to the resistance value of the fuel resistor, thereby avoiding the problem of inaccurate remaining fuel amount detection caused by unstable fuel amount detection circuit, improving the detection effect of the remaining fuel amount, and thus improving the user's vehicle experience.
[0005] In one aspect, the present invention provides a method for detecting a remaining oil level, the method comprising:
[0006] After the vehicle is powered on, the resistance stability test of the fuel resistor used to measure the remaining fuel is performed;
[0007] When it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor when the resistance value is stable.
[0008] Furthermore, in some embodiments, the step of performing resistance stability detection on a fuel resistor used to measure the remaining fuel amount includes:
[0009] Sampling the resistance of the fuel resistor according to a preset period, and collecting a first preset number of sampled resistance values corresponding to the fuel resistor at different times;
[0010] Whether the resistance of the fuel resistor is stable is determined based on the difference between the respective sampling resistance values of the first preset number of sampling resistance values.
[0011] Further, in some embodiments, judging whether the resistance of the fuel resistor is stable based on the difference between each of the first preset number of sampled resistance values includes:
[0012] Determining a first resistance value with the smallest resistance value among the preset number of sampled resistance values, and determining a second resistance value with the smallest resistance value among the first preset number of sampled resistance values;
[0013] Calculating a first resistance difference between the first resistance value and the second resistance value;
[0014] If the first resistance difference is less than or equal to a preset difference threshold, determining that the fuel resistor resistance is stable;
[0015] If the first resistance difference is greater than the preset difference threshold, it is determined that the resistance of the fuel resistor is unstable.
[0016] Further, in some embodiments, judging whether the resistance of the fuel resistor is stable based on the difference between each of the first preset number of sampled resistance values includes:
[0017] Sorting the first preset number of sampling resistance values according to sampling time to obtain a sampling resistance value sequence;
[0018] Subtracting the sampling resistance values in the sampling resistance value sequence in pairs in the order of first to last, to obtain second resistance value differences, wherein the subtracting in pairs in the order of first to last is to make a difference between the sampling resistance value at the first position in the sampling resistance sequence and the sampling resistance value at the last position, to make a difference between the sampling resistance value at the second position in the sampling resistance sequence and the sampling resistance value at the second last position, and so on;
[0019] If the number of the second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is greater than a second preset number, it is determined that the resistance of the fuel resistor is stable;
[0020] If the number of the second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is less than or equal to the second preset number, it is determined that the resistance of the fuel resistor is unstable.
[0021] Further, in some implementations, the subtraction of each sampling resistance value in the sampling resistance value sequence in pairs in the order of first to last to obtain each second resistance difference value includes:
[0022] Eliminate the first and last two sampling resistance values in the sampling resistance value sequence to obtain a sampling resistance value sequence after the first and last two are eliminated;
[0023] Subtract each sampling resistance value in the sampling resistance value sequence after the head and tail are removed in sequence from each other to obtain each second resistance value difference.
[0024] Furthermore, in some embodiments, the method further comprises:
[0025] If it is determined that the resistance of the fuel resistor is unstable, the step of performing resistance stability detection on the fuel resistor used to measure the remaining fuel amount is repeated after a preset delay time.
[0026] Further, in some embodiments, after the vehicle is powered on, the resistance stability detection of the fuel resistor used to measure the remaining fuel amount includes:
[0027] After the vehicle is powered on and a first preset time has passed, a resistance stability detection is performed on a fuel resistor used to measure the remaining fuel amount.
[0028] Furthermore, in some embodiments, the method further comprises:
[0029] If the resistance value of the fuel resistor is continuously detected to be unstable within a second preset time period after the vehicle is powered on, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor at the current moment after the second preset time period.
[0030] In another aspect, the present invention provides a remaining oil detection device, comprising:
[0031] A resistance stability detection module is used to detect the resistance stability of the fuel resistor used to measure the remaining fuel after the vehicle is powered on;
[0032] The remaining fuel amount calculation module is used to calculate the remaining fuel amount according to the resistance value corresponding to the fuel resistor when the resistance value is stable when it is determined that the resistance value of the fuel resistor is stable.
[0033] On the other hand, the present invention provides a storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the steps of the above method.
[0034] On the other hand, the present invention further provides a vehicle controller, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the above method.
[0035] On the other hand, the present invention further provides a vehicle, comprising the above-mentioned remaining fuel amount detection device or vehicle controller.
[0036] According to the remaining fuel detection method provided by the present invention, after the vehicle is powered on and started, the resistance stability detection is performed on the fuel resistor used to measure the remaining fuel amount, and when it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor when the resistance value is stable. That is, at the beginning of the vehicle being powered on and started, it is first detected whether the resistance value of the fuel resistor is stable, and after it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor, thereby avoiding the problem of inaccurate remaining fuel amount detection caused by the instability of the fuel amount detection circuit, improving the detection effect of the remaining fuel amount, and thus improving the user's vehicle experience.
[0037] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A schematic diagram of a flow chart of a method for detecting a remaining fuel amount provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a flow chart of a method for detecting a remaining fuel amount provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of a flow chart of a method for detecting a remaining fuel amount provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the structure of a remaining oil detection device provided by an embodiment of the present invention;
[0042] Figure 5 A schematic structural diagram of a vehicle controller provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0044] In the description of one or more embodiments of the present invention, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0045] See also Figure 1 , is a flow chart of a method for detecting the remaining fuel provided by an embodiment of the present invention. The execution subject of the process may be a program for detecting the remaining fuel, or the execution subject of the process may also be a vehicle or a domain controller equipped with the above program, or other devices capable of communicating with a vehicle, a domain controller, etc., without specific limitation.
[0046] The following is for Figure 1 The process shown in the figure is described in detail, and the remaining oil amount detection method may specifically include the following steps:
[0047] Step S102, after the vehicle is powered on, a resistance stability test is performed on a fuel resistor used to measure the remaining fuel amount;
[0048] It should be noted that the fuel resistor is a detection resistor set in the fuel level detection circuit. The resistance value of the resistor changes with the remaining fuel level in the fuel tank. By monitoring the resistance value of the fuel resistor in the fuel level detection circuit, the remaining fuel level in the fuel tank can be calculated based on the resistance value of the fuel resistor.
[0049] Specifically, at the beginning of the vehicle power-on, in response to the vehicle power-on, various controllers and circuit elements in the vehicle begin to charge and start, and at this time, the resistance value of the fuel resistor in the fuel quantity detection circuit is stably detected.
[0050] It is further explained that before the electronic components in the fuel quantity detection circuit are fully charged, the resistance value of the fuel resistor monitored by the fuel quantity detection circuit is inaccurate and has a large error. Only after the electronic components in the fuel quantity detection circuit are fully charged can the accurate resistance value of the fuel resistor be obtained through the fuel quantity detection circuit. Before the electronic components in the fuel quantity detection circuit are fully charged, the resistance value of the fuel resistor is in a fluctuating stage. After the electronic components in the fuel quantity detection circuit are fully charged, the resistance value of the fuel resistor will tend to a stable value. By performing a stable detection on the resistance value of the fuel resistor, it is possible to determine whether the fuel quantity detection circuit is fully charged, thereby determining whether the resistance value of the fuel resistor is accurate at this time.
[0051] Step S104, when it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor when the resistance value is stable.
[0052] Specifically, according to step S102, the resistance value of the fuel resistor is tested for resistance stability. When it is determined that the resistance value of the fuel resistor is stable, it indicates that the resistance value of the fuel resistor at this time is accurate, and then the remaining fuel in the fuel tank is calculated based on the resistance value of the fuel resistor at this time.
[0053] In an embodiment of the present invention, after the vehicle is powered on and started, a resistance stability detection is performed on a fuel resistor used to measure the remaining fuel amount. When it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor when the resistance value is stable. That is, at the beginning of the vehicle being powered on and started, it is first detected whether the resistance value of the fuel resistor is stable, and after it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor, thereby avoiding the problem of inaccurate remaining fuel amount detection caused by the instability of the fuel amount detection circuit, improving the detection effect of the remaining fuel amount, and thus improving the user's vehicle experience.
[0054] See also Figure 2 , is a flow chart of a method for detecting the amount of remaining oil provided by an embodiment of the present invention. Figure 2 The process shown in the figure is described in detail, and the remaining oil amount detection method may specifically include the following steps:
[0055] Step S202, after the vehicle is powered on, the fuel resistor is sampled according to a preset period, and a first preset number of sampled resistance values corresponding to the fuel resistor at different times are collected;
[0056] Specifically, when the vehicle is powered on and started, the MCU used to calculate the resistance value of the fuel resistor periodically samples the resistance value of the fuel resistor through the fuel detection circuit, and collects a first preset number of sampled resistance values corresponding to the fuel resistor at different times.
[0057] Preferably, the preset period may be 10 milliseconds.
[0058] More specifically, the MCU periodically samples the resistance value of the fuel resistor through the fuel detection circuit by sampling the voltage of the fuel resistor in the relative according to the fuel detection circuit to obtain the sampling voltage corresponding to the fuel resistor, and calculates its resistance value according to the sampling voltage of the fuel resistor.
[0059] Step S204, judging whether the fuel resistor is stable based on the difference between the sampling resistance values of the first preset number of sampling resistance values;
[0060] Specifically, after a first preset number of sampled resistance values are collected, it is determined whether the resistance of the fuel resistor is stable according to the difference between each sampled resistance value in the first preset number of sampled resistance values.
[0061] It can be understood that the stable resistance of the fuel resistor specifically means that the resistance of the fuel resistor tends to a certain fixed value. By sampling the first preset number of resistance values of the fuel resistor, it can be determined whether the sampled resistance values obtained during the sampling period tend to a certain fixed value according to the difference between the sampled resistance values, thereby obtaining a conclusion on whether the resistance of the fuel resistor is stable.
[0062] Optionally, judging whether the fuel resistance is stable is performed based on the difference between each sampled resistance value. Specifically, the method may include: determining a first resistance value with the smallest resistance among a preset number of sampled resistance values, and determining a second resistance value with the smallest resistance among a first preset number of sampled resistance values, and calculating a first resistance difference between the first resistance value and the second resistance value; if the first resistance difference is less than or equal to a preset difference threshold, determining that the fuel resistance is stable; and if the first resistance difference is greater than the preset difference threshold, determining that the fuel resistance is unstable.
[0063] The preset difference threshold is a preset threshold set according to actual detection needs. In a preferred implementation, the preset difference threshold may be 1 ohm.
[0064] Step S206, when it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor when the resistance value is stable.
[0065] Specifically, after determining that the resistance value of the fuel resistor is stable, the resistance value of the fuel resistor at the current moment is obtained, and the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor when the resistance value is stable.
[0066] In an embodiment of the present invention, after the vehicle is powered on and started, a resistance stability detection is performed on a fuel resistor used to measure the remaining fuel amount. When it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor when the resistance value is stable. That is, at the beginning of the vehicle being powered on and started, it is first detected whether the resistance value of the fuel resistor is stable, and after it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor, thereby avoiding the problem of inaccurate remaining fuel amount detection caused by the instability of the fuel amount detection circuit, improving the detection effect of the remaining fuel amount, and thus improving the user's vehicle experience.
[0067] See also Figure 3 , is a flow chart of a method for detecting the amount of remaining oil provided by an embodiment of the present invention. Figure 3 The process shown in the figure is described in detail, and the remaining oil amount detection method may specifically include the following steps:
[0068] Step S302, after the vehicle is powered on, sorting the first preset number of sampling resistance values according to sampling time to obtain a sampling resistance value sequence;
[0069] Specifically, during the period of sampling to obtain the first preset number of sampled resistance values, the first preset number of sampled resistance values are sorted according to the chronological order of sampling to obtain a sampled resistance value sequence.
[0070] Step S304, subtracting each sampling resistance value in the sampling resistance value sequence in pairs in the order of first to last, to obtain each second resistance value difference, wherein subtracting each other in pairs in the order of first to last is to make a difference between the sampling resistance value at the first position in the sampling resistance sequence and the sampling resistance value at the last position, and making a difference between the sampling resistance value at the second position in the sampling resistance sequence and the sampling resistance value at the second last position, and so on;
[0071] Specifically, after obtaining the sampling resistor sequence, the sampling resistor value at the first position in the sampling resistor sequence and the sampling resistor value at the last position in the sampling resistor sequence are subtracted to obtain a second resistance difference, and the sampling resistor value at the second position in the sampling resistor sequence and the sampling resistor value at the second last position in the sampling resistor sequence are subtracted to obtain a second resistance difference, and so on and so forth to obtain each second resistance difference.
[0072] Step S306, if the number of second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is greater than a second preset number, it is determined that the fuel resistance value is stable;
[0073] After obtaining each second resistance difference, it is determined whether the fuel resistor resistance is stable according to the magnitude of each second resistance difference. Specifically, if the number of second resistance differences less than or equal to the preset difference threshold among each second resistance difference is greater than a second preset number, it is determined that the fuel resistor resistance is stable.
[0074] The preset difference threshold is a preset threshold set according to actual detection needs. In a preferred embodiment, the preset difference threshold may be 1 ohm. When the number of second resistance differences that are less than or equal to the preset difference threshold among the second resistance differences is greater than a second preset number, it indicates that the resistance of the fuel resistor tends to be stable, and it is determined that the resistance of the fuel resistor is stable.
[0075] Step S308, if the number of second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is less than or equal to the second preset number, it is determined that the fuel resistor resistance is unstable;
[0076] When the number of second resistance differences that are less than or equal to the preset difference threshold among the second resistance differences is greater than a second preset number, it indicates that the resistance of the fuel resistor fluctuates greatly, and it is determined that the resistance of the fuel resistor is unstable.
[0077] Step S310, when it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor when the resistance value is stable.
[0078] In an embodiment of the present invention, after the vehicle is powered on and started, a resistance stability detection is performed on a fuel resistor used to measure the remaining fuel amount. When it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor when the resistance value is stable. That is, at the beginning of the vehicle being powered on and started, it is first detected whether the resistance value of the fuel resistor is stable, and after it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value of the fuel resistor, thereby avoiding the problem of inaccurate remaining fuel amount detection caused by the instability of the fuel amount detection circuit, improving the detection effect of the remaining fuel amount, and thus improving the user's vehicle experience.
[0079] Further, in one embodiment, in step S304, the sampling resistance values in the sampling resistance value sequence are sequentially subtracted in pairs in the order of first to last to obtain the second resistance value difference values. Alternatively, the first and last two sampling resistance values in the sampling resistance value sequence are eliminated to obtain the sampling resistance value sequence after the first and last are eliminated; and then the sampling resistance values in the sampling resistance value sequence after the first and last are sequentially subtracted in pairs in the order of first to last to obtain the second resistance value difference values.
[0080] That is, the first and second sampling resistance values and the last and second to last sampling resistance values in the sampling resistance value sequence are removed from the sampling resistance value sequence, and then the fuel resistance is judged whether the resistance is stable according to the removed sampling resistance value sequence, so as to avoid the interference of abnormal data sampled at the beginning and the end of sampling, and improve the accuracy of judging whether the fuel resistance is stable.
[0081] In one embodiment, if after performing a resistance stability test on the fuel resistor used to measure the remaining fuel amount, it is determined that the resistance of the fuel resistor is unstable, the step of performing a resistance stability test on the fuel resistor used to measure the remaining fuel amount is repeated after a preset delay time.
[0082] In one embodiment, after the vehicle is powered on and a first preset time has passed, a step of detecting the stability of the resistance of a fuel resistor used to measure the remaining fuel is performed.
[0083] Preferably, the first preset time length may be 200 milliseconds. It is understandable that the first preset time length is the average time length required for each component in the fuel quantity detection circuit to be fully charged at the initial stage of power-on. After the first preset time length has elapsed, the step of performing resistance stability detection on the fuel resistor used to measure the remaining fuel quantity can avoid the situation where each component in the fuel quantity detection circuit is not fully charged to the greatest extent, avoid detecting that the resistance value of the fuel resistor is unstable, and improve detection efficiency.
[0084] In one embodiment, if the resistance of the fuel resistor is continuously detected to be unstable within a second preset time period after the vehicle is powered on, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor at the current moment after the second preset time period.
[0085] Preferably, the second preset duration may be 1 minute.
[0086] It is understandable that if the resistance value of the fuel resistor is continuously detected to be unstable after the vehicle is powered on, the step of repeatedly performing the resistance stability detection on the fuel resistor used to measure the remaining fuel amount is stopped, and the remaining fuel amount is directly calculated according to the resistance value corresponding to the fuel resistor at the current moment. This avoids continuous and repeated resistance stability detection on the fuel resistor and reduces detection energy consumption.
[0087] Exemplarily, in a specific and feasible implementation, 200 milliseconds after the vehicle is powered on, the resistance value of the fuel resistor is sampled with a sampling period of 10 milliseconds, and the sampled resistance values corresponding to the fuel resistor at 100 different times are sampled, and the 100 sampled resistance values are sorted in the sampling order to obtain a sampled resistance value sequence, and the first and last two sampled resistance values in the sampled resistance value sequence are eliminated to obtain a sampled resistance value sequence containing 96 sampled resistance values after elimination, and the first and last sampled resistance values of each sampled resistance value in the sampled resistance value sequence containing 96 sampled resistance values are taken as the difference to obtain 48 second resistance value differences, and if 32 of the 48 second resistance value differences are less than or equal to 1 ohm, it is considered that the resistance value of the fuel resistor is stable, otherwise it is considered that the resistance value of the fuel resistor is unstable. After determining that the resistance value of the fuel resistor is stable, the latest resistance value of the fuel resistor is obtained, and the remaining fuel in the fuel tank is calculated based on the latest resistance value of the fuel resistor; if the resistance value of the fuel resistor is determined to be unstable, the resistance value sampling of the fuel resistor is continued after 10 seconds, and the resistance stability judgment is performed based on the newly sampled resistance value. If the detection conclusion that the resistance value of the fuel resistor is unstable is obtained within 1 minute, the latest resistance value of the fuel resistor is directly obtained, and the remaining fuel in the fuel tank is calculated based on the latest resistance value of the fuel resistor.
[0088] By adopting the remaining fuel amount detection method provided by one or more embodiments of the present invention, when the vehicle is powered on and started, it is possible to first detect whether the resistance value of the fuel resistor is stable, and after determining that the resistance value of the fuel resistor is stable, calculate the remaining fuel amount according to the resistance value of the fuel resistor, thereby avoiding the problem of inaccurate remaining fuel amount detection caused by unstable fuel amount detection circuit, improving the detection effect of the remaining fuel amount, and thus improving the user's car experience.
[0089] See also Figure 4 , is a schematic diagram of the structure of a remaining oil detection device provided by an embodiment of the present invention. Figure 4As shown, the remaining fuel detection device 01 can be implemented as all or part of the vehicle controller through software, hardware or a combination of both. According to some embodiments, the remaining fuel detection device 01 may include a resistance stability detection module 11 and a remaining fuel calculation module 12, specifically including:
[0090] The resistance stability detection module 11 is used to perform resistance stability detection on the fuel resistor used to measure the remaining fuel amount after the vehicle is powered on and started;
[0091] The remaining fuel amount calculation module 12 is used to calculate the remaining fuel amount according to the resistance value of the fuel resistor when it is determined that the resistance value of the fuel resistor is stable.
[0092] Optionally, the resistance stability detection module 11 is specifically used for:
[0093] Sampling the resistance of the fuel resistor according to a preset period, and collecting a first preset number of sampled resistance values corresponding to the fuel resistor at different times;
[0094] Whether the resistance of the fuel resistor is stable is determined based on the difference between the respective sampling resistance values of the first preset number of sampling resistance values.
[0095] Optionally, when the resistance stability detection module 11 performs the step of judging whether the resistance of the fuel resistor is stable based on the difference between each of the sampled resistance values in the first preset number of sampled resistance values, it is specifically used to:
[0096] Determining a first resistance value with the smallest resistance value among the preset number of sampled resistance values, and determining a second resistance value with the smallest resistance value among the first preset number of sampled resistance values;
[0097] Calculating a first resistance difference between the first resistance value and the second resistance value;
[0098] If the first resistance difference is less than or equal to a preset difference threshold, determining that the fuel resistor resistance is stable;
[0099] If the first resistance difference is greater than the preset difference threshold, it is determined that the resistance of the fuel resistor is unstable.
[0100] Optionally, when the resistance stability detection module 11 performs the step of judging whether the resistance of the fuel resistor is stable based on the difference between each of the sampled resistance values in the first preset number of sampled resistance values, it is specifically used to:
[0101] Sorting the first preset number of sampling resistance values according to sampling time to obtain a sampling resistance value sequence;
[0102] Subtracting the sampling resistance values in the sampling resistance value sequence in pairs in the order of first to last, to obtain second resistance value differences, wherein the subtracting in pairs in the order of first to last is to make a difference between the sampling resistance value at the first position in the sampling resistance sequence and the sampling resistance value at the last position, to make a difference between the sampling resistance value at the second position in the sampling resistance sequence and the sampling resistance value at the second last position, and so on;
[0103] If the number of the second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is greater than a second preset number, it is determined that the resistance of the fuel resistor is stable;
[0104] If the number of the second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is less than or equal to the second preset number, it is determined that the resistance of the fuel resistor is unstable.
[0105] Optionally, when the resistance stability detection module 11 performs the step of subtracting each of the sampled resistance values in the sampled resistance value sequence in pairs in the order of first to last to obtain each second resistance difference, it is specifically used to:
[0106] Eliminate the first and last two sampling resistance values in the sampling resistance value sequence to obtain a sampling resistance value sequence after the first and last two are eliminated;
[0107] Subtract each sampling resistance value in the sampling resistance value sequence after the head and tail are removed in sequence from each other to obtain each second resistance value difference.
[0108] Optionally, the resistance stability detection module 11 is further used for:
[0109] If it is determined that the resistance of the fuel resistor is unstable, the step of performing resistance stability detection on the fuel resistor used to measure the remaining fuel amount is repeated after a preset delay time.
[0110] Optionally, the resistance stability detection module 11 is specifically used for:
[0111] After the vehicle is powered on and a first preset time has passed, a resistance stability detection is performed on a fuel resistor used to measure the remaining fuel amount.
[0112] Optionally, the remaining fuel amount calculation module 12 is further used for:
[0113] If the resistance value of the fuel resistor is continuously detected to be unstable within a second preset time period after the vehicle is powered on, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor at the current moment after the second preset time period.
[0114] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0115] The present invention also provides a storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing the remaining oil detection method as in the above-mentioned embodiments. The specific execution process can be referred to the specific description in the above-mentioned embodiments, which will not be repeated here.
[0116] In one embodiment, the present invention also provides Figure 5 The structural diagram of the vehicle controller is shown in FIG. Figure 5 At the hardware level, the vehicle controller includes a processor 21, an internal bus 22, a network interface 23, a memory 24, and a non-volatile memory 25, and may also include hardware required for other services. The vehicle controller can be set in a vehicle, wherein the processor 21 reads the corresponding computer program from the non-volatile memory 25 into the memory and then runs it to implement the above-mentioned remaining fuel detection method.
[0117] In one embodiment, the present invention further provides a vehicle, which may include a remaining fuel level detection device or a vehicle controller as described above, so as to detect the remaining fuel level of the vehicle by executing a remaining fuel level detection method through the remaining fuel level detection device or the vehicle controller.
[0118] Finally, the various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0119] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for detecting the amount of remaining oil, comprising: After the vehicle is powered on, the resistance stability test of the fuel resistor used to measure the remaining fuel is performed; When it is determined that the resistance value of the fuel resistor is stable, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor when the resistance value is stable.
2. The method according to claim 1, wherein the step of performing resistance stability detection on a fuel resistor used to measure the remaining fuel comprises: Sampling the resistance of the fuel resistor according to a preset period, and collecting a first preset number of sampled resistance values corresponding to the fuel resistor at different times; Whether the resistance of the fuel resistor is stable is determined based on the difference between the respective sampling resistance values of the first preset number of sampling resistance values.
3. The method according to claim 2, wherein judging whether the resistance of the fuel resistor is stable based on the difference between the sampling resistance values in the first preset number of sampling resistance values comprises: Determining a first resistance value with the smallest resistance value among the preset number of sampled resistance values, and determining a second resistance value with the smallest resistance value among the first preset number of sampled resistance values; Calculating a first resistance difference between the first resistance value and the second resistance value; If the first resistance difference is less than or equal to a preset difference threshold, determining that the fuel resistor resistance is stable; If the first resistance difference is greater than the preset difference threshold, it is determined that the resistance of the fuel resistor is unstable.
4. The method according to claim 2, wherein judging whether the resistance of the fuel resistor is stable based on the difference between the sampling resistance values in the first preset number of sampling resistance values comprises: Sorting the first preset number of sampling resistance values according to sampling time to obtain a sampling resistance value sequence; Subtracting the sampling resistance values in the sampling resistance value sequence in pairs in the order of first to last, to obtain second resistance value differences, wherein the subtracting in pairs in the order of first to last is to make a difference between the sampling resistance value at the first position in the sampling resistance sequence and the sampling resistance value at the last position, to make a difference between the sampling resistance value at the second position in the sampling resistance sequence and the sampling resistance value at the second last position, and so on; If the number of the second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is greater than a second preset number, it is determined that the resistance of the fuel resistor is stable; If the number of the second resistance difference values that are less than or equal to the preset difference threshold value among the second resistance difference values is less than or equal to the second preset number, it is determined that the resistance of the fuel resistor is unstable.
5. The method according to claim 4, wherein the step of subtracting each of the sampled resistance values in the sampled resistance value sequence in sequence from the first to the last to obtain each second resistance difference comprises: Eliminate the first and last two sampling resistance values in the sampling resistance value sequence to obtain a sampling resistance value sequence after the first and last two are eliminated; Subtract each sampling resistance value in the sampling resistance value sequence after the head and tail are removed in sequence from each other to obtain each second resistance value difference.
6. The method according to any one of claims 3 or 4, further comprising: If it is determined that the resistance of the fuel resistor is unstable, the step of performing resistance stability detection on the fuel resistor used to measure the remaining fuel amount is repeated after a preset delay time.
7. The method according to claim 1, wherein after the vehicle is powered on and started, the resistance stability detection of the fuel resistor used to measure the remaining fuel volume comprises: After the vehicle is powered on and a first preset time has passed, a resistance stability detection is performed on a fuel resistor used to measure the remaining fuel amount.
8. The method according to claim 1, further comprising: If the resistance value of the fuel resistor is continuously detected to be unstable within a second preset time period after the vehicle is powered on, the remaining fuel amount is calculated according to the resistance value corresponding to the fuel resistor at the current moment after the second preset time period.
9. A residual oil detection device, comprising: A resistance stability detection module is used to detect the resistance stability of the fuel resistor used to measure the remaining fuel after the vehicle is powered on; The remaining fuel amount calculation module is used to calculate the remaining fuel amount according to the resistance value corresponding to the fuel resistor when the resistance value is stable when it is determined that the resistance value of the fuel resistor is stable.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
11. A vehicle controller, comprising: A processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 8.
12. A vehicle, comprising the remaining fuel amount detection device according to claim 9 or the vehicle controller according to claim 11.