Early warning methods, devices and equipment for smart gas meters

By dynamically adjusting the voltage threshold according to the gas meter's battery type, the problem of inaccurate low battery warnings in existing smart gas meters is solved, achieving more accurate battery voltage warnings and ensuring the normal operation of the gas meter.

CN117804565BActive Publication Date: 2026-05-26GOLDCARD HIGH TECH +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GOLDCARD HIGH TECH
Filing Date
2023-12-29
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The existing low battery voltage warning methods for smart gas meters use a fixed voltage threshold, which leads to inaccurate warnings and fails to promptly and effectively remind users to replace the battery, causing inconvenience to users.

Method used

Based on the battery type of the smart gas meter, an initial voltage warning value and an objective function value are determined, the voltage threshold is dynamically adjusted, and a warning message is generated by comparing the current battery voltage value with the actual low voltage threshold.

Benefits of technology

This improves the accuracy of low battery voltage warnings, ensuring users can replace batteries in a timely manner and preventing smart gas meters from malfunctioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117804565B_ABST
    Figure CN117804565B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and device for early warning of smart gas meters. The method includes: acquiring the currently reported gas meter data from the smart gas meter; determining the battery type of the smart gas meter based on its identifier; determining an initial voltage warning value for the smart gas meter based on its battery type, and determining an initial objective function value for the smart gas meter based on the initial voltage warning value; determining a current low voltage threshold for the smart gas meter based on the initial voltage warning value and the initial objective function value; determining an actual low voltage threshold for the smart gas meter based on the current low voltage threshold and a first preset voltage value; and generating and outputting first warning information if the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold. This application can improve the accuracy of low voltage warnings for smart gas meter batteries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of instrumentation, and in particular to a method, device, and equipment for early warning of a smart gas meter. Background Technology

[0002] With the development of technology, smart gas meters have brought great convenience to people's daily lives. However, as smart gas meters are used, their batteries may experience low voltage. To ensure gas safety, users need to be reminded to replace the batteries in a timely manner.

[0003] Currently, low voltage warnings for smart gas meters are based on a fixed voltage threshold. The system determines whether the voltage of the smart gas meter is below this threshold and then issues a warning.

[0004] However, the above method relies on a fixed voltage threshold for all smart gas meters to issue warnings, which is inaccurate and cannot accurately and promptly warn users when the smart gas meter's battery is low on voltage. This can lead to users being unable to effectively use the smart gas meter, causing inconvenience. Summary of the Invention

[0005] This application provides a method, device, and equipment for early warning of smart gas meters, in order to solve the problem of low accuracy of low battery voltage early warning in smart gas meters.

[0006] In a first aspect, this application provides a warning method for a smart gas meter, comprising:

[0007] Obtain the current battery voltage value and battery type of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery;

[0008] Based on the battery type of the smart gas meter, an initial voltage warning value for the smart gas meter is determined, wherein the initial voltage warning value represents an initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and based on the initial voltage warning value of the smart gas meter, an initial objective function value for the smart gas meter is determined, wherein the initial objective function value represents an objective function value for the initial low voltage threshold.

[0009] Based on the initial voltage warning value and the initial objective function value of the smart gas meter, the current low voltage threshold of the smart gas meter is determined; and based on the current low voltage threshold of the smart gas meter and the first preset voltage value, the actual low voltage threshold of the smart gas meter is determined.

[0010] If it is determined that the current battery voltage of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter, then a first warning message is generated and output.

[0011] Optionally, obtain the current battery voltage value and battery type of the smart gas meter, including:

[0012] Obtain the gas meter data currently reported by the smart gas meter; wherein, the gas meter data includes the current battery voltage value of the smart gas meter and the identifier of the smart gas meter;

[0013] The battery type of the smart gas meter is determined based on its identifier.

[0014] Optionally, the battery type of the smart gas meter is determined based on its identifier, including:

[0015] If it is determined that the smart gas meter is not reporting gas meter data for the first time, then the battery type of the smart gas meter corresponding to the smart gas meter's identifier is determined according to a preset database; wherein, the preset database includes the correspondence between the smart gas meter's identifier and the smart gas meter's battery type.

[0016] Optionally, the method further includes:

[0017] If it is determined that the smart gas meter is reporting gas meter data for the first time, then based on the current battery voltage value, the predicted battery type of the smart gas meter is predicted, and based on a preset database, the battery type of the smart gas meter corresponding to the identifier of the smart gas meter is determined; wherein, the preset database includes the correspondence between the identifier of the smart gas meter and the battery type of the smart gas meter.

[0018] If the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the identifier of the smart gas meter are consistent, then the predicted battery type of the smart gas meter is determined to be the battery type of the smart gas meter.

[0019] If the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the smart gas meter's identifier are inconsistent, a prompt message is generated and output, wherein the prompt message indicates that the user should confirm the battery type of the smart gas meter.

[0020] Optionally, based on the current battery voltage value, the predicted battery type of the smart gas meter is predicted, including:

[0021] If it is determined that the current battery voltage value is less than or equal to the second preset voltage value, then the predicted battery type of the smart gas meter is determined to be a lithium battery gas meter.

[0022] If the current battery voltage value is determined to be greater than the second preset voltage value, then the predicted battery type of the smart gas meter is determined to be an alkaline gas meter.

[0023] Optionally, based on the battery type of the smart gas meter, the initial voltage warning value of the smart gas meter is determined, including:

[0024] If it is determined that the battery type of the smart gas meter is a lithium-ion gas meter and the smart gas meter is reporting gas meter data for the first time, then a third preset voltage value is determined as the initial voltage warning value of the smart gas meter.

[0025] If it is determined that the battery type of the smart gas meter is a lithium-ion gas meter, and the smart gas meter is not reporting gas meter data for the first time, then the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter is determined as the initial voltage warning value of the smart gas meter.

[0026] Optionally, the method further includes:

[0027] If it is determined that the battery type of the smart gas meter is an alkaline gas meter, and the smart gas meter is reporting gas meter data for the first time, then based on a preset data table, the voltage level to which the current battery voltage value belongs is determined; wherein, the preset data table includes the voltage value range under each voltage level, and the voltage value range includes an upper voltage limit and a lower voltage limit; and based on the voltage value range under the voltage level to which the current battery voltage value belongs, the initial voltage warning value of the smart gas meter is determined;

[0028] If it is determined that the battery type of the smart gas meter is an alkaline gas meter, and the smart gas meter is not reporting gas meter data for the first time, then the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter is determined as the initial voltage warning value of the smart gas meter.

[0029] Optionally, based on the initial voltage warning value of the smart gas meter, the initial objective function value of the smart gas meter is determined, including:

[0030] Obtain a first mean, a second mean, and a third mean; wherein, the first mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period;

[0031] The initial objective function value of the smart gas meter is determined based on the first mean, the second mean, the third mean, and the initial voltage warning value.

[0032] Optionally, the initial objective function value of the smart gas meter is E0 = a*y1 + b*y2 + c*y3 - x0; where y1 is the first mean, y2 is the second mean, y3 is the third mean, and x0 is the initial voltage warning value; a, b, and c are all preset weight values, and a + b + c = 1.

