A Bluetooth heartbeat detection method for electricity meters

By installing a Bluetooth module on the electricity meter and implementing a heartbeat detection method, the problem of Bluetooth module failures not being detected in a timely manner is solved, ensuring the stable operation of the electricity meter and preventing damage.

CN116887240BActive Publication Date: 2026-07-31HANGZHOU SUNRISE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU SUNRISE TECH
Filing Date
2023-08-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The existing Bluetooth modules of electricity meters cannot detect faults in a timely manner, leading to abnormal operation or damage to the electricity meters, and there is a lack of effective fault detection methods.

Method used

A Bluetooth module is installed on the electricity meter, and a heartbeat detection method is implemented. By judging the reception and response of commands within a preset time period, the fault of the Bluetooth module can be detected in time and the power can be turned off to prevent damage to the electricity meter.

Benefits of technology

It enables timely detection and handling of Bluetooth module faults, preventing damage to the electricity meter and ensuring the reliability and stability of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116887240B_ABST
    Figure CN116887240B_ABST
Patent Text Reader

Abstract

This invention provides a Bluetooth heartbeat detection method for electricity meters, comprising: Step S1, controlling the power supply of the Bluetooth module to turn on and determining whether a request for configuration parameters command has been received; if yes, clearing the fault status record and querying the heartbeat count, then proceeding to Step S2; otherwise, proceeding to Step S3; Step S2, controlling the Bluetooth module to enter the normal communication process, then proceeding to Step S4; Step S3, continuously sending a query heartbeat command and determining whether a response has been received from the Bluetooth module; if yes, returning to Step S1; otherwise, proceeding to Step S5; Step S4, determining whether no communication signal has been continuously received from the Bluetooth module; if yes, returning to Step S3; otherwise, returning to Step S2; Step S5, controlling the power supply of the Bluetooth module to turn off and reporting the detection result indicating a fault in the Bluetooth module. The beneficial effect is that this invention can promptly detect the fault status of the Bluetooth module during the operation of the electricity meter and promptly handle it by turning off the power, preventing damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of electricity meters, and more specifically, to a Bluetooth heartbeat detection method for electricity meters. Background Technology

[0002] The new generation of electricity meters (IR46 modular electricity meters) has increasingly higher requirements for data communication. In my country's existing electricity meter technology system, the communication part is currently mainly implemented by communication modules (power line carrier, low-power wireless, etc.), RS485, and infrared. From the perspective of practical application, RS485 and infrared have obvious defects, such as RS485 wiring construction being difficult and communication speed being low; infrared communication being unreliable and slow. These two technologies are clearly not suitable for the future development trend of electricity meter technology. At present, there is an urgent need for a high-speed and reliable local communication technology to replace RS485 and infrared.

[0003] Bluetooth technology has undergone multiple upgrades and is now widely used in the Internet of Things (IoT) field. It is a mature communication technology, and Bluetooth has been completely domestically produced. Bluetooth technology can effectively compensate for the local communication bottleneck of electricity meters.

[0004] Specifically, Bluetooth is a wireless technology that supports short-range communication (generally within 10m) between devices. It enables wireless information exchange between a wide range of devices, including mobile phones, PDAs, wireless headsets, laptops, and related peripherals. Bluetooth technology can effectively simplify communication between mobile communication terminal devices and also successfully simplify communication between devices and the Internet, making data transmission faster and more efficient and paving the way for wireless communication.

[0005] Bluetooth, as a short-range wireless connection technology, enables convenient, fast, flexible, secure, low-cost, and low-power data and voice communication between devices. Therefore, it is one of the mainstream technologies for realizing wireless personal area network communication. Connecting with other networks can bring a wider range of applications. It is a cutting-edge open wireless communication technology that enables various digital devices to communicate wirelessly and is a type of wireless network transmission technology.

