Electricity meter monitoring method and device, electronic equipment and storage medium

By setting preset buried points in electronic equipment and using buried point drivers to monitor the power meter, the problem of low monitoring efficiency of the power meter in the prior art is solved, and timely monitoring and effective management of the power meter status is realized.

CN119557157APending Publication Date: 2025-03-04GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311129585.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, the monitoring efficiency of the electric meter of electronic equipment is low and it is impossible to detect the operating status of the electric meter in time. Especially when the electric meter has a gradual change problem, it is difficult to conduct effective monitoring.

Method used

By setting preset buried points in electronic devices, using buried point drivers to monitor the power meter, obtain monitoring and measurement parameters, and determine the operating status of the power meter, including normal and error status.

Benefits of technology

The status of the power meter is realized in a timely manner within the electronic equipment, the monitoring efficiency of the power meter is improved, and the measurement results of the power meter at the preset buried point can be collected in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557157A_ABST
    Figure CN119557157A_ABST
Patent Text Reader

Abstract

The invention discloses a voltameter monitoring method and device, electronic equipment and a storage medium, and belongs to the technical field of charging. The method is applied to electronic equipment and comprises the steps that monitoring measurement parameters for monitoring the voltameter through all preset burying points are obtained, the monitoring measurement parameters comprise measurement results collected at all the preset burying points, and all the preset burying points are set for the voltameter through burying point driving; and according to the monitoring measurement parameters, the operation state of the voltameter is determined, and the operation state comprises a normal state and an error state. In the running process of the electronic equipment, the voltameter is monitored in a buried point presetting mode, the monitoring and measuring parameters for monitoring the voltameter are obtained in time, whether the voltameter is in the normal state or the error state is determined based on the monitoring and measuring parameters, the effect of monitoring the voltameter in the electronic equipment is achieved, and the safety of the electronic equipment is improved. The measurement result of the voltameter at the preset burying point can be collected in time, and the efficiency of monitoring the voltameter of the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of charging technology, and in particular to a method, device, electronic device and storage medium for monitoring an electricity meter. Background Art

[0002] With the development of science and technology, various electronic devices appear in people's daily lives. When the electronic devices are low on power, they need to be charged.

[0003] At present, during the use of electronic devices, fuel meters are usually used to monitor relevant information of the battery. For example, the fuel meter can be used to obtain parameters such as battery voltage and battery current, and the fuel meter can also be used to predict battery capacity, battery health, etc. Since the fuel meter can achieve so many functions and obtain relevant information of the battery in a timely manner, more and more manufacturers will equip electronic devices with fuel meters when producing electronic devices, and use fuel meters to monitor the batteries of electronic devices. In related technologies, when there is a problem with the fuel meter of an electronic device, it is often necessary to detect the electronic device through an external device, and the operation of the fuel meter cannot be monitored in time. Moreover, the problem of the fuel meter is generally a gradual process rather than a sudden change, and there are problems such as low efficiency in monitoring the fuel meter of the electronic device. Summary of the invention

[0004] In order to solve the problems of the prior art and improve the efficiency of monitoring the electricity meter of an electronic device, the embodiments of the present application provide a method, device, electronic device and storage medium for monitoring the electricity meter. The technical solution is as follows:

[0005] In one aspect, the present application provides a method for monitoring an electric meter, which is applied to an electronic device, and the method includes:

[0006] Acquire monitoring measurement parameters for monitoring the electricity meter through each preset burying point, wherein the monitoring measurement parameters include measurement results collected at each preset burying point, and each preset burying point is set for the electricity meter through a burying point driver;

[0007] The operating state of the electricity meter is determined according to the monitoring measurement parameters, and the operating state includes a normal state and an error state.

[0008] In one aspect, the present application provides a monitoring device for an electric meter, which is applied to an electronic device, and the device includes:

[0009] A first acquisition module is used to acquire monitoring measurement parameters for monitoring the electricity meter through each preset burying point, wherein the monitoring measurement parameters include measurement results collected at each preset burying point, and each preset burying point is set for the electricity meter through a burying point driver;

[0010] The first determination module is used to determine the operating state of the electricity meter according to the monitoring measurement parameters, and the operating state includes a normal state and an error state.

[0011] In another aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the method for monitoring the electric meter as described in one aspect.

[0012] In another aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the method for monitoring the electricity meter as described in one aspect.

[0013] On the other hand, an embodiment of the present application provides a computer program product. When the computer program product is executed on a computer, the computer is enabled to execute the method for monitoring the electricity meter as described in one aspect above.

[0014] On the other hand, an embodiment of the present application provides an application publishing platform, which is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes the method for monitoring the electricity meter as described in one aspect above.

[0015] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0016] The present application obtains monitoring measurement parameters for monitoring the fuel meter through various preset buried points. The monitoring measurement parameters include measurement results collected at various preset buried points. Each preset buried point is set for the fuel meter through the buried point driver; according to the monitoring measurement parameters, the operating state of the fuel meter is determined, and the operating state includes a normal state and an error state. During the operation of the electronic device, the present application monitors the fuel meter by means of preset buried points, and can timely obtain the monitoring measurement parameters for monitoring the fuel meter, and determine whether the fuel meter is in a normal state or an error state based on the monitoring measurement parameters, thereby achieving the effect of monitoring the fuel meter inside the electronic device, and can timely collect the measurement results of the fuel meter at the preset buried points, thereby improving the efficiency of monitoring the fuel meter of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 is a schematic structural diagram of an example of an electronic device provided in an embodiment of the present application;

[0019] Figure 2 is a method flow chart of a method for monitoring an electricity meter provided by an exemplary embodiment of the present application;

[0020] Figure 3 is a method flow chart of a method for monitoring an electricity meter provided by an exemplary embodiment of the present application;

[0021] Figure 4 is a method flow chart of a method for monitoring an electricity meter provided by an exemplary embodiment of the present application;

[0022] Figure 5 is a structural block diagram of a monitoring device for an electricity meter provided by an exemplary embodiment of the present application;

[0023] Figure 6 It is a structural diagram of another example of the monitoring device of the electricity meter provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0025] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0026] The solution provided by the present application can be used in real-life scenarios where people use electronic devices in their daily lives. To facilitate understanding, the application scenarios involved in the embodiments of the present application are first briefly introduced below.

[0027] The fuel gauge was originally designed based on Faraday's law to measure the amount of electricity passing through a circuit. It is called a "coulomb meter" or "fuel gauge". With the development of science and technology, fuel gauges have become more and more useful. Fuel gauge chips have been integrated and produced. Fuel gauge chips and battery cells are assembled to form a combined battery (i.e., battery pack). During the use of electronic equipment, the fuel gauge is used to measure the battery voltage, battery current, battery temperature, battery capacity, battery health, etc.

[0028] Please refer to Figure 1 , is a schematic diagram of an example structure of an electronic device provided in an embodiment of the present application. Figure 1 The electronic device shown includes components such as a processor 110 , a memory 120 , a transceiver 130 , a display unit 140 , an input unit 150 , a sensor 160 , an audio circuit 170 , and a battery module 180 .

[0029] The processor 110 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, the processor 110 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 410 may include one or more processing units; optionally, the processor 110 may integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not listed here one by one.

[0030] The memory 120 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area, wherein the program storage area may store operating devices, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, phone book, etc.), etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0031] The transceiver 130 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 130 can be one or more devices integrating at least one communication processing module, for example, an antenna and a baseband processor are integrated into the transceiver 130, or an antenna and a modem processor are integrated into the transceiver 130, etc., which are not limited here.

[0032] The display unit 140 may be used to display information input by a user or information provided to a user and various menus of the electronic device. The display unit 140 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., which is not limited here.

[0033] The input unit 150 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 150 can collect the user's operations on or near it, and drive the corresponding connection device according to a pre-set program. In addition, the input unit 150 may include a touch panel, which can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, the input unit 150 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control keys, switch keys, etc.), trackballs, joysticks, etc.

[0034] The electronic device may also include at least one sensor 160, such as a gyroscope sensor, a motion sensor, and other sensors. The motion sensor may include an acceleration sensor for detecting the magnitude of acceleration in all directions, and the magnitude and direction of gravity when stationary, which may be used for applications to identify the posture of the electronic device, such as horizontal and vertical screen switching, related games, magnetometer posture calibration, etc. As for other sensors that may be configured in the electronic device, such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.

[0035] The audio circuit 170 may include a speaker and a microphone, and may provide an audio interface between a user and an electronic device. The audio circuit 170 may transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 170 and converted into audio data, and then the audio data is output to the processor 110 for processing, and then sent to another electronic device through the video circuit, or the audio data is output to the memory 120 for further processing.

[0036] The electronic device also includes a battery module 180 for supplying power to various components. Optionally, the battery module 180 can be logically connected to the processor 110 via a power management device, so that the power management device can manage functions such as charging, discharging, and power consumption.

[0037] Although not shown, the electronic device may further include a camera. Optionally, the camera may be located at the front or rear of the electronic device, which is not limited in the present embodiment.

[0038] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0039] Optionally, the electronic device is a terminal device having a battery and a power meter, for example, the electronic device may include but is not limited to wearable devices (such as bracelets, smart watches, smart glasses, etc.), mobile phones, tablet computers, laptop computers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, desktop computers, laptop computers, etc. The battery module of the electronic device may support wired charging or wireless charging.