[0033] Optionally, based on the initial voltage warning value and the initial objective function value of the smart gas meter, the current low voltage threshold of the smart gas meter is determined, including:

[0034] Repeat the following steps until a first preset condition is met, wherein the first preset condition is that the current algorithm temperature is lower than a preset temperature, and the initial value of the current algorithm temperature is the first preset value:

[0035] The initial voltage warning value and the initial objective function value of the smart gas meter are updated to obtain the updated initial voltage warning value;

[0036] The current algorithm temperature is determined by multiplying the current algorithm temperature by a preset cooling rate value, which is then used to obtain the updated current algorithm temperature.

[0037] The updated initial voltage warning value when the first preset condition is met is the current low voltage threshold of the smart gas meter.

[0038] Optionally, the initial voltage warning value and the initial objective function value of the smart gas meter are updated to obtain an updated initial voltage warning value, including:

[0039] Repeat the following steps until the second preset condition is met, where the value of i is greater than or equal to N, the initial value of i is 1, and i and N are both positive integers greater than or equal to 1:

[0040] Based on the battery type of the smart gas meter, a disturbance voltage value corresponding to the battery type of the smart gas meter is determined; and based on the initial voltage warning value, the disturbance voltage value, and the generated random number, a predicted voltage warning value of the smart gas meter is determined; wherein, the predicted voltage warning value represents the low voltage threshold value obtained when predicting the low voltage threshold of the smart gas meter;

[0041] Obtain a first mean, a second mean, and a third mean; wherein, the first mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period;

[0042] The predictive objective function value of the smart gas meter is determined based on the first mean, the second mean, the third mean, and the predicted voltage warning value; wherein, the predictive objective function value represents the objective function value obtained when predicting the low voltage threshold;

[0043] Subtracting the initial objective function value from the predicted objective function value yields the difference.

[0044] Based on the difference, the initial voltage warning value is updated to obtain the updated initial voltage warning value; and the value of i is determined to be incremented by 1.

[0045] Optionally, based on the difference, the initial voltage warning value is updated to obtain an updated initial voltage warning value, including:

[0046] If the difference is determined to be less than or equal to zero, then the predicted objective function value is determined as the updated initial objective function value, and the predicted voltage warning value is determined as the updated initial voltage warning value.

[0047] If the difference is determined to be greater than zero, a random probability value is generated. When the random probability value is less than a second preset value, the predicted objective function value is determined as the updated initial objective function value, and the predicted voltage warning value is determined as the updated initial voltage warning value. The second preset value is a value obtained by an exponential function based on the value obtained by dividing the difference by the current algorithm temperature.

[0048] Optionally, the method further includes:

[0049] Based on the identifier of the smart gas meter, determine the set of gas meters in the community to which the smart gas meter belongs, wherein the set of gas meters includes at least one other smart gas meter, and the battery type of the other smart gas meters in the set of gas meters is the same as the battery type of the current smart gas meter.

[0050] If the total number of other smart gas meters in the gas meter set is greater than or equal to a preset first quantity value, then determine the number of gas meters whose current battery voltage value is less than or equal to the actual low voltage threshold of the other smart gas meters in the gas meter set.

[0051] If it is determined that the number of gas meters is greater than or equal to a preset second quantity value, a second warning message is generated and output; wherein, the second warning message indicates a prompt to replace the batteries of other smart gas meters in the gas meter set.

[0052] Secondly, this application provides a warning device for a smart gas meter, comprising:

[0053] The acquisition unit is used to acquire the current battery voltage value and the battery type of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery;

[0054] The first determining unit is configured to determine an initial voltage warning value for the smart gas meter based on the battery type of the smart gas meter, wherein the initial voltage warning value represents an initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and to determine an initial objective function value for the smart gas meter based on the initial voltage warning value, wherein the initial objective function value represents an objective function value for the initial low voltage threshold.

[0055] The second determining unit is used to determine the current low voltage threshold of the smart gas meter based on the initial voltage warning value and the initial objective function value of the smart gas meter; and to determine the actual low voltage threshold of the smart gas meter based on the current low voltage threshold of the smart gas meter and the first preset voltage value.

[0056] The output unit is used to generate and output a first warning message when it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter.

[0057] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0058] The memory stores computer-executed instructions;

[0059] The processor executes computer execution instructions stored in the memory to implement the early warning method for a smart gas meter as described in any one of the first aspects.

[0060] Fourthly, this application provides a computer-readable storage medium, comprising: computer-executable instructions stored in the computer-readable storage medium, wherein the computer-executable instructions, when executed by a processor, are used to implement the early warning method of the smart gas meter as described in any one of the first aspects.

[0061] Fifthly, this application provides a computer program product, including a computer program that, when executed by the processor, implements the early warning method for a smart gas meter as described in any of the first aspects.

[0062] Sixthly, this application provides a chip on which a computer program is stored, and when the computer program is executed by the chip, it implements the early warning method of the smart gas meter as described in any of the first aspects.

[0063] The early warning method, apparatus, and device for smart gas meters provided in this application determine the initial voltage warning value and initial objective function value of the smart gas meter based on its battery type. Then, based on these values, the actual low voltage threshold of the smart gas meter is determined. Finally, based on the current battery voltage value and the actual low voltage threshold, it is determined whether to issue an early warning for the battery voltage of the smart gas meter. This method can determine the actual low voltage threshold of any smart gas meter based on its gas meter data, thereby determining whether to issue an early warning. Compared to existing technologies that use a fixed low voltage threshold for early warning, this method improves the accuracy of early warnings. Attached Figure Description

[0064] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0065] Figure 1 This is a schematic diagram of an application scenario;

[0066] Figure 2 A flowchart illustrating an early warning method for a smart gas meter provided in this application;

[0067] Figure 3 A flowchart illustrating another early warning method for a smart gas meter provided in this application;

[0068] Figure 4 A schematic diagram of the structure of an early warning device for a smart gas meter provided in this application;

[0069] Figure 5 A schematic diagram of the structure of an early warning device for another smart gas meter provided in this application;

[0070] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application.

[0071] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0072] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0073] Currently, low voltage warnings for smart gas meters are based on a fixed voltage threshold. The system determines whether the voltage of the smart gas meter is below this threshold and then issues a warning.

[0074] However, the above method relies on a fixed voltage threshold for warnings for all types of smart gas meters, resulting in inaccurate warnings. It fails to accurately and promptly alert users when the battery is low on voltage, which in turn prevents them from effectively using the smart gas meter and causes inconvenience.

[0075] In view of this, this application proposes a low-voltage warning method for smart gas meters, which predicts the low-voltage threshold of the smart gas meter's battery based on different battery types and the battery voltage data. This method can predict the low-voltage threshold of the battery for each smart gas meter, which improves the accuracy of low-voltage warnings compared to existing technologies that use a fixed voltage threshold for all smart gas meters.

