CN109116290B - Optimization method and device for metering of equipment electricity meter and electronic equipment - Google Patents

Optimization method and device for metering of equipment electricity meter and electronic equipment Download PDF

Info

Publication number
CN109116290B
CN109116290B CN201810612712.7A CN201810612712A CN109116290B CN 109116290 B CN109116290 B CN 109116290B CN 201810612712 A CN201810612712 A CN 201810612712A CN 109116290 B CN109116290 B CN 109116290B
Authority
CN
China
Prior art keywords
electricity meter
parameter
parameters
backup
electricity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810612712.7A
Other languages
Chinese (zh)
Other versions
CN109116290A (en
Inventor
吴韶祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mobvoi Information Technology Co Ltd
Original Assignee
Mobvoi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mobvoi Information Technology Co Ltd filed Critical Mobvoi Information Technology Co Ltd
Priority to CN201810612712.7A priority Critical patent/CN109116290B/en
Publication of CN109116290A publication Critical patent/CN109116290A/en
Application granted granted Critical
Publication of CN109116290B publication Critical patent/CN109116290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/04Testing or calibrating of apparatus covered by the other groups of this subclass of instruments for measuring time integral of power or current

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Secondary Cells (AREA)

Abstract

The embodiment of the invention discloses an optimization method and device for metering of an equipment electricity meter and electronic equipment, and relates to the technical field of data processing, wherein the method comprises the following steps: when the equipment is started, judging whether the electricity meter is reset or not; if yes, detecting whether backup electricity meter parameters exist or not; when the backup electricity meter parameters exist, extracting the backup electricity meter parameters and configuring the electricity meter so that the electricity meter can measure according to the backup electricity meter parameters. After the equipment is restarted after power failure, the stored backup electricity meter parameters are used for configuring and metering the electricity meter, and the metering accuracy of the electricity meter is improved.

Description

Optimization method and device for metering of equipment electricity meter and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to an optimization method and device for metering of an equipment ammeter and electronic equipment.
Background
Portable electronic devices are increasingly used in everyday life. Electricity meters are indispensable accessories in portable electronic devices. The fuel gauge can measure parameters such as residual capacity, full charge capacity, percentage capacity, voltage, current, temperature and the like of the battery of the electronic equipment. In general, when the device is produced, corresponding production parameter values are configured in the fuel gauge according to the battery parameters and characteristics of the device, so that when the device is started, the fuel gauge measures corresponding data indexes according to the configured production parameter values.
However, as the battery ages in the using process of the device, the performance state of the battery changes, the electricity meter can continuously self-learn and update the parameters of the electricity meter according to the current state of the battery to ensure the metering accuracy of the electricity meter, but after the device is powered down and restarted, the parameters of the electricity meter can be restored to default values.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide an optimization method and apparatus for metering an electricity meter of a device, and an electronic device, and mainly aim to configure the electricity meter according to a backup electricity meter parameter after a device is restarted after a power failure, so as to improve the metering accuracy of the electricity meter.
In order to solve the above technical problem, in a first aspect, an embodiment of the present invention provides an optimization method for metering an electricity meter of a device, where the method includes:
when the equipment is started, judging whether the electricity meter is reset or not;
if yes, detecting whether a backup electricity meter parameter exists, wherein the backup electricity meter parameter is a parameter which is stored in the equipment according to a preset time interval and used for calibrating the electricity meter;
when the backup electricity meter parameters exist, extracting the backup electricity meter parameters and configuring the electricity meter so that the electricity meter can measure according to the backup electricity meter parameters.
Optionally, the determining whether the electricity meter is reset includes:
acquiring current electricity meter parameters and preset electricity meter parameters, wherein the preset electricity meter parameters are default parameters of the electricity meter when the equipment leaves a factory, the current electricity meter parameters carry first version information of the electricity meter parameters, and the version information is used for identifying versions of the electricity meter parameters;
and when the current electricity meter parameter is the same as the preset electricity meter parameter, determining that the electricity meter is reset.
Optionally, the method further includes:
and acquiring a quantity production electricity meter parameter, wherein the quantity production electricity meter parameter is generated according to the characteristics and parameters of the equipment battery, and the quantity production parameter carries second version information of the electricity meter parameter.
Optionally, the method further includes:
if the electricity meter is not reset, detecting whether the first version information and the second version information are the same;
and if the quantity of the electricity generated by the electricity generator is different from the quantity of the electricity generated by the electricity generator, configuring the electricity generator by using the quantity of the electricity generated by the electricity generator.
Optionally, the backup electricity meter parameter further carries third version information of the electricity meter parameter, and when the backup electricity meter parameter exists, the method may further include:
detecting whether third version information is the same as the second version information;
the extracting the backup electricity meter parameters and configuring the electricity meter comprises:
and if the backup electricity meter parameters are the same, extracting the backup electricity meter parameters and configuring the electricity meter.
Optionally, the method further includes:
and if the third version information is different from the second version information, configuring the electricity meter by using the quantity electricity meter parameters.
In a second aspect, an embodiment of the present invention further provides an apparatus for optimizing metering of an electricity meter of a device, where the apparatus includes:
the judging unit is used for judging whether the electricity meter is reset or not when the equipment is started;
the detection unit is used for detecting whether a backup electricity meter parameter exists or not if the electricity meter is reset, wherein the backup electricity meter parameter is a parameter which is stored in the equipment at preset time intervals and used for calibrating the electricity meter;
an extraction unit configured to extract the backup electricity meter parameter when the backup electricity meter parameter exists;
and the configuration unit is used for configuring the electricity meter by using the backup electricity meter parameter so that the electricity meter measures according to the backup electricity meter parameter.
Optionally, the determining unit includes:
an obtaining module, configured to obtain a current electricity meter parameter and a preset electricity meter parameter, where the preset electricity meter parameter is a default parameter of the electricity meter when the device leaves a factory, and the current electricity meter parameter carries first version information of the electricity meter parameter, and the version information is used to identify a version of the electricity meter parameter;
and the determining module is used for determining that the fuel gauge is reset when the current fuel gauge parameter is the same as the preset fuel gauge parameter.
Optionally, the apparatus further comprises:
the acquisition unit is used for acquiring a quantity electricity meter parameter, wherein the quantity electricity meter parameter is generated according to the characteristics and parameters of the equipment battery, and the quantity electricity meter parameter carries second version information of the electricity meter parameter.
Optionally, the detecting unit is further configured to detect whether the first version information and the second version information in the current parameter of the fuel gauge are the same if the fuel gauge is not reset;
the configuration unit is further configured to configure the electricity meter by using the quantity electricity meter parameter if the first version information is different from the second version information.
Alternatively to this, the first and second parts may,
the detection unit is further configured to detect whether third version information in the backup fuel gauge parameter is the same as the second version information;
the configuration unit includes:
the extraction module is used for extracting the backup electricity meter parameter if the third version information is the same as the second version information;
and the configuration module is used for configuring the electricity meter by using the backup electricity meter parameters.
Alternatively to this, the first and second parts may,
the configuration unit is further configured to configure the electricity meter by using the quantity electricity meter parameter if the third version information is different from the second version information.
In order to achieve the above object, according to a third aspect of the embodiments of the present invention, there is provided a storage medium including a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the above described optimization method for metering the electricity amount of the device.
In order to achieve the above object, according to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the method for optimizing metering of electricity by a device as described above is performed.
By means of the technical scheme, the optimization method, the optimization device, the optimization storage medium and the electronic device for metering the electricity meter of the equipment provided by the embodiment of the invention solve the problem that the metering accuracy of the electricity meter is low when the electricity meter is still configured and metered according to the quantity production parameters initially configured in the equipment after the equipment is restarted after power failure in the prior art, the embodiment of the invention firstly judges whether the electricity meter in the equipment is reset or not when the equipment is started, detects whether the backup electricity meter parameters are stored or not when the judgment result is that the electricity meter is reset, and configures the electricity meter by using the backup parameters if the backup electricity meter parameters are detected, so compared with the prior art, the embodiment of the invention can store the backup electricity meter parameters in the operation process of the equipment, thereby configuring the electricity meter by using the backup electricity meter parameters after the equipment is restarted after power failure, the problem of low metering accuracy caused by the fact that the equipment is still configured according to the volume production parameters initially configured in the equipment after being restarted due to power failure is solved, and therefore metering accuracy of the electricity meter is improved. In addition, the version information in the electricity meter parameters is acquired and stored, and when the version information is detected to be changed, the updated new version electricity meter parameters are used for configuring the electricity meter, so that the metering accuracy of the electricity meter is further improved.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the embodiments of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the embodiments of the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of an optimization method for metering an electricity meter of a device according to an embodiment of the invention;
FIG. 2 is a flow chart of another method for optimizing metering of an electricity meter of a device according to an embodiment of the invention;
FIG. 3 is a schematic diagram illustrating a configuration flow of electricity meter parameters according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating an apparatus for optimizing metering of an electricity meter according to an embodiment of the present invention;
FIG. 5 is a block diagram showing the components of another device electricity meter metering optimization device provided by the embodiment of the invention;
fig. 6 shows a block diagram of an electronic device for optimizing metering of a device fuel gauge according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to improve the accuracy of electricity metering in a device, an embodiment of the present invention provides an optimization method for electricity metering in a device, as shown in fig. 1, the method includes:
101. when the equipment is started, whether the electricity meter is reset or not is judged.
For the embodiment of the present invention, when the electricity meter in the device is reset, all the parameters configured in the electricity meter are restored to the default parameters of the electricity meter when the device leaves the factory. Of course, the determination may also be performed according to the state of the flag bit of the electricity meter, and this is not specifically limited in the embodiment of the present invention.
It should be noted that, the execution main body of the embodiment of the present invention may be a device configured in the terminal device and used for optimizing the metering of the electricity meter, and when the device monitors that the device is restarted after a period of power failure, it indicates that the metering mode of the electricity meter needs to be optimized at this moment, and then a judgment instruction is triggered, so as to implement optimized metering by the electricity meter.
102. If yes, detecting whether the backup electricity meter parameters exist.
Wherein the backup electricity meter parameters are parameters stored in the device at preset time intervals for calibrating the electricity meter. It should be noted that, due to the continuous charging and discharging of the device battery, the electricity meter may calibrate the current partial parameters according to the relevant parameters of the device battery, such as the internal resistance of the battery, the full charge capacity of the battery, the aging condition of the battery, and the like, through self-learning of the electricity meter, so as to adapt to the current state of the device battery. Corresponding electricity meter parameters are calibrated through self-learning according to the battery state, the electricity meter can be assisted to measure according to different aging conditions of the battery of the device, and the measuring accuracy of the electricity meter can be improved.
In addition, the backup electricity meter parameter may be obtained and stored by the device at certain time intervals during the operation process. For example, in the operation process of the device, the current electricity meter parameters of the electricity meter are acquired and stored every other day, and the last stored electricity meter parameters are replaced, so that the backup of the electricity meter parameters is completed, and the backup electricity meter parameters are guaranteed to be accurately matched with the battery of the current device.
103. When the backup electricity meter parameters exist, extracting the backup electricity meter parameters and configuring the electricity meter.
Further, the electricity meter is enabled to meter according to the backup electricity meter parameter. Specifically, in the step, reference may be made to a configuration mode of the fuel gauge parameters in the prior art for the implementation mode of configuring the fuel gauge according to the fuel gauge parameters, which is not described in detail in the embodiment of the present invention.
For the embodiment of the present invention, when it is detected in step 101 that the device electricity meter is reset, it indicates that the device is used for the first time or is re-enabled after the system is powered down, so that it is detected in step 102 whether a backup electricity meter parameter exists, and when it is detected that the backup electricity meter parameter exists, it indicates that the device is re-enabled after the power down, and the backup data is the latest backup parameter before the power down of the device system, then the backup electricity meter parameter is obtained in this step and the electricity meter is configured by using the backup parameter, so that the electricity meter can directly perform metering according to the current state of the current device battery, and it is not necessary to perform metering according to the volume production parameter initially configured in the device, thereby avoiding the problem of low metering accuracy caused by performing configuration metering according to the volume production parameter at this time.
The optimization method for metering the electricity meter of the equipment, provided by the embodiment of the invention, has the advantages that the problem of low metering accuracy of the electricity meter caused by the fact that the electricity meter is still configured and metered according to the volume production parameters initially configured in the equipment after the equipment is restarted after power failure in the prior art is solved, the embodiment of the invention firstly judges whether the electricity meter in the equipment is reset or not when the judgment result is that the electricity meter is reset, detects whether the backup electricity meter parameters are stored or not, and configures the electricity meter by using the backup parameters if the backup electricity meter parameters are detected, so compared with the prior art, the embodiment of the invention can store the backup electricity meter parameters in the running process of the equipment, so that the electricity meter is configured by using the backup electricity meter parameters after the equipment is restarted after power failure, and the problem of low metering accuracy caused by the fact that the equipment is still configured according to the volume production parameters initially configured in the equipment after the equipment is restarted after the power failure is avoided, therefore, the metering accuracy of the electricity meter is improved.
Further, as a refinement and an extension of the embodiment shown in fig. 1, another method for optimizing metering of the electric quantity of the equipment is provided in the embodiment of the present invention, as shown in fig. 2.
201. When the equipment is started, whether the electricity meter is reset or not is judged.
For the embodiment of the present invention, the step 201 may include: acquiring current electricity meter parameters and preset electricity meter parameters; and when the current electricity meter parameter is the same as the preset electricity meter parameter, determining that the electricity meter is reset. The preset electricity meter parameters are default parameters of the electricity meter when the equipment leaves a factory, and the current electricity meter parameters carry first version information of the electricity meter parameters. The version information may be configured according to different application scenarios, for example, the version number is set to 00 when the device leaves a factory, and the version number is modified every time the volume production parameter is updated, such as 01 and 02, but is not limited thereto.
It should be noted that, the current fuel gauge parameter in this step is the same as the preset fuel gauge parameter, and may be that the current fuel gauge parameter is all the same as the preset fuel gauge parameter, or that the number of the same parameter exceeds a certain number range. For example, the current fuel gauge parameter and the preset fuel gauge parameter respectively include 4 parameters, that is, the battery capacity, the nominal voltage of the battery, the corresponding voltage value when the battery is fully charged, and the battery cut-off charging current, and when these four parameters are completely the same, it may be determined that the fuel gauge is reset, or when three parameters among the four parameters are the same, it may also be determined that the fuel gauge is reset. Of course, the step may also perform the determination according to the state of the flag bit of the electricity meter, which is not specifically limited in this embodiment of the present invention.
202. And acquiring the parameters of the mass-production electricity meter.
The quantity production electricity meter parameter is a configuration parameter of the electricity meter generated according to the characteristics and parameters of the equipment battery, the quantity production parameter carries second version information of the electricity meter parameter, and the version information is used for identifying the version of the electricity meter parameter. Specifically, each time the electricity meter volume production parameter is updated, the version of the electricity meter parameter is also updated. For the embodiment of the invention, the electricity meter parameters for mass production and the backup electricity meter parameters can be stored in the local storage area of the equipment, so that the electricity meter parameters for mass production and the backup electricity meter parameters are not lost when the equipment is powered off, and the electricity meter parameters are conveniently measured and the parameters for configuring the electricity meter are determined according to the two electricity meter parameters.
And 203a, if the electricity meter is reset, detecting whether the backup electricity meter parameters exist.
The backup electricity meter parameters are parameters stored in the device at preset time intervals for calibrating the electricity meter, and for specific conceptual explanation, reference may be made to the corresponding description in step 102, which is not repeated herein in this embodiment of the present invention.
204a, when the backup electricity meter parameter exists, detecting whether third version information in the backup electricity meter parameter is the same as the second version information.
It should be noted that, when the device system is updated, if the electricity meter quantity production parameter needs to be updated, the update program will update the quantity production electricity meter parameter, and configure corresponding version information in the electricity meter parameter. Therefore, when the backup information exists, the device is powered off and restarted after being used for a period of time, and although the backup electricity meter parameter exists, the version information in the quantity production electricity meter parameter still needs to be detected to judge whether the quantity production parameter of the device electricity meter is updated. And is configured with the quantity electricity meter parameters configured in the new system when the equipment system is updated, without using backup electricity meter parameters.
And 205a, if the parameters are the same, extracting the backup electricity meter parameters and configuring the electricity meter.
For the embodiment of the invention, when the backup fuel gauge parameters stored when the equipment operates before are consistent with the current fuel gauge parameter version when the equipment is started, the version of the equipment fuel gauge quantity production parameters is not updated before and after the equipment is powered off, so the backup fuel gauge parameters stored in the equipment are the parameters closest to the current state of the equipment battery, and the fuel gauge is configured by using the backup fuel gauge parameters in the step, so that the fuel gauge metering accuracy can be ensured to the maximum extent.
Step 205b, which is parallel to step 205a, configures the electricity meter using the quantity electricity meter parameter if the third version information is different from the second version information.
For example, it is detected that the version information in the backup electricity meter parameter is 03, and the obtained version information of the quantity production electricity meter parameter at this time is 04, which indicates that the quantity production parameter version of the electricity meter is updated after the system is restarted due to power failure, so that the electricity meter needs to be configured according to the updated quantity production electricity meter parameter.
For the embodiment of the invention, when the reset of the device electricity meter is detected, whether the backup electricity meter parameter exists is detected firstly, and whether the backup electricity meter parameter is the same as the version information in the quantity electricity meter parameter stored in the device at the moment is further detected when the backup electricity meter parameter exists, so that the electricity meter is configured by adopting the updated quantity electricity meter parameter when the device electricity meter quantity parameter is updated, and the electricity meter is configured by adopting the backup electricity meter parameter stored before power failure when the device electricity meter quantity parameter is not updated, so that the accuracy of the parameter configuration of the electricity meter can be ensured from multiple aspects, and the accuracy of the metering of the electricity meter is further improved.
Step 203b, which is parallel to step 203a, detects whether the first version information and the second version information are the same if the fuel gauge is not reset.
It should be noted that when the fuel gauge is not reset, it indicates that the device fuel gauge is in a normal use state, and during the normal use of the fuel gauge, the fuel gauge may continuously obtain the battery state parameters and automatically update the parameters for configuring the fuel gauge by using self-learning. Therefore, when the electricity meter is not reset, whether the quantity production parameters of the electricity meter of the equipment are updated or not is detected, and the electricity meter is configured by adopting the quantity production electricity meter parameters under the latest version when the system is updated, so that the accuracy of the parameter configuration of the electricity meter is ensured, and the accuracy of the metering of the electricity meter is further improved.
204b, if the quantity is different from the electricity meter, configuring the electricity meter by using the quantity electricity meter parameters.
Similarly, when detecting that the device electricity meter volume production parameter is updated, the electricity meter needs to be configured by using the initialized parameter configured after updating.
Further, according to the method described in step 201-205b, in combination with the schematic configuration diagram of the fuel gauge parameter shown in fig. 3, an embodiment of the present invention may further provide an implementation manner for configuring the fuel gauge parameter in combination with a specific application scenario, where the implementation process is divided into four execution steps, specifically, as follows:
the method comprises the steps of firstly, judging whether an electricity meter in the equipment is reset or not when the equipment is detected to be started, if not, detecting whether version information in current parameters is consistent with version information in quantity electricity meter parameters or not, if not, configuring the electricity meter by utilizing the quantity electricity meter parameters, and if so, keeping the current electricity meter parameters unchanged.
And secondly, when detecting that the electricity meter is reset, triggering to detect whether backup electricity meter parameters exist.
And thirdly, when the backup electricity meter parameters exist, further detecting whether the version information in the backup electricity meter parameters is consistent with the version information in the quantity production electricity meter parameters, and if so, configuring the electricity meter by using the backup electricity meter parameters.
And fourthly, when the backup electricity meter parameters do not exist or the version information in the backup electricity meter parameters is inconsistent with the version information in the quantity production electricity meter parameters, the electricity meter is configured by utilizing the quantity production electricity meter parameters.
However, it should be noted that the specific implementation described in the foregoing application scenarios is only an example, and is not the only specific implementation of the embodiment of the present invention, and is only one of the optimized implementations of the method according to the embodiment of the present invention.
Further, as an implementation of the method shown in fig. 1 and fig. 2, an embodiment of the present invention further provides an apparatus for optimizing metering of an electricity meter of a device. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 4, the apparatus includes: a judging unit 31, a detecting unit 32, an extracting unit 33, a configuring unit 34, wherein
The judging unit 31 may be configured to judge whether or not the electricity meter is reset when the apparatus is started.
The detecting unit 32 may be configured to detect whether a backup fuel gauge parameter exists if the determining unit 31 determines that the fuel gauge is reset, where the backup fuel gauge parameter is a parameter that is stored in the device at preset time intervals and used for calibrating the fuel gauge.
An extracting unit 33 may be configured to extract the backup electricity meter parameter when the backup electricity meter parameter exists.
A configuration unit 34, configured to configure the electricity meter by using the backup electricity meter parameter extracted by the extraction unit 33, so that the electricity meter is metered according to the backup electricity meter parameter.
Further, as an implementation of the method shown in fig. 2, another device for optimizing metering of an electricity meter is provided in an embodiment of the present invention, and is used for implementing the method shown in fig. 2. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 5, the apparatus includes: a judging unit 41, a detecting unit 42, an extracting unit 43, a configuring unit 44, wherein
The judging unit 41 may be configured to judge whether the electricity meter is reset when the apparatus is started.
The detecting unit 42 may be configured to detect whether a backup fuel gauge parameter exists if the determining unit 41 determines that the fuel gauge is reset, where the backup fuel gauge parameter is a parameter that is stored in the device at preset time intervals and used for calibrating the fuel gauge.
An extracting unit 43 may be configured to extract the backup electricity meter parameter when the backup electricity meter parameter exists.
A configuration unit 44, configured to configure the electricity meter by using the backup electricity meter parameter extracted by the extraction unit 33, so that the electricity meter is metered according to the backup electricity meter parameter.
Further, the apparatus further comprises:
the obtaining unit 45 may be configured to obtain a quantity electricity meter parameter, where the quantity electricity meter parameter is generated according to the characteristics and parameters of the device battery, and the quantity electricity meter parameter carries second version information of the electricity meter parameter, and the version information is used to identify a version of the electricity meter parameter.
Further, the judging unit 41 includes:
the obtaining module 4101 may be configured to obtain a current fuel gauge parameter and a preset fuel gauge parameter.
A determining module 4102 may be configured to determine that a reset of the fuel gauge occurs when the current fuel gauge parameter and the preset fuel gauge parameter are the same.
Further, in the above-mentioned case,
the detecting unit 42 may be further configured to detect whether third version information in the backup electricity meter parameter is the same as the second version information when the backup electricity meter parameter exists.
The extracting unit 43 may be specifically configured to extract the backup electricity meter parameter and configure the electricity meter if the third version information is the same as the second version information.
Further, the configuration unit 44 may be further configured to configure the electricity meter by using the quantity electricity meter parameter if the third version information is different from the second version information.
Further, in the above-mentioned case,
the detecting unit 42 may be further configured to detect whether the first version information and the second version information are the same if the electricity meter is not reset.
The configuration unit 44 may be further configured to configure the electricity meter by using the quantity electricity meter parameter if the quantity electricity meter parameter is different from the quantity electricity meter parameter.
The embodiment of the invention provides another device for optimizing metering of an electricity meter. The device comprises: the device comprises a judging unit, a detecting unit, an extracting unit and a configuring unit. Compared with the prior art, the embodiment of the invention can store the backup electricity meter parameters in the running process of the equipment so as to configure the electricity meter by using the backup electricity meter parameters after the equipment is restarted after power failure, thereby avoiding the problem of low metering accuracy rate caused by the fact that the equipment is still configured according to the volume production parameters initially configured in the equipment after the equipment is restarted after the power failure, therefore, the metering accuracy of the electricity meter is improved. In addition, the version information in the electricity meter parameters is acquired and stored, and when the version information is detected to be changed, the updated new version electricity meter parameters are used for configuring the electricity meter, so that the metering accuracy of the electricity meter is further improved.
Since the device for optimizing the metering of the fuel gauge of the device described in this embodiment is a device that can execute the method for optimizing the metering of the fuel gauge of the device in this embodiment, based on the method for optimizing the metering of the fuel gauge of the device described in this embodiment of the present invention, a person skilled in the art can understand the specific implementation manner of the device for optimizing the metering of the fuel gauge of the device of this embodiment and various modifications thereof, so how to implement the method for optimizing the metering of the fuel gauge of the device in this embodiment of the present invention is not described in detail here. The device adopted by the person skilled in the art to implement the method for optimizing the metering of the electric quantity of the equipment in the embodiment of the invention is all within the protection scope of the present application.
The text processing device comprises a processor and a memory, wherein the judging unit 31, the detecting unit 32, the extracting unit 33, the configuring unit 34 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the metering accuracy of the electricity meter is improved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method for optimizing metering of a device electricity meter according to the above embodiments.
An embodiment of the present invention provides an electronic device, as shown in fig. 6, including: at least one processor (processor) 41; and at least one memory (memory)52, a bus 53 connected to the processor 51; wherein,
the processor 51 and the memory 52 complete mutual communication through the bus 53;
the processor 51 is configured to call program instructions in the memory 52 to perform the following steps: when the equipment is started, judging whether the electricity meter is reset or not; if yes, detecting whether a backup electricity meter parameter exists, wherein the backup electricity meter parameter is a parameter which is stored in the equipment according to a preset time interval and used for calibrating the electricity meter; when the backup electricity meter parameters exist, extracting the backup electricity meter parameters and configuring the electricity meter so that the electricity meter can measure according to the backup electricity meter parameters.
Further, the determining whether the electricity meter is reset includes:
acquiring current electricity meter parameters and preset electricity meter parameters, wherein the preset electricity meter parameters are default parameters of the electricity meter when the equipment leaves a factory, the current electricity meter parameters carry first version information of the electricity meter parameters, and the version information is used for identifying versions of the electricity meter parameters;
and when the current electricity meter parameter is the same as the preset electricity meter parameter, determining that the electricity meter is reset.
Further, the method further comprises:
and acquiring a quantity production electricity meter parameter, wherein the quantity production electricity meter parameter is generated according to the characteristics and parameters of the equipment battery, and the quantity production parameter carries second version information of the electricity meter parameter.
Further, if the electricity meter is not reset, detecting whether the first version information and the second version information are the same;
and if the quantity of the electricity generated by the electricity generator is different from the quantity of the electricity generated by the electricity generator, configuring the electricity generator by using the quantity of the electricity generated by the electricity generator.
Further, the backup electricity meter parameter also carries third version information of the electricity meter parameter, and when the backup electricity meter parameter exists, the method may further include:
detecting whether third version information is the same as the second version information;
the extracting the backup electricity meter parameters and configuring the electricity meter comprises:
and if the backup electricity meter parameters are the same, extracting the backup electricity meter parameters and configuring the electricity meter.
Further, the method further comprises:
and if the third version information is different from the second version information, configuring the electricity meter by using the quantity electricity meter parameters.
The device in the embodiment of the invention can be a server, a PC, a PAD, a mobile phone and the like.
An embodiment of the present invention further provides a computer program product, which, when executed on a data processing apparatus, is adapted to execute a program that initializes the following method steps: when the equipment is started, judging whether the electricity meter is reset or not; if yes, detecting whether a backup electricity meter parameter exists, wherein the backup electricity meter parameter is a parameter which is stored in the equipment according to a preset time interval and used for calibrating the electricity meter; when the backup electricity meter parameters exist, extracting the backup electricity meter parameters and configuring the electricity meter so that the electricity meter can measure according to the backup electricity meter parameters.
Further, the determining whether the electricity meter is reset includes:
acquiring current electricity meter parameters and preset electricity meter parameters, wherein the preset electricity meter parameters are default parameters of the electricity meter when the equipment leaves a factory, the current electricity meter parameters carry first version information of the electricity meter parameters, and the version information is used for identifying versions of the electricity meter parameters;
and when the current electricity meter parameter is the same as the preset electricity meter parameter, determining that the electricity meter is reset.
Further, the method further comprises:
and acquiring a quantity production electricity meter parameter, wherein the quantity production electricity meter parameter is generated according to the characteristics and parameters of the equipment battery, and the quantity production parameter carries second version information of the electricity meter parameter.
Further, if the electricity meter is not reset, detecting whether the first version information and the second version information are the same;
and if the quantity of the electricity generated by the electricity generator is different from the quantity of the electricity generated by the electricity generator, configuring the electricity generator by using the quantity of the electricity generated by the electricity generator.
Further, the backup electricity meter parameter also carries third version information of the electricity meter parameter, and when the backup electricity meter parameter exists, the method may further include:
detecting whether third version information is the same as the second version information;
the extracting the backup electricity meter parameters and configuring the electricity meter comprises:
and if the backup electricity meter parameters are the same, extracting the backup electricity meter parameters and configuring the electricity meter.
Further, the method further comprises:
and if the third version information is different from the second version information, configuring the electricity meter by using the quantity electricity meter parameters.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (6)

1. A method for optimizing metering of a device fuel gauge, the method comprising:
when the equipment is started, judging whether the electricity meter is reset or not;
if yes, detecting whether a backup electricity meter parameter exists, wherein the backup electricity meter parameter is a parameter which is stored in the equipment according to a preset time interval and used for calibrating the electricity meter;
when the backup electricity meter parameters exist, extracting the backup electricity meter parameters and configuring the electricity meter so that the electricity meter can measure according to the backup electricity meter parameters;
wherein, whether the judgement fuel gauge resets includes:
acquiring current electricity meter parameters and preset electricity meter parameters, wherein the preset electricity meter parameters are default parameters of the electricity meter when the equipment leaves a factory, the current electricity meter parameters carry first version information of the electricity meter parameters, and the first version information is used for identifying versions of the electricity meter parameters;
when the current electricity meter parameter is the same as the preset electricity meter parameter, determining that the electricity meter is reset;
the method further comprises the following steps:
obtaining a quantity production electricity meter parameter, wherein the quantity production electricity meter parameter is generated according to the characteristics and parameters of the equipment battery, and the quantity production parameter carries second version information of the electricity meter parameter;
if the electricity meter is not reset, detecting whether the first version information and the second version information are the same;
and if the quantity of the electricity generated by the electricity generator is different from the quantity of the electricity generated by the electricity generator, configuring the electricity generator by using the quantity of the electricity generated by the electricity generator.
2. The method according to claim 1, wherein the backup electricity meter parameter further carries a third version information of the electricity meter parameter, and when the backup electricity meter parameter exists, the method further comprises:
detecting whether third version information is the same as the second version information;
the extracting the backup electricity meter parameters and configuring the electricity meter comprises:
and if the backup electricity meter parameters are the same, extracting the backup electricity meter parameters and configuring the electricity meter.
3. The method of claim 2, further comprising:
and if the third version information is different from the second version information, configuring the electricity meter by using the quantity electricity meter parameters.
4. An apparatus for optimizing metering of an electricity meter of a device, the apparatus comprising:
the judging unit is used for judging whether the electricity meter is reset or not when the equipment is started;
the detection unit is used for detecting whether a backup electricity meter parameter exists or not if the electricity meter is reset, wherein the backup electricity meter parameter is a parameter which is stored in the equipment at preset time intervals and used for calibrating the electricity meter;
an extraction unit configured to extract the backup electricity meter parameter when the backup electricity meter parameter exists;
a configuration unit, configured to configure the electricity meter by using the backup electricity meter parameter, so that the electricity meter performs metering according to the backup electricity meter parameter;
wherein the judging unit includes:
an obtaining module, configured to obtain a current electricity meter parameter and a preset electricity meter parameter, where the preset electricity meter parameter is a default parameter of the electricity meter when the device leaves a factory, and the current electricity meter parameter carries first version information of the electricity meter parameter, and the first version information is used to identify a version of the electricity meter parameter;
the determining module is used for determining that the fuel gauge is reset when the current fuel gauge parameter is the same as the preset fuel gauge parameter;
the device further comprises: the acquisition unit is used for acquiring a quantity production electricity meter parameter, wherein the quantity production electricity meter parameter is generated according to the characteristics and parameters of the equipment battery, and the quantity production parameter carries second version information of the electricity meter parameter;
the detection unit is further configured to detect whether the first version information and the second version information are the same if the electricity meter is not reset;
and the configuration unit is also used for configuring the electricity meter by using the quantity electricity meter parameters if the quantity electricity meter parameters are different.
5. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the optimization method for metering the electricity meter of the device according to any one of claims 1 to 3.
6. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more programs to implement the method of optimizing device electricity meter metering of any of claims 1-3.
CN201810612712.7A 2018-06-14 2018-06-14 Optimization method and device for metering of equipment electricity meter and electronic equipment Active CN109116290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810612712.7A CN109116290B (en) 2018-06-14 2018-06-14 Optimization method and device for metering of equipment electricity meter and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810612712.7A CN109116290B (en) 2018-06-14 2018-06-14 Optimization method and device for metering of equipment electricity meter and electronic equipment

Publications (2)

Publication Number Publication Date
CN109116290A CN109116290A (en) 2019-01-01
CN109116290B true CN109116290B (en) 2020-08-11

Family

ID=64821971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810612712.7A Active CN109116290B (en) 2018-06-14 2018-06-14 Optimization method and device for metering of equipment electricity meter and electronic equipment

Country Status (1)

Country Link
CN (1) CN109116290B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011257226A (en) * 2010-06-08 2011-12-22 Mazda Motor Corp Detection method and detection device for residual capacity of battery
CN102946479A (en) * 2012-11-02 2013-02-27 惠州Tcl移动通信有限公司 Method for mobile terminal to update electric quantity of battery and mobile terminal
CN103685706A (en) * 2012-09-21 2014-03-26 中兴通讯股份有限公司 Method for correcting electric quantity of mobile terminal and mobile terminal
CN104301499A (en) * 2013-07-15 2015-01-21 腾讯科技(深圳)有限公司 Method and device for analyzing battery capacity records of mobile terminal, platform and mobile terminal
CN105470590A (en) * 2014-09-05 2016-04-06 宇龙计算机通信科技(深圳)有限公司 Method and device for managing battery parameters
CN106680728A (en) * 2016-12-30 2017-05-17 深圳天珑无线科技有限公司 Electricity quantity detecting method and device
CN106775610A (en) * 2016-03-22 2017-05-31 新华三技术有限公司 A kind of electronic equipment starts method and a kind of electronic equipment
CN107295175A (en) * 2017-06-23 2017-10-24 广东欧珀移动通信有限公司 A kind of display control method, device, storage medium and the mobile terminal of mobile terminal electricity
CN107911438A (en) * 2017-11-06 2018-04-13 出门问问信息科技有限公司 The method, apparatus and system of data processing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011257226A (en) * 2010-06-08 2011-12-22 Mazda Motor Corp Detection method and detection device for residual capacity of battery
CN103685706A (en) * 2012-09-21 2014-03-26 中兴通讯股份有限公司 Method for correcting electric quantity of mobile terminal and mobile terminal
CN102946479A (en) * 2012-11-02 2013-02-27 惠州Tcl移动通信有限公司 Method for mobile terminal to update electric quantity of battery and mobile terminal
CN104301499A (en) * 2013-07-15 2015-01-21 腾讯科技(深圳)有限公司 Method and device for analyzing battery capacity records of mobile terminal, platform and mobile terminal
CN105470590A (en) * 2014-09-05 2016-04-06 宇龙计算机通信科技(深圳)有限公司 Method and device for managing battery parameters
CN106775610A (en) * 2016-03-22 2017-05-31 新华三技术有限公司 A kind of electronic equipment starts method and a kind of electronic equipment
CN106680728A (en) * 2016-12-30 2017-05-17 深圳天珑无线科技有限公司 Electricity quantity detecting method and device
CN107295175A (en) * 2017-06-23 2017-10-24 广东欧珀移动通信有限公司 A kind of display control method, device, storage medium and the mobile terminal of mobile terminal electricity
CN107911438A (en) * 2017-11-06 2018-04-13 出门问问信息科技有限公司 The method, apparatus and system of data processing

Also Published As

Publication number Publication date
CN109116290A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
CN106461732B (en) Method for estimating state of health of battery
CN111812531B (en) Battery state detection method, device and storage medium
CN108333526B (en) Battery capacity detection method and device
CN113111508B (en) Evaluation method, device and server for consistency of battery cells
CN112345944B (en) Battery abnormality detection method, apparatus, electronic device, and computer-readable storage medium
CN107024665B (en) Method for calibrating residual capacity of battery
CN108279385A (en) State of charge evaluation method, device and the electronic equipment of battery
CN112216886B (en) Method and device for estimating battery charging time
CN112986842B (en) Method, device and equipment for estimating state of charge of battery
CN110888065B (en) Battery pack state of charge correction method and device
CN111929603A (en) Battery monomer self-discharge measuring and calculating method and device and computer readable storage medium
CN112098864B (en) Leakage current detection method and device, electronic equipment and storage medium
US20150369876A1 (en) Deterioration determination method, manufacturing method of electric storage device, deterioration determination device, and storage medium
CN105372595A (en) Battery capacity detection system and method
WO2018120769A1 (en) Method and device for obtaining capacity difference between batteries
CN111521945B (en) Battery health state detection method and device, electronic equipment and storage medium
CN108051755A (en) Battery internal resistance acquisition method and device, battery management system and computer storage readable medium
CN112230152B (en) Method and system for measuring internal resistance increment of single battery cell
CN118671624A (en) SOC error calibration method and system for lithium iron phosphate energy storage battery
CN109116290B (en) Optimization method and device for metering of equipment electricity meter and electronic equipment
CN103942133A (en) Information processing method and electronic equipment
CN107656213B (en) Intelligent test method and system for battery core
US20140019790A1 (en) Monitoring a battery in an electronic device
CN109541492B (en) Method, device and equipment for determining residual electric quantity of power supply and readable storage medium
CN113608953B (en) Test data generation method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant