Calculation method, calculation system and storage medium for electricity consumption per 100 kilometers
By calculating the car's power consumption per kilometer and updating the array, combined with limit operation and candidate power consumption verification per 100 kilometers, the problem of large errors in calculation of power consumption per 100 kilometers is solved, and the accuracy and reliability of the calculation are improved.
Patent Information
- Application Number
- CN202110987142.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2041-08-26
AI Technical Summary
In the existing technology, the calculation of power consumption per 100 kilometers is easily affected by the amplification of errors in power consumption and mileage calculation, resulting in abnormal calculation results and lack of high accuracy.
By determining the power-on status of the car, obtain the current power consumption and driving mileage, calculate the power consumption per kilometer, and update the preset power consumption per kilometer array, and then calculate the power consumption per 100 kilometers, using limit operation and candidate power consumption per 100 kilometers. Verification mechanism to reduce the impact of errors.
When there is a sampling error in the current driving mileage and power consumption, the impact of the error on the power consumption per 100 kilometers is only 1%, which improves the accuracy and reliability of the calculation.
Smart Images

Figure CN113792251B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of calculating electricity consumption per 100 kilometers, and in particular to a method, a system and a storage medium for calculating electricity consumption per 100 kilometers. Background Art
[0002] Electricity consumption per 100 kilometers refers to the amount of electricity and energy consumed by an electric vehicle when it travels 100 kilometers at a certain speed under certain operating conditions.
[0003] In the related art, the power consumption per 100 kilometers is calculated by the following formula: Power consumption per 100 kilometers = (power consumption / mileage) * 100. In the above method, when there is an error in the calculation of power consumption or mileage at a certain moment, the calculation error of the power consumption per 100 kilometers will be magnified 100 times, resulting in abnormal calculation of the power consumption per 100 kilometers. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method, a system and a storage medium for calculating the power consumption per 100 kilometers, which can improve the accuracy of the calculation of the power consumption per 100 kilometers.
[0005] According to the method for calculating the electricity consumption per 100 kilometers of the first aspect of the present application, the method for calculating the electricity consumption per 100 kilometers includes: determining that the automobile is in a powered-on state, and obtaining the current electricity consumption and the current mileage; determining that the current electricity consumption and the current mileage are both valid, and calculating the current electricity consumption per kilometer based on the current electricity consumption and the current mileage; updating a preset first electricity consumption per kilometer array based on the current electricity consumption per kilometer; and calculating the current electricity consumption per 100 kilometers of the automobile based on the first electricity consumption per kilometer array.
[0006] According to the method for calculating the electricity consumption per 100 kilometers of the embodiment of the present application, at least the following beneficial effects are achieved: the current electricity consumption per kilometer is calculated by the current mileage and the current electricity consumption, and the current electricity consumption per kilometer is used to update the corresponding element in the first electricity consumption per kilometer array, and the corresponding current electricity consumption per 100 kilometers is obtained by accumulating and summing the elements in the first electricity consumption per kilometer array. Therefore, when the method for calculating the electricity consumption per 100 kilometers provided by the embodiment of the present application has a sampling error in the current mileage and / or the current electricity consumption, the error has only an effect of 1% on the current electricity consumption per 100 kilometers, thereby improving the accuracy of the calculation of the automobile's electricity consumption per 100 kilometers to a certain extent.
[0007] According to some embodiments of the present application, the current power consumption per kilometer is calculated based on the current power consumption and the current mileage, including: determining that the change in the current mileage is equal to a first preset threshold, and calculating the current power consumption per kilometer based on the change in the current mileage and the change in the current power consumption; and / or determining that the change in the current mileage is less than the first preset threshold, determining that the parking time of the car is greater than a second preset threshold, obtaining the previous power consumption per kilometer, and calculating the current power consumption per kilometer based on the previous power consumption per kilometer and the change in the current power consumption.
[0008] According to some embodiments of the present application, the current power consumption per kilometer is calculated based on the current power consumption and the current mileage, including: determining that the car is in an initial power-on state, determining that the change in the current mileage is equal to a first preset threshold, and obtaining the remaining power consumption of the car when it was last powered off; calculating the current power consumption per kilometer based on the remaining power consumption, the change in the current mileage, and the change in the current power consumption; and / or determining that the car is in an initial power-on state, determining that the change in the current mileage is less than the first preset threshold, determining that the parking time of the car is greater than a second preset threshold, and obtaining the previous power consumption per kilometer and the remaining power consumption of the car when it was last powered off; calculating the current power consumption per kilometer based on the previous power consumption per kilometer, the change in the current power consumption, and the remaining power consumption.
[0009] According to some embodiments of the present application, updating the preset first power consumption per kilometer array based on the current power consumption per kilometer includes: performing a limit operation on the current power consumption per kilometer according to a preset limit value; and updating the preset first power consumption per kilometer array based on the current power consumption per kilometer after the limit operation.
[0010] According to some embodiments of the present application, updating a preset first power consumption per kilometer array according to the current power consumption per kilometer after a limit operation includes: obtaining the valid number of elements in the first power consumption per kilometer array; if the valid number is less than the length of the first power consumption per kilometer array, updating the corresponding element according to the current power consumption per kilometer after the limit operation; if the valid number is greater than the length of the first power consumption per kilometer array, shifting the elements in the first power consumption per kilometer array, and updating the last element in the first power consumption per kilometer array according to the current power consumption per kilometer after the limit operation.
[0011] According to some embodiments of the present application, before obtaining the current power consumption and the current mileage, the method for calculating the power consumption per 100 kilometers also includes: obtaining a second power consumption array per kilometer and a first candidate power consumption per 100 kilometers of the last power-off state of the vehicle; calculating a second candidate power consumption per 100 kilometers based on the second power consumption array per kilometer; if the difference between the second candidate power consumption per 100 kilometers and the first candidate power consumption per 100 kilometers is within a preset range, updating the initial value of the power consumption per 100 kilometers of the vehicle according to the second candidate power consumption per 100 kilometers; if the difference between the second candidate power consumption per 100 kilometers and the first candidate power consumption per 100 kilometers is not within the preset range, updating the initial value of the power consumption per 100 kilometers of the vehicle according to a preset reference value.
[0012] According to some embodiments of the present application, it also includes: determining that the vehicle is in a power-off state, and storing the current power consumption per 100 kilometers and the first power consumption per kilometer array.
[0013] According to the second aspect of the present application, the system for calculating the electricity consumption per 100 kilometers is applied to an automobile, including: a first module, used to determine that the automobile is in a powered-on state, and obtain the current electricity consumption and the current mileage; a second module, used to determine that the current electricity consumption and the current mileage are both valid, and calculate the current electricity consumption per kilometer based on the current electricity consumption and the current mileage; a third module, used to update a preset first electricity consumption per kilometer array based on the current electricity consumption per kilometer; and a fourth module, used to calculate the current electricity consumption per 100 kilometers of the automobile based on the first electricity consumption per kilometer array.
[0014] According to the third aspect of the present application, the system for calculating the electric consumption per 100 kilometers includes: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the method for calculating the electric consumption per 100 kilometers as described in any of the above embodiments.
[0015] According to the computer-readable storage medium of the fourth aspect embodiment of the present application, processor-executable instructions are stored therein, and when the processor-executable instructions are executed by the processor, they are used to implement the method for calculating the electricity consumption per 100 kilometers as described in any of the above embodiments.
[0016] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present application is further described below with reference to the accompanying drawings and embodiments, wherein:
[0018] Figure 1 A flow chart of a method for calculating the power consumption per 100 kilometers according to an embodiment of the present application;
[0019] Figure 2 Another flow chart of the method for calculating the power consumption per 100 kilometers according to the embodiment of the present application;
[0020] Figure 3 Another flow chart of the method for calculating the power consumption per 100 kilometers according to the embodiment of the present application;
[0021] Figure 4 Another flow chart of the method for calculating the power consumption per 100 kilometers according to the embodiment of the present application;
[0022] Figure 5 Another flow chart of the method for calculating the power consumption per 100 kilometers according to the embodiment of the present application;
[0023] Figure 6 Another flow chart of the method for calculating the power consumption per 100 kilometers according to the embodiment of the present application;
[0024] Figure 7 A module block diagram of a system for calculating the electricity consumption per 100 kilometers according to an embodiment of the present application.
[0025] Reference numerals:
[0026] The first module 100 , the second module 200 , the third module 300 , and the fourth module 400 . DETAILED DESCRIPTION
[0027] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0028] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0029] In the description of this application, "several" means more than one, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0030] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0031] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0032] Reference Figure 1 The present application embodiment provides a method for calculating the power consumption per 100 kilometers, which is applied to automobiles. The method for calculating the power consumption per 100 kilometers includes the following steps:
[0033] S110, determining that the vehicle is in a powered-on state, and obtaining the current power consumption and current mileage of the vehicle;
[0034] S120, determining that the current power consumption and the current mileage are both valid, and calculating the current power consumption per kilometer based on the current power consumption and the current mileage;
[0035] S130, updating a preset first power consumption per kilometer array according to the current power consumption per kilometer;
[0036] S140, calculating the current 100-kilometer power consumption of the vehicle according to the first per-kilometer power consumption array.
[0037] Specifically, in order to ensure the accuracy of the calculation, it is necessary to first determine whether the car is powered on, that is, to determine whether the battery of the car is discharged. When it is determined that the car is powered on, the current power consumption and the current mileage of the car after a period of driving are obtained. The current power consumption and the current mileage are respectively compared with the corresponding preset effective ranges to determine the validity of the current power consumption and the current mileage. If the current power consumption and the current mileage are both valid, the current power consumption per kilometer is calculated according to the following formula (1), and the current power consumption per kilometer is used to update the elements in the preset first power consumption per kilometer array.
[0038]
[0039] Among them, Δcurrent power consumption represents the change in current power consumption, and Δcurrent mileage represents the change in current mileage. Taking the first power consumption per kilometer array including 100 elements as an example, before the first power consumption per kilometer array is updated according to the current power consumption per kilometer, the 100 elements are assigned by the preset reference value of the power consumption per kilometer and / or other values. After the current power consumption per kilometer is calculated according to formula (1), the corresponding elements in the first power consumption per kilometer array are assigned according to the current power consumption per kilometer, so that all elements in the first power consumption per kilometer array are accumulated and summed to obtain the corresponding current power consumption per 100 kilometers. It can be understood that the number of elements in the first power consumption per kilometer array can also be adaptively adjusted according to actual conditions, and the embodiments of the present application are only for exemplary purposes.
[0040] The method for calculating the power consumption per 100 kilometers provided in the embodiment of the present application calculates the current power consumption per kilometer through the current mileage and the current power consumption, and uses the current power consumption per kilometer to update the corresponding elements in the first power consumption per kilometer array, and obtains the corresponding current power consumption per 100 kilometers by accumulating and summing the elements in the first power consumption per kilometer array. Therefore, when the method for calculating the power consumption per 100 kilometers provided in the embodiment of the present application has a sampling error in the current mileage and / or the current power consumption, the error only affects the current power consumption per 100 kilometers by 1%, thereby improving the accuracy of the calculation of the power consumption per 100 kilometers of the vehicle to a certain extent.
[0041] In some embodiments, when the 100-kilometer power consumption of a car is calculated using the 100-kilometer power consumption calculation method, the car may be in the initial power-on state, the state of having been driven for a period of time, or the state of parking and discharging after driving for a period of time. Below, step S120 is specifically described according to the above different states. Among them, the initial power-on state means the state of the car being powered on again after being powered off, or the state of the car being powered on for the first time as a new car. Correspondingly, the state of having been driven for a period of time means the state of not being powered off after being powered on, and the power-on duration is relatively long.
[0042] When the car has been running for a period of time, the step S120 of "calculating the current power consumption per kilometer based on the current power consumption and the current mileage" includes the following sub-steps:
[0043] Determine that the change in the current mileage is equal to a first preset threshold, and calculate the current power consumption per kilometer according to the change in the current mileage and the change in the current power consumption;
[0044] And / or, determine that the change in current mileage is less than a first preset threshold, determine that the parking time of the vehicle is greater than a second preset threshold, obtain the previous power consumption per kilometer, and calculate the current power consumption per kilometer based on the change in the previous power consumption per kilometer and the current power consumption.
[0045] Specifically, the first preset threshold is set to one kilometer, and the second preset threshold is set to twenty minutes. Correspondingly, the state of having traveled for a period of time is set to the state in which the cumulative mileage after the car is powered on is greater than one kilometer. Therefore, when it is determined that the car has been traveling for a period of time, and the change in the current mileage reaches one kilometer, a current power consumption per kilometer is calculated according to the above formula (1). If the change in the mileage of the car is less than one kilometer, but the parking time is greater than twenty minutes, the change in the current power consumption when the car is parked and the power consumption per kilometer calculated last time (i.e., the previous time of this calculation) are obtained. The change in the current power consumption and the power consumption per kilometer calculated last time are accumulated and summed to obtain the corresponding current power consumption per kilometer, thereby avoiding the phenomenon in the related art that when the mileage is less than one kilometer, the power consumption generated by the on-board electrical appliances (such as air conditioners, DCDC modules, etc.) when the car is parked is omitted from calculation, thereby improving the accuracy of the 100-kilometer power consumption calculation to a certain extent. It can be understood that the specific values of the first preset threshold and the second preset threshold can also be adaptively selected according to actual conditions, and the embodiments of the present application are not specifically limited. For example, in order to reduce the number of elements in the first per kilometer change array, the first preset threshold value may be set to five kilometers, that is, the power consumption per five kilometers is calculated according to the above method, and the elements of the first per kilometer power consumption array are reduced from 100 to 20. Or, in order to speed up the calculation cycle of the current 100-kilometer power consumption, the second preset threshold value may be set to ten minutes, that is, when the current mileage change is less than one kilometer and the parking time of the car is greater than ten minutes, the above method is used to calculate the corresponding current per kilometer power consumption.
[0046] Reference Figure 2 and Figure 3 When the car is in the initial power-on state, the step S120 of "calculating the current power consumption per kilometer according to the current power consumption and the current mileage" includes the following sub-steps:
[0047] S210, determining that the vehicle is in an initial power-on state, determining that a change in the current mileage is equal to a first preset threshold, and obtaining the remaining power consumption of the vehicle when it was last powered off;
[0048] S220, calculating the current power consumption per kilometer according to the remaining power consumption, the change in the current mileage, and the change in the current power consumption.
[0049] and / or,
[0050] S310, determining that the vehicle is in an initial power-on state, determining that the change in the current mileage is less than a first preset threshold, determining that the parking time of the vehicle is greater than a second preset threshold, and obtaining the last power consumption per kilometer and the remaining power consumption of the vehicle in the last power-off state;
[0051] S320, calculating the current power consumption per kilometer according to the previous power consumption per kilometer, the change in the current power consumption, and the remaining power consumption.
[0052] Specifically, the initial power-on state refers to the state of the car being powered on again after being powered off, or the state of the car being powered on for the first time when it is a new car. When it is determined that the car is in the initial power-on state, it is necessary to obtain the remaining power consumption of the last power-off state, that is, the power consumption that was not included in the calculation of the power consumption per 100 kilometers in the last power-off state, so as to bring the remaining power consumption into the calculation of the power consumption per 100 kilometers this time.
[0053] For example, the first preset threshold is set to one kilometer, and the second preset threshold is set to twenty minutes. Correspondingly, the initial power-on state is set to a state where the cumulative mileage after the car is powered on is less than or equal to one kilometer. Therefore, when it is determined that the car is in the initial power-on state and the change in mileage reaches one kilometer, a current power consumption per kilometer is calculated according to the following formula (2). When the change in the mileage of the car is less than one kilometer, but the parking time is greater than twenty minutes, the change in the current power consumption when the car is parked, as well as the power consumption per kilometer calculated last time (that is, the power consumption per kilometer calculated last time before this calculation, in the embodiment of the present application, it is the power consumption per kilometer calculated last time before the last power-off state), thereby calculating a current power consumption per kilometer according to the following formula (3).
[0054]
[0055] Current power consumption per kilometer = remaining power consumption + Δ current power consumption + previous power consumption per kilometer............Formula (3)
[0056] It can be understood that when the initial power-on state indicates that the car is a new car and is powered on for the first time, the previous power consumption per kilometer indicates a preset reference value of power consumption per kilometer corresponding to the battery model used by the car.
[0057] Reference Figure 4 In some embodiments, step S130 includes sub-steps:
[0058] S410, limiting the current power consumption per kilometer according to a preset limit value;
[0059] S420: Update a preset first power consumption per kilometer array according to the current power consumption per kilometer after the limiting operation.
[0060] Specifically, in order to ensure the accuracy of the calculation of the power consumption per 100 kilometers, in addition to judging the validity of the current power consumption per kilometer and the current mileage, it is also necessary to perform a limit operation on the current power consumption per kilometer calculated based on the current power consumption and the current mileage. Taking the preset limit value as ±1% as an example, the limit operation represents the corresponding operation when the difference ratio between the current power consumption per kilometer and the previous power consumption per kilometer (or the preset reference value of the power consumption per kilometer) is greater than or less than ±1%. For example, when the difference ratio is less than ±1%, the first power consumption per kilometer array is updated according to the current power consumption per kilometer; when the difference ratio is greater than ±1%, the current power consumption per kilometer is corrected according to the difference ratio of ±1%, that is, the current power consumption per kilometer is limited according to the maximum difference ratio allowed between the current power consumption per kilometer and the previous power consumption per kilometer (or the preset reference value of the power consumption per kilometer), and the first power consumption per kilometer array is updated according to the current power consumption per kilometer after the limit. It can be understood that the preset limit values of the embodiments of the present application are only exemplary, and the preset limit values can also be adaptively selected according to actual needs.
[0061] Reference Figure 5 In some embodiments, step S420 includes sub-steps:
[0062] S510, obtaining the valid number of elements in the first power consumption per kilometer array;
[0063] S520, if the valid number is less than the length of the first per-kilometer power consumption array, updating the corresponding element according to the current per-kilometer power consumption after the limit operation;
[0064] S530: If the valid number is greater than the length of the first per-kilometer power consumption array, shift the elements in the first per-kilometer power consumption array, and update the last element in the first per-kilometer power consumption array according to the current per-kilometer power consumption after the limit operation.
[0065] Specifically, take the example that the length of the first power consumption per kilometer array is one hundred, that is, the first power consumption per kilometer array includes 100 elements. In the initial state, each element is assigned a value according to a preset reference value or other value of the power consumption per kilometer. When a current power consumption per kilometer is calculated according to any of the above embodiments, the assignment of the corresponding element is updated according to the current power consumption per kilometer. Among them, the valid number represents the number of elements in the first power consumption per kilometer value that are assigned with the current power consumption per kilometer. When the number of times the current power consumption per kilometer is calculated is less than one hundred times, for example, when the cumulative mileage of the car is less than 100 kilometers, the valid number is less than 100. At this time, the assignment of the corresponding element is directly updated according to the current power consumption per kilometer. When the number of times the current power consumption per kilometer is calculated is greater than one hundred times, for example, when the cumulative mileage of the car is 101 kilometers, the valid number is 101, which is greater than the length of the first power consumption per kilometer array. At this time, the value of the second element in the first per-kilometer power consumption array is assigned to the first element, the value of the third element is assigned to the second element, and so on, and the assignment of the 100th element is updated according to the current per-kilometer power consumption calculated at the 101st kilometer. The elements in the first per-kilometer power consumption array after the shift operation are accumulated and summed to obtain the current per-kilometer power consumption at the 101st kilometer.
[0066] Reference Figure 6 In some embodiments, before "obtaining the current power consumption and the current mileage" in step S110, the method for calculating the power consumption per 100 kilometers further includes the steps of:
[0067] S610, obtaining a second per-kilometer power consumption array and a first candidate per-hundred-kilometer power consumption when the vehicle was last powered off;
[0068] S620, calculating a second candidate 100-kilometer power consumption according to a second per-kilometer power consumption array;
[0069] S630: if the difference between the second candidate 100-kilometer power consumption and the first candidate 100-kilometer power consumption is within a preset range, updating the initial 100-kilometer power consumption of the vehicle according to the second candidate 100-kilometer power consumption;
[0070] S640: If the difference between the second candidate 100-kilometer electricity consumption and the first candidate 100-kilometer electricity consumption is not within a preset range, the initial value of the 100-kilometer electricity consumption of the vehicle is updated according to a preset reference value.
[0071] Specifically, the first candidate 100-kilometer power consumption and the second per-kilometer power consumption array calculated for the last time before the last power-off state of the car are obtained, and the elements in the second per-kilometer power consumption array are accumulated and summed to obtain the second candidate 100-kilometer power consumption. It is determined whether the difference between the second candidate 100-kilometer power consumption and the first candidate 100-kilometer power consumption is within the preset range. If the difference is not within the preset range, it means that the data stored in the last power-off state is incorrect. At this time, the initial value of the 100-kilometer power consumption is assigned according to the preset reference value of the 100-kilometer power consumption; if the difference is within the preset range, the initial value of the 100-kilometer power consumption is assigned according to the second candidate 100-kilometer power consumption. Among them, the initial value of the 100-kilometer power consumption is used to represent the 100-kilometer power consumption of the car when it is in the initial power-on state but the current 100-kilometer power consumption has not been calculated. It can be understood that in addition to assigning the elements in the first per-kilometer power consumption array according to the preset reference value, the elements in the first per-kilometer power consumption array can also be assigned according to the initial value of the 100-kilometer power consumption.
[0072] Furthermore, in order to ensure the reliability of data and the timeliness of calculation, when the duration of obtaining the second power consumption per kilometer array and the first candidate power consumption per hundred kilometers is greater than the preset duration, the initial value of power consumption per hundred kilometers is assigned according to the preset reference value of power consumption per hundred kilometers.
[0073] In some embodiments, the method for calculating the electricity consumption per 100 kilometers also includes the steps of: determining that the vehicle is in a power-off state, and storing the current electricity consumption per 100 kilometers and a first electricity consumption per kilometer array.
[0074] Specifically, when the current state of the car is power-off, the first power consumption per kilometer array and the current power consumption per 100 kilometers updated before power-off are stored. When the car is powered on again, the initial value of the power consumption per 100 kilometers can be calculated according to steps S610 to S640, the first power consumption per kilometer array (i.e., the second power consumption per kilometer array in step S610), and the current power consumption per 100 kilometers (i.e., the first candidate power consumption per 100 kilometers in step S610). It is understandable that in order to prevent storage abnormalities caused by power-off abnormalities, the current power consumption per 100 kilometers and the first power consumption per kilometer array can also be periodically saved, and this embodiment of the present application does not specifically limit this.
[0075] Reference Figure 7 The embodiment of the present application further provides a system for calculating the power consumption per 100 kilometers, and the system for calculating the power consumption per 100 kilometers includes:
[0076] The first module 100 is used to determine whether the vehicle is powered on and obtain the current power consumption and the current mileage;
[0077] The second module 200 is used to determine that both the current power consumption and the current mileage are valid, and calculate the current power consumption per kilometer according to the current power consumption and the current mileage;
[0078] The third module 300 is used to update a preset first power consumption per kilometer array according to the current power consumption per kilometer;
[0079] The fourth module 400 is used to calculate the current power consumption per 100 kilometers of the vehicle according to the first power consumption per kilometer array.
[0080] It can be seen that the contents of the above-mentioned embodiment of the method for calculating the electricity consumption per 100 kilometers are all applicable to the embodiment of the present system for calculating the electricity consumption per 100 kilometers. The functions specifically implemented by the embodiment of the system for calculating the electricity consumption per 100 kilometers are the same as those of the above-mentioned embodiment of the method for calculating the electricity consumption per 100 kilometers, and the beneficial effects achieved are also the same as those achieved by the above-mentioned embodiment of the method for calculating the electricity consumption per 100 kilometers.
[0081] The embodiment of the present application also provides another 100-kilometer electricity consumption calculation system, which includes: at least one processor, and a memory connected to the at least one processor. The memory stores instructions, and the instructions are executed by the at least one processor, so that when the at least one processor executes the instructions, the method for calculating the 100-kilometer electricity consumption described in any of the above embodiments is implemented.
[0082] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the method for calculating the electricity consumption per 100 kilometers described in any of the above embodiments.
[0083] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0084] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0085] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present application. In addition, the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
Claims
1. A method for calculating the power consumption per 100 kilometers, applied to automobiles, It is characterized in that The calculation method of the power consumption per 100 kilometers includes: Determine that the vehicle is powered on, and obtain current power consumption and current mileage; Determining that the current power consumption and the current driving mileage are both valid; If it is determined that the change in the current mileage is equal to a first preset threshold, the current power consumption per kilometer is calculated according to the change in the current mileage and the change in the current power consumption; If it is determined that the change in the current mileage is less than the first preset threshold, and it is determined that the parking time of the vehicle is greater than the second preset threshold, the previous power consumption per kilometer is obtained, and the current power consumption per kilometer is calculated based on the previous power consumption per kilometer and the change in the current power consumption; updating a preset first per-kilometer power consumption array according to the current per-kilometer power consumption; wherein the first per-kilometer power consumption array includes a plurality of elements, and before the first per-kilometer power consumption array is updated according to the current per-kilometer power consumption, each of the elements is assigned a preset reference value of the per-kilometer power consumption; after obtaining the current per-kilometer power consumption, assigning a corresponding element in the first per-kilometer power consumption array according to the current per-kilometer power consumption; The current power consumption per 100 kilometers of the vehicle is calculated by accumulating and summing the elements in the first power consumption per kilometer array.
2. The method for calculating the power consumption per 100 kilometers according to claim 1, It is characterized in that The updating of a preset first power consumption per kilometer array according to the current power consumption per kilometer comprises: Performing a limit operation on the current power consumption per kilometer according to a preset limit value; The preset first power consumption per kilometer array is updated according to the current power consumption per kilometer after the limit operation.
3. The method for calculating the power consumption per 100 kilometers according to claim 2, It is characterized in that The updating of a preset first power consumption per kilometer array according to the current power consumption per kilometer after the limit operation includes: Obtaining the valid number of elements in the first power consumption per kilometer array; If the valid number is less than the length of the first power consumption per kilometer array, updating the corresponding element according to the current power consumption per kilometer after the limit operation; If the valid number is greater than the length of the first power consumption per kilometer array, a shift operation is performed on the elements in the first power consumption per kilometer array, and the last element in the first power consumption per kilometer array is updated according to the current power consumption per kilometer after the limit operation.
4. The method for calculating the power consumption per 100 kilometers according to claim 1, It is characterized in that Before obtaining the current power consumption and the current mileage, the method for calculating the power consumption per 100 kilometers further includes: Obtain a second per-kilometer power consumption array and a first candidate per-hundred-kilometer power consumption of the vehicle when it was last powered off; If the duration of obtaining the second per-kilometer power consumption array and the first candidate 100-kilometer power consumption is greater than a preset duration, assigning an initial 100-kilometer power consumption value of the vehicle according to a preset reference value of the 100-kilometer power consumption; wherein the initial 100-kilometer power consumption value is used to indicate the 100-kilometer power consumption when the vehicle is powered on but the current 100-kilometer power consumption is not calculated; Accumulating and summing the elements in the second per-kilometer power consumption array to obtain a second candidate per-hundred-kilometer power consumption; If the difference between the second candidate 100-kilometer electricity consumption and the first candidate 100-kilometer electricity consumption is within a preset range, updating the initial value of the 100-kilometer electricity consumption of the vehicle according to the second candidate 100-kilometer electricity consumption; If the difference between the second candidate electric consumption per 100 kilometers and the first candidate electric consumption per 100 kilometers is not within a preset range, the initial value of the electric consumption per 100 kilometers of the vehicle is updated according to a preset reference value.
5. The method for calculating the power consumption per 100 kilometers according to claim 4, It is characterized in that Also includes: It is determined that the vehicle is in a power-off state, and the current power consumption per 100 kilometers and the first power consumption per kilometer array are stored.
6. A system for calculating the power consumption per 100 kilometers, applied to automobiles, It is characterized in that include: The first module is used to determine whether the vehicle is powered on and obtain the current power consumption and the current mileage; The second module is used to determine that both the current power consumption and the current mileage are valid; if it is determined that the change in the current mileage is equal to a first preset threshold, the current power consumption per kilometer is calculated according to the change in the current mileage and the change in the current power consumption; if it is determined that the change in the current mileage is less than the first preset threshold, and it is determined that the parking time of the vehicle is greater than a second preset threshold, the previous power consumption per kilometer is obtained, and the current power consumption per kilometer is calculated according to the previous power consumption per kilometer and the change in the current power consumption; A third module is configured to update a preset first per-kilometer power consumption array according to the current per-kilometer power consumption; wherein the first per-kilometer power consumption array includes a plurality of elements, and before the first per-kilometer power consumption array is updated according to the current per-kilometer power consumption, each of the elements is assigned a preset reference value of the per-kilometer power consumption; after obtaining the current per-kilometer power consumption, the corresponding elements in the first per-kilometer power consumption array are assigned according to the current per-kilometer power consumption; The fourth module is used to calculate the current power consumption per 100 kilometers of the vehicle by accumulating and summing the elements in the first power consumption per kilometer array.
7. An electronic device, It is characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method for calculating the electricity consumption per 100 kilometers as described in any one of claims 1 to 5.
8. A computer-readable storage medium having stored therein instructions executable by a processor, It is characterized in that The processor-executable instructions are used to implement the method for calculating the electric consumption per 100 kilometers as described in any one of claims 1 to 5 when executed by the processor.