[0076] Figure 1 This is a diagram illustrating one application scenario. For example... Figure 1 As shown, it includes a business system and at least one smart gas meter. It should be noted that... Figure 1 The image shown is only an illustration of three smart gas meters.

[0077] The aforementioned smart gas meter can communicate with the aforementioned business system to report gas meter data such as the user's gas consumption and the voltage value of the smart gas meter's battery.

[0078] The aforementioned business system is used to manage the gas meter data reported by smart gas meters.

[0079] The implementing entity of this application can be the aforementioned business system. This business system can be deployed independently on an electronic device in any environment (e.g., deployed independently on an edge server in an edge environment), deployed entirely in a cloud environment, or distributed across different environments. For example, the business system can be logically divided into multiple parts, each with different functions. Any two or three parts of the business system can be deployed. It should be understood that this application does not restrict the specific deployment environments of which parts of the business system are deployed. In practical applications, deployment can be adaptively made based on the computing power of the electronic device, the resource availability of the edge and cloud environments, or specific application requirements.

[0080] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0081] Figure 2 This is a flowchart illustrating an early warning method for a smart gas meter provided in this application. Figure 2 As shown, the method includes:

[0082] S101. Obtain the current battery voltage value and battery type of the smart gas meter.

[0083] For example, the current battery voltage value mentioned above is the actual voltage value of the smart gas meter battery. The battery type of the smart gas meter mentioned above refers to the type of battery, such as lithium battery, alkaline battery, or other types of battery, which is not limited here.

[0084] In one example, the system could obtain the current gas meter data reported by the smart gas meter, which includes the current battery voltage value and the smart gas meter's identifier; and determine the smart gas meter's battery type based on the smart gas meter's identifier.

[0085] For example, the identifier of the smart gas meter is used to uniquely identify the smart gas meter. For example, it can be the number of the smart gas meter or the ID assigned to the smart gas meter by the business system. This application does not limit this. The smart gas meter can report its gas meter data to the business system at regular intervals, for example, it can report at 11 pm every day or every Monday. This application does not limit the reporting time.

[0086] One possible implementation is that the identifier of the smart gas meter can characterize the battery type of the smart gas meter. For example, the numbers or letters in a preset position of the smart gas meter identifier can reflect the battery type, and the aforementioned business system can determine the battery type of the smart gas meter based on the identifier. Another possible implementation is that the aforementioned business system can determine the battery type of the smart gas meter from a preset database based on the smart gas meter identifier. This preset database includes a correspondence between smart gas meter identifiers and smart gas meter battery types.

[0087] In another example, the current battery voltage value and battery type of the smart gas meter can be imported from an external device, such as a USB flash drive, or obtained through communication with other electronic devices.

[0088] S102. Based on the battery type of the smart gas meter, determine the initial voltage warning value of the smart gas meter, wherein the initial voltage warning value represents the initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and based on the initial voltage warning value of the smart gas meter, determine the initial objective function value of the smart gas meter, wherein the initial objective function value represents the objective function value of the initial low voltage threshold.

[0089] For example, the objective function described above represents the correspondence between the objective function value and the initial low voltage threshold. This application does not limit the form of the objective function; for example, it can be a linear function or a nonlinear function, and can be set according to actual needs.

[0090] In one example, the aforementioned business system can pre-define the correspondence between the battery type of the smart gas meter and the initial voltage warning value of the smart gas meter, and determine the initial voltage warning value of the smart gas meter based on the battery type. Alternatively, it can determine the previous actual low voltage threshold of the smart gas meter's battery from a pre-determined database based on the smart gas meter's identifier. This pre-determined database includes the correspondence between the smart gas meter's identifier and the actual low voltage threshold of the smart gas meter's battery in previous records. Furthermore, it pre-determines the correspondence between the smart gas meter's battery type and a pre-determined data value. Based on the smart gas meter's battery type, it determines a pre-determined data value, processes the previous actual low voltage threshold of the smart gas meter's battery (e.g., by adding or subtracting the pre-determined data value), and uses the processed data as the initial voltage warning value of the smart gas meter.

[0091] In one example, the above business system can determine the initial objective function value of the smart gas meter based on the initial voltage warning value and the objective function.

[0092] S103. Determine the current low voltage threshold of the smart gas meter based on the initial voltage warning value and the initial objective function value; and determine the actual low voltage threshold of the smart gas meter based on the current low voltage threshold and the first preset voltage value.

[0093] For example, the current low voltage threshold of the aforementioned smart gas meter refers to the battery voltage value when the smart gas meter malfunctions. It should be understood that when issuing a low battery warning to the user, the battery voltage value should be higher than the battery voltage value when the smart gas meter malfunctions. Therefore, the actual low voltage threshold is a voltage value higher than the current low voltage threshold, and is the low voltage threshold used for warning purposes.

[0094] In one example, the aforementioned business system can determine the current low voltage threshold of the smart gas meter based on the mapping relationship between the initial voltage warning value, the initial objective function value, and the current low voltage threshold. Alternatively, it can pre-train a prediction model for the current low voltage threshold, taking the initial voltage warning value and the initial objective function value of the smart gas meter as input, and outputting the predicted current low voltage threshold. This prediction model could be, for example, a convolutional neural network model. Alternatively, the current low voltage threshold of the smart gas meter can be calculated based on the initial voltage warning value and the initial objective function value using an optimization algorithm. This optimization algorithm could be, for example, a simulated annealing algorithm.

[0095] In one example, after determining the current low voltage threshold of the smart gas meter, the current low voltage threshold can be added to a first preset voltage value to obtain the actual low voltage threshold of the smart gas meter. Alternatively, the current low voltage threshold can be multiplied by the first preset voltage value to obtain the actual low voltage threshold of the smart gas meter.

[0096] S104. If it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter, then generate and output the first warning information.

[0097] For example, the aforementioned first warning message indicates a prompt for the user to replace the battery of the smart gas meter.

[0098] In one example, after generating the first warning information, the aforementioned business system can obtain the mobile phone number of the user of the smart gas meter based on the smart gas meter's identifier and send a text message containing the first warning information to that mobile phone number. Alternatively, after generating the first warning information, the business system can output it to the business system administrator, who will then send a text message containing the first warning information to the user of the smart gas meter. Or, after generating the first warning information, the business system can output it to the smart gas meter, causing the indicator light on the smart gas meter to flash or an alarm to sound, prompting the user to replace the smart gas meter's battery. This application does not limit the output method of the first warning information.

[0099] Optionally, if it is determined that the current battery voltage of the smart gas meter is greater than the actual low voltage threshold of the smart gas meter, then the actual low voltage threshold of the smart gas meter is stored in a preset database.

[0100] In this embodiment, the initial voltage warning value and initial objective function value of the smart gas meter are determined based on the battery type of the smart gas meter. The actual low voltage threshold of the smart gas meter is then determined based on these values. Finally, based on the current battery voltage value and the actual low voltage threshold, it is determined whether to issue a warning for the battery voltage of the smart gas meter. This method can determine the actual low voltage threshold of any smart gas meter based on its gas meter data, thereby determining whether to issue a warning. Compared to the prior art which uses a fixed low voltage threshold for warnings, this method improves the accuracy of the warning.

