Gas meter control method, system, gas meter, alarm and user equipment
By using wireless communication between the gas meter and the alarm, and by having the alarm forward control commands and results, the problem of delayed control commands from the gas meter is solved, thus improving the processing efficiency of gas services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GOLDCARD HIGH TECH
- Filing Date
- 2021-12-31
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, gas meters experience delays in receiving control commands, which affects the efficiency of gas service processing.
The alarm forwards control commands generated by the user equipment to the gas meter and executes the target operation in a low-power state, or sends the execution result through the alarm in a low-power state, or sends the result after waking up the gas meter to the online state.
This enables gas meters to execute control commands promptly even in low-power conditions, improving the efficiency of gas service processing.
Smart Images

Figure CN116412869B_ABST
Abstract
Description
Technical Field
[0001] This application relates to Internet of Things (IoT) technology, and more particularly to a gas meter control method, system, gas meter, alarm, and user equipment. Background Technology
[0002] The internet enables communication between gas meters in users' homes and the gas service system. During routine use, gas company personnel can send control commands to the gas meter via user devices. The gas meter then executes the desired operation based on the control commands and reports the execution results to the gas service platform.
[0003] Currently, most gas meters are battery-powered. To extend battery life, gas meters are typically in a dormant state, only actively establishing a communication connection with the gas service platform when the scheduled time arrives. Before the scheduled time arrives, if the terminal device needs to send a control command to the gas meter, the control command is first cached in the gas service platform. When the scheduled time arrives, the control command is then sent to the gas meter to control it.
[0004] However, in existing technologies, gas meters experience delays in receiving control commands, which affects the efficiency of gas service processing. Summary of the Invention
[0005] This application provides a gas meter control method, system, gas meter, alarm, and user equipment to solve the problem in the prior art where the gas meter's reception of control commands is delayed, thus affecting the efficiency of gas service processing.
[0006] In a first aspect, this application provides a gas meter control method applied to a gas meter, wherein the gas meter is communicatively connected to an alarm. The method includes: receiving a control command sent by a user equipment through the alarm; the control command being used to control the gas meter to perform a target operation; performing the target operation according to the control command; switching from a low-power state to an online state and sending the execution result of the target operation to the user equipment, or, in the low-power state, sending the execution result of the target operation to the user equipment through the alarm.
[0007] Secondly, this application provides a gas meter control method applied to an alarm, wherein the gas meter is communicatively connected to the alarm, and the alarm is communicatively connected to a user equipment. The method includes: receiving a control command sent by a user through the user equipment; the control command being used to control the gas meter to perform a target operation; and forwarding the control command to the gas meter to control the gas meter to perform the target operation.
[0008] Thirdly, this application provides a gas meter control method applied to user equipment. The method includes: generating a control command; the control command being used to control the gas meter to perform a target operation; determining whether the gas meter is online; and if the gas meter is not online, forwarding the control command to the gas meter via an alarm.
[0009] Fourthly, this application provides a gas meter control system, including: a gas meter, an alarm, and a user equipment; the user equipment is communicatively connected to the alarm and is used to acquire control commands input by a user through the user equipment and send them to the alarm; the control commands are used to control the gas meter to perform a target operation; the alarm is communicatively connected to the gas meter and is used to receive the control commands sent by the user equipment and forward them to the gas meter; the gas meter is used to execute the target operation according to the control commands, and switch from a low-power state to an online state, and send the execution result of the target operation to the user equipment, or, in a low-power state, send the execution result of the target operation to the user equipment through the alarm.
[0010] Fifthly, this application provides a gas meter, including: a transceiver, a processor, and a memory communicatively connected to the processor;
[0011] The transceiver is used for communication connection with the alarm;
[0012] The memory stores computer-executed instructions;
[0013] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.
[0014] Sixthly, this application provides an alarm device, including: a transceiver, a processor, and a memory communicatively connected to the processor;
[0015] The transceiver is used for communication connection with the gas meter;
[0016] The memory stores computer-executed instructions;
[0017] The processor executes computer execution instructions stored in the memory to implement the method as described in the second aspect.
[0018] In a seventh aspect, this application provides a user equipment, including: a transceiver, a processor, and a memory communicatively connected to the processor;
[0019] The transceiver is used for communication connection with the alarm;
[0020] The memory stores computer-executed instructions;
[0021] The processor executes computer execution instructions stored in the memory to implement the method as described in the third aspect.
[0022] Eighthly, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the methods described in the first, second, or third aspects.
[0023] Ninthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in the first, second, or third aspects.
[0024] The gas meter control method, system, gas meter, alarm, and user equipment provided in this application forward control commands generated by the user equipment to the gas meter via the alarm. This causes the gas meter to execute the target operation indicated by the control command, switch from a low-power state to an online state, and send the execution result of the target operation to the user equipment. Alternatively, in a low-power state, the execution result of the target operation can be sent to the user equipment via the alarm. Since when the gas meter is not in an online state, the control command is forwarded to the gas meter via the alarm to control the gas meter to execute the target operation and switch from a low-power state to an online state, sending the execution result of the target operation to the user equipment, or in a low-power state, sending the execution result of the target operation to the user equipment via the alarm, this method can achieve the effect of timely execution of control commands by the gas meter even when it is in a low-power state, thereby improving the efficiency of gas service processing. Attached Figure Description
[0025] 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.
[0026] Figure 1 A schematic diagram of a gas meter control system provided for the prior art;
[0027] Figure 2 This is a schematic diagram of the structure of a gas meter control system provided in an embodiment of this application;
[0028] Figure 3 An interactive schematic diagram of a gas meter control method provided in an embodiment of this application;
[0029] Figure 4 This is a control logic block diagram of a gas meter provided in an embodiment of this application;
[0030] Figure 5 An interactive schematic diagram of another gas meter control method provided in an embodiment of this application;
[0031] Figure 6 An interactive schematic diagram of another gas meter control method provided in an embodiment of this application;
[0032] Figure 7 A schematic diagram of the state of the wireless communication module of the gas meter provided in an embodiment of this application;
[0033] Figure 8 An example diagram illustrating a wireless communication connection between a gas meter and an alarm, provided in an embodiment of this application.
[0034] Figure 9 An example diagram illustrating the wireless communication connection between the alarm and the gas meter provided in this application embodiment;
[0035] Figure 10 This is a schematic diagram of the structure of a gas meter control device provided in an embodiment of this application;
[0036] Figure 11 This is a schematic diagram of another gas meter control device provided in an embodiment of this application;
[0037] Figure 12 A schematic diagram of another gas meter control device provided in this application;
[0038] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0039] The accompanying drawings illustrate 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 concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0040] 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.
[0041] Figure 1 A schematic diagram of a gas meter control system provided by the prior art. (Example) Figure 1 As shown, the gas meter control system includes: a gas meter 11, an alarm 12, and user equipment 13;
[0042] The gas meter 11 and the alarm 12 are connected by a wire.
[0043] Optionally, user device 13 includes smartphones, tablets, desktop computers, and laptops.
[0044] Users can access the gas service platform through the webpage provided by user device 13, and generate control commands and view gas service data through user device 13.
[0045] The alarm 12 is wired to communicate with the gas meter 11, and the alarm 12 is powered by municipal electricity. When the alarm detects a gas leak in the gas meter 11, it sends a gas leak alarm message to the gas meter 11, which then closes the valve and sounds an alarm.
[0046] The gas meter switches from a low-power state to an online state at a fixed time every day, that is, it establishes a communication connection with the user equipment 13, acquires target data according to preset rules and actively reports the target data to the user equipment 13, or receives control commands sent by the user equipment, executes target operations according to the control commands, and sends the execution results of the target operations to the user equipment 13.
[0047] When a user sends a control command to a gas meter through their user equipment, the system first checks if the gas meter is online. If the gas meter is offline, the control command is initially buffered in the user equipment. It is only sent to the gas meter at its designated reporting time. The frequency of these reporting events could be hourly or monthly. This results in a delay in the control command process, impacting the efficiency of gas service processing.
[0048] In addition, if the gas meter needs to communicate with the user's equipment in real time, the user needs to manually operate the buttons on the gas meter to wake it up and enable the gas meter to actively establish communication with the user's equipment. This will cause inconvenience to the user.
[0049] To address the aforementioned technical problems, this application proposes the following technical concept: When a user sends a control command to a gas meter through a user device, and the gas meter is not online, the control command will be forwarded to the gas meter through an alarm to control the gas meter to execute the target operation according to the control command and switch from a low-power state to an online state, sending the execution result of the target operation to the gas service platform; or, in a low-power state, the execution result of the target operation will be sent to the gas service platform through an alarm.
[0050] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These 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 now be described with reference to the accompanying drawings.
[0051] Figure 2 This is a schematic diagram of a gas meter control system provided in an embodiment of this application. Figure 2 As shown, the gas meter control system includes: a gas meter 21, an alarm 22, a first user equipment 23, and a second user equipment 24.
[0052] In this system, after the gas meter 21 switches from a low-power state to an online state, it communicates with the first user equipment 23 and the second user equipment 24 via Narrow Band Internet of Things (NB-IoT). The alarm 22 communicates with both the first user equipment 23 and the second user equipment 24 via NB-IoT. Optionally, the gas meter 21 and the alarm 22 can be connected via a wired or wireless connection. If the connection is wireless, it can be via Bluetooth or 433MHz wireless communication.
[0053] Optionally, the first user equipment 23 includes smartphones, tablets, desktop computers, and laptops, etc. The second user equipment 24 includes smartphones, tablets, desktop computers, and laptops, etc. The first user equipment 23 can be the first user, such as the user equipment where a gas company's sales personnel are located, and the second user equipment 24 can be the second user, such as the user equipment where a gas user is located. Of course, the first user equipment 23 can also be the user equipment where a second user is located, and the second user equipment 24 can also be the user equipment where a first user is located.
[0054] Taking user equipment 23 as the user equipment of the first user and user equipment 24 as the user equipment of the second user, the first user can access the gas service platform through web pages, mini-programs, and applications (Apps) provided by user equipment 23. Similarly, the second user can access the gas company's gas service system through web pages, mini-programs, and applications (Apps) provided by user equipment 24. The first user can send control commands to the gas meter through user equipment 23, and the second user can also send control commands to the gas meter through user equipment 24.
[0055] Optionally, the first user can also send control commands to the alarm through their first user equipment, and the second user can also send control commands to the alarm through their second user equipment. For example, sending a silencing command to the alarm to control it to silence it, or sending a parameter threshold adjustment control command to the alarm to control it to modify parameter thresholds, such as the gas concentration threshold.
[0056] In addition, the first user can view the location of all networked alarms and gas meters on the map through their device, as well as gas concentration information around each gas meter, data reported by each gas meter to the gas service platform, and data reported by each alarm to the gas service platform. The second user can view the location of their corresponding alarm and gas meter on the map through their device, as well as gas concentration information around their corresponding gas meter, data reported by their corresponding gas meter to the gas service platform, and data reported by their corresponding alarm to the gas service platform.
[0057] When the alarm detects a gas leak, it can send an alarm message to the gas meter, causing the meter to shut off the gas valve to prevent accidents caused by the leak. For example, the alarm can send the valve-closing alarm message to the gas meter via wired voltage changes or wireless alarm data.
[0058] Due to the special nature of the alarm 22, the alarm 22 is powered by municipal power and is configured to maintain a constant connection with the user equipment, that is, to maintain a communication connection with the user equipment for a long time.
[0059] based on Figure 2 This application proposes a gas meter control method for a gas meter control system. Figure 3 This is an interactive schematic diagram of the gas meter control method provided in an embodiment of this application. Figure 3 As shown, the gas meter control method includes the following steps:
[0060] S301. The user equipment generates a control command, which is used to control the gas meter to perform the target operation.
[0061] Please continue reading. Figure 2 In one optional implementation, step S301 includes: a first user generating a first control command through a first user equipment, and / or a second user generating a second control command through a second user equipment.
[0062] Optionally, the target operation includes at least one of the following: gas meter data acquisition, gas meter data update, gas meter anomaly detection, and gas meter control parameter update. The target operation is explained in detail below with some specific scenarios:
[0063] Gas meters typically display the current gas usage and remaining gas supply. Data acquisition from the gas meter includes retrieving gas usage. The execution result of this target operation is then sent to the user's device, either by sending the gas usage data directly to the user's device or through an alarm. It should be understood that sending the gas usage data to the user's device can be interpreted as sending it to the gas service platform, through which the user accesses the platform to obtain their gas usage information.
[0064] Gas meter data updates include: the gas service platform determines the target remaining gas volume for the gas meter based on the current gas usage reported by the meter and the pre-stored total gas volume corresponding to the meter, and sends the target remaining gas volume to the gas meter or via an alarm. The gas meter updates its remaining gas volume based on the target remaining gas volume. Users can access the gas service platform through their user devices to obtain the remaining gas volume of their gas meters.
[0065] Anomaly detection of gas meters includes: obtaining anomaly detection results for preset functions of the gas meter and sending these results to the user's device, or sending these results to the user's device via an alarm. It should be noted that sending the anomaly detection results to the user's device here can be understood as sending the results to the gas service platform, allowing the user to access the platform through their device and thus obtain the anomaly detection results.
[0066] The gas meter control parameter update process includes: the gas service platform receiving modified control parameters sent by the user through their user equipment, and then updating the gas meter's control parameters accordingly. The user obtains the modified control parameters by accessing the gas service platform through their user equipment.
[0067] Taking the first user generating control commands through the first user device as an example, the first user accesses the gas business platform through web pages, mini programs, APPs, etc. on the first user device. Then, the graphical user interface of the first user device will display multiple control functions. The user can trigger at least one control function by triggering an operation, thereby generating control commands.
[0068] For example, the graphical user interface of the first user equipment displays selection controls for data reporting, gas meter data updates, gas meter anomaly detection, and gas meter control parameter updates. When the user selects any control, such as the data reporting selection control, the first user equipment can generate control commands.
[0069] S302. The user equipment determines whether the gas meter is online.
[0070] Specifically, user equipment can obtain information from the gas service platform regarding whether the gas meter is online.
[0071] S303. If the user equipment determines that the gas meter is not online, it sends a control command to the alarm.
[0072] When the gas meter is not online, it can be understood as being in a low-power state. In this state, the gas meter performs operations with lower power consumption and avoids those with higher power consumption. High and low power consumption can be determined based on power consumption thresholds. For example, operations with power consumption greater than or equal to a threshold are considered high-power operations, while operations with power consumption less than the threshold are considered low-power operations.
[0073] In low-power mode, the gas meter does not initiate communication with the user's equipment; that is, the gas meter cannot communicate with the user's equipment. If the gas meter needs to communicate with the user's equipment, it needs to switch from low-power mode to online mode to communicate with the user's equipment.
[0074] In one alternative implementation, if the gas meter is online, the user equipment can directly send control commands to the gas meter.
[0075] S304 The alarm receives control commands sent by the user equipment.
[0076] The alarm and user equipment are in a constant connection state, meaning they are always in communication. Therefore, the user can send control commands to the alarm at any time through the user equipment.
[0077] S305 The alarm forwards the control command to the gas meter to control the gas meter to perform the target operation.
[0078] In one optional implementation, a control command is used to wake up the gas meter, causing it to switch from a low-power state to an online state, execute a target operation, and send the execution result of the target operation to the user equipment. In this implementation, the gas meter needs to activate its communication function to send the execution result of the target operation to the user equipment.
[0079] In another optional implementation, the control command is used to control the gas meter to perform a target operation and send the execution result of the target operation to the alarm, which then forwards the execution result to the user equipment. In this implementation, the gas meter does not need to activate its communication function; that is, the gas meter remains in a low-power state. The gas meter performs the target operation in this low-power state and sends the execution result of the target operation to the user equipment via the alarm.
[0080] S306, Gas meter receives control commands.
[0081] S307. The gas meter executes the target operation according to the control command.
[0082] S308. The gas meter switches from a low-power state to an online state and sends the execution result of the target operation to the user equipment. Alternatively, when the gas meter is in a low-power state, it sends the execution result of the target operation to the user equipment through the alarm.
[0083] Figure 4 This is a control logic block diagram of a gas meter provided in an embodiment of this application. The gas meter includes a communication module 41 and a control module 42. When the gas meter is in a low-power state, the control module 42 performs operations with low power consumption. When the communication module 41 receives a control command, it forwards the command to the control module 42. The control module 42 executes the target operation according to the command and forwards the execution result to the alarm via the communication module 41. The alarm then sends the execution result to the user equipment. At this time, the control module 42 can continue to maintain a low-power state and does not need to switch from a low-power state to an online state.
[0084] Alternatively, when communication module 41 receives a control command, it forwards the command to control module 42. Control module 42 executes the target operation according to the control command and switches from a low-power state to an online state. Furthermore, control module 42 communicates with user equipment via communication module 41 and sends the execution result of the target operation to user equipment.
[0085] In this embodiment, the gas meter can send the execution result of the target operation to the gas service platform through the following two optional implementation methods. Specifically:
[0086] Figure 5 This is an interactive schematic diagram of another gas meter control method provided in an embodiment of this application. (See attached diagram.) Figure 5 As shown, after step S307, the gas meter control method further includes the following steps:
[0087] S501, The gas meter sends the execution result of the target operation to the alarm;
[0088] S502, The alarm receives the execution result of the target operation returned by the gas meter;
[0089] S503, The alarm sends the execution result of the target operation to the user equipment;
[0090] S504. The user equipment receives the execution result of the target operation.
[0091] In this implementation, the gas meter sends the execution result of the target operation to the user equipment via an alarm.
[0092] Figure 6 This is an interactive schematic diagram of another gas meter control method provided in an embodiment of this application. For example... Figure 6 As shown, after step S307, the gas meter control method further includes the following steps:
[0093] S601, The gas meter sends the execution result of the target operation to the user equipment;
[0094] S602, The user equipment receives the execution result of the target operation.
[0095] This implementation method is... Figure 3 Based on the illustrated embodiment, the gas meter directly returns the execution result of the target operation to the gas service platform. Compared to the first optional implementation, the second optional implementation does not require the alarm to relay the execution result of the target operation; therefore, the execution result of the target operation has a lower latency in the second optional implementation.
[0096] This embodiment forwards control commands generated by the user equipment to the gas meter via an alarm, executing the target operation indicated by the control commands. It then switches from a low-power state to an online state, sending the execution result of the target operation back to the user equipment, or sending the execution result of the target operation back to the user equipment via the alarm. Since the gas meter forwards control commands to the gas meter via the alarm when it is in a low-power state, waking it up to send the execution result of the target operation to the gas service platform, or switches from a low-power state to an online state and sends the execution result of the target operation to the user equipment, this embodiment ensures that the gas meter can execute control commands promptly even when it is in a low-power state, thereby improving the efficiency of gas service processing.
[0097] In existing technology, when an alarm is detected, it alerts the user via a buzzer or indicator light. However, if the user is not near the gas meter, the alarm information cannot be obtained in real time, and appropriate safety measures cannot be taken on-site promptly. The alarm is connected to the gas meter via a wired connection. If the wiring is broken or the contact is poor, the alarm cannot detect the disconnection, potentially preventing it from transmitting alarm information to the gas meter in time to perform actions such as shutting off the valve, thus creating a safety hazard.
[0098] In addition, the gas meter needs to respond quickly to the alarm's commands, which requires the gas meter and the alarm to be in a constant connection state. If the communication module connecting the gas meter and the alarm malfunctions, the alarm will continue to send commands to the gas meter, and the gas meter will be in a state of continuously receiving commands, which will cause the gas meter to be in a high power consumption state and consume power quickly.
[0099] Therefore, in order to reduce the power consumption of gas meters and the incidence of safety accidents, this application establishes a wireless communication connection between the gas meter and the alarm for gas control. The following section details the scheme for establishing a wireless communication connection between the gas meter and the alarm for gas control.
[0100] Please continue reading. Figure 2 Based on the wireless communication between the gas meter 21 and the alarm 22, this embodiment also includes the following optional implementation methods:
[0101] In a first optional embodiment, when the gas meter 21 and the alarm 22 are connected wirelessly, the method of this embodiment further includes:
[0102] Step a1: Check whether the wireless communication connection between the gas meter and the alarm is disconnected.
[0103] Specifically, step a1 includes: the gas meter sending a heartbeat packet to the alarm; the gas meter determining whether it has received a response data packet for the heartbeat packet; if the gas meter receives a response data packet for the heartbeat packet, it determines that the wireless communication connection with the alarm has not been disconnected; if the gas meter does not receive a response data packet for the heartbeat packet, it determines that the wireless communication connection with the alarm has been disconnected.
[0104] Step a2: If the gas meter detects that the wireless communication connection with the alarm has been lost, it will re-establish the wireless communication connection with the alarm.
[0105] Specifically, the gas meter resends a wireless communication connection request to the alarm to re-establish a wireless communication connection with the alarm.
[0106] Step a3: If the gas meter determines that the number of failed attempts to reconnect to the wireless communication exceeds the preset number, it will report a message indicating that the wireless communication connection with the alarm has failed.
[0107] This embodiment detects whether the wireless communication connection with the alarm is broken. If a break is detected, a reconnection is attempted. If the number of failed reconnection attempts exceeds a preset limit, a notification of a failed wireless communication connection is sent. This solves the problem of users not being able to promptly detect a wired connection failure when the gas meter and alarm are connected via wired connection. Furthermore, it avoids situations where the gas meter fails to reconnect to the alarm for an extended period, preventing the gas meter from receiving control commands forwarded by the alarm and causing a delay in gas meter control.
[0108] The following is a specific example to illustrate the wireless communication module of a gas meter:
[0109] Figure 7 This is a schematic diagram illustrating the state of the wireless communication module of the gas meter provided in an embodiment of this application. For example... Figure 7 As shown, the operating states of the gas meter's wireless communication module include: off state (initial state), broadcast state, low-power broadcast state, communication interaction state, low-power communication interaction state, and disconnected state (power off). The low-power broadcast state refers to the gas meter sending broadcast messages to search for pairable alarms while in a low-power state. The low-power interaction state refers to the gas meter interacting with the alarm while in a low-power state. A specific example will be used below to illustrate this. Figure 7 Explanation:
[0110] S701. When the wireless communication module of the gas meter is in the off state, i.e. the initialization state, and the wireless communication module of the gas meter does not store the identifier of the pairable alarm, it enters the broadcast state and sends broadcast information when it receives a start request, such as a power-on request.
[0111] S702 If the preset time is exceeded, for example, pairing is unsuccessful after 2 minutes, it will enter a low-power broadcast state and wake up to restart every hour.
[0112] Specifically, in low-power broadcast mode, hourly wake-up restart refers to waking up the wireless communication module and retransmitting the matching information.
[0113] S703. If pairing is successful within a preset time, then enter a low-power communication interaction state.
[0114] S704. If a shutdown request is received in broadcast mode or low-power communication interaction mode, a shutdown operation is performed and the device enters the shutdown state.
[0115] S705. If a command to restart broadcast is received during low-power communication interaction, then the broadcast state is entered.
[0116] S706. If a single communication interaction exceeds a preset time, such as 30 seconds, during the communication interaction state, then the system enters a low-power communication interaction state.
[0117] S707. If a wake-up command is received during low-power communication interaction, the communication interaction state is entered.
[0118] S708. If a disconnect command is received from the alarm during communication interaction, or during low-power broadcast, or during low-power communication interaction, or if the gas meter is powered off, the connection with the alarm is disconnected and the system enters a disconnected state, and the alarm's identifier is saved; or if the gas meter is powered off during broadcast, the system enters a disconnected state.
[0119] S709. If a disconnect command is received during communication interaction, the connection with the alarm will be disconnected and the device will enter the off state.
[0120] S710: If a button disconnect command is received in low-power broadcast mode and the wireless device name information is updated, it will enter the off state.
[0121] Figure 7 The solution can be summarized as follows: When the gas meter is in a low-power state, such as a low-power communication interaction state or a low-power broadcast state, it can be woken up by an external alarm via wireless connection to perform data interaction. After the data interaction is completed, it enters the broadcast state and detects whether the wireless communication is connected by sending heartbeat packets. If the gas meter needs to replace the external wireless communication device, the current wireless connection can be disconnected, the device information cleared, and the new device reconnected by pressing the button on the gas meter.
[0122] In a second optional embodiment, when the gas meter 21 and the alarm 22 are connected wirelessly, the method of this embodiment further includes:
[0123] Step b1: Check whether the wireless communication connection between the alarm and the gas meter is disconnected.
[0124] Specifically, step b1 includes: the alarm sending a heartbeat packet to the gas meter; the alarm determining whether it has received a response data packet for the heartbeat packet; if the alarm receives a response data packet for the heartbeat packet, it determines that the wireless communication connection with the gas meter is not broken; if the alarm does not receive a response data packet for the heartbeat packet, it determines that the wireless communication connection with the gas meter is broken.
[0125] Step b2: If the alarm detects that the wireless communication connection with the gas meter has been lost, it will re-establish the wireless communication connection with the gas meter.
[0126] Specifically, the alarm resends a wireless communication connection request to the gas meter to re-establish a wireless communication connection with the gas meter.
[0127] Step b3: If the alarm determines that the number of failed attempts to reconnect to the wireless communication exceeds a preset number, it will report a message indicating that the wireless communication connection with the alarm has failed.
[0128] This embodiment detects whether the wireless communication connection with the gas meter is broken. If a break is detected, a new wireless communication connection is established. If the number of failed attempts to reconnect exceeds a preset limit, a notification of a failed wireless communication connection is sent. This solves the problem of users not being able to promptly detect a wired connection failure when the gas meter and alarm are connected via wired connection. Furthermore, it avoids situations where the gas meter fails to receive control commands from the alarm for an extended period, resulting in delayed control of the gas meter.
[0129] In a third optional implementation, when the gas meter 21 and the alarm 22 are connected wirelessly, the method of this embodiment further includes:
[0130] Step c1: Detect the current of the wireless communication module in the gas meter.
[0131] The execution subject in this embodiment is a gas meter.
[0132] Step c2: If the current of the wireless communication module in the gas meter is greater than the preset current threshold, then report a message indicating that the wireless communication module of the gas meter is malfunctioning.
[0133] Step c3: If the current of the wireless communication module in the gas meter is less than or equal to the preset current threshold, then the wireless communication module of the gas meter is determined to be normal.
[0134] This embodiment detects the current of the wireless communication module in the gas meter. If the current of the wireless communication module in the gas meter is greater than a preset current threshold, it reports an abnormality in the wireless communication module of the gas meter. This can promptly detect abnormal power consumption of the wireless communication module on the gas meter, thereby solving the problem of excessive power consumption of the gas meter and affecting battery life when the wireless communication module malfunctions.
[0135] In a fourth optional embodiment, when the gas meter 21 and the alarm 22 are connected wirelessly, the method of this embodiment further includes:
[0136] Step d1: The gas meter receives a command to disconnect the wireless communication connection with the alarm.
[0137] Step d2: Disconnect the gas meter from the alarm wireless communication and search for a new target alarm to be paired.
[0138] Step d3: The gas meter establishes a wireless communication connection with the paired target alarm.
[0139] Figure 8 This is an example diagram illustrating a wireless communication connection between a gas meter and an alarm, as provided in an embodiment of this application. Figure 8 As shown, this example includes:
[0140] S801. After the gas meter is turned on, the gas meter will set its status to the "on" state.
[0141] S802. When the gas meter is powered on, it can actively search for alarms and wirelessly connect to the found alarms, and update the gas meter's status to "connection in progress".
[0142] S803. If the gas meter cannot find an alarm or fails to connect to a found alarm within a preset time while in connection mode, an alarm signal for connection failure will be issued via indicator light or buzzer.
[0143] S804. If the gas meter finds and successfully connects to the alarm while in the connection process, the gas meter's status is updated to the connection successful state, and it interacts with the alarm in real time.
[0144] S805. If the gas meter receives a command to clear the connection while it is in the successfully connected state, the gas meter's status is updated to the clear connection state, the connection information of the currently connected alarm is cleared, the gas meter's status is updated to the connection in progress state, and the process returns to step S802.
[0145] In the fifth optional embodiment, when the gas meter 21 and the alarm 22 are connected wirelessly, the method of this embodiment further includes:
[0146] Step e1: The alarm receives a command to disconnect the wireless communication connection with the gas meter.
[0147] Step e2: The alarm disconnects from the gas meter via wireless communication and searches for a new target gas meter to be paired.
[0148] Step e3: The alarm establishes a wireless communication connection with the target gas meter that can be paired.
[0149] Figure 8 The illustrated embodiment is also applicable to alarms. Specifically, Figure 9 This is an example diagram illustrating the wireless communication connection between the alarm and the gas meter provided in this application embodiment. Figure 9 As shown, this example includes:
[0150] S901. After the alarm is powered on, the alarm will set its own status to the powered-on state.
[0151] S902. When the alarm is powered on, it can actively search for gas meters and wirelessly connect to the found gas meters, and update the alarm status to "connection in progress".
[0152] S903. If the alarm fails to find a gas meter or fails to connect successfully to a found gas meter within a preset time while in connection mode, it will issue a connection failure alarm signal via indicator light or buzzer.
[0153] S904. If the alarm finds and successfully connects to the gas meter while in the connection process state, the alarm status is updated to the connection successful state, and real-time interaction with the gas meter is performed.
[0154] S905. If the alarm receives a command to clear the connection while it is in the successfully connected state, the alarm's state is updated to the clear connection state, the connection information of the currently connected gas meter is cleared, the alarm's state is updated to the connection in progress state, and the process returns to step S802.
[0155] Based on the above method embodiments, Figure 10 This is a schematic diagram of a gas meter control device provided in an embodiment of this application. Figure 10 As shown, the gas meter control device is applied to a gas meter, and the gas meter control device includes:
[0156] The receiving module 101 is used to receive control commands sent by the terminal device through the alarm; the control commands are used to control the gas meter to perform the target operation;
[0157] Control module 102 is used to execute the target operation according to the control command;
[0158] The sending module 103 is used to switch from a low-power state to an online state and send the execution result of the target operation to the user equipment, or, in the low-power state, send the execution result of the target operation to the user equipment through the alarm.
[0159] In some embodiments, the target operation includes at least one of the following: acquiring data from the gas meter, updating data from the gas meter, detecting anomalies in the gas meter, and updating control parameters of the gas meter.
[0160] In some embodiments, the gas meter and the alarm are connected wirelessly. The gas meter further includes: a detection module 104, used to detect whether the wireless communication connection with the alarm is disconnected; if the wireless communication connection with the alarm is detected to be disconnected, then re-establish the wireless communication connection with the alarm; and a sending module 103, used to report a wireless communication connection failure message to the alarm if the number of failed attempts to re-establish the wireless communication connection exceeds a preset number.
[0161] In some embodiments, the detection module 104 is further configured to detect the current of the wireless communication module in the gas meter; the sending module 103 is further configured to report a prompt message indicating an abnormality in the wireless communication module of the gas meter if the current of the wireless communication module in the gas meter is greater than a preset current threshold.
[0162] In some embodiments, the device further includes a connection module 105;
[0163] The receiving module 101 is also used to receive an instruction to disconnect the wireless communication connection with the alarm;
[0164] The connection module 105 is used to disconnect the wireless communication connection with the alarm and search for a new pairable target alarm; and to establish a wireless communication connection with the pairable target alarm.
[0165] The gas meter control device provided in this application embodiment can be used to execute the technical solution of the gas meter control method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0166] Based on the above method embodiments, Figure 11 This is a schematic diagram of another gas meter control device provided in an embodiment of this application. Figure 11 As shown, the gas meter control device is used in an alarm system, and the gas meter control device includes:
[0167] The receiving module 111 is used to receive control commands sent by the user through the terminal device; the control commands are used to control the gas meter to perform a target operation;
[0168] The sending module 112 is used to forward the control command to the gas meter to wake up the gas meter to perform the target operation.
[0169] In some embodiments, the receiving module 111 is further configured to receive the execution result of the target operation sent by the gas meter;
[0170] The sending module 112 is also used to forward the execution result of the target operation to the user equipment.
[0171] The gas meter control device provided in this application embodiment can be used to execute the technical solution of the gas meter control method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0172] Based on the above method embodiments, Figure 12 This is a structural schematic diagram of another gas meter control device provided in this application. Figure 12 As shown, the gas meter control device is used in an alarm system, and the gas meter control device includes:
[0173] The generation module 121 is used to generate control commands; the control commands are used to control the gas meter to perform target operations.
[0174] The determination module 122 is used to determine whether the gas meter is online;
[0175] The sending module 123 is used to forward the control command to the gas meter via an alarm if the gas meter is not online.
[0176] In some embodiments, the sending module 123 is further configured to send the control command to the gas meter if the gas meter is online.
[0177] The gas meter control device provided in this application embodiment can be used to execute the technical solution of the gas meter control method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0178] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented in software via processing element calls, while others are implemented in hardware. For example, the control module 102 can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its functions can be called and executed by a processing element of the device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0179] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 13As shown, the electronic device may include: a transceiver 131, a processor 132, and a memory 133.
[0180] Processor 132 executes computer execution instructions stored in memory, causing processor 132 to perform the scheme in the above embodiments. Processor 132 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0181] The memory 133 is connected to the processor 132 via the system bus and completes communication between them. The memory 133 is used to store computer program instructions.
[0182] Transceiver 131 can be used to communicate with external devices.
[0183] The electronic device provided in this application embodiment can be a gas meter, alarm, or terminal device as described in the above embodiments. If the electronic device is a gas meter, the transceiver 131 in the gas meter can be used to communicate with the alarm and user equipment.
[0184] If the electronic device is an alarm, the transceiver 131 in the alarm can be used to communicate with the gas meter and terminal equipment.
[0185] If the electronic device is a user equipment, the transceiver 131 in the user equipment can be used to communicate with the gas meter and alarm.
[0186] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0187] This application also provides a chip for executing instructions, which is used to execute the technical solution of the gas meter control method in the above embodiments.
[0188] This application also provides a computer-readable storage medium storing computer instructions. When these computer instructions are executed on a computer, the computer performs the technical solution of the gas meter control method described in the above embodiments. The computer here can be a gas meter, an alarm, or a terminal device.
[0189] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the gas meter control method in the above embodiments.
[0190] 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.
[0191] 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 gas meter control method, characterized in that, Applied to a gas meter, wherein the gas meter is communicatively connected to an alarm, the gas meter includes a communication module and a control module, the method includes: In a low-power state, the communication module receives a control command sent by the alarm from the user equipment when it determines that the gas meter is in a low-power state and forwards it to the control module; the control command is used to control the gas meter to perform a target operation; the target operation includes at least one of the following: data acquisition of the gas meter, data update of the gas meter, anomaly detection of the gas meter, and control parameter update of the gas meter; The control module executes the target operation according to the control command; In the low-power state, the control module forwards the execution result of the target operation to the alarm through the communication module, so that the alarm can send the execution result of the target operation to the user equipment. The control module maintains a low-power state and does not need to switch from a low-power state to an online state.
2. The method according to claim 1, characterized in that, The gas meter and the alarm are connected wirelessly, and the method further includes: Detect whether the wireless communication connection with the alarm is disconnected; If a wireless communication connection with the alarm is detected to be disconnected, a new wireless communication connection is established with the alarm. If the number of failed attempts to reconnect to the wireless communication exceeds a preset number, a message indicating a failed wireless communication connection with the alarm will be reported.
3. The method according to claim 2, characterized in that, The method further includes: Detect the current of the wireless communication module in the gas meter; If the current of the wireless communication module in the gas meter exceeds a preset current threshold, a warning message indicating an abnormality in the wireless communication module of the gas meter will be reported.
4. The method according to claim 2, characterized in that, The method further includes: Receive a command to disconnect the wireless communication connection with the alarm; Disconnect the wireless communication connection with the alarm and search for a new, pairable target alarm. It establishes a wireless communication connection with the paired target alarm.
5. A gas meter control method, characterized in that, The gas meter is used in an alarm system. The gas meter is communicatively connected to the alarm system, and the alarm system is communicatively connected to the user equipment. The gas meter includes a communication module and a control module. The communication module is used to forward received control commands to the control module. The control module is used to execute a target operation according to the control command and forward the execution result of the target operation to the alarm system through the communication module, so that the alarm system can send the execution result of the target operation to the user equipment. The control module maintains a low-power state and does not need to switch from a low-power state to an online state; the method includes: The system receives a control command sent by a user through the user equipment when it determines that the gas meter is in a low-power state; the control command is used to control the gas meter to perform a target operation; the target operation includes at least one of the following: data acquisition of the gas meter, data update of the gas meter, anomaly detection of the gas meter, and control parameter update of the gas meter; the gas meter is in a low-power state. The control command is forwarded to the gas meter to control the gas meter to perform the target operation; Receive the execution result of the target operation sent by the gas meter; The execution result of the target operation is forwarded to the user equipment.
6. A gas meter control method, characterized in that, Applied to user equipment, the method includes: Generate control instructions; the control instructions are used to control the gas meter to perform target operations; the target operations include at least one of the following: data acquisition of the gas meter, data update of the gas meter, anomaly detection of the gas meter, and control parameter update of the gas meter; Determine whether the gas meter is online; If the gas meter is not online, the control command is forwarded to the gas meter via the alarm, so that the gas meter can perform the target operation according to the control command. Receive the execution result of the target operation sent by the alarm when the gas meter is offline; The gas meter includes a communication module and a control module. The communication module forwards received control commands to the control module, which executes a target operation according to the control commands and forwards the execution result of the target operation to the alarm via the communication module, so that the alarm can send the execution result of the target operation to the user equipment. The control module maintains a low-power state and does not need to switch from a low-power state to an online state.
7. The method according to claim 6, characterized in that, The method further includes: If the gas meter is online, the control command is sent to the gas meter.
8. A gas meter control system, characterized in that, include: Gas meters, alarms, and user equipment; The user equipment is communicatively connected to the alarm and is used to acquire control commands input by the user through the user equipment. When the gas meter is in a low-power state, the control commands are sent to the alarm. The control commands are used to control the gas meter to perform target operations. The target operations include at least one of the following: data acquisition of the gas meter, data update of the gas meter, anomaly detection of the gas meter, and control parameter update of the gas meter. The alarm is communicatively connected to the gas meter and is used to receive control commands sent by the user equipment and forward them to the gas meter. The gas meter includes a communication module and a control module; The communication module is used to forward received control commands to the control module; The control module is used to execute the target operation according to the control command, and forward the execution result of the target operation to the alarm through the communication module, so that the execution result of the target operation can be sent to the user equipment through the alarm. The control module maintains a low-power state and does not need to switch from a low-power state to an online state.
9. A gas meter, characterized in that, include: A transceiver, a processor, and a memory communicatively connected to the processor; The transceiver is used for communication connection with the alarm; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-4.
10. An alarm device, characterized in that, include: A transceiver, a processor, and a memory communicatively connected to the processor; The transceiver is used for communication connection with the gas meter; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in claim 5.
11. A user equipment, characterized in that, include: A transceiver, a processor, and a memory communicatively connected to the processor; The transceiver is used for communication connection with the alarm; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in claim 6 or 7.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-7.