[0006] Bluetooth technology is an open, global standard for wireless data and voice communication. Based on low-cost, short-range wireless connectivity, it establishes a unique connection for communication environments between fixed and mobile devices. Essentially, it establishes a universal radio air interface for communication between fixed or mobile devices, further integrating communication and computer technologies. This allows various 3C devices to communicate or operate each other within a short range without the need for wires or cables. Simply put, Bluetooth is a technology that uses low-power radio waves to transmit data between various 3C devices. Bluetooth operates in the globally common 2.4GHz ISM (Industrial, Scientific, and Medical) band and uses the IEEE 802.11 protocol. As an emerging short-range wireless communication technology, it is strongly driving the development of low-speed wireless personal area networks (WLANs).

[0007] However, when Bluetooth modules are used in electricity meters, if the electricity meter cannot detect damage or malfunction of the Bluetooth module in a timely manner, it will cause abnormal operation of the electricity meter, or even lead to malfunction and damage. Summary of the Invention

[0008] The problem this invention aims to solve is to provide a Bluetooth heartbeat detection method for electricity meters, which can detect the fault status of the Bluetooth module in a timely manner during the operation of the electricity meter and promptly shut down the power to prevent damage to the electricity meter.

[0009] To address the above problems, this invention provides a Bluetooth heartbeat detection method for electricity meters, wherein a Bluetooth module is pre-installed on the electricity meter, and the Bluetooth heartbeat detection method for electricity meters includes the following steps:

[0010] Step S1: Control the power supply of the Bluetooth module to turn on, and determine whether a request configuration parameter instruction is received from the Bluetooth module within a first preset time period.

[0011] If so, clear the fault status record of the Bluetooth module and query the heartbeat count, then proceed to step S2;

[0012] If not, proceed to step S3;

[0013] Step S2: Control the Bluetooth module to enter the normal communication process, and then proceed to step S4;

[0014] Step S3: Continuously send a heartbeat query command to the Bluetooth module within a third preset time period, and determine whether a response is received from the Bluetooth module.

[0015] If so, return to step S1;

[0016] If not, proceed to step S5;

[0017] Step S4: Determine whether there is a situation where no communication signal is received from the Bluetooth module for an extended period of time.

[0018] If so, return to step S3;

[0019] If not, return to step S2;

[0020] Step S5: Control the power supply of the Bluetooth module to be turned off, and report the detection results indicating that the Bluetooth module has failed.

[0021] Preferably, if the first preset time period is set to 3 seconds, then in step S1, it is determined whether the request configuration parameter instruction output by the Bluetooth module is received within 3 seconds.

[0022] Preferably, if the second preset time period is set to 10 minutes, then in step S4, it is determined whether there is a situation where the communication signal of the Bluetooth module is not received continuously within 10 minutes.

[0023] Preferably, step S3 includes:

[0024] Step S31: Send the first heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period.

[0025] If so, return to step S1;

[0026] If not, proceed to step S32;

[0027] Step S32: Send the second heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period.

[0028] If so, return to step S1;

[0029] If not, proceed to step S33;

[0030] Step S33: Send the third heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period.

[0031] If so, return to step S1;

[0032] If not, proceed to step S5.

[0033] Preferably, after determining in step S33 that no response is received from the Bluetooth module within the fourth preset time period, the method further includes:

[0034] Step S34: Control the Bluetooth module to reset, then send the query heartbeat command to the Bluetooth module three times consecutively, and determine whether a response is received from the Bluetooth module within the fourth preset time period after sending the query heartbeat command to the Bluetooth module in any of the three instances.

[0035] If so, return to step S1;

[0036] If not, proceed to step S5.

[0037] Preferably, if the fourth preset time period is set to 500 milliseconds, then in steps S31, S32, S33 and S34, it is determined whether a response from the Bluetooth module is received within 500 milliseconds.

[0038] Preferably, in step S5, after controlling the power off of the Bluetooth module, a fault re-detection process is further included, which includes:

[0039] Step A1: After a preset time interval, return to step S1 and determine whether to proceed to step S5 after executing step S3.

[0040] If so, proceed to step A2;

[0041] If not, then exit;

[0042] Step A2: Count the total number of times the steps in step S1 are returned, and determine whether the total number of times is greater than a preset threshold.

[0043] If so, the detection result indicating that the Bluetooth module has malfunctioned is reported, and the power supply of the Bluetooth module is permanently turned off.

[0044] If not, return to step A1.

[0045] Preferably, if the preset threshold is set to 10, then in step A2, it is determined whether the total number of times is greater than 10.

[0046] The present invention has the following beneficial effects: In the present invention, a preliminary fault judgment of the Bluetooth module is made by judging whether the communication signal of the Bluetooth module is not received continuously within a second preset time period, and a reactivation is attempted by continuously sending a query heartbeat command to the Bluetooth module within a third preset time period. Subsequently, the accurate fault detection result of the Bluetooth module is obtained by judging whether a response is received from the Bluetooth module, and the power supply of the Bluetooth module is controlled to be turned off when the detection result indicates that the Bluetooth module has failed. By timely detecting the fault state of the Bluetooth module during the operation of the electricity meter and promptly handling and turning off the power supply, damage to the electricity meter can be prevented. Attached Figure Description

[0047] Figure 1 This is a flowchart of the steps of the present invention;

[0048] Figure 2 This is a flowchart illustrating step S3 of the present invention.

[0049] Figure 3 This is a flowchart of the fault re-detection process of the present invention. Detailed Implementation

[0050] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0051] In a preferred embodiment of the present invention, based on the above-mentioned problems existing in the prior art, a Bluetooth heartbeat detection method for electricity meters is provided, wherein a Bluetooth module is pre-installed on the electricity meter, and the Bluetooth heartbeat detection method for electricity meters is as follows: Figure 1 As shown, it includes the following steps:

[0052] Step S1: Control the power supply of the Bluetooth module and determine whether a request for configuration parameters is received from the Bluetooth module within a first preset time period.

[0053] If so, clear the fault status record of the Bluetooth module and query the heartbeat count, then proceed to step S2;

[0054] If not, proceed to step S3;

[0055] Step S2: Control the Bluetooth module to enter the normal communication process, and then proceed to step S4;

[0056] Step S3: Continuously send a heartbeat query command to the Bluetooth module within the third preset time period, and determine whether a response is received from the Bluetooth module:

[0057] If so, return to step S1;

[0058] If not, proceed to step S5;

[0059] Step S4: Determine whether there is a situation where no communication signal is received from the Bluetooth module for an extended period of time.

[0060] If so, return to step S3;

[0061] If not, return to step S2;

[0062] Step S5: Control the power supply of the Bluetooth module to be turned off and report the detection results indicating that the Bluetooth module has failed.

[0063] Specifically, in this embodiment, each time the power of the Bluetooth module is turned on and a request for configuration parameters is received from the Bluetooth module within a first preset time period, it is necessary to clear the fault status record and query the heartbeat count, that is, to perform an initialization operation on the Bluetooth module, so as to avoid the inherent stored fault status record and query heartbeat count from affecting the subsequent judgment logic.

[0064] Preferably, in actual operation, the presence of a fault in the Bluetooth module is initially determined by whether no communication signal is received from the Bluetooth module within a second preset time period. If a fault is initially determined, a query heartbeat command is continuously sent to the Bluetooth module within a third preset time period to attempt reactivation. Subsequently, it is determined whether a response is received from the Bluetooth module to obtain an accurate fault detection result for the Bluetooth module. When the detection result indicates that the Bluetooth module has malfunctioned, the power supply of the Bluetooth module is turned off to prevent damage to the electricity meter.

[0065] In a preferred embodiment of the present invention, the first preset time period is set to 3 seconds. In step S1, it is determined whether a request configuration parameter instruction is received from the Bluetooth module within 3 seconds.