[0040] Above Figure 1In the electronic device shown, the battery module may include a combined battery, that is, the battery cell of the above-mentioned battery + a fuel gauge chip. The fuel gauge can measure and monitor various data such as battery voltage and battery current during the use of the electronic device. When there is a problem with the fuel gauge of the electronic device, the measured data is not accurate enough, and the fuel gauge needs to be inspected or repaired. At present, in terms of fuel gauge detection of electronic devices, it is often necessary to detect the electronic device through external devices, and the operation of the fuel gauge cannot be monitored in time. Moreover, the problem of the fuel gauge is generally a gradual process rather than a sudden change, and the gradual process of the fuel gauge cannot be monitored. There are problems such as low efficiency in monitoring the fuel gauge of the electronic device.

[0041] In order to solve the problems existing in the above-mentioned related technologies, improve the efficiency of detecting the power meter of the electronic device, and timely obtain the data collected by the power meter during operation, the present application provides a monitoring method of the power meter, which can monitor the different measurement results that can be collected by the power meter based on preset buried points, so as to timely analyze whether there is a problem with the power meter of the electronic device.

[0042] Please refer to Figure 2 , which shows a method flow chart of a method for monitoring an electric meter provided by an exemplary embodiment of the present application, and the method for monitoring an electric meter can be executed by an electronic device. Figure 2 As shown, the monitoring method of the electricity meter may include the following steps:

[0043] Step 201, obtaining monitoring measurement parameters for monitoring the electricity meter through each preset burying point, the monitoring measurement parameters including measurement results collected at each preset burying point, each preset burying point is set for the electricity meter through a burying point driver.

[0044] Optionally, the electronic device can set various preset burying points for the power meter by loading the burying point driver, and the effect of monitoring the power meter of the electronic device can be achieved through the various preset burying points. Among them, the burying point driver can be pre-set before the electronic device leaves the factory, or it can be set based on the operating system of the electronic device, or it can be updated with the operating system of the electronic device. For example, each electronic device manufacturer will release a new system version based on the background server. The electronic device downloads the new system version and runs the burying point driver contained therein to set various preset burying points for the power meter.

[0045] Optionally, during the operation of the electronic device, whether it is charging or discharging, the electronic device can collect data based on preset buried points and obtain corresponding monitoring and measurement parameters. For example, the preset buried points include buried points for measuring the battery power of the fuel gauge, then the monitoring and measurement parameters obtained include the measurement results of the collected battery power. Similarly, the preset buried points in this scheme can be set to measure multiple parameters such as battery voltage, battery current, collection time, battery charge and discharge times, battery health, battery full charge capacity, battery maximum capacity, and battery minimum power measured by the fuel gauge. Correspondingly, the collected measurement results are also the measurement results obtained when these parameters are collected.

[0046] Step 202: determining the operating state of the electricity meter according to the monitoring measurement parameters, where the operating state includes a normal state and an error state.

[0047] Optionally, the electronic device detects the operating status of the electricity meter based on the acquired monitoring and measurement parameters, and determines whether its own electricity meter is currently in a normal state or an error state, thereby achieving the effect of real-time monitoring of the electricity meter.

[0048] In summary, the present application obtains monitoring measurement parameters for monitoring the fuel meter through various preset buried points, the monitoring measurement parameters include measurement results collected at various preset buried points, and each preset buried point is set for the fuel meter through the buried point driver; according to the monitoring measurement parameters, the operating state of the fuel meter is determined, and the operating state includes a normal state and an error state. During the operation of the electronic device, the present application monitors the fuel meter by means of preset buried points, and can timely obtain the monitoring measurement parameters for monitoring the fuel meter, and determine whether the fuel meter is in a normal state or an error state based on the monitoring measurement parameters, thereby achieving the effect of monitoring the fuel meter inside the electronic device, and can timely collect the measurement results of the fuel meter at the preset buried points, thereby improving the efficiency of monitoring the fuel meter of the electronic device.

[0049] In one possible implementation, the electronic device can establish a connection with a server and receive a tracking point driver published by the server, update its own tracking point driver, automatically load the updated tracking point driver at startup, arrange preset tracking points for different parameters that can be collected by the power meter, and flexibly change or update the parameters of the power meter that needs to be monitored.

[0050] In one possible implementation, when the electronic device determines that the operating state of the fuel meter is an error state, it can also record the battery status information of the electronic device and upload the battery status information in the form of a storage queue to facilitate subsequent analysis and statistics of the overall data of the fuel meter and improve the efficiency of monitoring the fuel meter of the electronic device.

[0051] Please refer to Figure 3, which shows a method flow chart of a method for monitoring an electric meter provided by an exemplary embodiment of the present application, and the method for monitoring an electric meter can be executed by an electronic device. Figure 3 As shown, the monitoring method of the electricity meter may include the following steps:

[0052] Step 301, when the electronic device is started, the embedded point driver is loaded.

[0053] Optionally, the embedding driver can be built-in the electronic device, or the embedding driver issued by the server can be received when the electronic device is connected to the server. The electronic device can load the embedding driver each time it is restarted, and set various preset embedding points for the electricity meter through the embedding driver.

[0054] Optionally, the server can update the system version of the electronic device. After the electronic device downloads the new system version from the server, it can bring the buried point driver in the new system version. The electronic device reloads the buried point driver to update the existing buried point driver. For example, the existing preset buried points in the electronic device monitor the first parameter, the second parameter, and the third parameter measured by the power meter. After the server is updated in the background, the electronic device loads a new buried point driver. The set preset buried point can be changed to a buried point that monitors the first parameter, the third parameter, the fourth parameter, and the fifth parameter measured by the power meter. The preset buried points inside the electronic device can be flexibly added, replaced, and other operations. Optionally, here is an example that the updated buried point driver can be completed by the electronic device downloading a new system version from the server. In actual applications, the electronic device and the server can also interact, and the new buried point driver is sent to the electronic device in real time through the server. The electronic device then reloads the new buried point driver sent by the server by restarting, etc., which will not be repeated here.

[0055] Step 302, obtaining monitoring measurement parameters for monitoring the electricity meter through each preset burying point, the monitoring measurement parameters including the measurement results collected at each preset burying point, each preset burying point is set for the electricity meter through a burying point driver.

[0056] Step 303: determining the operating state of the electricity meter according to the monitoring measurement parameters, where the operating state includes a normal state and an error state.

[0057] Optionally, the above-mentioned burying point driver can obtain the monitoring measurement parameters at the node position at which each preset burying point is set for the electronic device.

[0058] For example, the preset burying point is set at the node position of the first target parameter. The first target parameter can be any one or more of the battery power, battery health, and battery charge and discharge cycle times. If there are multiple cases, each first target parameter corresponds to a preset burying point.

[0059] Optionally, when the preset tracking point is set at the node position of the first target parameter, the monitoring measurement parameters acquired by the electronic device include the first parameter value and the second parameter value of the first target parameter of the electricity meter based on the interval acquisition, the first parameter value is the parameter value of the first target parameter of the electricity meter acquired at the start time of the preset interval moment, and the second parameter value is the parameter value of the first target parameter of the electricity meter acquired at the end time of the preset interval moment; when executing step 303 to determine the operating state of the electricity meter according to the monitoring measurement parameters, it can be as follows: the electronic device obtains the first difference between the first parameter value and the second parameter value according to the first difference between the two; determines the operating state of the electricity meter according to the first difference and the preset difference threshold value corresponding to the preset interval moment. Among them, the preset interval moment can be preset by the developer or operation and maintenance personnel.

[0060] For example, the preset interval is 5s. The electronic device can collect the first parameter value of the first target parameter 5s ago through the above preset buried points, and can also collect the second parameter value of the first target parameter after 5s. According to the first parameter value and the second parameter value, the first difference of the first target parameter before and after the interval of 5s is obtained, and the operation state of the fuel meter is determined according to the first difference and the preset difference threshold. For example, when the first target parameter is the battery power, the preset difference threshold can be 5. The electronic device can obtain the first battery power value soc1 and the second battery power value soc2 of the fuel meter before and after a certain 5s during use, and detect whether the difference between soc1 and soc2 is greater than 5. If it is greater than 5, it means that the measured battery power has a power jump within 5s, indicating that the fuel meter has a problem, and the operation state of the fuel meter is an error state. On the contrary, if it is not greater than 5, it means that the measured battery power has no power jump within 5s, indicating that the fuel meter is normal, and the operation state of the fuel meter is normal. Among them, 5s is exemplary, and the preset interval time can also be other values ​​(such as 4s, 6s, etc.). The target monitoring thread runs according to the preset interval time, and the monitoring parameter variables obtained in the process also include the value of the start time and the end time of the preset interval time.

[0061] Optionally, when the first target parameter is the battery health, the preset difference threshold may be 3, and the electronic device may obtain the first battery health value soh1 and the second battery health value soh2 of the fuel gauge around 5 seconds during use, by detecting whether the difference between soh1 and soh2 is greater than 3. If it is greater than 3, it means that the measured battery power has a jump in battery health within 5 seconds, indicating that there is a problem with the fuel gauge and the operating state of the fuel gauge is an error state. On the contrary, if it is not greater than 3, it means that the measured battery power has no jump in battery health within 5 seconds, indicating that the fuel gauge is normal and the operating state of the fuel gauge is normal.