[0101] Figure 3 A flowchart illustrating another early warning method for a smart gas meter provided in this application. Figure 3 As shown, the method includes:

[0102] S201. Obtain the gas meter data currently reported by the smart gas meter; wherein, the gas meter data includes the current battery voltage value of the smart gas meter and the identification of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery; and determine the battery type of the smart gas meter based on the identification of the smart gas meter.

[0103] In one example, step S201 may include the following steps:

[0104] S2011. Determine whether this is the first time the smart gas meter has reported gas meter data.

[0105] If it is determined that the smart gas meter is not reporting gas meter data for the first time, then proceed to step S2012; if it is determined that the smart gas meter is reporting gas meter data for the first time, then proceed to step S2013.

[0106] S2012. Based on a preset database, determine the battery type of the smart gas meter corresponding to the smart gas meter's identifier; wherein, the preset database includes the correspondence between the smart gas meter's identifier and the smart gas meter's battery type.

[0107] S2013. Based on the current battery voltage value, predict the predicted battery type of the smart gas meter, and determine the battery type of the smart gas meter corresponding to the smart gas meter's identifier according to the preset database; wherein, the preset database includes the correspondence between the smart gas meter's identifier and the smart gas meter's battery type.

[0108] For example, if the current battery voltage value is determined to be less than or equal to a second preset voltage value, the predicted battery type of the smart gas meter is determined to be a lithium-ion gas meter; if the current battery voltage value is determined to be greater than the second preset voltage value, the predicted battery type of the smart gas meter is determined to be an alkaline gas meter.

[0109] For example, the second preset voltage value can be 4V. If the current battery voltage is less than or equal to 4V, then the predicted battery type of the smart gas meter is determined to be a lithium-ion gas meter.

[0110] S2014. Determine whether the predicted battery type of the smart gas meter is consistent with the battery type of the smart gas meter corresponding to the identifier of the smart gas meter.

[0111] If the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the smart gas meter's identifier are consistent, then the predicted battery type of the smart gas meter is determined as the battery type of the smart gas meter.

[0112] If the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the smart gas meter's identifier are inconsistent, a prompt message is generated and output, in which the prompt message indicates that the user should confirm the battery type of the smart gas meter.

[0113] S202. Based on the battery type of the smart gas meter, determine the initial voltage warning value of the smart gas meter, wherein the initial voltage warning value represents the initial low voltage threshold for issuing a warning for the battery of the smart gas meter.

[0114] Taking the above-mentioned smart gas meter with a lithium battery as an example, in one example, step S202 may include the following two cases:

[0115] In the first scenario, if it is determined that the smart gas meter is a lithium-ion gas meter and this is the first time the smart gas meter is reporting gas meter data, then the third preset voltage value is determined as the initial voltage warning value of the smart gas meter.

[0116] For example, the third preset voltage value mentioned above could be 3.2V.

[0117] In the second scenario, if it is determined that the smart gas meter is a lithium-ion gas meter and this is not the first time the smart gas meter has reported gas meter data, then the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter is determined as the initial voltage warning value of the smart gas meter.

[0118] For example, based on the identifier of the smart gas meter, the actual low voltage threshold obtained from the gas meter data previously reported by the smart gas meter can be retrieved from a preset database and used as the initial voltage warning value of the smart gas meter.

[0119] Taking the above-mentioned smart gas meter with an alkaline battery as an example, in one example, step S202 may include the following two cases:

[0120] In the first scenario, if it is determined that the smart gas meter's battery type is an alkaline gas meter and this is the first time the smart gas meter is reporting gas meter data, then based on a preset data table, the voltage level to which the current battery voltage value belongs is determined; wherein, the preset data table includes the voltage value range under each voltage level, and the voltage value range includes an upper voltage limit and a lower voltage limit; and based on the voltage value range under the voltage level to which the current battery voltage value belongs, the initial voltage warning value of the smart gas meter is determined.

[0121] For example, the aforementioned preset data table can be as shown in Table 1. It should be noted that Table 1 is only an illustration of a preset data table, and this application does not limit it. It can be set according to actual needs.

[0122] Table 1

[0123]

[0124] In one example, the voltage level to which the current battery voltage belongs can be determined based on the current battery voltage value and the upper and lower voltage limits of the voltage range in a preset data table. For example, referring to Table 1, if the current battery voltage value is 5.4V, it belongs to the voltage range of 5.35V to 5.5V, that is, it belongs to voltage level 4.

[0125] In one example, after determining the voltage level to which the current battery voltage value belongs, the upper limit of the voltage range within that range can be used as the initial voltage warning value for the smart gas meter; alternatively, the lower limit can be used; or the average of the upper and lower limits can be used. It should be noted that this application does not impose any limitations, and the settings can be tailored to specific needs.

[0126] For example, if the current battery voltage is 5.4V, which falls within the voltage range of 5.35V to 5.5V, i.e., it belongs to voltage level 4, then the upper limit of the voltage level, 5.5V, can be used as the initial voltage warning value for the smart gas meter.

[0127] In the second scenario, if it is determined that the battery type of the smart gas meter is an alkaline gas meter and this is not the first time the smart gas meter has reported gas meter data, then the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter is determined as the initial voltage warning value of the smart gas meter.

[0128] For example, based on the identifier of the smart gas meter, the actual low voltage threshold obtained from the gas meter data previously reported by the smart gas meter can be retrieved from a preset database and used as the initial voltage warning value of the smart gas meter.

[0129] S203. Obtain the first mean, the second mean, and the third mean.

[0130] For example, the first average value represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter during a first preset time period; the second average value represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter during a second preset time period; the third average value represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter during a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period.

[0131] For example, if the current time reported by the smart gas meter is A, the first preset time period can be [AB, A], the second preset time period can be (A-2B, AB), and the third preset time period can be [A-3B, A-2B], where B is a preset time interval, such as one day or one month, which is not limited in this application.

[0132] In one example, the aforementioned business system can retrieve the actual low voltage thresholds of all smart gas meters with the same battery type from a preset database within a first preset time period, based on the battery type of the smart gas meter, and then determine the first average value. The determination methods for the second and third average values ​​are similar to those for the first average value, and will not be elaborated here.

[0133] S204. Based on the first mean, second mean, third mean and initial voltage warning value mentioned above, determine the initial objective function value of the smart gas meter.

[0134] In one example, the initial objective function value of the smart gas meter can be determined based on the mapping relationship between the initial objective function value and the aforementioned first, second, and third average values, as well as the initial voltage warning value. It should be noted that this application does not limit the mapping relationship; it can be set according to actual needs.

[0135] For example, the initial objective function value can be E0 = a*y1 + b*y2 + c*y3 - x0, where y1 is the first mean, y2 is the second mean, y3 is the third mean, and x0 is the initial voltage warning value; a, b, and c are all preset weight values, and a + b + c = 1.