[0066] Specifically, in this embodiment, 3 seconds is not a fixed value for the first preset time period. The value of the first preset time period can be adaptively adjusted in different application scenarios and usage scenarios.

[0067] In a preferred embodiment of the present invention, the second preset time period is set to 10 minutes. In step S4, it is determined whether there is a situation where no communication signal from the Bluetooth module is received for 10 minutes.

[0068] Specifically, in this embodiment, 10 minutes is not a fixed value for the second preset time period. The value of the second preset time period can be adaptively adjusted under different application scenarios and usage scenarios.

[0069] In a preferred embodiment of the present invention, step S3 is as follows: Figure 2 As shown, it includes:

[0070] Step S31: Send the first heartbeat query command to the Bluetooth module and determine whether a response is received from the Bluetooth module within the fourth preset time period.

[0071] If so, return to step S1;

[0072] If not, proceed to step S32;

[0073] Step S32: Send a second heartbeat query command to the Bluetooth module and determine whether a response is received from the Bluetooth module within the fourth preset time period.

[0074] If so, return to step S1;

[0075] If not, proceed to step S33;

[0076] Step S33: Send the third heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period.

[0077] If so, return to step S1;

[0078] If not, proceed to step S5.

[0079] Specifically, in this embodiment, three consecutive query heartbeat command sending and judgment operations are used to obtain the judgment result of whether the Bluetooth module has malfunctioned, so as to ensure the accuracy of the judgment result.

[0080] In a preferred embodiment of the present invention, after determining in step S33 that no response is received from the Bluetooth module within the fourth preset time period, the method further includes:

[0081] Step S34: Control the Bluetooth module to reset, then send three consecutive heartbeat query commands to the Bluetooth module, and determine whether a response is received from the Bluetooth module within a fourth preset time period after sending any of the heartbeat query commands to the Bluetooth module.

[0082] If so, return to step S1;

[0083] If not, proceed to step S5.

[0084] Specifically, in this embodiment, after sending three consecutive heartbeat query commands without receiving a response from the Bluetooth module, a three-retransmission mechanism will be triggered. If three consecutive heartbeat query commands are sent without a response, the Bluetooth module will be reset once. If three more consecutive heartbeat query commands are sent without a response, the Bluetooth module is considered to have malfunctioned, and the Bluetooth module's power supply will be turned off.

[0085] In a preferred embodiment of the present invention, the fourth preset time period is set to 500 milliseconds. Then, in steps S31, S32, S33 and S34, it is determined whether a response from the Bluetooth module is received within 500 milliseconds.

[0086] In a preferred embodiment of the present invention, after controlling the power off of the Bluetooth module in step S5, a fault re-detection process is further included, as follows: Figure 3 As shown, it includes:

[0087] Step A1: After a preset time interval, return to step S1 and determine whether to proceed to step S5 after executing step S3.

[0088] If so, proceed to step A2;

[0089] If not, then exit;

[0090] Step A2: Count the total number of times the steps S1 are returned, and determine whether the total number of times exceeds a preset threshold.

[0091] If so, report the detection results indicating a fault in the Bluetooth module and control the permanent shutdown of the Bluetooth module's power supply.

[0092] If not, return to step A1.

[0093] In a preferred embodiment of the present invention, the preset threshold is set to 10, and in step A2, it is determined whether the total number of times is greater than 10.

[0094] Specifically, in this embodiment, the preset time interval can be set and adjusted according to the actual situation. When it is determined that the Bluetooth module has failed, the power of the Bluetooth module is periodically turned on at 4:00 am every day to repeatedly determine whether the Bluetooth module has failed. After 10 cycles, the power of the Bluetooth module is permanently turned off and the Bluetooth module failure is actively reported.

[0095] Preferably, when the Bluetooth module malfunctions and is already in a state of permanently shutting down the Bluetooth module power, after a power outage occurs, the energy meter should re-evaluate the abnormal state of the Bluetooth module. If a Bluetooth working mode switching command is received during this process, no response should be executed.