[0062] Optionally, when the first target parameter is the number of charge and discharge cycles of the battery, the preset difference threshold can be 3. The electronic device can obtain the charge and discharge cycle value cc1 of the first battery and the charge and discharge cycle value cc2 of the second battery around 5 seconds during the use of the fuel meter, and detect whether the difference between cc1 and cc2 is greater than 3. If it is greater than 3, it means that the measured battery power has a jump in the number of charge and discharge cycles within 5 seconds, indicating that there is a problem with the fuel meter and the operating state of the fuel meter is an error state. On the contrary, if it is not greater than 3, it means that the measured battery power has no jump in the battery health within 5 seconds, indicating that the fuel meter is normal and the operating state of the fuel meter is normal.

[0063] Alternatively, the above-mentioned interval-collected electricity meter can also be implemented in the following manner. For example, the monitoring measurement parameter acquired by the electronic device is the current parameter value of the first target parameter of the electricity meter collected at the current moment; when executing step 303, the operation state of the electricity meter can be determined according to the monitoring measurement parameter as follows: according to the current parameter value and the historical parameter value, the parameter difference and time difference between the two are acquired, and the historical parameter value is the parameter value of the first target parameter of the electricity meter collected last time; according to the preset difference threshold corresponding to the parameter difference and the time difference, the operation state of the electricity meter is determined.

[0064] That is to say, the electronic device can also store the historical parameter values ​​collected last time. After the electronic device obtains the current parameter value of the first target parameter of the currently collected power meter, it can obtain the parameter difference and time difference between the current parameter value of the first target parameter of the currently collected power meter and the stored historical parameter value collected last time, and compare the parameter difference with the preset difference threshold corresponding to the time difference, so as to determine whether the operating state of the power meter is an error state or a normal state. Optionally, the preset difference threshold corresponding to the time difference can be pre-set by the developer or operation and maintenance personnel. For example, the first target parameter is the battery power, the time difference is 5s, the preset difference threshold is 5, and other first target parameters are similar, which will not be repeated here.

[0065] It should be noted that the above-mentioned preset tracking points can monitor multiple first target parameters, and accordingly, detect the first parameter values ​​and the second parameter values ​​of the multiple first target parameters to determine the operating status of the power meter. If any one of the first target parameters fails to pass the detection, it means that the operating status of the power meter is an error state.

[0066] Optionally, when the electronic device obtains the monitoring measurement parameters for monitoring the fuel meter, it can obtain them based on the created target monitoring thread. For example, before obtaining the monitoring measurement parameters for monitoring the fuel meter, the electronic device pre-creates the target monitoring thread, initializes the relevant parameter variables of the target monitoring thread, and the relevant parameter variables include the initial variable values ​​at the preset buried points of the fuel meter; obtaining the monitoring measurement parameters for monitoring the fuel meter includes: obtaining the monitoring measurement parameters for monitoring the fuel meter by running the target monitoring thread.

[0067] Optionally, during operation, the electronic device can actively create a target monitoring thread of the fuel gauge, and obtain the required monitoring and measurement parameters by running the target monitoring thread. In the process of creating the target thread of the fuel gauge, the electronic device initializes the relevant parameter variables that the target monitoring thread needs to obtain, and sets the initial variable values ​​for the relevant parameter variables. For example, the monitoring and measurement parameters corresponding to each preset buried point include parameter one, parameter two, parameter three, and parameter four. Here, the relevant parameter variables that the target monitoring thread needs to obtain are parameter one, parameter two, parameter three, and parameter four. These parameter variables are set with initial variable values. For example, parameter one is the battery power, and the initialized battery power is the battery power at the current moment, parameter two is the battery health, and the initialized battery power is the battery health at the current moment, parameter three is the number of battery charge and discharge cycles, and the initialized battery power is the number of battery charge and discharge cycles at the current moment, etc.

[0068] Optionally, when the electronic device is running the target monitoring thread, it can periodically run the target monitoring thread according to a preset interval. For example, the preset interval is 5s, that is, the target monitoring thread is run once every 5s to obtain the required monitoring measurement parameters. When the electronic device is turned on and executes the above process for the first time, the data obtained in the first 5s is the value of the initialized related parameter variable, avoiding the situation where the corresponding value cannot be obtained at the initial time.

[0069] In one possible implementation, the monitoring measurement parameter includes a third parameter value of a second target parameter of the fuel meter collected during charging or discharging, and the second target parameter includes the battery charge; when executing step 303, the operating state of the fuel meter is determined according to the monitoring measurement parameter as follows: the operating state of the fuel meter is determined according to the change of the battery charge within a first time period. Among them, the first time period can be pre-set by the developer or operation and maintenance personnel. For example, the electronic device can classify and detect the discharge and charging conditions. During the charging process of the electronic device, if the battery charge is still decreasing for a period of time, it means that there is a problem with the fuel meter. Or, during the discharge process of the electronic device, if the battery charge is still increasing for a period of time, it means that there is a problem with the fuel meter. Based on this principle, this solution can be designed to collect the parameter values ​​at the above-mentioned preset buried points when the electronic device is charging or discharging.

[0070] Here, the second target parameter is the battery power as an example. Another preset buried point can be set in the electronic device to detect the battery current. Since charging or discharging requires accurate judgment of the starting time of charging and discharging, the electronic device can establish a variable with an initial time for the battery current, for example, through Pre_batt_current to represent the battery current, the electronic device can establish a variable with a charging start time for charging, such as through Start_chg_time to represent the charging start time, and similarly, a variable with a discharge start time can also be established for discharging, such as through Start_no_chg_time to represent the discharge start time. Optionally, the electronic device can set initialization values ​​for Pre_batt_current, Start_chg_time, and Start_no_chg_time, and set Pre_batt_current to the battery current of the current system time after the electronic device is started (if it is not currently charging, then the set value is greater than 0, if it is currently charging, then the set value is less than 0), Start_chg_time is set to the current system time after the electronic device is started, and Start_no_chg_time is set to the current system time after the electronic device is started.

[0071] That is to say, after the electronic device is started, the charging start time and the discharging start time can both use the current system time as the starting time. After the battery current is subsequently obtained, it is compared with the battery current obtained last time. If it is the first time to obtain the battery current, then the battery current obtained last time is the above initialization value. If it is found that the electronic device has switched between charging and discharging, for example, if the electronic device is switched from charging to discharging, the electronic device will update the charging start time to the current time. If the electronic device is switched from discharging to charging, the electronic device will update the discharging start time to the current time and update the battery current to the battery current at the current time.

[0072] For example, the first duration is 30 minutes. If the battery current initialized during the operation of the electronic device is less than 0, and the battery current obtained for the first time is greater than 0, it means that the electronic device has switched from charging to discharging. Start_no_chg_time is updated to the current time, and within the next 30 minutes, it is determined whether the battery power continues to increase. If it continues to increase, it means that the power smoothing curve of the fuel gauge is wrong. At this time, there is a problem with the fuel gauge, and the operating state of the fuel gauge is an error state. If the battery current initialized during the operation of the electronic device is greater than 0, and the battery current obtained for the first time is less than 0, it means that the electronic device has switched from discharging to charging. Start_chg_time is updated to the current time, and within the next 30 minutes, it is determined whether the battery power continues to decrease. If it continues to decrease, it means that the power smoothing curve of the fuel gauge is wrong. At this time, there is a problem with the fuel gauge, and the operating state of the fuel gauge is an error state.

[0073] Optionally, a first indicator may be provided in the electronic device, and the first indicator is used to indicate whether it is the first time that the monitoring measurement parameters are obtained after the electronic device is started. For example, the first indicator is represented by a flag, and when flag=true, it indicates that it is the first time that the monitoring measurement parameters are obtained after the electronic device is started. When flag=false, it indicates that it is not the first time that the monitoring measurement parameters are obtained after the electronic device is started. Therefore, when flag=true, the electronic device can execute the above-mentioned initialization of the battery current, the charging start time, and the value of the discharging start time, and adjust flag=true to flag=false. When the battery current obtained subsequently indicates that the battery is currently charging, that is, when the battery current is less than 0, combined with the initial variable, it is determined whether the electronic device is changing from discharging to charging. If so, within the next 30 minutes, it is determined whether the battery power obtained subsequently continues to increase. If it continues to increase, it means that the power smoothing curve of the fuel gauge is wrong. On the contrary, when the battery current obtained subsequently indicates that the battery is currently discharging, that is, when the battery current is greater than 0, combined with the initial variables, it is determined whether the electronic device has changed from charging to discharging. If so, within the next 30 minutes, it is determined whether the battery power obtained subsequently continues to decrease. If it continues to decrease, it means that the power smoothing curve of the fuel gauge is wrong.

[0074] It should be noted that after each of the above judgments is completed, the electronic device will update Pre_batt_current, Start_chg_time, and Start_no_chg_time, and the subsequently obtained battery current will continue to be compared with the battery current after this update. If any changes in charging and discharging are found, Start_chg_time and Start_no_chg_time will continue to be updated, and the above judgment of the changes in the battery power within the first time period will be executed.