[0136] S205. Determine the current low voltage threshold of the smart gas meter based on the initial voltage warning value and the initial objective function value of the smart gas meter.

[0137] In one example, taking the current low voltage threshold of the smart gas meter obtained according to the simulated annealing algorithm as an example, step S205 may include the following steps:

[0138] Repeat the following steps until the first preset condition is reached, wherein the first preset condition is that the current algorithm temperature is less than the preset temperature, and the initial value of the current algorithm temperature is the first preset value.

[0139] For example, the first preset value can be 1000°C, and the preset temperature can be 0.0001°C.

[0140] S2051. Update the initial voltage warning value and the initial objective function value of the smart gas meter to obtain the updated initial voltage warning value.

[0141] In one example, step S2051 may include the following steps:

[0142] Repeat the following steps until the second preset condition is met, wherein the second preset condition is that the value of i is greater than or equal to N, the initial value of i is 1, and i and N are both positive integers greater than or equal to 1.

[0143] S20511. Based on the battery type of the smart gas meter, determine the disturbance voltage value corresponding to the battery type of the smart gas meter; and based on the initial voltage warning value, the disturbance voltage value, and the generated random number, determine the predicted voltage warning value of the smart gas meter; wherein, the predicted voltage warning value represents the low voltage threshold value obtained when predicting the low voltage threshold of the smart gas meter.

[0144] In one example, a mapping relationship between the battery type and the disturbance voltage value of a smart gas meter can be preset. Based on the battery type of the smart gas meter, the disturbance voltage value corresponding to that battery type can be determined. For example, the preset disturbance voltage value for a lithium-ion gas meter is 0.5V. In another example, if the battery type of the smart gas meter is an alkaline gas meter, the disturbance voltage value corresponding to that battery type can be determined based on the current battery voltage value of the smart gas meter.

[0145] Specifically, based on the current battery voltage value of the smart gas meter and the aforementioned preset data table, the voltage level to which the current battery voltage value belongs can be determined; then, based on the voltage level to which it belongs, the two voltage levels adjacent to the current voltage level can be determined, and the upper limit value of the voltage corresponding to the two voltage levels adjacent to the current voltage level can be determined respectively; the difference between the upper limit values ​​of the voltage corresponding to the two voltage levels adjacent to the current voltage level can be used as the disturbance voltage value corresponding to the battery type of the smart gas meter.

[0146] For example, referring to Table 1, if the current battery voltage is 5.4V, it belongs to voltage level 4. The two voltage levels adjacent to voltage level 4 are voltage level 3 and voltage level 5. The upper limit of voltage level 3 is 5.35V, and the upper limit of voltage level 5 is 5.75V. The difference between the two upper limit values ​​is 0.4V, which is used as the disturbance voltage value corresponding to the battery type of the smart gas meter.

[0147] In one example, after determining the disturbance voltage value corresponding to the battery type of the smart gas meter, the predicted voltage warning value of the smart gas meter can be determined based on the mapping relationship between the predicted voltage warning value, the initial voltage warning value, the disturbance voltage value, and the generated random number. It should be noted that this application does not limit this mapping relationship; it can be set according to actual needs.

[0148] For example, the preset voltage warning value can be the initial voltage warning value plus the generated random number multiplied by the disturbance voltage value.

[0149] S20512, Obtain the first mean, the second mean, and the third mean.

[0150] S20513. Based on the first mean, the second mean, the third mean, and the predicted voltage warning value, determine the prediction objective function value of the smart gas meter; wherein, the prediction objective function value represents the objective function value obtained when predicting the low voltage threshold.

[0151] For example, the predicted objective function value E i = a*y1+b*y2+c*y3-x i Where y1 is the first mean, y2 is the second mean, y3 is the third mean, and x i The above predicted voltage warning value is given; a, b, and c are all preset weight values, and a+b+c=1.

[0152] S20514. Subtract the initial objective function value from the predicted objective function value to obtain the difference.

[0153] S20515. Based on the difference, update the initial voltage warning value to obtain the updated initial voltage warning value; and determine the value of i to be incremented by 1.

[0154] In one example, step S20515 may include the following steps:

[0155] S205151. If it is determined that the difference is less than or equal to zero, then the predicted objective function value is determined as the updated initial objective function value, and the predicted voltage warning value is determined as the updated initial voltage warning value.

[0156] S205152. If it is determined that the difference is greater than zero, a random probability value is generated, and when the random probability value is less than the second preset value, the predicted objective function value is determined as the updated initial objective function value, and the predicted voltage warning value is determined as the updated initial voltage warning value; wherein, the second preset value is a value obtained by an exponential function based on the value obtained by dividing the difference by the current algorithm temperature.

[0157] For example, the second preset value is exp(ΔE / T), where ΔE is the difference and T is the current algorithm temperature.

[0158] Optionally, if the random probability value is greater than or equal to the second preset value, the initial objective function value is used as the updated initial objective function value, and the initial voltage warning value is used as the updated initial voltage warning value.

[0159] Repeat steps S20511-20515 until the second preset condition is met, obtain the updated initial objective function value and the updated initial voltage warning value at the current algorithm temperature, and then execute step S2052 to perform temperature iteration.

[0160] S2052. Determine the current algorithm temperature by multiplying it by the preset cooling rate value, resulting in the updated current algorithm temperature.

[0161] For example, the preset cooling rate value can be 0.9.

[0162] Repeat steps S2051 and S2052 until the first preset condition is met, then use the updated initial voltage warning value as the current low voltage threshold of the smart gas meter.

[0163] S206. Determine the actual low voltage threshold of the smart gas meter based on the current low voltage threshold and the first preset voltage value.

[0164] In one example, the first preset voltage value mentioned above could be 0.2V. In that case, the actual low voltage threshold of the smart gas meter could be the current low voltage threshold + 0.2V.

[0165] S207. If it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter, then generate and output the first warning information.

[0166] It should be noted that this step can be referred to in the explanation of step S104, and will not be repeated here.

[0167] Optionally, after determining that the current battery voltage of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter, the above-mentioned business system may also perform the following steps:

[0168] S208. Based on the identifier of the smart gas meter, determine the set of gas meters in the community to which the smart gas meter belongs, wherein the set of gas meters includes at least one other smart gas meter, and the battery type of the other smart gas meters in the set is the same as the battery type of the current smart gas meter.

[0169] In one example, the aforementioned preset database also includes the identifier of the smart gas meter and the location information of the smart gas meter, such as the community to which it belongs. Based on the identifier of the smart gas meter, the community to which the smart gas meter belongs can be determined, and then based on the community, a set of gas meters belonging to that community with the same battery type as the smart gas meter can be determined.

[0170] S209. If the total number of other smart gas meters in the gas meter set is greater than or equal to a preset first quantity value, then determine the number of gas meters whose current battery voltage value is less than or equal to the actual low voltage threshold of the other smart gas meters in the gas meter set.

[0171] The purpose of this step is to determine whether the number of gas meters in the community with the same battery type as the smart gas meter has reached the preset quantity requirement (preset first quantity value). If the preset quantity requirement has been reached, it means that the requirement to perform linkage analysis on other smart gas meters in the gas meter set of the community is met.