[0096] Preferably, if a Bluetooth module malfunction is detected but the Bluetooth module power is not permanently turned off, and a Bluetooth working mode switching command is received during the process, the process returns to step S3 without needing to re-detect the abnormal state.

[0097] While the disclosure is as stated above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of this disclosure, and all such changes and modifications will fall within the protection scope of this invention.

Claims

1. A Bluetooth heartbeat detection method for an electricity meter, characterized in that, A Bluetooth module is pre-installed on the electricity meter. The Bluetooth heartbeat detection method for the electricity meter includes the following steps: Step S1: Control the power supply of the Bluetooth module to turn on, and determine whether a request configuration parameter instruction is received from the Bluetooth module within a first preset time period. If so, clear the fault status record of the Bluetooth module and query the heartbeat count, then proceed to step S2; If not, proceed to step S3; Step S2: Control the Bluetooth module to enter the normal communication process, and then proceed to step S4; Step S3: Continuously send a heartbeat query command to the Bluetooth module within a third preset time period, and determine whether a response is received from the Bluetooth module. If so, return to step S1; If not, proceed to step S5; Step S4: Determine whether there is a situation where no communication signal is received from the Bluetooth module for an extended period of time. If so, return to step S3; If not, return to step S2; Step S5: Control the power supply of the Bluetooth module to be turned off, and report the detection results indicating that the Bluetooth module has failed.

2. The Bluetooth heartbeat detection method for an energy meter according to claim 1, characterized in that, If the first preset time period is set to 3 seconds, then in step S1, it is determined whether the request configuration parameter instruction output by the Bluetooth module is received within 3 seconds.

3. The Bluetooth heartbeat detection method for an energy meter according to claim 1, characterized in that, If the second preset time period is set to 10 minutes, then in step S4, it is determined whether there is a situation where the communication signal of the Bluetooth module is not received for 10 minutes.

4. The Bluetooth heartbeat detection method for an energy meter according to claim 1, characterized in that, Step S3 includes: Step S31: Send the first heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period. If so, return to step S1; If not, proceed to step S32; Step S32: Send the second heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period. If so, return to step S1; If not, proceed to step S33; Step S33: Send the third heartbeat query command to the Bluetooth module, and determine whether a response is received from the Bluetooth module within the fourth preset time period. If so, return to step S1; If not, proceed to step S5.

5. The Bluetooth heartbeat detection method for an energy meter according to claim 4, characterized in that, After determining in step S33 that no response has been received from the Bluetooth module within the fourth preset time period, the method further includes: Step S34: Control the Bluetooth module to reset, then send the query heartbeat command to the Bluetooth module three times in succession, and determine whether the Bluetooth module receives a response within the fourth preset time period after sending the query heartbeat command to the Bluetooth module in any of the three times. If so, return to step S1. If not, proceed to step S5.

6. The Bluetooth heartbeat detection method for an energy meter according to claim 5, characterized in that, If the fourth preset time period is set to 500 milliseconds, then in steps S31, S32, S33 and S34, it is determined whether a response from the Bluetooth module is received within 500 milliseconds.

7. The Bluetooth heartbeat detection method for an energy meter according to claim 1, characterized in that, In step S5, after controlling the power off of the Bluetooth module, a fault re-detection process is further included, which includes: Step A1: After a preset time interval, return to step S1 and determine whether to proceed to step S5 after executing step S3. If so, proceed to step A2; If not, then exit; Step A2: Count the total number of times the steps in step S1 are returned, and determine whether the total number of times is greater than a preset threshold. If so, the detection result indicating that the Bluetooth module has malfunctioned is reported, and the power supply of the Bluetooth module is permanently turned off. If not, return to step A1.

8. The Bluetooth heartbeat detection method for an energy meter according to claim 7, characterized in that, If the preset threshold is set to 10, then in step A2, it is determined whether the total number of times is greater than 10.