[0075] In one possible implementation, the second target parameter also includes the battery voltage, and the acquired second target parameter includes the battery charge and the battery voltage; when the electronic device performs step 303 to determine the operating state of the fuel meter according to the monitoring measurement parameters, it can be as follows: by detecting whether the battery charge matches the battery voltage, obtaining the detection result, and the detection result is used to indicate whether the battery charge matches or does not match the battery voltage; according to the detection result, determining the operating state of the fuel meter. That is to say, in addition to the above-mentioned battery charge, the monitoring measurement parameters acquired by the electronic device may also include the battery voltage. Different monitoring measurement parameters correspond to different judgment methods. In the case where the acquired second target parameter includes the battery charge and the battery voltage, the electronic device can detect whether the battery voltage and the battery charge match. If they match, it means that the operating state of the fuel meter is normal. If they do not match, it means that the operating state of the fuel meter is an error state.

[0076] Optionally, the electronic device can detect whether the battery power matches the battery voltage in the following manner: obtain a target matching relationship, where the target matching relationship is the corresponding relationship between the battery voltage and the battery power when the electronic device is connected to a charger or not connected to a charger, wherein different types of chargers correspond to different target matching relationships when the electronic device is connected to a charger; and detect whether the battery power matches the battery voltage based on the target matching relationship. For example, the electronic device can check whether it is plugged into a charger. If it is currently plugged into a charger, the matching relationship obtained is the first matching relationship; if it is currently not plugged into a charger, the matching relationship obtained is the second matching relationship.

[0077] For example, if the charger plugged in is the first model of fast charging charger, after the electronic device is fast charged, during the fast charging process, the battery power and battery voltage will change as each other changes, and there is a change curve. The electronic device can judge whether the battery power and battery voltage match according to the change curve, and whether they meet the value of the change curve. If they do, it means that the battery power and battery voltage match, and the running state of the fuel gauge is normal. If they do not meet, it means that the battery power and battery voltage do not match, and the running state of the fuel gauge is an error state. Among them, the change curve can be pre-set in the electronic device by the developer.

[0078] For example, taking the electronic device being fully charged based on the above-mentioned first model of fast charging charger as an example, the battery voltage at this time in the change curve should be the full charging voltage, and the battery power should not be less than 80%. That is to say, in the fully charged state, if the actual battery power obtained is less than 80%, it means that the battery voltage does not match the battery power, and it is determined that the operating state of the fuel meter is an error state. If the actual battery power obtained is not less than 80%, it means that the battery voltage matches the battery power, and it is determined that the operating state of the fuel meter is normal.

[0079] If the electronic device is fully charged but not connected to a charger, the electronic device will obtain the battery voltage and battery power after the second time period. If the obtained battery voltage is greater than the first voltage threshold and the battery power is less than the first power threshold, it means that the battery power does not match the battery voltage, and the running state of the fuel gauge is an error state. If the obtained battery voltage is less than the second voltage threshold and the battery power is greater than the first power threshold, it means that the battery power does not match the battery voltage, and the running state of the fuel gauge is an error state. Among them, the first voltage threshold, the second voltage threshold and the first power threshold can all be set in the electronic device in advance by the developer or operation and maintenance personnel.

[0080] Taking the second time length of 18 minutes, the full charge voltage of the electronic device battery is 4.2V, and the nominal voltage is 3.6V as an example, after the electronic device is fully charged and not connected to the charger for 18 minutes, that is, by subtracting the last discharge start time from the current time>18 minutes, if the obtained battery voltage is greater than 4V, and the obtained battery power is less than 40%, it means that the battery power does not match the battery voltage, and the running state of the fuel gauge is an error state. If the obtained battery voltage is less than 3.6V, and the obtained battery power is greater than 40%, it means that the battery power does not match the battery voltage, and the running state of the fuel gauge is an error state.

[0081] In one possible implementation, the monitoring measurement parameter includes a fourth parameter value of the third target parameter of the collected power meter; the third target parameter includes any one or more of the maximum battery capacity, the full charge capacity of the battery, and the minimum battery capacity. When the electronic device performs step 303 to determine the operating state of the power meter according to the monitoring measurement parameter, it can be as follows: determine the operating state of the power meter according to the size relationship between the fourth parameter value and the preset nominal value. Among them, the preset nominal value can be pre-set in the electronic device by the developer or operation and maintenance personnel.

[0082] For example, when the third target parameter is the maximum capacity of the battery, the electronic device can obtain the fourth parameter value corresponding to the maximum capacity of the battery at the current moment, and detect whether the fourth parameter value is greater than 1.1 times the preset nominal value of the maximum capacity of the battery, or detect whether the fourth parameter value is less than 0.7 times the preset nominal value of the maximum capacity of the battery. If it is greater than 1.1 times the preset nominal value of the maximum capacity of the battery, it indicates that there is a problem with the fuel gauge and the operating state of the fuel gauge is an error state. Alternatively, if it is less than 0.7 times the preset nominal value of the maximum capacity of the battery, it also indicates that there is a problem with the fuel gauge and the operating state of the fuel gauge is an error state.

[0083] Optionally, when the third target parameter is the battery full charge capacity, the electronic device can obtain the fourth parameter value corresponding to the battery full charge capacity at the current moment, and detect whether the fourth parameter value is greater than 1.1 times the preset nominal value of the battery full charge capacity, or detect whether the fourth parameter value is less than 0.7 times the preset nominal value of the battery full charge capacity. If it is greater than 1.1 times the preset nominal value of the battery full charge capacity, it indicates that there is a problem with the fuel meter and the operating state of the fuel meter is an error state. Alternatively, if it is less than 0.7 times the preset nominal value of the battery full charge capacity, it also indicates that there is a problem with the fuel meter and the operating state of the fuel meter is an error state.

[0084] Optionally, when the third target parameter is the minimum battery power, the electronic device can obtain the fourth parameter value corresponding to the current minimum battery power, and detect whether the fourth parameter value is less than 1% of the battery's full charge capacity (i.e., a preset nominal value). If it is less than 1% of the battery's full charge capacity, it means that the electronic device will shut down immediately, and it also indicates that there is a problem with the fuel meter, and the operating state of the fuel meter is an error state.

[0085] In one possible implementation, the electronic device includes at least two processors, and the at least two processors are used to obtain the monitoring and measurement parameters required by each of them; the acquired monitoring and measurement parameters also include the occupancy time of the current processor to obtain the monitoring and measurement parameters; when the electronic device executes step 303 to determine the operating status of the power meter according to the monitoring and measurement parameters, it can be as follows: determine the operating status of the power meter according to the relationship between the occupancy time and a preset time threshold.

[0086] For example, the two processors are a microcontroller unit (MCU) and a central processing unit (CPU). In practical applications, the registers of the fuel meter are accessed through these two processors to obtain the corresponding monitoring and measurement parameters, and accessing the fuel meter takes a certain amount of time (such as about 5ms). Therefore, in this case, if there are two processors, after one of the processors (MCU) accesses, it needs to release the permission to the other processor (CPU) to allow the other processor to access. If one of the processors takes too long (such as more than 5ms), the other processor will not be able to access the data of the fuel meter and will be reset, causing problems in the process. Based on this principle, this solution can obtain the occupancy time of the current processor to obtain the monitoring and measurement parameters, and determine the operating status of the fuel meter according to the size relationship between the occupancy time and the preset time threshold (such as 5ms). If the occupancy time is greater than 5ms, it means that there is a problem with the fuel meter and the operating status of the fuel meter is an error state. If the occupancy time is not greater than 5ms, it means that the operating status of the fuel meter is normal.

[0087] It should be noted that the above-mentioned various monitoring and measurement parameters can be obtained and detected at the same time, or they can be obtained and detected separately. That is, this solution can detect all the monitoring and measurement parameters to be detected at the same time, or it can detect one monitoring and measurement parameter at a time, and the detection of the above-mentioned monitoring and measurement parameters can be flexibly combined. In the method of detecting one monitoring and measurement parameter at a time, when one monitoring and measurement parameter indicates that the electricity meter is in a normal state, it is also feasible to detect another monitoring and measurement parameter to achieve a coherent detection process.

[0088] Step 304: when the running state of the fuel meter is an error state, the battery state information of the electronic device is recorded, and the battery state information includes parameter information of the monitoring measurement parameters.

[0089] In this solution, if it is determined that the operating state of the fuel gauge is an error state, the battery state information of the electronic device needs to be recorded to facilitate subsequent analysis of the problem.

[0090] Optionally, a second indicator is set for the running state of the electric meter in the electronic device. When the second indicator is a default field, it indicates that the running state of the electric meter is a normal state. When it is determined that the running state of the electric meter is an error state, the second indicator is replaced with the target field corresponding to the detection process, indicating that the running state of the electric meter is an error state. For example, the second indicator is represented by err_type, and the default field is default. If err_type=default, it indicates that the running state of the electric meter is a normal state. If err_type!=default, it indicates that the running state of the electric meter is an error state.

[0091] Optionally, this solution sets the target field of err_type value differently when it is detected that the running state of the fuel meter is in an error state based on different monitoring and measurement parameters obtained. For example, if the battery power is detected and the running state of the fuel meter is determined to be in an error state based on the detection result of a power jump within 5s, err_type=soc_jump can be set. If the battery health is detected and the running state of the fuel meter is determined to be in an error state based on the detection result of a battery health jump within 5s, err_type=soh_jump can be set. If the number of charge and discharge cycles is detected and the running state of the fuel meter is determined to be in an error state based on the detection result of a charge and discharge cycle jump within 5s, err_type=cc_jump can be set.