[0172] S210. If it is determined that the number of gas meters is greater than or equal to a preset second quantity value, then generate and output a second warning message; wherein, the second warning message indicates a prompt to replace the batteries of other smart gas meters in the gas meter set.

[0173] For example, if the number of gas meters in the gas meter set whose current battery voltage is less than or equal to the actual low voltage threshold of the smart gas meter reaches a preset second number, then a second warning message can be sent to the property management personnel of the community to remind them to replace the batteries of other smart gas meters in the gas meter set, which can serve as a reminder to the user to replace the batteries of the smart gas meters again.

[0174] In this embodiment, the battery type of the smart gas meter is first determined using the gas meter data reported by the smart gas meter. Based on the battery type, the initial voltage warning value and initial objective function value of the smart gas meter are determined. Then, according to the simulated annealing algorithm, the current low voltage threshold and the actual low voltage threshold of the smart gas meter are determined. Finally, it is determined whether to issue a low voltage warning for the smart gas meter's battery. This method first uses gas meter data to confirm the accuracy of the battery type to ensure the accuracy of subsequent predictions. Then, based on the battery type of the smart gas meter, the actual low voltage threshold of the smart gas meter is obtained using the simulated annealing algorithm, making the predicted actual low voltage threshold more accurate.

[0175] Figure 4 This is a schematic diagram of the early warning device for a smart gas meter provided in this application. Figure 4 As shown, the device 30 includes:

[0176] The acquisition unit 31 is used to acquire the current battery voltage value and the battery type of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery;

[0177] The first determining unit 32 is configured to determine an initial voltage warning value for the smart gas meter based on the battery type of the smart gas meter, wherein the initial voltage warning value represents an initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and to determine an initial objective function value for the smart gas meter based on the initial voltage warning value, wherein the initial objective function value represents an objective function value for the initial low voltage threshold.

[0178] The second determining unit 33 is used to determine the current low voltage threshold of the smart gas meter based on the initial voltage warning value and the initial objective function value of the smart gas meter; and to determine the actual low voltage threshold of the smart gas meter based on the current low voltage threshold of the smart gas meter and the first preset voltage value.

[0179] The output unit 34 is used to generate and output a first warning message when it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter.

[0180] The early warning device for the smart gas meter provided in this application can execute the early warning method for the smart gas meter in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0181] Figure 5 A schematic diagram of the structure of an early warning device for another smart gas meter provided in this application. (See diagram below.) Figure 5 As shown, the device 40 includes:

[0182] The acquisition unit 41 is used to acquire the current battery voltage value and the battery type of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery;

[0183] The first determining unit 42 is configured to determine an initial voltage warning value for the smart gas meter based on the battery type of the smart gas meter, wherein the initial voltage warning value represents an initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and to determine an initial objective function value for the smart gas meter based on the initial voltage warning value, wherein the initial objective function value represents an objective function value for the initial low voltage threshold.

[0184] The second determining unit 43 is used to determine the current low voltage threshold of the smart gas meter based on the initial voltage warning value and the initial objective function value of the smart gas meter; and to determine the actual low voltage threshold of the smart gas meter based on the current low voltage threshold of the smart gas meter and the first preset voltage value.

[0185] Output unit 44 is used to generate and output a first warning message when it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter; wherein, the first warning message indicates that the user should replace the battery of the smart gas meter.

[0186] In one example, the aforementioned acquisition unit 41 includes:

[0187] The first acquisition module 411 is used to acquire the gas meter data currently reported by the smart gas meter; wherein, the gas meter data includes the current battery voltage value of the smart gas meter and the identifier of the smart gas meter;

[0188] The first determining module 412 is used to determine the battery type of the smart gas meter based on the identifier of the smart gas meter.

[0189] In one example, the first determining module 412 is specifically used to determine the battery type of the smart gas meter corresponding to the identifier of the smart gas meter according to a preset database when it is determined that the smart gas meter is not reporting gas meter data for the first time; wherein, the preset database includes the correspondence between the identifier of the smart gas meter and the battery type of the smart gas meter.

[0190] In one example, the first determining module 412 described above can also be used to predict the predicted battery type of the smart gas meter based on the current battery voltage value when it is determined that the smart gas meter is reporting gas meter data for the first time, and to determine the battery type of the smart gas meter corresponding to the identifier of the smart gas meter based on a preset database; wherein, the preset database includes the correspondence between the identifier of the smart gas meter and the battery type of the smart gas meter.

[0191] When the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the smart gas meter's identifier are consistent, the predicted battery type of the smart gas meter is determined as the battery type of the smart gas meter; when the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the smart gas meter's identifier are inconsistent, a prompt message is generated and output, wherein the prompt message indicates that the user is prompted to confirm the battery type of the smart gas meter.

[0192] In one example, the first determining module 412 described above can also be used to determine the predicted battery type of the smart gas meter as a lithium-ion gas meter when the current battery voltage value is determined to be less than or equal to a second preset voltage value; and to determine the predicted battery type of the smart gas meter as an alkaline gas meter when the current battery voltage value is determined to be greater than the second preset voltage value.

[0193] In one example, the first determining unit 42 mentioned above includes:

[0194] The second determining module 421 is used to determine a third preset voltage value as the initial voltage warning value of the smart gas meter when it is determined that the battery type of the smart gas meter is a lithium-ion gas meter and the smart gas meter is reporting gas meter data for the first time; and to determine the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter as the initial voltage warning value of the smart gas meter when it is determined that the battery type of the smart gas meter is a lithium-ion gas meter and the smart gas meter is not reporting gas meter data for the first time.

[0195] In one example, the second determining module 421 described above can also be used to determine the voltage level to which the current battery voltage value belongs based on a preset data table when it is determined that the battery type of the smart gas meter is an alkaline gas meter and the smart gas meter is reporting gas meter data for the first time; wherein, the preset data table includes the voltage value range under each voltage level, and the voltage value range includes an upper voltage limit and a lower voltage limit; and determine the initial voltage warning value of the smart gas meter according to the voltage value range under the voltage level to which the current battery voltage value belongs; when it is determined that the battery type of the smart gas meter is an alkaline gas meter and the smart gas meter is not reporting gas meter data for the first time, determine the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter as the initial voltage warning value of the smart gas meter.

[0196] In one example, the first determining unit 42 described above may further include:

[0197] The second acquisition module 422 is used to acquire a first average, a second average, and a third average; wherein, the first average represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second average represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third average represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period;

[0198] The third determining module 423 is used to determine the initial objective function value of the smart gas meter based on the first average, the second average, the third average, and the initial voltage warning value.

[0199] In one example, the initial objective function value of the smart gas meter is E0 = a*y1 + b*y2 + c*y3 - x0; where y1 is the first mean, y2 is the second mean, y3 is the third mean, and x0 is the initial voltage warning value; a, b, and c are all preset weight values, and a + b + c = 1.

[0200] In one example, the second determining unit 43 mentioned above includes:

