CN112363065B - Electric quantity monitoring method and device applied to sensor of Internet of things - Google Patents

Electric quantity monitoring method and device applied to sensor of Internet of things Download PDF

Info

Publication number
CN112363065B
CN112363065B CN202011034022.1A CN202011034022A CN112363065B CN 112363065 B CN112363065 B CN 112363065B CN 202011034022 A CN202011034022 A CN 202011034022A CN 112363065 B CN112363065 B CN 112363065B
Authority
CN
China
Prior art keywords
value
current comparison
battery
voltage value
comparison voltage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011034022.1A
Other languages
Chinese (zh)
Other versions
CN112363065A (en
Inventor
马超
朱一伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Leedarson Lighting Co Ltd
Original Assignee
Leedarson Lighting Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Leedarson Lighting Co Ltd filed Critical Leedarson Lighting Co Ltd
Priority to CN202011034022.1A priority Critical patent/CN112363065B/en
Publication of CN112363065A publication Critical patent/CN112363065A/en
Application granted granted Critical
Publication of CN112363065B publication Critical patent/CN112363065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/382Arrangements for monitoring battery or accumulator variables, e.g. SoC
    • G01R31/3835Arrangements for monitoring battery or accumulator variables, e.g. SoC involving only voltage measurements

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides an electric quantity monitoring method and device applied to an Internet of things sensor, and relates to the technical field of electric quantity monitoring, wherein the electric quantity monitoring method comprises the following steps: determining a current comparison voltage value based on a voltage value of a battery of the Internet of things sensor after starting up, and determining a current electric quantity reporting value based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; and if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the times of continuous decrease reach the first time limit value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reporting value based on the current comparison voltage value. Based on the technical scheme provided by the application, the reliability of electric quantity monitoring can be effectively improved.

Description

Electric quantity monitoring method and device applied to sensor of Internet of things
Technical Field
The application relates to the technical field of electric quantity monitoring, in particular to an electric quantity monitoring method and device applied to an Internet of things sensor.
Background
The internet of things sensor is a sensor used by the internet of things system when collecting various information, and the internet of things system usually needs to be provided with the internet of things sensor at more sites so that the internet of things sensor covers each position of a service area of the internet of things system as much as possible, so that the installation convenience of the internet of things sensor is improved, and the internet of things sensor is usually powered by a battery.
In the prior art, due to the limitation of the volume of the sensor of the internet of things, the battery in the sensor of the internet of things can only be a battery with a smaller volume (such as a button battery or a common dry battery with a smaller volume), and the load capacity of the battery is weaker. The internet of things sensor usually comprises a plurality of devices such as an alarm module (such as a buzzer), a positioning module and a processing module, so that the battery load pressure of the internet of things sensor is extremely high, the voltage of the battery can be changed violently along with the change of the running state, the accuracy of voltage acquisition on the battery is seriously influenced, the electric quantity displayed by the internet of things sensor is reduced abnormally, the low-power alarm of the battery is triggered mistakenly, and the reliability of battery electric quantity monitoring is reduced.
Disclosure of Invention
The application provides an electric quantity monitoring method and device applied to an Internet of things sensor, and the reliability of electric quantity monitoring can be effectively improved.
In order to achieve the above technical effect, a first aspect of the present application provides an electric quantity monitoring method applied to a sensor of an internet of things, including:
determining a current comparison voltage value based on a voltage value of a battery of the Internet of things sensor after starting up, and determining a current electric quantity reporting value based on the current comparison voltage value;
acquiring a real-time voltage value of the battery at each transmitting time, wherein the transmitting time is the time when the sensor of the internet of things transmits data;
tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value;
and if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the continuous times smaller than the current comparison voltage value reach the first time limit value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the continuous times smaller than the current time is the times when the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously larger than the first value.
Based on the first aspect of the present application, in a first possible implementation manner, before the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the method for monitoring the electric quantity further includes:
caching the current comparison voltage value for X times to obtain cached data containing X numbers, wherein X is more than or equal to two;
if the voltage monitoring value of the battery is not greater than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the electric quantity monitoring method further comprises the following steps:
and replacing all data in the cache data with the latest voltage monitoring value.
Based on the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner, after the tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value, the method for monitoring the electric quantity further includes:
if the voltage detection value of the battery is not larger than the current comparison voltage value, and the difference value between the voltage monitoring value of the battery and the current comparison voltage value is not larger than the first value, then: replacing one number in the cache data with the latest voltage monitoring value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity reporting value based on the current comparison voltage value.
Based on the first possible implementation manner of the first aspect of the present application, in a third possible implementation manner, after the tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value, the method for monitoring the electric quantity further includes:
if the voltage detection value of the battery is not larger than the current comparison voltage value and the continuous smaller times are smaller than the second secondary number limit value, then: replacing a number in the cache data with a difference value between the current comparison voltage value and the first value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second numerical limit is less than the first numerical limit.
Based on the third possible implementation manner of the first aspect of the present application, in a fourth possible implementation manner, after the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the method for monitoring the electric quantity further includes:
if the voltage detection value of the battery is not larger than the current comparison voltage value, and the continuous number of times of less than the second time limit value is not less than the first time limit value, then: replacing two numbers in the cache data with the difference value between the current comparison voltage value and the second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second value is greater than the first value.
Based on the first aspect of the present application or the first or second or third or fourth possible implementation manner of the first aspect of the present application, in a fifth possible implementation manner, the tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value includes:
after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round, wherein the end node of each round of collection is as follows: the number of the collected real-time voltage values reaches a set number threshold, or the collection time of the round reaches a set time threshold.
Based on the fifth possible implementation manner of the first aspect of the present application, in a sixth possible implementation manner, after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round includes:
if the current electric quantity reported value is in a first preset interval, setting the number threshold value as a third value, and setting the duration threshold value as a fourth value;
if the current electric quantity reported value is in a second preset interval, setting the number threshold value as a fifth value and setting the duration threshold value as a sixth value;
if the current electric quantity reported value is in a third preset interval, setting the number threshold value as a seventh value, and setting the duration threshold value as an eighth value;
the minimum value of the second predetermined interval is greater than the maximum value of the first predetermined interval, the maximum value of the second predetermined interval is smaller than the minimum value of the third predetermined interval, the fifth value is greater than the third value and smaller than the seventh value, and the sixth value is greater than the fourth value and smaller than the eighth value.
Based on the first aspect of the present application or the first or second or third or fourth possible implementation manner of the first aspect of the present application, in a seventh possible implementation manner, the determining a current comparison voltage value based on a voltage value of a battery of the sensor of the internet of things after the sensor of the internet of things is turned on, and determining a current electric quantity reporting value based on the current comparison voltage value includes:
in a first preparation stage of the sensor of the Internet of things, acquiring real-time voltage values of the M batteries, and determining an average value of the real-time voltage values acquired in the first preparation stage as a first voltage value;
in a second preparation stage of the sensor of the internet of things, respectively collecting the real-time voltage values of the battery at the N transmitting occasions, and determining the maximum value of the real-time voltage values collected in the second preparation stage as a second voltage value;
determining a weighted average value of the first voltage value and the second voltage value as a current comparison voltage value, and determining a current electric quantity reporting value based on the current comparison voltage value;
the first preparation phase is a phase from starting to transmitting data for the first time, and the second preparation phase is a phase from transmitting data for the first time to determining the current electric quantity reporting value for the first time.
Based on the seventh possible implementation manner of the first aspect of the present application, in an eighth possible implementation manner, before the collecting the real-time voltage values of the battery at the N transmission occasions respectively, the method for monitoring electric quantity further includes:
judging whether the sensor of the Internet of things is connected with a gateway or not after the sensor of the Internet of things is started;
if the sensor of the internet of things is not connected with the gateway, setting the N to be a ninth value;
if the sensor of the internet of things is connected with the gateway, setting the N to be a tenth value;
wherein the ninth value is less than the tenth value.
Based on the first aspect of the present application or the first or second or third or fourth possible implementation manner of the first aspect of the present application, in a ninth possible implementation manner, after tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value, the electric quantity monitoring method further includes:
and if the voltage monitoring value of the battery is greater than the current comparison voltage value and the times of continuous greater than the current comparison voltage value reach the time threshold value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the times of continuous greater than is the times of continuous greater than the eleventh value of the difference between the voltage monitoring value of the battery and the current comparison voltage value.
The application second aspect provides a be applied to electric quantity monitoring devices of thing networking sensor, includes:
the first determining unit is used for determining a current comparison voltage value based on a voltage value of a battery of the Internet of things sensor after the battery is started, and determining a current electric quantity reporting value based on the current comparison voltage value;
the acquisition unit is used for acquiring the real-time voltage value of the battery at each transmitting moment, wherein the transmitting moment is the moment when the sensor of the internet of things transmits data;
the second determining unit is used for tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value;
and the updating unit is used for updating the current comparison voltage value based on the latest voltage monitoring value when the voltage monitoring value of the battery is not larger than the current comparison voltage value and the continuous times smaller than the current comparison voltage value reach the first time limit value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the continuous times smaller than the current time is the times when the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously larger than the first value.
As can be seen from the above, according to the technical scheme of the application, the current comparison voltage value is determined based on the voltage value of the battery after the internet of things sensor is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of an embodiment of a power monitoring method applied to a sensor of the internet of things provided by the present application;
fig. 2 is a schematic flow chart of another embodiment of a power monitoring method applied to a sensor of the internet of things according to the present application;
fig. 3 is a schematic flow chart of a further embodiment of the electric quantity monitoring method applied to the sensor of the internet of things provided by the present application;
fig. 4 is a schematic structural diagram of an embodiment of an electric quantity monitoring device applied to a sensor of the internet of things provided by the present application;
fig. 5 is a schematic structural diagram of another embodiment of an electric quantity monitoring device applied to a sensor of the internet of things.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The technical solutions in the embodiments of the present application are clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those described herein, and it will be apparent to those of ordinary skill in the art that the present application is not limited by the specific embodiments disclosed below.
Example one
The application provides an electric quantity monitoring method applied to a sensor of the Internet of things, as shown in fig. 1, the electric quantity monitoring method comprises the following steps:
step 101, determining a current comparison voltage value based on a voltage value of a battery of the internet of things sensor after starting up, and determining a current electric quantity reporting value based on the current comparison voltage value;
in the embodiment of the application, after the internet of things sensor is started, the voltage value of the battery of the internet of things sensor is collected at once, the voltage value of the battery at the moment is used as an initial value of a current comparison voltage value, and a current electric quantity reported value is determined based on the relation between the voltage value of the battery and the electric quantity, wherein the current electric quantity reported value can be used for periodically reading the gateway connected with the internet of things sensor or actively reporting the gateway to the internet of things sensor, so that the gateway can track and determine the current electric quantity of the internet of things sensor, and further control the internet of things sensor or prompt a user to replace the battery based on the current electric quantity.
Or after the sensor of the internet of things is started, the voltage values of the battery are collected before data is transmitted and the data transmitting nodes are connected, a current comparison voltage value is determined based on the collected voltage values, and then a current electric quantity reporting value is determined based on the determined current comparison voltage value; specifically, the determining a current comparison voltage value based on a voltage value of a battery of the sensor of the internet of things after the battery is powered on and determining a current electric quantity reporting value based on the current comparison voltage value may include:
in a first preparation stage of the sensor of the Internet of things, collecting real-time voltage values of M batteries, and determining an average value of the real-time voltage values collected in the first preparation stage as a first voltage value;
in a second preparation stage of the sensor of the internet of things, acquiring real-time voltage values of the battery at N transmitting occasions respectively, and determining a maximum value of the real-time voltage values acquired in the second preparation stage as a second voltage value, wherein the transmitting occasions are moments when the sensor of the internet of things transmits data;
determining a weighted average value of the first voltage value and the second voltage value as a current comparison voltage value, and determining a current electric quantity reporting value based on the current comparison voltage value;
the first preparation phase is a phase from starting to transmitting data for the first time, and the second preparation phase is a phase from transmitting data for the first time to determining the current electric quantity reporting value for the first time.
Specifically, M and N are preset natural numbers.
Further, before the collecting the real-time voltage values of the battery at the N transmission timings, the method for monitoring electric quantity further includes:
judging whether the Internet of things sensor is connected with a gateway or not after the Internet of things sensor is started;
if the sensor of the internet of things is not connected with the gateway, setting the N to be a ninth value;
if the sensor of the internet of things is connected with the gateway, setting the N to be a tenth value;
wherein the ninth value is less than the tenth value.
102, collecting the real-time voltage value of the battery at each transmitting time;
in the embodiment of the application, the real-time voltage value of the battery is collected at the moment when each sensor of the internet of things transmits data, so that the real-time voltage value of the battery is more accurate.
It should be noted that, when data is transmitted, the operation of each power device of the sensor of the internet of things is stopped or the power consumption is reduced to an extremely low value, the load pressure of the battery is reduced to an extremely low value, and the voltage fluctuation of the battery is small, so that voltage collection is performed at the time of transmission, and the real-time voltage value of the battery obtained through collection is accurate.
103, tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value;
in this embodiment of the present application, the average value or the median value or the minimum value or the maximum value or other values of the real-time voltage values acquired at each transmission opportunity in each acquisition cycle may be determined as the voltage detection value of the battery after each acquisition cycle ends.
Optionally, the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value includes:
after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round, wherein the end node of each round of collection is as follows: the number of the collected real-time voltage values reaches a set number threshold, or the collection time of the round reaches a set time threshold.
Further, after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round comprises:
if the current electric quantity reported value is in a first preset interval, setting the number threshold value as a third value, and setting the duration threshold value as a fourth value;
if the current electric quantity reported value is in a second preset interval, setting the number threshold value as a fifth value and setting the duration threshold value as a sixth value;
if the current electric quantity reported value is in a third preset interval, setting the number threshold value as a seventh value, and setting the duration threshold value as an eighth value;
the minimum value of the second predetermined interval is greater than the maximum value of the first predetermined interval, the maximum value of the second predetermined interval is smaller than the minimum value of the third predetermined interval, the fifth value is greater than the third value and smaller than the seventh value, and the sixth value is greater than the fourth value and smaller than the eighth value.
Step 104, if the voltage monitoring value of the battery is not greater than the current comparison voltage value and the times of the battery is continuously less than the first time limit value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value;
the continuous less times are times that the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously greater than a first value.
In this embodiment of the application, when the number of times that the difference between the voltage monitoring value of the battery and the current comparison voltage value is continuously greater than the first value reaches the first time limit value, the current comparison voltage value is updated to the latest voltage monitoring value, and then the current electric quantity reporting value is updated based on the current comparison voltage value.
As can be seen from the above, according to the technical scheme, the current comparison voltage value is determined based on the voltage value of the battery of the internet of things sensor after the battery is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
Example two
The application also provides an electric quantity monitoring method applied to the sensor of the internet of things, as shown in fig. 2, the method comprises the following steps:
step 101, determining a current comparison voltage value based on a voltage value of a battery of the internet of things sensor after the battery is started, and determining a current electric quantity reporting value based on the current comparison voltage value.
102, collecting the real-time voltage value of the battery at each transmitting time;
and the transmitting time is the time when the sensor of the Internet of things transmits data.
And 103, tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value.
Step 104, if the voltage monitoring value of the battery is not greater than the current comparison voltage value and the times of the battery is continuously less than the first time limit value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value;
the continuous less times are times that the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously greater than a first value.
Optionally, before tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the electric quantity monitoring method further includes:
caching the current comparison voltage value for X times to obtain cached data containing X numbers, wherein X is a preset natural number and is not less than two;
if the voltage monitoring value of the battery is not greater than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the electric quantity monitoring method further comprises the following steps:
and replacing all data in the cache data with the latest voltage monitoring value.
Further, after the voltage monitoring value of the battery is determined based on the collected real-time voltage value, the method for monitoring the electric quantity further includes:
step 105, if the voltage detection value of the battery is not greater than the current comparison voltage value, and the difference between the voltage monitoring value of the battery and the current comparison voltage value is not greater than the first value, then: replacing one number in the cache data with the latest voltage monitoring value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity reporting value based on the current comparison voltage value.
Further, after the voltage monitoring value of the battery is determined based on the collected real-time voltage value, the electric quantity monitoring method further includes:
step 106, if the voltage detection value of the battery is not greater than the current comparison voltage value and the continuous number of times less than the second secondary number limit value, then: replacing a number in the cache data with a difference value between the current comparison voltage value and the first value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second numerical limit is less than the first numerical limit.
Furthermore, after the voltage monitoring value of the battery is determined based on the collected real-time voltage value, the power monitoring method further includes:
step 107, if the voltage detection value of the battery is not greater than the current comparison voltage value, and the consecutive number of times of less than the second count limit is not less than the first count limit, then: replacing two numbers in the cache data with the difference value between the current comparison voltage value and the second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second value is greater than the first value.
Optionally, after the voltage monitoring value of the battery is determined based on the collected real-time voltage value by tracking, the method for monitoring the electric quantity further includes:
and 108, if the voltage monitoring value of the battery is greater than the current comparison voltage value and the times of continuous greater than the current comparison voltage value reach the time threshold value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the times of continuous greater than is the times of continuous greater than the eleventh value of the difference value between the voltage monitoring value of the battery and the current comparison voltage value.
It should be noted that, the tracking judgment may be performed in step 104 or step 105 or step 106 or step 107 or step 108 based on the voltage monitoring value of the battery tracked and determined in step 103, and then, the step 103 and the subsequent steps may be performed based on the real-time voltage value acquired in step 102.
As can be seen from the above, according to the technical scheme, the current comparison voltage value is determined based on the voltage value of the battery of the internet of things sensor after the battery is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
EXAMPLE III
The application also provides an electric quantity monitoring method applied to the sensor of the internet of things, as shown in fig. 3, the electric quantity monitoring method comprises the following steps:
step 201, determining a current comparison voltage value based on a voltage value of a battery of the internet of things sensor after the internet of things sensor is started, and determining a current electric quantity reporting value based on the current comparison voltage value.
Step 202, collecting the real-time voltage value of the battery at each transmitting time, wherein the transmitting time is the time when the sensor of the internet of things transmits data.
Step 203, tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value;
in this embodiment of the application, before the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the electric quantity monitoring method further includes:
and caching the current comparison voltage value for X times to obtain cache data containing X numbers, wherein X is a preset natural number and is not less than two.
Step 204, judging whether the voltage monitoring value of the battery is larger than the current comparison voltage value;
in this embodiment, if the voltage monitoring value of the battery is not greater than the current comparison voltage value, step 205 is executed; if the voltage monitoring value of the battery is greater than the current comparison voltage value, step 211 is executed.
Step 205, determining whether the difference between the voltage monitoring value of the battery and the current comparison voltage value is greater than a first value;
in this embodiment, if the difference between the voltage monitoring value of the battery and the current comparison voltage value is not greater than the first value, step 206 is executed; if the difference between the voltage monitoring value of the battery and the current comparison voltage value is greater than the first value, step 207 is executed.
Step 206, replacing one number in the cache data with the latest voltage monitoring value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity report value based on the current comparison voltage value.
Step 207, judging the relationship between the continuous times less than the first time limit value and the second time limit value;
wherein, the second time limit value is smaller than the first time limit value, and the continuous less times are times that the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously larger than the first value;
in the embodiment of the present application, if the consecutive less times reaches the first time limit, step 208 is executed; if the number of consecutive less than the second threshold is less than the second threshold, go to step 209; if the number of consecutive times is not less than the second threshold and is less than the first threshold, step 210 is executed.
And 208, updating the current comparison voltage value based on the latest voltage monitoring value, then updating the current electric quantity reporting value based on the current comparison voltage value, and replacing all data in the cache data with the latest voltage monitoring value.
Step 209, replacing a number in the cache data with a difference between the current comparison voltage value and the first value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity reporting value based on the current comparison voltage value.
Step 210, replacing two numbers in the cache data with a difference value between the current comparison voltage value and the second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second value is greater than the first value.
Step 211, determining whether the number of times of continuous increase reaches a number threshold;
wherein, the continuous greater times are times that the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously greater than an eleventh value;
in the embodiment of the present application, if the number of times of the above-mentioned continuous operation is greater than the number of times and reaches the number threshold, step 212 is executed; if the number of times of the continuous voltage increase does not reach the threshold value, step 203 and the subsequent steps are continuously executed based on the real-time voltage value collected in step 202.
In step 212, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current power reporting value is updated based on the current comparison voltage value.
It should be noted that, after step 206 or step 208 or step 209 or step 210 or step 212 is completed, step 203 and the subsequent steps can be executed continuously based on the real-time voltage value collected in step 202.
As can be seen from the above, according to the technical scheme of the application, the current comparison voltage value is determined based on the voltage value of the battery after the internet of things sensor is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
Example four
The application provides an electric quantity monitoring devices for thing networking sensor, as shown in fig. 4, electric quantity monitoring devices 30 includes:
the first determining unit 301 is configured to determine a current comparison voltage value based on a voltage value of a battery of the internet of things sensor after the battery is started up, and determine a current electric quantity reporting value based on the current comparison voltage value;
an acquisition unit 302, configured to acquire a real-time voltage value of the battery at each transmission time, where the transmission time is a time when the sensor of the internet of things transmits data;
a second determining unit 303, configured to determine a voltage monitoring value of the battery based on the collected real-time voltage value;
an updating unit 304, configured to update the current comparison voltage value based on the latest voltage monitoring value when the voltage monitoring value of the battery is not greater than the current comparison voltage value and the consecutive less times reaches the first time limit value, and then update the current electric quantity reported value based on the current comparison voltage value, where the consecutive less times is the times when the difference between the voltage monitoring value of the battery and the current comparison voltage value is continuously greater than the first value.
Specifically, the power monitoring device 30 may be an internet of things sensor.
Optionally, the second determining unit 303 is further configured to: caching the current comparison voltage value for X times to obtain cached data containing X numbers, wherein X is more than or equal to two;
the updating unit 304 is further configured to: and when the voltage monitoring value of the battery is not larger than the current comparison voltage value and the times of continuous decrease reach a first time limit value, replacing all data in the cache data with the latest voltage monitoring value.
Further, the updating unit 304 is further configured to: when the voltage detection value of the battery is not larger than the current comparison voltage value, and the difference value between the voltage monitoring value of the battery and the current comparison voltage value is not larger than the first value: replacing one number in the cache data with the latest voltage monitoring value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity report value based on the current comparison voltage value.
Further, the updating unit 304 is further configured to: when the voltage detection value of the battery is not more than the current comparison voltage value and the continuous less times are less than a second secondary time limit value: replacing a number in the cache data with a difference value between the current comparison voltage value and the first value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity report value based on the current comparison voltage value;
wherein the second time limit is less than the first time limit.
Further, the updating unit 304 is further configured to: when the voltage detection value of the battery is not greater than the current comparison voltage value, and the continuous smaller times are not less than the second time limit value and less than the first time limit value: replacing two numbers in the cache data with a difference value between the current comparison voltage value and a second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second value is greater than the first value.
Optionally, the second determining unit 303 is specifically configured to: after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round, wherein the end node of each round of collection is as follows: and the number of the acquired real-time voltage values reaches a set number threshold, or the acquisition time of the round reaches a set time threshold.
Further, the second determining unit 303 is further specifically configured to: when the current electric quantity reporting value is in a first preset interval, setting the number threshold value as a third value and setting the duration threshold value as a fourth value;
when the current electric quantity reporting value is in a second preset interval, setting the number threshold value as a fifth value and setting the duration threshold value as a sixth value;
when the current electric quantity reported value is in a third preset interval, setting the number threshold value as a seventh value, and setting the duration threshold value as an eighth value;
the minimum value of the second predetermined interval is greater than the maximum value of the first predetermined interval, the maximum value of the second predetermined interval is smaller than the minimum value of the third predetermined interval, the fifth value is greater than the third value and smaller than the seventh value, and the sixth value is greater than the fourth value and smaller than the eighth value.
Optionally, the first determining unit 301 is specifically configured to: in a first preparation stage of the sensor of the Internet of things, acquiring real-time voltage values of the M batteries, and determining an average value of the real-time voltage values acquired in the first preparation stage as a first voltage value;
in a second preparation stage of the sensor of the internet of things, respectively collecting the real-time voltage values of the battery at the N transmitting occasions, and determining the maximum value of the real-time voltage values collected in the second preparation stage as a second voltage value;
determining the weighted average value of the first voltage value and the second voltage value as a current comparison voltage value, and determining a current electric quantity reporting value based on the current comparison voltage value;
the first preparation stage is a stage from starting to transmitting data for the first time, and the second preparation stage is a stage from transmitting data for the first time to determining a current electric quantity report value for the first time.
Further, the first determining unit 301 is further specifically configured to: judging whether the sensor of the Internet of things is connected with a gateway or not after the sensor of the Internet of things is started;
if the Internet of things sensor is not connected with the gateway, setting the N to be a ninth value;
if the sensor of the internet of things is connected with the gateway, setting the N to be a tenth value;
wherein the ninth value is less than the tenth value.
Optionally, the updating unit 304 is further configured to: and when the voltage monitoring value of the battery is greater than the current comparison voltage value and the times of continuous greater than the current comparison voltage value reach the time threshold value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the times of continuous greater than the times are the times of continuous greater than the eleventh value of the difference between the voltage monitoring value of the battery and the current comparison voltage value.
As can be seen from the above, according to the technical scheme, the current comparison voltage value is determined based on the voltage value of the battery of the internet of things sensor after the battery is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
EXAMPLE five
This application still provides another kind of electric quantity monitoring devices who is applied to thing networking sensor, as shown in fig. 5, electric quantity monitoring devices in this application embodiment includes: a memory 401, a processor 402, and a computer program stored in the memory 401 and executable on the processor 402, wherein: the memory 401 is used to store software programs and modules, the processor 402 executes various functional applications and data processing by operating the software programs and modules stored in the memory 401, and the memory 401 and the processor 402 are connected by a bus 403.
Specifically, the processor 402 implements the following steps by running the above-mentioned computer program stored in the memory 401:
determining a current comparison voltage value based on a voltage value of a battery of the Internet of things sensor after starting up, and determining a current electric quantity reporting value based on the current comparison voltage value;
acquiring a real-time voltage value of the battery at each transmitting time, wherein the transmitting time is the time when the sensor of the internet of things transmits data;
tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value;
if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the continuous times smaller than the current comparison voltage value reach the first time limit value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reporting value based on the current comparison voltage value, wherein the continuous times smaller than the current time is the times when the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously larger than the first value.
Assuming that the above is the first possible implementation manner, in a second possible implementation manner based on the first possible implementation manner, before tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the power monitoring method further includes:
caching the current comparison voltage value for X times to obtain cached data containing X numbers, wherein X is more than or equal to two;
if the voltage monitoring value of the battery is not greater than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the electric quantity monitoring method further comprises the following steps:
and replacing all data in the cache data with the latest voltage monitoring value.
In a third possible implementation manner based on the second possible implementation manner, after the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the method for monitoring the electric quantity further includes:
if the voltage detection value of the battery is not larger than the current comparison voltage value, and the difference value between the voltage monitoring value of the battery and the current comparison voltage value is not larger than the first value, then: replacing one number in the cache data with the latest voltage monitoring value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity reporting value based on the current comparison voltage value.
In a fourth possible implementation manner based on the second possible implementation manner, after the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the electric quantity monitoring method further includes:
if the voltage detection value of the battery is not larger than the current comparison voltage value and the continuous smaller times are smaller than the second secondary number limit value, then: replacing a number in the cache data with a difference value between the current comparison voltage value and the first value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second numerical limit is less than the first numerical limit.
In a fifth possible implementation manner based on the fourth possible implementation manner, after the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the electric quantity monitoring method further includes:
if the voltage detection value of the battery is not larger than the current comparison voltage value, and the continuous number of times of less than the second time limit value is not less than the first time limit value, then: replacing two numbers in the cache data with the difference value between the current comparison voltage value and the second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second value is greater than the first value.
In a sixth possible implementation manner based on the first, second, third, fourth, or fifth possible implementation manner, the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value includes:
after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round, wherein the finishing node of each round of collection is as follows: and the number of the acquired real-time voltage values reaches a set number threshold, or the acquisition time of the round reaches a set time threshold.
In a seventh possible implementation manner based on the sixth possible implementation manner, the updating the voltage monitoring value of the battery based on the real-time voltage value acquired in each round after the acquisition of each round is ended includes:
if the current electric quantity reported value is in a first preset interval, setting the number threshold value as a third value, and setting the duration threshold value as a fourth value;
if the current electric quantity reported value is in a second preset interval, setting the number threshold value as a fifth value, and setting the duration threshold value as a sixth value;
if the current electric quantity reported value is in a third preset interval, setting the number threshold value as a seventh value, and setting the duration threshold value as an eighth value;
the minimum value of the second predetermined interval is greater than the maximum value of the first predetermined interval, the maximum value of the second predetermined interval is smaller than the minimum value of the third predetermined interval, the fifth value is greater than the third value and smaller than the seventh value, and the sixth value is greater than the fourth value and smaller than the eighth value.
In an eighth possible implementation manner based on the first, second, third, fourth, or fifth possible implementation manner, the determining a current comparison voltage value based on a voltage value of a battery of the sensor of the internet of things after the battery is powered on, and determining a current electric quantity reporting value based on the current comparison voltage value includes:
in a first preparation stage of the sensor of the Internet of things, acquiring real-time voltage values of the M batteries, and determining an average value of the real-time voltage values acquired in the first preparation stage as a first voltage value;
in a second preparation stage of the sensor of the internet of things, respectively collecting the real-time voltage values of the battery at the N transmitting occasions, and determining the maximum value of the real-time voltage values collected in the second preparation stage as a second voltage value;
determining a weighted average value of the first voltage value and the second voltage value as a current comparison voltage value, and determining a current electric quantity reporting value based on the current comparison voltage value;
the first preparation stage is a stage from starting to transmitting data for the first time, and the second preparation stage is a stage from transmitting data for the first time to determining a current electric quantity report value for the first time.
In a ninth possible implementation manner based on the eighth possible implementation manner, before the collecting the real-time voltage value of the battery at the N transmission timings respectively, the method for monitoring electric quantity further includes:
judging whether the Internet of things sensor is connected with a gateway or not after the Internet of things sensor is started;
if the sensor of the internet of things is not connected with the gateway, setting the N to be a ninth value;
if the sensor of the internet of things is connected with the gateway, setting the N to be a tenth value;
wherein the ninth value is less than the tenth value.
In a tenth possible implementation manner based on the first, second, third, fourth, or fifth possible implementation manner, after tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value, the electric quantity monitoring method further includes:
and if the voltage monitoring value of the battery is greater than the current comparison voltage value and the times of continuous greater than the current comparison voltage value reach the time threshold value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the times of continuous greater than is the times of continuous greater than the eleventh value of the difference between the voltage monitoring value of the battery and the current comparison voltage value.
As can be seen from the above, according to the technical scheme, the current comparison voltage value is determined based on the voltage value of the battery of the internet of things sensor after the battery is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
Example six
The present application also provides a computer readable storage medium having a computer program stored thereon, which when executed, can implement the steps provided by the above-described embodiments. Specifically, the computer program includes computer program code, which may be in one of a source code form, an object code form, an executable file or some intermediate form, and is not limited herein; the computer readable storage medium can be any entity or device capable of carrying the above computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, and is not limited thereto. It should be noted that the contents contained in the computer-readable storage medium can be increased or decreased as required by legislation and patent practice in the jurisdiction.
As can be seen from the above, according to the technical scheme, the current comparison voltage value is determined based on the voltage value of the battery of the internet of things sensor after the battery is started, and the current electric quantity reporting value is determined based on the current comparison voltage value; collecting a real-time voltage value of the battery at each transmitting opportunity; tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value; if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the current comparison voltage value is updated based on the latest voltage monitoring value, and then the current electric quantity reported value is updated based on the current comparison voltage value, so that the phenomenon that the current electric quantity reported value is abnormally reduced due to the fact that the real-time voltage value of the battery is changed violently is avoided, and the reliability of electric quantity monitoring is improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be noted that, the methods and the details thereof provided by the foregoing embodiments may be combined with the apparatuses and devices provided by the embodiments, which are referred to each other and are not described again.
Those of ordinary skill in the art would appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and the actual implementation may be implemented by another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (8)

1. A power monitoring method applied to a sensor of the Internet of things is characterized by comprising the following steps:
determining a current comparison voltage value based on a voltage value of a battery of the Internet of things sensor after starting up, and determining a current electric quantity reporting value based on the current comparison voltage value;
acquiring a real-time voltage value of the battery at each transmitting occasion, wherein the transmitting occasion is the moment when the sensor of the internet of things transmits data;
caching the current comparison voltage value for X times to obtain cached data containing X numbers, wherein X is more than or equal to two;
tracking and determining a voltage monitoring value of the battery based on the acquired real-time voltage value;
if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the number of times of continuous decrease reaches the first time limit value, the electric quantity monitoring method further comprises the following steps:
replacing all data in the cache data with the latest voltage monitoring value;
if the voltage monitoring value of the battery is not larger than the current comparison voltage value and the continuous times of less than the current comparison voltage value reach the first time limit value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the continuous times of less than the current comparison voltage value is the times of continuously larger difference between the voltage monitoring value of the battery and the current comparison voltage value than the first value
If the voltage detection value of the battery is not larger than the current comparison voltage value and the continuous smaller times are smaller than the second secondary number limit value, then: replacing a number in the cache data with a difference value between the current comparison voltage value and the first value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all numbers in the cache data, and then updating a current electric quantity report value based on the current comparison voltage value;
wherein the second decimal limit is less than the first decimal limit;
if the voltage detection value of the battery is not larger than the current comparison voltage value, and the continuous number of times of being smaller than the second secondary number limit value is not smaller than the first secondary number limit value, then: replacing two numbers in the cache data with the difference value between the current comparison voltage value and the second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all numbers in the cache data, and then updating a current electric quantity report value based on the current comparison voltage value;
wherein the second value is greater than the first value.
2. The method for monitoring power consumption of claim 1, wherein after tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the method for monitoring power consumption further comprises:
if the voltage detection value of the battery is not larger than the current comparison voltage value, and the difference value between the voltage monitoring value of the battery and the current comparison voltage value is not larger than the first value, then: replacing a number in the cache data with the latest voltage monitoring value based on a cache-first replacement principle; and determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating the current electric quantity report value based on the current comparison voltage value.
3. The power monitoring method according to claim 1 or 2, wherein the tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value comprises:
after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round, wherein the finishing node of each round of collection is as follows: the number of the collected real-time voltage values reaches a set number threshold, or the collection time of the round reaches a set time threshold.
4. The method for monitoring electric quantity according to claim 3, wherein after each round of collection is finished, updating the voltage monitoring value of the battery based on the real-time voltage value collected in the round comprises:
if the current electric quantity reported value is in a first preset interval, setting the number threshold value as a third value, and setting the duration threshold value as a fourth value;
if the current electric quantity reported value is in a second preset interval, setting the number threshold value as a fifth value and setting the duration threshold value as a sixth value;
if the current electric quantity reported value is in a third preset interval, setting the number threshold value as a seventh value, and setting the duration threshold value as an eighth value;
the minimum value of the second preset interval is greater than the maximum value of the first preset interval, the maximum value of the second preset interval is smaller than the minimum value of the third preset interval, the fifth value is greater than the third value and smaller than the seventh value, and the sixth value is greater than the fourth value and smaller than the eighth value.
5. The electric quantity monitoring method according to claim 1 or 2, wherein the determining a current comparison voltage value based on a voltage value of a battery of the sensor of the internet of things after being powered on, and the determining a current electric quantity reporting value based on the current comparison voltage value comprises:
in a first preparation stage of the sensor of the Internet of things, collecting real-time voltage values of M batteries, and determining an average value of the real-time voltage values collected in the first preparation stage as a first voltage value;
in a second preparation stage of the sensor of the internet of things, respectively collecting the real-time voltage values of the battery at N transmitting occasions, and determining the maximum value of the real-time voltage values collected in the second preparation stage as a second voltage value;
determining a weighted average value of the first voltage value and the second voltage value as a current comparison voltage value, and determining a current electric quantity reporting value based on the current comparison voltage value;
the first preparation phase is a phase from starting to transmitting data for the first time, and the second preparation phase is a phase from transmitting data for the first time to determining a current electric quantity reporting value for the first time.
6. The method for monitoring electric quantity according to claim 5, wherein before said respectively collecting real-time voltage values of said battery at said N transmission occasions, said method further comprises:
judging whether the sensor of the Internet of things is connected with a gateway or not after the sensor of the Internet of things is started;
if the Internet of things sensor is not connected with the gateway, setting the N to be a ninth value;
if the IOT sensor is connected with a gateway, setting the N to be a tenth value;
wherein the ninth value is less than the tenth value.
7. The method for monitoring electric quantity according to claim 1 or 2, wherein after tracking and determining the voltage monitoring value of the battery based on the collected real-time voltage value, the method for monitoring electric quantity further comprises:
and if the voltage monitoring value of the battery is greater than the current comparison voltage value and the times of continuous greater than the current comparison voltage value reach the time threshold value, updating the current comparison voltage value based on the latest voltage monitoring value, and then updating the current electric quantity reported value based on the current comparison voltage value, wherein the times of continuous greater than is the times of continuous greater than the eleventh value of the difference value between the voltage monitoring value of the battery and the current comparison voltage value.
8. The utility model provides an electric quantity monitoring devices for thing networking sensor which characterized in that includes:
the first determining unit is used for determining a current comparison voltage value based on a voltage value of a battery of the Internet of things sensor after the battery is started, and determining a current electric quantity reporting value based on the current comparison voltage value;
the acquisition unit is used for acquiring a real-time voltage value of the battery at each transmitting occasion, wherein the transmitting occasion is the moment when the sensor of the Internet of things transmits data;
the second determining unit is used for tracking and determining the voltage monitoring value of the battery based on the acquired real-time voltage value;
the updating unit is used for updating the current comparison voltage value based on the latest voltage monitoring value when the voltage monitoring value of the battery is not greater than the current comparison voltage value and the continuous times smaller than the current comparison voltage value reach a first time limit value, and then updating the current electric quantity reporting value based on the current comparison voltage value, wherein the continuous times smaller than the current time is the times when the difference value between the voltage monitoring value of the battery and the current comparison voltage value is continuously greater than the first value;
the second determination unit is further configured to:
caching the current comparison voltage value for X times to obtain cached data containing X numbers, wherein X is more than or equal to two;
the update unit is further configured to:
when the voltage monitoring value of the battery is not larger than the current comparison voltage value and the times of continuous decrease reach a first time limit value, replacing all data in the cache data with the latest voltage monitoring value;
the update unit is further configured to: when the voltage detection value of the battery is not larger than the current comparison voltage value and the continuous less times are smaller than a second secondary number limit value: replacing a number in the cache data with a difference value between the current comparison voltage value and the first value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all the numbers in the cache data, and then updating a current electric quantity reporting value based on the current comparison voltage value;
wherein the second decimal limit is less than the first decimal limit;
the update unit is further configured to: when the voltage detection value of the battery is not larger than the current comparison voltage value and the continuous less times are not smaller than the second secondary limit value and are smaller than the first secondary limit value: replacing two numbers in the cache data with the difference value between the current comparison voltage value and the second value based on a cache-first replacement principle; determining a current comparison voltage value based on the average value of all numbers in the cache data, and then updating a current electric quantity report value based on the current comparison voltage value;
wherein the second value is greater than the first value.
CN202011034022.1A 2020-09-27 2020-09-27 Electric quantity monitoring method and device applied to sensor of Internet of things Active CN112363065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011034022.1A CN112363065B (en) 2020-09-27 2020-09-27 Electric quantity monitoring method and device applied to sensor of Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011034022.1A CN112363065B (en) 2020-09-27 2020-09-27 Electric quantity monitoring method and device applied to sensor of Internet of things

Publications (2)

Publication Number Publication Date
CN112363065A CN112363065A (en) 2021-02-12
CN112363065B true CN112363065B (en) 2022-09-13

Family

ID=74506948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011034022.1A Active CN112363065B (en) 2020-09-27 2020-09-27 Electric quantity monitoring method and device applied to sensor of Internet of things

Country Status (1)

Country Link
CN (1) CN112363065B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064088B (en) * 2021-03-16 2024-03-22 中磊电子(苏州)有限公司 Internet of things device and battery electric quantity detection method
CN114509684B (en) * 2022-04-19 2022-07-26 西安因联信息科技有限公司 Self-adaptive battery electric quantity monitoring method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111474482A (en) * 2020-04-29 2020-07-31 珠海优特物联科技有限公司 Electric quantity detection model establishing method, electric quantity detection method and device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW539140U (en) * 2001-12-31 2003-06-21 Giant Mfg Co Ltd Detection and display device for residual charge of rechargeable battery
CN102298119B (en) * 2011-05-24 2015-12-02 惠州Tcl移动通信有限公司 Battery electric quantity display device and method
CN109085508A (en) * 2018-08-30 2018-12-25 深圳市道通智能航空技术有限公司 Determine method, apparatus, chip, battery and the aircraft of the charged state of battery
CN110716142A (en) * 2019-10-16 2020-01-21 蔚复来(浙江)科技股份有限公司 Low-power-consumption battery electric quantity detection method
CN111142031A (en) * 2019-12-30 2020-05-12 深圳移航通信技术有限公司 Battery capacity updating method and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111474482A (en) * 2020-04-29 2020-07-31 珠海优特物联科技有限公司 Electric quantity detection model establishing method, electric quantity detection method and device and electronic equipment

Also Published As

Publication number Publication date
CN112363065A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN112363065B (en) Electric quantity monitoring method and device applied to sensor of Internet of things
CN102223264B (en) Alarm processing method and alarm processing system for monitoring system
CN114801751B (en) Automobile battery fault prediction system based on data analysis
CN105283772A (en) Method and device for measuring state of charge of mobile terminal
CN104281510A (en) Method and system for obtaining power consumption degree of application program and energy-saving method and system
CN111483339A (en) Electric vehicle charging monitoring system, charging pile system and monitoring method
CN111200864A (en) Data processing method, device, equipment and storage medium
CN116739202B (en) Power routing method, system, equipment and storage medium
CN112924866A (en) Capacity conservation rate detection method, capacity conservation rate detection device, vehicle and storage medium
CN115436871A (en) Method for preventing zero line missing electricity stealing of single-phase electric energy meter based on low power consumption
CN110929115A (en) Power utilization safety monitoring method and system based on power utilization characteristics
CN112327175B (en) Electric quantity monitoring method applied to sensor of Internet of things and related device
CN113821421A (en) Server performance data acquisition method, system, device and storage medium
CN116627046A (en) Household power supply control method and system based on intelligent gateway
CN116449072A (en) Static current testing method and device, battery controller, vehicle and storage medium
CN114325257A (en) Self-adaptive adjustment method and monitoring system for data acquisition of partial discharge sensor of transformer
CN114338778A (en) Control method and device of gateway equipment, storage medium and electronic device
CN113030749B (en) Current detection method, device, equipment, system and storage medium
CN111948556A (en) Anti-fluctuation battery electric quantity detection method and device
CN111879334A (en) Step counting method, step counting device and computer readable storage medium
CN116435631B (en) Button cell low-power alarming method
CN117890813B (en) Battery electric quantity detection method and detection system based on dynamic load condition
CN109413725B (en) Method, device and equipment for prolonging service life of battery of low-power-consumption Internet of things equipment
CN109714792B (en) Data collection method, device and system
CN117368787B (en) ACC detection method and system without broken line, terminal and storage medium thereof

Legal Events

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