[0092] If the battery power drops during charging, or if the battery power rises during discharging, it means that the power smoothing curve of the fuel gauge is wrong, and the running state of the fuel gauge is determined to be an error state, and err_type = soc_smooth can be set. If the battery voltage is detected to match the battery power, if they do not match, it means that the running state of the fuel gauge is an error state, and err_type = volt_not_match_soc can be set.

[0093] If the relationship between the maximum capacity of the battery and the preset nominal value is detected, it is determined that the operation state of the fuel gauge is an error state, and err_type = qmax can be set. If the relationship between the full charge capacity of the battery and the preset nominal value is detected, it is determined that the operation state of the fuel gauge is an error state, and err_type = fcc can be set. If the relationship between the minimum charge of the battery and the preset nominal value is detected, it is determined that the operation state of the fuel gauge is an error state, and err_type = soc_1_info can be set.

[0094] Optionally, if err_type=default, it means that no recording is required, and data is updated directly, for example, the initialized related parameter variables are updated, the next 5s cycle is performed, and the target monitoring thread is run.

[0095] Optionally, the second indicator can be used to determine whether the state of the fuel meter is an error state or a normal state, and different target fields can indicate which parameter is detected to determine the error state. When the operating state of the fuel meter is an error state, the third indicator can be set to true to indicate that the battery status information of the electronic device needs to be recorded. For example, the third indicator is represented by record_reg_info. When it is not necessary to record the battery status information of the electronic device, record_reg_info = false. When the operating state of the fuel meter is an error state and it is necessary to record the battery status information of the electronic device, record_reg_info = true is set to record the battery status information.

[0096] In one possible implementation, the battery status information is recorded in the form of a storage queue. For example, a storage queue is pre-created in the electronic device, and the storage queue contains N elements. The byte space occupied by each element is used to store the battery status information. When the electronic device records the battery status information of the electronic device, it can be as follows: the battery status information of the electronic device is recorded through the target element in the storage queue, and the target element is an element in an idle state among the N elements. For example, when the above-mentioned buried point driver is loaded, a storage queue fifo can be created, and 4 elements can be allocated to the storage queue. The byte space occupied by each element is used to store the battery status information that needs to be recorded at this time. In step 304, the acquired battery status information is stored in an idle element among these 4 elements.

[0097] In one possible implementation, the byte spaces occupied by N elements are equal. Before the electronic device records the battery status information of the electronic device through the target element in the storage queue, it can also perform the following steps: allocate a data acquisition memory, the data acquisition memory has the same byte space size as the target element; store the battery status information of the electronic device in the data acquisition memory; and when recording the battery status information of the electronic device through the target element in the storage queue, fill the target element in the storage queue with the data information stored in the data acquisition memory.

[0098] Still taking N=4 as an example, among the 4 elements allocated by the buried point driver to the storage queue fifo, each element occupies 512 bytes of space and is initialized to all zeros. At this time, no recording is performed. When it is determined that the battery status information needs to be recorded later, a memory space gauge_data with the same size as an element in the storage queue fifo is first allocated, and the battery status information of the electronic device obtained is filled into the gauge_data, and the data information stored in the data acquisition memory is filled into the target element in the storage queue by copying. For example, the electronic device can obtain the relevant register parameters of the fuel gauge (i.e., the parameter information of the monitoring measurement parameters) through the ops selection project, and then fill it into the gauge_data memory area together with the current time current_time of this register through string operations. Finally, the gauge_data is popped into the fifo queue; and the gauge_data memory space is released.

[0099] In a possible implementation, the condition for the electronic device to record the battery status information in this solution may also include automatically recording once every time the battery power changes by 25%. That is, regardless of whether the fuel gauge is in an error state or not, if the battery power changes by more than 25% (either increase or decrease), the electronic device may also record the battery status information once. That is, if the absolute value of the difference between the battery power at the current moment and the battery power before the battery power changes by 25% exceeds 25%, record_reg_info=true may also be set to record the battery status information. Among them, upload_soc is used to represent the battery power before the battery power changes by 25%. The upload_soc parameter variable may be created and initialized when the target monitoring thread is created. After each judgment, upload_soc needs to be updated to the battery power at the current moment.

[0100] For the example of the above four elements, when recording, the four elements can be recorded in the order of the four elements. For example, the first to fourth elements of the four elements are all empty, and when recording, the first, second, third, and fourth elements are recorded in sequence, so that all four elements are recorded fully.

[0101] Optionally, when all N elements in the storage queue are occupied, the electronic device can also release the byte space of the element with the earliest time order among the N elements, and use the released element as the target element. In other words, if the battery status information needs to be recorded, but all four elements are occupied, the electronic device can release the byte space of the element with the earliest time order, and use the released element for this recording.

[0102] For example, the contents of the 4 element records are as follows:

[0103] 16:43:09]-0x06==8e,0c……9d,03,5f,01,db,11||time[2022-12-31

[0104] 16:44:01]-0x06=78,0c|0x……,db,11||time[2022-12-31

[0105] 16:44:52]-0x06=79,0……,01,db,11||time[2022-12-31

[0106] 16:45:24]-0x06=75,0c……11$$Time@@1672505124

[0107] If the battery status information needs to be recorded this time, but the above four elements are all occupied, the electronic device can release the byte space of the element with the time sequence of 16:43:09, and use the released element to perform the recording this time.

[0108] Optionally, whether the above four elements are all occupied can be indicated by a fourth indicator. For example, kfifo represents the fourth indicator. If kfifo=full, it means that the four elements are all occupied and an element needs to be popped out from the storage queue fifo. If kfifo!=full, the idle elements are used for recording.

[0109] Step 305: Upload battery status information.

[0110] Optionally, each time an element is recorded, a piece of battery status information needs to be uploaded, and after the battery status information is recorded in step 304, the recorded battery status information is uploaded. The upload object may be a manufacturer's server of the electronic device, and the manufacturer's server may receive the uploaded battery status information and promptly discover problems with the fuel gauge from the background.

[0111] In a possible implementation, before uploading the battery status information, the electronic device needs to perform a test to detect whether the number of uploads of the battery status information exceeds a preset threshold, and the number of uploads is reset according to a first preset period; when the number of uploads does not exceed the preset threshold, the current number of uploads is increased by one, and the battery status information is uploaded; when the number of uploads exceeds the preset threshold, the recording of the battery status information of the electronic device is stopped. The preset threshold and the first preset period can be preset by developers or operation and maintenance personnel.

[0112] For example, the preset threshold is 10 times. In this solution, the electronic device can upload the recorded battery status information up to 10 times in 1 day. Each time the upload is performed, it can be detected whether it exceeds 10 times. If it exceeds 10 times, the upload will be stopped, and if it does not exceed, the upload will continue. That is, the current electronic device limits the number of uploads of the fuel meter buried point to a maximum of 10 (i.e. 10 times) per day. If it exceeds 1 day, the number of uploads will be reset to zero, and the number of uploads will be represented by upload_count, and upload_count=0. When upload_count is less than 10, upload_count+1 is executed. Then all the elements in the queue are popped out and assembled into a reg_info string; the current fuel meter id is obtained and its err_type is mapped to a specific error string; the above information is assembled into a battery status information, the application programming interface (Application Programming Interface, API) of the buried point upload is called, and then uploaded.

[0113] It should be noted that after the background server receives the uploaded battery status information, if it feels that other monitoring and measurement parameters need to be obtained to evaluate the fuel meter, it can update the above-mentioned tracking driver and let the electronic device reload the updated tracking driver to achieve flexible transformation and acquisition of different monitoring and measurement parameters, thereby achieving the normalization of the fuel meter tracking software architecture.

[0114] In summary, the present application obtains monitoring measurement parameters for monitoring the fuel meter through various preset buried points, the monitoring measurement parameters include measurement results collected at various preset buried points, and each preset buried point is set for the fuel meter through the buried point driver; according to the monitoring measurement parameters, the operating state of the fuel meter is determined, and the operating state includes a normal state and an error state. During the operation of the electronic device, the present application monitors the fuel meter by means of preset buried points, and can timely obtain the monitoring measurement parameters for monitoring the fuel meter, and determine whether the fuel meter is in a normal state or an error state based on the monitoring measurement parameters, thereby achieving the effect of monitoring the fuel meter inside the electronic device, and can timely collect the measurement results of the fuel meter at the preset buried points, thereby improving the efficiency of monitoring the fuel meter of the electronic device.

[0115] In addition, in this solution, preset tracking points are loaded through tracking point drivers. To subsequently add tracking points for new models of electricity meters or other parameters, it is only necessary to implement the corresponding ops access to the corresponding register driver code. The background server can update the tracking point driver to flexibly change the monitoring measurement parameters that need to be monitored, thereby improving the flexibility of monitoring.

[0116] In addition, by storing queues and intervals of electricity meter points, the gradual change of the state of the meter can be perfectly recorded, which is in line with the application of monitoring the meter. This solution also summarizes various abnormal conditions of the meter and monitors various monitoring and measurement parameters, making the meter points more standardized and systematic.

[0117] Next, taking the electronic device being a mobile phone as an example, the power meter of the mobile phone is monitored during use of the mobile phone, and various monitoring and measurement parameters of the power meter of the mobile phone are flexibly obtained, so as to timely determine whether there is a problem with the power meter of the mobile phone, thereby improving the efficiency of monitoring the power meter of the mobile phone.