[0201] Execution module 431 is used to repeatedly execute the following steps until a first preset condition is reached, wherein the first preset condition is that the current algorithm temperature is lower than a preset temperature, and the initial value of the current algorithm temperature is the first preset value:

[0202] The update module 432 is used to update the initial voltage warning value and the initial objective function value of the smart gas meter to obtain the updated initial voltage warning value.

[0203] The fourth determining module 433 is used to determine the current algorithm temperature multiplied by a preset cooling rate value to obtain the updated current algorithm temperature; wherein, the updated initial voltage warning value when the first preset condition is reached is the current low voltage threshold of the smart gas meter.

[0204] In one example, the above update module 432 includes:

[0205] Execution submodule 4321 is used to repeatedly execute the following steps until a second preset condition is met, wherein the second preset condition is that the value of i is greater than or equal to N, the initial value of i is 1, and i and N are both positive integers greater than or equal to 1:

[0206] The first determining submodule 4322 is used to determine a disturbance voltage value corresponding to the battery type of the smart gas meter according to the battery type of the smart gas meter; and to determine a predicted voltage warning value of the smart gas meter according to the initial voltage warning value, the disturbance voltage value and the generated random number; wherein, the predicted voltage warning value represents the low voltage threshold value obtained when predicting the low voltage threshold of the smart gas meter.

[0207] The first acquisition submodule 4323 is used to acquire a first average, a second average, and a third average; wherein, the first average represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second average represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third average represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period;

[0208] The second determining submodule 4324 is used to determine the prediction objective function value of the smart gas meter based on the first average, the second average, the third average, and the predicted voltage warning value; wherein, the prediction objective function value represents the objective function value obtained when predicting the low voltage threshold;

[0209] Processing submodule 4325 is used to subtract the initial objective function value from the predicted objective function value to obtain the difference;

[0210] The update submodule 4326 is used to update the initial voltage warning value based on the difference to obtain the updated initial voltage warning value; and to determine the value of i plus 1.

[0211] In one example, the aforementioned update submodule 4326 is specifically configured to, when determining that the difference is less than or equal to zero, determine the predicted objective function value as the updated initial objective function value and determine the predicted voltage warning value as the updated initial voltage warning value; when determining that the difference is greater than zero, generate a random probability value, and when the random probability value is less than a second preset value, determine the predicted objective function value as the updated initial objective function value and determine the predicted voltage warning value as the updated initial voltage warning value; wherein, the second preset value is a value obtained based on an exponential function with the difference divided by the current algorithm temperature as the exponent.

[0212] In one example, the above-mentioned device may further include a third determining unit 45, configured to determine the set of gas meters in the community to which the smart gas meter belongs based on the identifier of the smart gas meter, wherein the set of gas meters includes at least one other smart gas meter, and the battery type of the other smart gas meters in the set is the same as the battery type of the current smart gas meter; if the total number of other smart gas meters in the set is greater than or equal to a preset first quantity value, then determine the number of gas meters in the set whose current battery voltage value is less than or equal to the actual low voltage threshold of the other smart gas meters; if the number of gas meters is determined to be greater than or equal to a preset second quantity value, then generate and output second warning information; wherein the second warning information indicates a prompt to replace the battery of the other smart gas meters in the set.

[0213] The early warning device for the smart gas meter provided in this application can execute the early warning method for the smart gas meter in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0214] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 500 may include at least one processor 501 and a memory 502, such as a computer, tablet computer or other electronic device with processing capabilities.

[0215] Memory 502 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions. Memory 502 may include high-speed RAM or non-volatile memory.

[0216] The processor 501 is used to execute computer execution instructions stored in the memory 502 to implement the early warning method for the smart gas meter described in the foregoing method embodiments. The processor 501 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0217] The electronic device 500 may also include a communication interface 504, through which it can communicate and interact with external devices. These external devices may be, for example, electronic devices such as computers or tablets.

[0218] In practical implementation, if the communication interface 504, memory 502, and processor 501 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.

[0219] Optionally, in a specific implementation, if the communication interface 504, memory 502, and processor 501 are integrated on a single chip, then the communication interface 504, memory 502, and processor 501 can communicate through an internal interface.

[0220] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used for the early warning method of the smart gas meter in the above embodiments.

[0221] This application also provides a computer program product including executable instructions stored in a readable storage medium. At least one processor of an electronic device 500 can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the electronic device 500 to implement the early warning method for a smart gas meter provided in the various embodiments described above.

[0222] This application also provides a chip on which a computer program is stored. When the computer program is executed by the chip, it implements the early warning method for smart gas meters provided in various embodiments.

[0223] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0224] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A pre-warning method for a smart gas meter, characterized in that, The method includes: Obtain the current battery voltage value and battery type of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery; Based on the battery type of the smart gas meter, an initial voltage warning value for the smart gas meter is determined, wherein the initial voltage warning value represents an initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and based on the initial voltage warning value of the smart gas meter, an initial objective function value for the smart gas meter is determined, wherein the initial objective function value represents an objective function value for the initial low voltage threshold. Based on the initial voltage warning value and the initial objective function value of the smart gas meter, the current low voltage threshold of the smart gas meter is determined; and based on the current low voltage threshold of the smart gas meter and the first preset voltage value, the actual low voltage threshold of the smart gas meter is determined. If it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter, then a first warning message is generated and output. The step of determining the initial objective function value of the smart gas meter based on the initial voltage warning value of the smart gas meter includes: Obtain a first mean, a second mean, and a third mean; wherein, the first mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period; The initial objective function value of the smart gas meter is determined based on the first mean, the second mean, the third mean, and the initial voltage warning value.

2. The method according to claim 1, characterized in that, Obtain the current battery voltage value and battery type of the smart gas meter, including: Obtain the gas meter data currently reported by the smart gas meter; wherein, the gas meter data includes the current battery voltage value of the smart gas meter and the identifier of the smart gas meter; The battery type of the smart gas meter is determined based on its identifier.

3. The method according to claim 2, characterized in that, Based on the identifier of the smart gas meter, the battery type of the smart gas meter is determined, including: If it is determined that the smart gas meter is not reporting gas meter data for the first time, then the battery type of the smart gas meter corresponding to the smart gas meter's identifier is determined according to a preset database; wherein, the preset database includes the correspondence between the smart gas meter's identifier and the smart gas meter's battery type.

4. The method according to claim 3, characterized in that, The method further includes: If it is determined that the smart gas meter is reporting gas meter data for the first time, then based on the current battery voltage value, the predicted battery type of the smart gas meter is predicted, and based on a preset database, the battery type of the smart gas meter corresponding to the identifier of the smart gas meter is determined; wherein, the preset database includes the correspondence between the identifier of the smart gas meter and the battery type of the smart gas meter. If the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the identifier of the smart gas meter are consistent, then the predicted battery type of the smart gas meter is determined to be the battery type of the smart gas meter. If the predicted battery type of the smart gas meter and the battery type of the smart gas meter corresponding to the smart gas meter's identifier are inconsistent, a prompt message is generated and output, wherein the prompt message indicates that the user should confirm the battery type of the smart gas meter.