[0118] Please refer to Figure 4 , which shows a method flow chart of a method for monitoring an electric meter provided by an exemplary embodiment of the present application, and the method can be executed by a mobile phone. Figure 4 As shown, the method may include the following steps:

[0119] Step 401: The mobile phone starts and loads the tracking point driver, and sets various preset tracking points.

[0120] Step 402, create a target monitoring thread and initialize related variables.

[0121] Optionally, the mobile phone starts loading the tracking driver, and allocates 4 elements to the storage queue fifo in the driver. Each element occupies 512 bytes of space and is initialized to all zeros. Then create a power meter tracking monitoring thread and initialize related variables:

[0122] Initialize related variables:

[0123] Pre_check_time=current_time;

[0124] Jump_soc = batt_soc;

[0125] Update_soc = batt_soc;

[0126] Pre_soh=batt_soh;

[0127] Pre_cc=batt_cc

[0128] Among them, Pre_check_time is the time of the previous day, current_time is the current time, Jump_soc is the battery power in the previous 5 seconds, batt_soc is the battery power at the current moment; Update_soc is the battery power before the change of 25%; pre_soh is the battery health in the previous 5 seconds, batt_soh is the battery health at the current moment; pre_cc is the number of battery charge and discharge times in the previous 5 seconds, batt_cc is the number of battery charge and discharge times at the current moment. Then the power meter tracking monitoring thread is scheduled to run in the CPU, and the target monitoring thread runs periodically every 5 seconds.

[0129] Step 403, determine whether the battery power level changes within 5 seconds.

[0130] That is, obtain Abs(jump_soc-batt_soc), if Abs(jump_soc-batt_soc)>5, equivalent to a change of 5%, it is considered that there is a jump in the power, and then set the running state of the power meter err_type=soc_jump. Otherwise, execute step 404.

[0131] Step 404, detecting whether the battery charging capacity decreases or the battery discharging capacity increases.

[0132] Optionally, use fla to indicate whether it is the first execution at startup. When flag = true, it indicates that it is the first execution at startup, and the reference time for charging and discharging is set to the current system time. Set as follows:

[0133] Pre_batt_current=batt_current;

[0134] Start_chg_time=current_time;

[0135] Start_no_chg_time=current_time;

[0136] Flag=false

[0137] Among them, Pre_batt_current is the charging current 5 seconds ago, Start_chg_time is the starting time of charging, and Start_no_chg_time is the starting time of discharging. Among them, when the battery is charging, the variable batt_current obtained < 0; when the battery is discharging, the variable batt_current obtained > 0; since the battery has a charging and discharging process, it is necessary to accurately judge the starting time of charging and discharging. When Pre_batt_current > 0 and batt_current < 0 at the same time, that is, the previous 5 seconds is discharging and now it is charging, which is the starting time of charging, and the starting time of charging needs to be updated: Start_chg_time = current_time. When Pre_batt_current < 0 and batt_current > 0 at the same time, that is, the previous 5 seconds is charging and now it is discharging, which is the starting time of discharging, and the starting time of charging and discharging needs to be updated: Start_no_chg_time = current_time.

[0138] After completing the above operations, update pre_batt_current to batt_current. Then, judge whether the battery power soc still decreases when charging for 30 minutes; and whether the battery power soc still increases when discharging for 30 minutes. That is, when batt_current < 0, current_time - start_chg_time > 30 minutes, and batt_soc < soc, it means that the power smoothing curve of the fuel gauge is incorrect. Let err_type = soc_smooth and update start_chg_time = current_time.

[0139] When batt_current > 0, current_time - start_no_chg_time > 30 minutes, and batt_soc > soc, it also means that the power smoothing curve of the fuel gauge is incorrect. Let err_type = soc_smooth and update start_no_chg_time = current_time. If there is no error, then execute 405.

[0140] Step 405, detect whether the battery voltage and the battery power match.

[0141] Optionally, check whether the battery voltage and power match, divided into plugged in charger and not plugged in charger. If the charger is plugged in and fast charged (fastchg_to_normal=true), the power is less than 80% (batt_soc<80), then set err_type=volt_not_match_soc. When the charger is not plugged in, it is judged that 18 minutes after not charging (current_time-start_no_chg_time>18min), if the battery voltage is greater than 4V and the battery power is less than 40%, or the battery voltage is less than 3.6V, the battery power is greater than 40% at that time. That is, Batt_volt>4000mv and batt_soc<40; or, Batt_volt<3600mv and batt_soc>40, it means that the running state of the fuel gauge is wrong, then set err_type=volt_not_match_soc. If there is no error, execute 406.

[0142] Step 406, checking whether the value of the maximum battery capacity qmax of the battery meter is legal.

[0143] Optionally, the mobile phone detects whether the value of qmax of the battery meter is legal, and can read the value of qmax batt_qmax from the fuel meter chip through the I2C bus (Inter-Integrated Circuit), and then judge whether batt_qmax> nominal value*1.1 times, or batt_qmax< nominal value*0.7. If it is satisfied, that is, batt_qmax> nominal value*1.1 times, or batt_qmax< nominal value*0.7, it means that the running state of the fuel meter is wrong, and err_type=qmax is set. If it is not satisfied, it means that the running state of the fuel meter is normal, and enter step 407.

[0144] Step 407, detecting whether the value of the battery full charge capacity fcc of the battery is legal.

[0145] Optionally, the mobile phone detects whether the value of the full charge capacity fcc of the battery is legal, and can read the value of fcc batt_fcc from the fuel gauge chip through the I2C bus, and then judge whether batt_fcc> nominal value*1.1 times, or batt_fcc<nominal value*0.7. If it is satisfied, that is, batt_fcc>nominal value*1.1 times, or batt_fcc<nominal value*0.7, it means that the running state of the fuel gauge is wrong, and err_type=fcc is set. If it is not satisfied, it means that the running state of the fuel gauge is normal, and enter step 408.

[0146] Step 408, detecting whether the battery health soh of the battery changes.

[0147] Optionally, the mobile phone detects whether the battery health soh of the battery jumps, and can read the current soh value batt_soh from the fuel gauge chip through the I2C bus, and compare it with the pre_soh read 5s ago. If the difference between the two values ​​is greater than 3, it is a soh jump, indicating that the operating state of the fuel gauge is wrong, and err_type is set to soh. If it is not greater than 3, it means that the operating state of the fuel gauge is normal, and enter step 409.

[0148] Step 409, detecting whether the number of charge and discharge cycles cc of the battery changes.

[0149] Optionally, the mobile phone detects whether the number of charge and discharge cycles cc (charger cycle) of the battery jumps, and can read the current cc value batt_cc from the fuel gauge chip through the I2C bus, and compare it with the pre_cc read 5s ago. If the difference between the two values ​​is greater than 3, it is a cc jump, indicating that the operating state of the fuel gauge is wrong, and err_type is set to cc. If it is not greater than 3, it means that the operating state of the fuel gauge is normal, and enter step 410.

[0150] Step 410, detecting whether the battery power drops to 1%.

[0151] Optionally, the mobile phone detects whether the battery power drops to 1%. When the battery drops to 1%, it will shut down immediately. Therefore, it is necessary to record the current battery status information, that is, the power 5s ago is greater than the current power, and the power at this time is equal to 1, that is, batt_soc=1 and pre_soc>soc, that is, if it drops to 1%, it means that the running state of the fuel gauge is wrong, and err_type=soc_1_info is set. If it does not drop to 1%, it means that the running state of the fuel gauge is normal.

[0152] Step 411: If err_type!=default, record the battery status information.

[0153] If err_type!=default (the default value of err_type is equal to default), it means an error has occurred and the circuit needs to be recorded.

[0154] Pool status information, that is, set the value of record_reg_info to true. If it is equal to default, it means that no upload is required, and directly update the relevant parameters Jump_soc = batt_soc; Pre_soh = batt_soh; Pre_cc = batt_cc, and perform the next 5s cycle monitoring.

[0155] Optionally, the current mechanism is to record the battery status information every time the battery power changes by 25%. The number of elements in the fifo is 4, which can just record the battery status information change of every 25% from 0 to 100%. Therefore, when the absolute value of the difference between the current power batt_soc and the upload_soc 25% ago exceeds 25%, it is also necessary to record, set the value of record_reg_info to true, and update upload_soc = batt_soc.

[0156] If record_reg_info = true, it means that it is necessary to perform the operation of collecting the relevant register parameters of the fuel gauge and merging them into the storage queue. The mobile phone first allocates a memory space gauge_data of the same size as an element in the storage queue fifo. The gauge_data needs to be filled later and copied to one of the elements of the fifo. At this time, it is necessary to determine whether the fifo is full (a total of 4 elements) by checking whether kfifo = full. If so, an element needs to be popped out of the fifo, otherwise the element is added directly. The relevant register parameters of the fuel gauge are obtained by selecting the specific fuel gauge model used in the project through ops, and then filled into the gauge_data memory area together with the system time current_time that records this register through string operations. Finally, the gauge_data is popped into the fifo queue; and the gauge_data memory space is released.

[0157] Step 412, upload the recorded battery status information.

[0158] Optional, if there is no abnormality, the tracking point needs to be uploaded once a day, so when the current time minus pre_check_time>1 day, record_reg_info=true is also required. Update at the same time

[0159] pre_check_time = current_time. Then, if there is no abnormality before, the current err_type needs to be set to the type of 1-day general record err_type = general_info.

[0160] When uploading is required, a series of operations for uploading tracking points are executed. Currently, the number of tracking points of the power meter is limited to 10 per day (to avoid tracking storms). If it exceeds 1 day, the number of uploads will be reset to zero (upload_count = 0). When upload_count is less than 10, upload_count+1 is executed. Then all elements in the storage queue are popped out and assembled into a reg_info string; the current power meter id is obtained and its err_type is mapped to a specific error string; the above information is assembled into a tracking point information, and the tracking point upload API is called and then uploaded.

[0161] The above judgment process is also exemplary. If it is determined that any parameter indicates that the operating state of the fuel gauge is an error state, step 411 can be directly performed to record the battery status information. The battery status information can also be recorded by combining multiple other conditions, which is not limited here.

[0162] In summary, the present application obtains monitoring measurement parameters for monitoring the fuel meter through various preset buried points, the monitoring measurement parameters include measurement results collected at various preset buried points, and each preset buried point is set for the fuel meter through the buried point driver; according to the monitoring measurement parameters, the operating state of the fuel meter is determined, and the operating state includes a normal state and an error state. During the operation of the electronic device, the present application monitors the fuel meter by means of preset buried points, and can timely obtain the monitoring measurement parameters for monitoring the fuel meter, and determine whether the fuel meter is in a normal state or an error state based on the monitoring measurement parameters, thereby achieving the effect of monitoring the fuel meter inside the electronic device, and can timely collect the measurement results of the fuel meter at the preset buried points, thereby improving the efficiency of monitoring the fuel meter of the electronic device.

[0163] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0164] Please refer to Figure 5 , which shows a structural block diagram of a monitoring device for an electric meter provided by an exemplary embodiment of the present application. The monitoring device 500 for an electric meter can be used in an electronic device. Figure 2 , Figure 3 , Figure 4 All or part of the steps in the method provided by the illustrated embodiment are performed by an electronic device. The monitoring device 500 of the electricity meter includes:

[0165] A first acquisition module 501 is used to acquire monitoring measurement parameters for monitoring the electricity meter through each preset burying point, wherein the monitoring measurement parameters include measurement results collected at each preset burying point, and each preset burying point is set for the electricity meter through a burying point driver;

[0166] The first determination module 502 is used to determine the operating state of the electricity meter according to the monitoring measurement parameters, and the operating state includes a normal state and an error state.

[0167] In summary, the present application obtains monitoring measurement parameters for monitoring the fuel meter through various preset buried points, the monitoring measurement parameters include measurement results collected at various preset buried points, and each preset buried point is set for the fuel meter through the buried point driver; according to the monitoring measurement parameters, the operating state of the fuel meter is determined, and the operating state includes a normal state and an error state. During the operation of the electronic device, the present application monitors the fuel meter by means of preset buried points, and can timely obtain the monitoring measurement parameters for monitoring the fuel meter, and determine whether the fuel meter is in a normal state or an error state based on the monitoring measurement parameters, thereby achieving the effect of monitoring the fuel meter inside the electronic device, and can timely collect the measurement results of the fuel meter at the preset buried points, thereby improving the efficiency of monitoring the fuel meter of the electronic device.

[0168] Optionally, the device further comprises:

[0169] A first receiving module, configured to receive a burying point driver issued by the server when a connection is established with the server before acquiring the monitoring measurement parameters of the electricity meter monitored by each preset burying point;

[0170] The first loading module is used to load the buried point driver.

[0171] Optionally, the device further comprises:

[0172] A first recording module, configured to, after determining the operating state of the fuel meter according to the monitoring measurement parameter, record battery status information of the electronic device when the operating state of the fuel meter is the error state, wherein the battery status information includes parameter information of the monitoring measurement parameter;

[0173] The first uploading module is used to upload the battery status information.

[0174] Optionally, a storage queue is pre-created in the electronic device, and the storage queue contains N elements. The byte space occupied by each element is used to store the battery status information. The first recording module is also used to record the battery status information of the electronic device through a target element in the storage queue, and the target element is an element in an idle state among the N elements.

[0175] Optionally, the byte spaces occupied by the N elements are equal, and the device further comprises:

[0176] A first allocation module, configured to allocate a data acquisition memory before recording the battery status information of the electronic device through the target element in the storage queue, wherein the data acquisition memory has the same size as the byte space of the target element;

[0177] A first storage module, used to store the battery status information of the electronic device in the data acquisition memory;

[0178] The first recording module is further used to fill the target element in the storage queue with the data information stored in the data acquisition memory.

[0179] Optionally, when all N elements in the storage queue are occupied, the device further includes:

[0180] The first release module is used to release the byte space of the element with the earliest recorded time order among the N elements, and use the released element as the target element.

[0181] Optionally, the device further comprises:

[0182] A first detection module, used for detecting whether the number of times the battery status information is uploaded exceeds a preset threshold before uploading the battery status information, and the number of uploads is reset according to a first preset period;

[0183] A second uploading module, configured to increase the current upload number by one and upload the battery status information when the upload number does not exceed the preset threshold;

[0184] The first stopping module is used to stop recording the battery status information of the electronic device when the number of uploads exceeds the preset threshold.

[0185] Optionally, the device further comprises:

[0186] A first creation module, used for creating a target monitoring thread and initializing relevant parameter variables of the target monitoring thread before obtaining the monitoring measurement parameters for monitoring the electricity meter, wherein the relevant parameter variables include initial variable values ​​at preset buried points of the electricity meter;

[0187] The first acquisition module is further used to run the target monitoring thread to obtain the monitoring measurement parameters for monitoring the electricity meter.

[0188] Optionally, the running of the target monitoring thread includes:

[0189] The target monitoring thread is periodically run at the preset interval.

[0190] Optionally, the monitoring measurement parameters include a first parameter value and a second parameter value of a first target parameter of the electricity meter based on interval collection, and each first target parameter corresponds to a preset buried point;

[0191] The first parameter value is a parameter value of a first target parameter of the electricity meter collected at a start time in a preset interval, and the second parameter value is a parameter value of the first target parameter of the electricity meter collected at an end time in the preset interval;

[0192] The first determination module includes: a first acquisition unit and a first determination unit;

[0193] The first acquisition unit is used to acquire a first difference between the first parameter value and the second parameter value according to the first parameter value and the second parameter value;

[0194] The first determining unit is used to determine the operating state of the electricity meter according to the first difference and a preset difference threshold corresponding to the preset interval time.

[0195] Optionally, the first target parameter includes any one or more of battery power, battery health, and battery charge and discharge cycle times.

[0196] Optionally, the monitored measurement parameter includes a third parameter value of a second target parameter of the power meter collected during charging or discharging, wherein the second target parameter includes battery power;

[0197] The first determination module includes: a second determination unit;

[0198] The second determining unit is used to determine the operating state of the power meter according to the change of the battery power within a first period of time.

[0199] Optionally, the monitored measurement parameter includes a third parameter value of a second target parameter of the fuel gauge collected during charging or discharging, wherein the second target parameter includes a battery charge and a battery voltage;

[0200] The first determination module includes: a first detection unit and a third determination unit;

[0201] The first detection unit is used to detect whether the battery power matches the battery voltage, and obtain a detection result, where the detection result is used to indicate whether the battery power matches or does not match the battery voltage;

[0202] The third determining unit is used to determine the operating state of the electricity meter according to the detection result.

[0203] Optionally, the first detection unit includes: a first acquisition subunit and a first detection subunit;

[0204] The first acquisition subunit is used to acquire a target matching relationship, where the target matching relationship is a corresponding relationship between a battery voltage and a battery power when the electronic device is connected to a charger or is not connected to a charger, wherein when the electronic device is connected to a charger, different types of chargers correspond to different target matching relationships;

[0205] The first detection subunit is used to detect whether the battery power matches the battery voltage according to the target matching relationship.

[0206] Optionally, the monitored measurement parameter includes a fourth parameter value of a third target parameter of the collected electricity meter;

[0207] The first determining module includes: a fourth determining unit;

[0208] The fourth determining unit is used to determine the operating state of the electricity meter according to the magnitude relationship between the fourth parameter value and the preset nominal value.

[0209] Optionally, the third target parameter includes any one or more of the maximum battery capacity, the fully charged battery capacity, and the minimum battery power.

[0210] Optionally, the electronic device includes at least two processors, and the at least two processors are used to obtain the monitoring measurement parameters required by each processor; the monitoring measurement parameters also include the occupancy time of the current processor to obtain the monitoring measurement parameters;

[0211] The first determining module includes: a fifth determining unit;

[0212] The fifth determining unit is used to determine the operating state of the electricity meter according to the magnitude relationship between the occupancy time and a preset time threshold.

[0213] Please refer to Figure 6 , which is a structural diagram of another example of a monitoring device for an electric meter provided in an embodiment of the present application. Among them, the monitoring device 600 for an electric meter can be an electronic device that can implement the functions in the method provided in an embodiment of the present application. Among them, the monitoring device 600 for an electric meter can be a chip system. In the embodiment of the present application, the chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0214] In hardware implementation, the communication module may be a transceiver, which is integrated into the monitoring device 600 of the electricity meter to form a communication interface 603 .