5. The method according to claim 4, characterized in that, Based on the current battery voltage value, the predicted battery type of the smart gas meter is determined, including: If it is determined that the current battery voltage value is less than or equal to the second preset voltage value, then the predicted battery type of the smart gas meter is determined to be a lithium battery gas meter. If the current battery voltage value is determined to be greater than the second preset voltage value, then the predicted battery type of the smart gas meter is determined to be an alkaline gas meter.

6. The method according to claim 2, characterized in that, Based on the battery type of the smart gas meter, the initial voltage warning value of the smart gas meter is determined, including: If it is determined that the battery type of the smart gas meter is a lithium-ion gas meter and the smart gas meter is reporting gas meter data for the first time, then a third preset voltage value is determined as the initial voltage warning value of the smart gas meter. If it is determined that the battery type of the smart gas meter is a lithium-ion gas meter, and the smart gas meter is not reporting gas meter data for the first time, then the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter is determined as the initial voltage warning value of the smart gas meter.

7. The method according to claim 6, characterized in that, The method further includes: If it is determined that the battery type of the smart gas meter is an alkaline gas meter, and the smart gas meter is reporting gas meter data for the first time, then based on a preset data table, the voltage level to which the current battery voltage value belongs is determined; wherein, the preset data table includes the voltage value range under each voltage level, and the voltage value range includes an upper voltage limit and a lower voltage limit; and based on the voltage value range under the voltage level to which the current battery voltage value belongs, the initial voltage warning value of the smart gas meter is determined; If it is determined that the battery type of the smart gas meter is an alkaline gas meter, and the smart gas meter is not reporting gas meter data for the first time, then the actual low voltage threshold obtained based on the gas meter data previously reported by the smart gas meter is determined as the initial voltage warning value of the smart gas meter.

8. The method according to claim 1, characterized in that, The initial objective function value of the smart gas meter is The first mean, The second mean, The third mean, Initial voltage warning value; a, b, and c are all preset weight values, and a+b+c=1.

9. The method according to any one of claims 1-8, characterized in that, Based on the initial voltage warning value and initial objective function value of the smart gas meter, the current low voltage threshold of the smart gas meter is determined, including: Repeat the following steps until a first preset condition is met, wherein the first preset condition is that the current algorithm temperature is lower than a preset temperature, and the initial value of the current algorithm temperature is the first preset value: The initial voltage warning value and the initial objective function value of the smart gas meter are updated to obtain the updated initial voltage warning value; The current algorithm temperature is determined by multiplying the current algorithm temperature by a preset cooling rate value, which is then used to obtain the updated current algorithm temperature. The updated initial voltage warning value when the first preset condition is met is the current low voltage threshold of the smart gas meter.

10. The method according to claim 9, characterized in that, The initial voltage warning value and initial objective function value of the smart gas meter are updated to obtain the updated initial voltage warning value, including: Repeat the following steps until the second preset condition is met, where the value of i is greater than or equal to N, the initial value of i is 1, and i and N are both positive integers greater than or equal to 1: Based on the battery type of the smart gas meter, a disturbance voltage value corresponding to the battery type of the smart gas meter is determined; and based on the initial voltage warning value, the disturbance voltage value, and the generated random number, a predicted voltage warning value of the smart gas meter is determined; wherein, the predicted voltage warning value represents the low voltage threshold value obtained when predicting the low voltage threshold of the smart gas meter; Obtain a first mean, a second mean, and a third mean; wherein, the first mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period; The predictive objective function value of the smart gas meter is determined based on the first mean, the second mean, the third mean, and the predicted voltage warning value; wherein, the predictive objective function value represents the objective function value obtained when predicting the low voltage threshold; Subtracting the initial objective function value from the predicted objective function value yields the difference. Based on the difference, the initial voltage warning value is updated to obtain the updated initial voltage warning value; and the value of i is determined to be incremented by 1.

11. The method according to claim 10, characterized in that, Based on the difference, the initial voltage warning value is updated to obtain the updated initial voltage warning value, including: If the difference is determined to be less than or equal to zero, then the predicted objective function value is determined as the updated initial objective function value, and the predicted voltage warning value is determined as the updated initial voltage warning value. If the difference is determined to be greater than zero, a random probability value is generated. When the random probability value is less than a second preset value, the predicted objective function value is determined as the updated initial objective function value, and the predicted voltage warning value is determined as the updated initial voltage warning value. The second preset value is a value obtained by an exponential function based on the value obtained by dividing the difference by the current algorithm temperature.

12. The method according to any one of claims 1-8, characterized in that, The method further includes: Based on the identifier of the smart gas meter, determine the set of gas meters in the community to which the smart gas meter belongs, wherein the set of gas meters includes at least one other smart gas meter, and the battery type of the other smart gas meters in the set of gas meters is the same as the battery type of the current smart gas meter. If the total number of other smart gas meters in the gas meter set is greater than or equal to a preset first quantity value, then determine the number of gas meters whose current battery voltage value is less than or equal to the actual low voltage threshold of the other smart gas meters in the gas meter set. If it is determined that the number of gas meters is greater than or equal to a preset second quantity value, a second warning message is generated and output; wherein, the second warning message indicates a prompt to replace the batteries of other smart gas meters in the gas meter set.

13. A warning device for a smart gas meter, characterized in that, The device includes: The acquisition unit is used to acquire the current battery voltage value and the battery type of the smart gas meter; the current battery voltage value is the actual voltage value of the smart gas meter battery; The first determining unit is configured to determine an initial voltage warning value for the smart gas meter based on the battery type of the smart gas meter, wherein the initial voltage warning value represents an initial low voltage threshold for issuing a warning to the battery of the smart gas meter; and to determine an initial objective function value for the smart gas meter based on the initial voltage warning value, wherein the initial objective function value represents an objective function value for the initial low voltage threshold. The second determining unit is used to determine the current low voltage threshold of the smart gas meter based on the initial voltage warning value and the initial objective function value of the smart gas meter; and to determine the actual low voltage threshold of the smart gas meter based on the current low voltage threshold of the smart gas meter and the first preset voltage value. The output unit is used to generate and output a first warning message when it is determined that the current battery voltage value of the smart gas meter is less than or equal to the actual low voltage threshold of the smart gas meter. The step of determining the initial objective function value of the smart gas meter based on the initial voltage warning value of the smart gas meter includes: Obtain a first mean, a second mean, and a third mean; wherein, the first mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a first preset time period; the second mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a second preset time period; the third mean represents the average actual low voltage threshold of other smart gas meters with the same battery type as the smart gas meter within a third preset time period; the time of the third preset time period is earlier than the time of the second preset time period, and the time of the second preset time period is earlier than the time of the first preset time period; The initial objective function value of the smart gas meter is determined based on the first mean, the second mean, the third mean, and the initial voltage warning value.

14. An electronic device, characterized in that, The electronic device includes: a processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the early warning method for the smart gas meter as described in any one of claims 1-12.