[0215] The monitoring device 600 of the electricity meter includes at least one processor 601, which is used to implement or support the monitoring device 600 of the electricity meter to implement the functions of the electronic device in the method provided in the embodiment of the present application. Exemplarily, the processor 601 can obtain monitoring measurement parameters for monitoring the electricity meter through various preset buried points, and the monitoring measurement parameters include measurement results collected at various preset buried points, and each preset buried point is set for the electricity meter through the buried point driver; according to the monitoring measurement parameters, determine the operating status of the electricity meter and other steps. Please refer to the detailed description in the method example for details, which will not be repeated here.

[0216] The monitoring device 600 of the electricity meter may also include at least one memory 602 for storing program instructions and / or data. The memory 602 is coupled to the processor 601. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 601 may operate in conjunction with the memory 602. The processor 601 may execute program instructions stored in the memory 602. At least one of the at least one memory may be included in the processor.

[0217] The monitoring device 600 for the electricity meter may further include a communication interface 603, which is used to communicate with other devices through a transmission medium, so that the device in the monitoring device 600 for the electricity meter can communicate with other devices. Exemplarily, the other device may be a network side device. The processor 601 may use the communication interface 603 to send and receive data. The communication interface 603 may specifically be a transceiver.

[0218] The specific connection medium between the communication interface 603, the processor 601 and the memory 602 is not limited in the embodiment of the present application. Figure 6 In the embodiment, the memory 602, the processor 601 and the communication interface 603 are connected via a bus 604. Figure 6 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0219] In the embodiment of the present application, the processor 601 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware processor to be executed, or can be executed by a combination of hardware and software modules in the processor.

[0220] In an embodiment of the present application, the memory 602 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., or a volatile memory (volatile memory), such as a random access memory (RAM). The memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present application may also be a circuit or any other device that can implement a storage function, for storing program instructions and / or data.

[0221] Optionally, an embodiment of the present application further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing a computer program, the computer program being executed by the processor to implement all or part of the steps performed by the electronic device in the method for monitoring the electricity meter of each of the above embodiments.

[0222] Optionally, an embodiment of the present application further provides a computer-readable medium storing a computer program, which is executed by a processor to implement all or part of the steps performed by an electronic device in the method for monitoring the electricity meter of each of the above embodiments.

[0223] Optionally, an embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the method for monitoring the electricity meter of each of the above embodiments, including all or part of the steps executed by the electronic device.

[0224] Optionally, an embodiment of the present application further provides an application publishing platform, which is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes the method for monitoring the electricity meter of the above embodiments, all or part of the steps executed by the electronic device.

[0225] It should be noted that: when the device provided in the above embodiment performs the control of the electronic device, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0226] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0227] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0228] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for monitoring an electricity meter, characterized in that: Applied to electronic equipment, the method includes: obtaining monitoring measurement parameters for monitoring the electricity meter through each preset burying point, the monitoring measurement parameters including measurement results collected at each preset burying point, and each preset burying point is set for the electricity meter through a burying point driver; The operating state of the electricity meter is determined according to the monitoring measurement parameters, and the operating state includes a normal state and an error state.

2. The method according to claim 1, characterized in that Before acquiring the monitoring measurement parameters of the electricity meter through each preset buried point, the method further includes: When a connection is established with a server, receiving a tracking point driver issued by the server; Load the embedded point driver.

3. The method according to claim 1, characterized in that: After determining the operating state of the electricity meter according to the monitoring measurement parameters, the method further includes: When the running state of the fuel meter is the error state, recording the battery state information of the electronic device, the battery state information including the parameter information of the monitoring measurement parameter; The battery status information is uploaded.

4. The method according to claim 3, characterized in that: A storage queue is pre-created in the electronic device, the storage queue contains N elements, and the byte space occupied by each element is used to store the battery status information. The recording of the battery status information of the electronic device includes: The battery status information of the electronic device is recorded through a target element in the storage queue, and the target element is an element in an idle state among the N elements.

5. The method according to claim 4, characterized in that The byte spaces occupied by the N elements are equal, and before recording the battery status information of the electronic device through the target element in the storage queue, the method further includes: Allocating data acquisition memory, the data acquisition memory having the same size as the byte space of the target element; Storing the battery status information of the electronic device in the data acquisition memory; The recording of the battery status information of the electronic device through the target element in the storage queue includes: The target element in the storage queue is filled with the data information stored in the data acquisition memory.

6. The method according to claim 5, characterized in that When all N elements in the storage queue are occupied, the method further includes: The byte space of the element with the earliest recorded time order among the N elements is released, and the released element is used as the target element.

7. The method according to any one of claims 2 to 6, characterized in that: Before uploading the battery status information, the method further includes: Detecting whether the number of times the battery status information is uploaded exceeds a preset threshold, the number of times of uploading is reset according to a first preset period; When the upload times do not exceed the preset threshold, increase the current upload times by one, and upload the battery status information; When the upload times exceeds the preset threshold, the recording of the battery status information of the electronic device is stopped.

8. The method according to claim 1, characterized in that: Before acquiring the monitoring measurement parameter for monitoring the electricity meter, the method further includes: Creating a target monitoring thread, initializing relevant parameter variables of the target monitoring thread, wherein the relevant parameter variables include initial variable values ​​at preset buried points of the electricity meter; The obtaining of monitoring measurement parameters for monitoring the electricity meter includes: The target monitoring thread is run to obtain the monitoring measurement parameters for monitoring the electricity meter.

9. The method according to claim 8, characterized in that The running of the target monitoring thread includes: The target monitoring thread is periodically run at the preset interval.

10. The method according to claim 1, characterized in that The monitoring measurement parameters include a first parameter value and a second parameter value of a first target parameter of the electricity meter based on interval collection, and each first target parameter corresponds to a preset buried point; The first parameter value is the parameter value of the first target parameter of the electricity meter collected at the start time of the preset interval, and the second parameter value is the parameter value of the first target parameter of the electricity meter collected at the end time of the preset interval; The step of determining the operating state of the electricity meter according to the monitoring measurement parameter includes: According to the first parameter value and the second parameter value, obtaining a first difference between the two; The operating state of the electricity meter is determined according to the first difference and a preset difference threshold corresponding to the preset interval time.

11. The method according to claim 10, characterized in that The first target parameter includes any one or more of battery power, battery health, and battery charge and discharge cycle times.

12. The method according to claim 1, characterized in that The monitored measurement parameter includes a third parameter value of a second target parameter of the fuel gauge collected during charging or discharging, wherein the second target parameter includes the battery charge; The step of determining the operating state of the electricity meter according to the monitoring measurement parameter includes: The operating state of the fuel meter is determined according to the change of the battery power within a first period of time.

13. The method according to claim 1, characterized in that The monitored measurement parameter includes a third parameter value of a second target parameter of the fuel gauge collected during charging or discharging, wherein the second target parameter includes a battery charge and a battery voltage; The step of determining the operating state of the electricity meter according to the monitoring measurement parameter includes: Detecting whether the battery power matches the battery voltage, and obtaining a detection result, wherein the detection result is used to indicate whether the battery power matches or does not match the battery voltage; According to the detection result, the operating state of the electricity meter is determined.

14. The method according to claim 13, characterized in that The detecting whether the battery power matches the battery voltage includes: Acquire a target matching relationship, where the target matching relationship is a corresponding relationship between a battery voltage and a battery power when the electronic device is connected to a charger or is not connected to a charger, wherein when the electronic device is connected to a charger, different types of chargers correspond to different target matching relationships; According to the target matching relationship, it is detected whether the battery power level matches the battery voltage.

15. The method according to claim 1, characterized in that The monitored measurement parameters include a fourth parameter value of a third target parameter of the collected electricity meter; The step of determining the operating state of the electricity meter according to the monitoring measurement parameter includes: The operating state of the electricity meter is determined according to the magnitude relationship between the fourth parameter value and the preset nominal value.

16. The method according to claim 15, characterized in that The third target parameter includes any one or more of the maximum battery capacity, the fully charged battery capacity, and the minimum battery power.

17. The method according to claim 1, characterized in that The electronic device includes at least two processors, and the at least two processors are used to obtain the monitoring measurement parameters required by each processor; the monitoring measurement parameters also include the occupancy time of the current processor to obtain the monitoring measurement parameters; The monitoring and measuring parameters to determine the operating state of the electricity meter include: The operating state of the electricity meter is determined according to the magnitude relationship between the occupancy time and a preset time threshold.

18. A monitoring device for an electricity meter, characterized in that: Applied to electronic equipment, the device comprises: A first acquisition module is used to acquire monitoring measurement parameters for monitoring the electricity meter through each preset burying point, wherein the monitoring measurement parameters include measurement results collected at each preset burying point, and each preset burying point is set for the electricity meter through a burying point driver; The first determination module is used to determine the operating state of the electricity meter according to the monitoring measurement parameters, and the operating state includes a normal state and an error state.

19. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is executed by the processor to implement the method for monitoring the electricity meter according to any one of claims 1 to 17.

20. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is executed by a processor to implement the method for monitoring the electricity meter according to any one of claims 1 to 17.

Citation Information

Cited By

  • Terminal equipment sleep wake-up electric quantity calibration method and device and terminal equipment

    CN120820861A

  • A terminal device hibernation wake-up electric quantity calibration method and device and a terminal device

    CN120820861B