Iot table switch state control method and system based on dual-mode communication

By using a dual-mode communication method, the problem of signal instability in complex environments caused by traditional communication technologies is solved, enabling compatibility and long-distance control of equipment from different manufacturers, and improving system stability and operation and maintenance efficiency.

CN121332932BActive Publication Date: 2026-04-17SHANDONG LUNENG SOFTWARE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG LUNENG SOFTWARE TECH
Filing Date
2025-12-16
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional communication technologies are susceptible to interference in complex environments, leading to unstable signals that cannot meet the needs of long-distance control. Furthermore, poor compatibility between devices from different manufacturers increases maintenance costs and difficulty.

Method used

An IoT meter switching status control method based on dual-mode communication is adopted. By receiving control commands, collecting signal quality, adjusting transmission gain and communication mode, a switching strategy is generated. Combined with preset communication protocols and filtering processing, the accuracy and reliability of data transmission are ensured, and compatibility and stability with devices from different manufacturers are achieved.

Benefits of technology

It improves communication stability and reliability, reduces the difficulty of on-site operation and maintenance, enables control of remote devices, meets the application needs of complex scenarios, and improves operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121332932B_ABST
    Figure CN121332932B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of intelligent low-voltage power distribution and provides a method and system for controlling the status of IoT meter switches based on dual-mode communication. The technical solution involves receiving IoT meter switch status control commands; collecting power line carrier signal strength and low-power wireless signal strength; determining the communication mode used for transmitting the IoT meter switch status control commands based on the power line carrier signal strength and low-power wireless signal strength; generating a corresponding switch component switching strategy based on the target communication mode; communicating with an external IoT switch based on a preset communication protocol corresponding to the communication mode; and generating control signals to control the opening and closing actions of the external IoT switch. This improves communication stability and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent low-voltage power distribution, and particularly relates to an Internet of Things (IoT) meter switch communication control system and method based on dual-mode communication. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Traditional single-mode communication technologies are no longer sufficient to meet complex application requirements. Local communication technology has evolved through four stages: first-generation narrowband carrier, second-generation low-power wireless technology, the recent third-generation high-speed carrier (HPLC), and now the fourth-generation dual-mode communication. Traditional IoT control technologies such as Zigbee and WiFi are susceptible to poor wireless signals and interference, leading to control failures, and signal coverage may be insufficient when devices are far away. Simple power line carrier technology, however, is limited in its application range because power line carrier signals can generally only be transmitted on single-phase power lines. When devices are on different phases of the power line, control failures may occur. Bluetooth control is also limited by distance and cannot perform long-distance control. While HPLC communication control allows for monitoring of on-site switch status from the backend, poor interoperability between different manufacturers and varying on-site debugging standards or methods when multiple meters and carrier modules exist in the same area increases maintenance costs and reduces maintenance efficiency. Traditional Bluetooth control technology has limited transmission distance: Bluetooth transmission distance is typically short, and the scattered distribution of electricity meters within a distribution area makes setting up Bluetooth devices sequentially time-consuming and laborious, limiting its application scope. In some large industrial sites or commercial buildings, effective control of remote devices may not be possible; moreover, Bluetooth signals may interfere with each other, leading to data transmission failures or control malfunctions.

[0004] To address the aforementioned technical challenges, a fusion approach combining Bluetooth and dual-mode carrier was proposed to resolve compatibility issues between devices from different manufacturers. However, while existing dual-mode communication methods achieve data transmission through Orthogonal Frequency Division Multiplexing (OFDM) and adaptive frequency hopping, with switching latency within 150 milliseconds, making them suitable for smart grids, industrial IoT, and other scenarios, they still face challenges in complex environments. These include long distances, numerous connected meters or switches, severe weather conditions such as thunderstorms, and nearby electromagnetic interference sources. These issues result in intermittent signal transmission, unstable networking, proxy nodes affecting overall communication quality, and cumbersome and complex on-site debugging procedures, ultimately failing to meet the application requirements of complex scenarios. Summary of the Invention

[0005] To address at least one of the technical problems mentioned above, this invention provides an IoT meter switch state control method and system based on dual-modal communication, which improves communication stability and reliability and meets the application requirements of different complex scenarios.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] The first aspect of the present invention provides an IoT meter switch state control method based on dual-modal communication, comprising the following steps:

[0008] Receive the control commands for the switch status of the IoT meter;

[0009] The system collects IoT meter switch signals from various terminals, determines the optimal transmit gain required by the current terminal based on signal quality, and adjusts the transmit power and communication mode used for transmitting IoT meter switch status control commands based on the current terminal's environment. It also generates a corresponding switch component switching strategy based on the target communication mode. The system communicates with the IoT external switch based on the preset communication protocol of the corresponding communication mode, and generates control signals to control the opening and closing of the IoT external switch.

[0010] Furthermore, after acquiring the communication data for the corresponding mode, the data is filtered. For the communication data acquired in HPLC mode, dual-mode feedback basic filtering is used, and for the communication data acquired in HRF mode, median filtering is used.

[0011] Furthermore, the step of generating the corresponding switching strategy for the switching component based on the target communication mode includes:

[0012] Based on the type of the target communication mode, output the corresponding control signal for switching the analog switch. Upon receiving the control signal, control the analog switch to switch, connecting the target channel to the common terminal and disconnecting the non-target channel.

[0013] Furthermore, during the communication link switching process, a temporary communication link is established, and the signal strength and communication status pins of the current communication link are collected in real time. Based on the signal strength data and the pin status of the dual-mode communication switching circuit, it is determined whether the current communication link has failed. If so, it automatically switches to another communication link within a set time.

[0014] Furthermore, the communication protocol based on the preset corresponding communication mode and the external IoT switch specifically includes:

[0015] If the communication mode is HPLC communication mode, it receives the IoT meter switch status control command, transmits the data of all encrypted IoT meters based on the set encryption transmission protocol, verifies the acquired encrypted IoT meter data, reads the current status data of the successfully verified IoT external switch, and determines whether the read status data and the control command are consistent. If they are inconsistent, it generates a relay control signal to control the opening and closing action of the IoT external switch.

[0016] If the communication mode is HRF communication mode, determine whether the legality of the control command needs to be verified. If so, verify the legality of the transmission command according to the set verification rules. If the verification is successful, determine whether the current state of the target IoT external switch is normal. If it is normal, send a control signal to the target IoT external switch to control the opening and closing action of the external switch.

[0017] Furthermore, the defined encrypted transmission protocol incorporates protocol encryption benefits, which are expressed as follows:

[0018] ,

[0019] in, , and Indicates the weighting coefficient. This indicates the numerical value corresponding to encryption security. This represents the numerical value corresponding to transmission efficiency. This indicates the numerical value corresponding to the compliance of the agreement.

[0020] Furthermore, the defined verification rules specifically include format verification, permission verification, and frequency verification;

[0021] The format verification rules include that the instruction frame must contain the opcode, device ID, random verification code and CRC16 check; if any one is missing or the format is incorrect, it will be discarded directly.

[0022] Access verification includes enabling high-power loads, which requires an additional dynamic flag; if the flag is missing, execution will be refused.

[0023] The frequency verification rules include counting the number of identical commands received within a set time period. If the number of commands is consecutive and consistent with the current state, it is determined to be interference and false triggering, and similar commands are blocked.

[0024] A second aspect of the present invention provides an IoT meter switch status control system based on dual-modal communication, comprising:

[0025] The instruction receiving module is used to receive the control instructions for the switch status of the IoT meter.

[0026] The communication mode switching module is used to collect the IoT meter switch signals from each terminal, determine the optimal transmission gain required by the current terminal based on the signal quality, and adjust the transmission power and the communication mode used for transmitting IoT meter switch status control commands according to the current terminal environment. It also generates a corresponding switch component switching strategy based on the target communication mode. The switch control module is used to communicate with the IoT external switch based on the preset communication protocol of the corresponding communication mode, and generate control signals to control the opening and closing of the IoT external switch.

[0027] A third aspect of the present invention provides a computer-readable storage medium.

[0028] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the IoT meter switch state control method based on dual-modal communication as described above.

[0029] A fourth aspect of the present invention provides a computer device.

[0030] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the IoT meter switch state control method based on dual-modal communication as described above.

[0031] Compared with the prior art, the beneficial effects of the present invention are:

[0032] This invention solves the compatibility problem between devices from different manufacturers by optimizing the fusion of Bluetooth and dual-mode carrier. It communicates with an external IoT switch based on a preset communication protocol corresponding to the corresponding communication mode, thereby improving the communication stability of the system in complex environments.

[0033] This invention introduces a PID algorithm when generating control signals for external IoT switches to ensure the accuracy and reliability of data transmission, enabling control of devices at greater distances to meet the application needs of different scenarios; reducing the workload and difficulty of on-site maintenance personnel, and improving maintenance efficiency.

[0034] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0035] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0036] Figure 1This is a schematic diagram of an IoT meter switch status control system based on dual-modal communication provided in an embodiment of the present invention;

[0037] Figure 2 This is a schematic diagram of the IoT meter switch state control method based on dual-modal communication provided in an embodiment of the present invention. Detailed Implementation

[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0039] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0040] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0041] like Figure 1 The diagram shows the overall system architecture, including a cloud platform, a dual-mode communication layer, a local control unit, and a terminal execution layer.

[0042] The cloud platform is used to monitor the status of all IoT online meters and concentrators, aggregate the acquired data, and store the meter information in the database; in terms of business logic, it performs remote meter reading, prepaid management, file configuration, and issuance of switch on / off commands.

[0043] The dual-mode communication layer is responsible for stable and reliable data transmission, including but not limited to local communication between meters, external switches, and concentrators; the dual-mode converged communication – High-speed Power Line Communications (HPLC) and High-speed Radio Frequency (HRF) devices automatically select the channel with better signal quality, or adopt a dual-channel concurrent, backup mode, which greatly improves the communication success rate; the concentrator / collector, as a communication hub in a region, collects data from all IoT meters under it and performs protocol conversion; it also has dual-mode communication capabilities and can establish optimal connections with meters in different environments.

[0044] The terminal sensing and execution layer is responsible for data acquisition and the execution of final actions. It includes IoT meters, metering units, dual-mode communication modules, control modules, and external control switches.

[0045] Local control unit / application layer: Directly facing end users and administrators. Typically, this is a client such as a mobile app / Bluetooth mini-program or host computer interface, which can query usage, balance, carrier module on-site upgrades, receive alarm notifications, and request the closing of control switches, etc.

[0046] Example 1

[0047] like Figure 2 As shown, this embodiment provides an IoT meter switch state control method based on dual-modal communication, which specifically includes the following steps:

[0048] Step 1: Receive IoT meter switch status control commands sent by each terminal;

[0049] Step 2: Collect the IoT meter switch signals of each terminal, determine the optimal transmission gain required by the current terminal based on the signal quality, and adjust the transmission power and the communication mode used for transmitting IoT meter switch status control commands according to the current environment of the terminal. Generate the corresponding switch component switching strategy according to the target communication mode.

[0050] In this embodiment, gain adjustment at the transmitter is performed based on channel and noise interference detection, moving beyond simple "mode switching." Compared to the fixed or manually configured transmit power of traditional IoT nodes, this system achieves several key improvements: First, it is intelligent, upgrading the communication system from static, passive configuration to a dynamic, proactive, and adaptive intelligent system. Second, it is precise, enabling refined power management for each terminal and communication link, achieving "tailored instruction" and "on-demand allocation." It finds a dynamic optimal solution among the three mutually constraining objectives of communication reliability, device power consumption, and overall network performance. Third, it achieves deep collaboration, deeply integrating physical layer power control with the link layer's dual-mode strategy, resulting in a synergistic effect of "1+1>2." This not only ensures dual-mode redundancy but also improves channel quality, playing a crucial role in enhancing overall system performance.

[0051] Specifically, the steps include the following:

[0052] Step 201: Continuously and periodically detect the quality of the IoT meter switch signal from each terminal, and determine the optimal transmit gain required by the current terminal based on the quality of the IoT meter switch signal from each terminal.

[0053] In this embodiment, the uplink signal quality of each terminal may include parameters such as signal strength indication (RSSI), signal-to-noise ratio (SNR), and bit error rate (BER);

[0054] Step 202: Based on the optimal transmit gain required by the current terminal, send a gain adjustment command to the specific terminal through any of the dual-mode communication modes;

[0055] Step 203: Dynamically adjust the gain of the power amplifier (PA) of the current terminal according to the gain adjustment command, and conduct subsequent communication with the new power level;

[0056] Step 204: Determine whether the current IoT meter switch signal meets the gain required by the current environment. If not, issue a transmission gain adjustment control command.

[0057] When in a complex and interfering environment (such as a multi-story underground garage or a cabinet with shielding function), where the channel attenuation is large or the noise interference is strong, a control command to increase the transmission gain is issued to ensure that the control command (switching status) can be reliably transmitted, thereby improving the robustness and success rate of communication.

[0058] When the on-site environment is good, the terminal is very close to the master station, or the channel conditions are good, the master station will instruct it to reduce the transmission gain, thereby reducing the power consumption of the terminal.

[0059] Independent gain control in dual modes: The master station can establish separate gain adjustment strategies for both power line carrier and wireless communication modes. If power line noise suddenly increases, the terminal is instructed to increase the transmission power of the power line carrier mode; if wireless signal attenuation is detected due to weather conditions, the transmission power of the wireless mode is instructed to increase. When the concentrator receives instructions from the backend, it activates the dual-layer communication layer to select the communication mode. By monitoring the quality of the two communication links in real time, it automatically selects the more stable mode to avoid single-mode communication interruptions.

[0060] Mode switching pre-adjustment: For example, when a frequency band switch is required, the gain of the terminal in the preset frequency band can be adjusted to an estimated optimal value in advance. Real-time monitoring of the received signal strength indication (RSSI) of the power line carrier and the signal-to-noise ratio (SNR) of low-power wireless ensures that the mode with the higher current signal strength is always selected. To avoid frequent switching due to signal fluctuations, a strength difference threshold is set. Switching will only occur when the signal strength of one mode is consistently higher than that of another mode, and the difference exceeds the set strength difference threshold, and this remains for a set time, such as 100ms.

[0061] As one implementation method, after acquiring the communication data of the corresponding mode, the data is filtered. Specifically, the filtering process for the communication data acquired in HPLC mode includes:

[0062] Dual-mode feedback basic filtering, moving average filtering, and continuous N sampling of dual-mode (e.g., HPLC) data. The average is calculated using the following formula:

[0063] ,

[0064] in, This represents the output value after the k-th carrier filtering. This represents the original carrier sample value (latest sample value) of the i-th time, k is the carrier sample of the k-th time (k is a positive integer), and N is the sampling window size, for example, 5~7 when the noise is high and 3~5 when the noise is low;

[0065] The filtering process for communication data acquired in HRF mode includes:

[0066] Median filtering (suppressing transient impulse noise) involves taking the median value after sorting the single-mode samples to filter out sudden interference. The specific calculation formula is as follows:

[0067] ,

[0068] in, This represents the output value after the k-th RF filter. This represents the k-th original radio frequency sample value (the latest sample value). This represents the median.

[0069] As a further implementation, the step of generating a corresponding switching strategy for the switching component based on the target communication mode includes:

[0070] When the target communication mode is HRF mode, the corresponding A / B level combination is output, A=1, B=1. The control signal is stabilized by pull-up resistors (R1 / R2) to prevent interference from causing false switching.

[0071] Upon receiving the A / B level combination signal, the analog switch performs a switching operation. The internal electronic switch connects the target channel (Y0-Y3) with the common terminal (Z0-Z1) while disconnecting the non-target channel, ensuring physical isolation between the two communication modes and avoiding signal conflicts. The MCU reconfigures the communication peripherals to match the protocol requirements of the new communication mode and reinitializes the registers and buffers of the corresponding communication modules.

[0072] During data transmission, in HPLC mode, data is sent / received via a power line coupling circuit, using OFDM or FSK modulation; in HRF mode, data is sent / received via a radio frequency front-end, using GFSK or LoRa modulation. Throughout the communication process, the MCU continues to monitor channel quality and triggers a switchover again when necessary; this achieves cyclical monitoring and optimization of "HPLC→HRF→HPLC" to ensure the best communication experience.

[0073] The specific switching strategies are shown in Table 1:

[0074] Table 1 Switching strategy for switching components

[0075]

[0076] Where A and B are MCU control pins, Y is an analog switch communication pin, and z is a common terminal. For example: Y0 is HPLC_TX, Y1 is HPLC_RX, Y2 is HRF_TX, Y3 is HRF_RX, Z0 is the common terminal (TX), and Z1 is the common terminal (RX).

[0077] As one implementation method, in order to avoid the loss of cached instructions during the communication link switching process, a temporary communication link is established to wait for or send instructions.

[0078] Specifically, during the communication link switching process, a temporary communication link is established, and the signal strength and communication status pins of the current communication link are collected in real time. Based on the signal strength data and the pin status of the dual-mode communication switching circuit, it is determined whether the current communication link has failed. If so, the system automatically switches to another communication link within a set time.

[0079] As a further implementation, when sending a control signal to the target IoT external switch to control the opening and closing action of the external switch, a specific operating range is set. In order to ensure the strength and range of the Bluetooth received signal, when designing the Bluetooth antenna matching circuit, the impedance (50Ω) of the Bluetooth module's external PCB antenna needs to be calibrated through a π-type matching network (capacitor + inductor) to reduce signal reflection and ensure stable communication inside the metal meter box (the measured communication distance is greater than 10 meters).

[0080] Step 3: Communicate with the IoT external switch based on the preset communication protocol of the corresponding communication mode, and generate control signals to control the opening and closing of the IoT external switch.

[0081] If the communication mode is HPLC communication mode, it receives the transmission command from the HPLC module, transmits the data of all encrypted IoT meters based on the set encryption transmission protocol, verifies the acquired encrypted IoT meter data, reads the current status data of the verified IoT external switch, and determines whether the read status data and status command are consistent. If they are inconsistent, it sends a relay control signal to the IoT external switch to control the opening and closing action of the external switch.

[0082] In this embodiment, the encrypted transmission protocol incorporates protocol encryption benefits, and the specific reward function is as follows:

[0083] ,

[0084] in, , and Indicates the weighting coefficient. β represents the reward coefficient, β represents the penalty coefficient, and γ represents the balance coefficient. This indicates the numerical value corresponding to encryption security. This represents the numerical value corresponding to transmission efficiency. This indicates the numerical value corresponding to the compliance of the agreement.

[0085] For example, when , , hour, Successful encryption earns 10 points, expired key transmission earns -20 points, and failed signature verification earns -15 points. A delay of <50ms results in an 8, a retransmission of 1 results in an 3, and a retransmission of ≥2 results in a -5. Frame 698 transmitted according to APDU structure yields 5, frame 645 passes CRC check and yields 5, incompatible protocol version yields -10.

[0086] when , , At that time, encryption security, transmission efficiency, and protocol compliance values ​​reach their maximum values, which is the optimal solution for the immediate reward function; if the values ​​of α, β, and γ are undetermined, then one cannot blindly rely on... , , The optimal reward value is determined numerically. By setting a weight of α=0.4, encryption security is prioritized while also considering transmission efficiency and protocol compatibility, avoiding the pitfalls of prioritizing security over efficiency or vice versa. Transmission status is evaluated in real-time based on the reward value, dynamically adjusting the mode, encryption strategy, and transmission parameters to adapt to complex channel environments (such as power line interference and wireless signal attenuation). Quantitative rewards and penalties based on R protocol compliance ensure that transmission conforms to industry standards such as 698 / 645, improving cross-device and cross-system adaptability. Severe penalties (-20, -15) are imposed for security risks such as key expiration and signature failure, forcibly triggering risk handling mechanisms to prevent security vulnerabilities. As a further implementation method, a dynamic weight update formula is introduced on top of the original reward and penalty mechanism. The weight coefficients α, β, and γ, along with the quantified scores of each behavior, are iteratively optimized using historical transmission data, ensuring that the reward and penalty parameters are adapted to the actual on-site conditions.

[0087] In this embodiment, for different field scenarios, the weights are iteratively updated based on the historical score R and the achievement rate of business objectives G (such as "zero key expiration rate" in security scenarios and "latency compliance rate" in efficiency scenarios), as expressed as:

[0088] ,

[0089] ,

[0090] ,

[0091] in, t For the iteration period (e.g., quarter), α t+1 ,β t+1 γ t+1 The updated weights; , , This represents the achievement rate of business objectives for the corresponding dimension in the current period. , and The preset target baseline value; The learning rate is typically set to 0.1 to 0.3 to control the magnitude of weight updates.

[0092] For example, target benchmark =95%, current cycle achieved. =90%, then This means appropriately reducing the weight of security in order to guide scenario optimization.

[0093] For specific behaviors (such as "encryption successful" or "retransmission ≥ 2 times"), the quantitative score is adjusted based on the frequency F of the behavior and the business impact I (e.g., "key expired transmission" has a high impact).

[0094] ,

[0095] in, For the first i The updated score for each behavior The actual business impact of this action (e.g., high / medium / low correspond to 1.5 / 1.0 / 0.5). The average impact of all actions; λ represents the frequency of this behavior (e.g., the number of times "retransmission ≥ 2 times" occurs per month); λ is an adjustment factor (usually taken as 0.05~0.2).

[0096] For example, the impact of "protocol version incompatibility" is I. i =1.5, average influence =1.0, frequency F i =5, then This means appropriately increasing the severity of punishment for the behavior and reducing its frequency.

[0097] To prevent parameters from deviating excessively from the target, additional constraints are required: the weighting coefficients must satisfy α + β + γ = 1; the absolute value of the behavior score must be within a preset range (e.g., the score for safety-related behaviors must be within a certain range). (between 25 and +15).

[0098] Through the above mechanism, the weights and scores can be automatically iterated based on the actual data transmitted on site, so that the reward and punishment parameters can be continuously adapted to the real needs of different scenarios.

[0099] The encrypted message is examined and verified. If the verification is correct, the next step is to compare the status. Based on the comparison result, a switch action is executed. If the status comparison is different, it indicates that the action to be executed is normal and valid; otherwise, the process ends.

[0100] As a further implementation, a generation strategy is set when the relay control signal is generated; specifically including:

[0101] For PID optimization targeting external switches, conventional PID controllers struggle to adapt to the nonlinearity and delay of switches. The core issue requiring optimization is output limiting to prevent ineffective drive and hardware damage. Switch drive signals have an "effective range" (e.g., relay drive voltage 9~12V); outputs exceeding this range are meaningless (or may damage hardware). This can be represented as:

[0102]

[0103] in, This indicates the final drive output after limiting (a valid and safe signal). This indicates the hardware safety threshold (upper limit, such as 12V). Outputs exceeding this value may damage the hardware, thus forcibly clamping the voltage to this value. This indicates the switching action threshold (lower limit, e.g., 9V). Outputs below this value are considered "invalid drive" and are forcibly clamped to this value. This represents the raw output of the k-th PID calculation (unlimited, and may be any value).

[0104] If the communication mode is HRF communication mode, determine whether the legality of the command needs to be verified. If so, verify the legality of the transmission command according to the set verification rules. If the verification is successful, determine whether the current state of the target IoT external switch is normal. If it is normal, send a control signal to the target IoT external switch to control the opening and closing action of the external switch.

[0105] In this embodiment, the specific verification rules include format verification, permission verification, and frequency verification.

[0106] The format verification rules include that the instruction frame must contain "operation code (1 byte) + device ID (2 bytes) + random verification code (2 bytes, generated by pre-negotiation between the control terminal and the switch) + CRC16 check (2 bytes)". If any one of these is missing or the format is incorrect, the instruction frame will be discarded.

[0107] The permission verification rules include "on" for high-power loads (e.g., >500W), which requires an additional dynamic flag (obtained by the control end via a Bluetooth Low Energy encrypted channel, valid for minutes); if no flag is present, execution will be refused.

[0108] The frequency verification rules include counting the number of identical commands received within 1 second. If there are ≥3 consecutive identical commands that are consistent with the current state (e.g., if the current state is already on, but the command is still "on"), it is determined to be an interference false trigger, and similar commands are blocked within 5 seconds after the trigger.

[0109] To ensure reliable operation, PID optimization is performed on the external switch characteristics. Conventional PID controllers struggle to adapt to the nonlinearity and delay of switches, requiring optimization to address the core issue of output limiting. This prevents ineffective driving and hardware damage. Switch drive signals have an "effective range" (e.g., relay drive voltage 9~12V). Outputs outside this range are meaningless (or may damage hardware), as shown in the following formula:

[0110]

[0111] in, This indicates the final drive output after limiting (a valid and safe signal). This indicates the hardware safety threshold (upper limit, such as 12V). Outputs exceeding this value may damage the hardware, thus forcibly clamping the voltage to this value. This indicates the switching action threshold (lower limit, e.g., 9V). Outputs below this value are considered "invalid drive" and are forcibly clamped to this value. This represents the raw output of the k-th PID calculation (unlimited, and may be any value).

[0112] Avoid outputting below the action threshold (invalid) or above the safety value (damaged), ensuring that the drive signal is "valid and safe".

[0113] Example 2

[0114] This embodiment provides an IoT meter switch status control system based on dual-modal communication, including:

[0115] The instruction receiving module is used to receive the control instructions for the switch status of the IoT meter.

[0116] The communication mode switching module is used to collect the IoT meter switch signals from each terminal, determine the optimal transmission gain required by the current terminal based on the signal quality, and adjust the transmission power and the communication mode used for transmitting IoT meter switch status control commands according to the current terminal environment. It also generates a corresponding switch component switching strategy based on the target communication mode. The switch control module is used to communicate with the IoT external switch based on the preset communication protocol of the corresponding communication mode, and generate control signals to control the opening and closing of the IoT external switch.

[0117] It should be noted that the specific implementation of the IoT meter switch state control system based on dual-mode communication in this embodiment of the invention is similar to the specific implementation of the IoT meter switch state control method based on dual-mode communication in this embodiment of the invention. Please refer to the description in the method section for details. To reduce redundancy, it will not be repeated here.

[0118] Example 3

[0119] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the IoT meter switch state control method based on dual-modal communication described above.

[0120] Example 4

[0121] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the IoT meter switch state control method based on dual-modal communication described above.

[0122] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0123] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0124] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0125] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0126] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for controlling the state of an IoT table switch based on dual-mode communication, characterized in that, Includes the following steps: Receive the control commands for the switch status of the IoT meter; Collect IoT meter switch signals from each terminal, determine the optimal transmit gain required by the current terminal based on the signal quality, adjust the transmit power and the communication mode used for transmitting IoT meter switch status control commands based on the current terminal's environment, and generate corresponding switch component switching strategies based on the target communication mode. Based on the optimal transmit gain required by the current terminal, a gain adjustment command is sent to the specific terminal through either of the dual-mode communication modes; the gain of the power amplifier of the current terminal is dynamically adjusted according to the gain adjustment command to carry out subsequent communication at the new power level; it is determined whether the current IoT meter switch signal meets the gain required by the current environment. If it does not meet the gain, a transmit gain adjustment control command is issued. Based on a preset communication protocol corresponding to the communication mode, it communicates with the IoT external switch to generate control signals to control the opening and closing of the external switch. If the communication mode is HPLC communication mode, it receives the IoT meter switch status control command, transmits the data of all encrypted IoT meters based on the set encryption transmission protocol, verifies the acquired encrypted IoT meter data, reads the current status data of the successfully verified IoT external switch, and determines whether the read status data and control command are consistent. If they are inconsistent, a relay control signal is generated to control the opening and closing of the IoT external switch. If the communication mode is HRF communication mode, it determines whether the legality of the control command needs to be verified. If so, the legality of the transmitted command is verified according to the set verification rules. If the verification is successful, it determines whether the current status of the target IoT external switch is normal. If it is normal, a control signal is sent to the target IoT external switch to control the opening and closing of the external switch.

2. The IoT meter switch state control method based on dual-mode communication as described in claim 1, characterized in that, After acquiring the communication data for the corresponding mode, the data is filtered. For the communication data acquired in HPLC mode, dual-mode feedback basic filtering is used, and for the communication data acquired in HRF mode, median filtering is used.

3. The IoT meter switch state control method based on dual-mode communication as described in claim 1, characterized in that, The step of generating the corresponding switching strategy for the switching component based on the target communication mode includes: Based on the type of the target communication mode, output the corresponding control signal for switching the analog switch. Upon receiving the control signal, control the analog switch to switch, connecting the target channel to the common terminal and disconnecting the non-target channel.

4. The IoT meter switch state control method based on dual-modal communication as described in claim 1, characterized in that, During the communication link switching process, a temporary communication link is established, and the signal strength and communication status pins of the current communication link are collected in real time. Based on the signal strength data and the pin status of the dual-mode communication switching circuit, it is determined whether the current communication link has failed. If so, it automatically switches to another communication link within a set time.

5. The IoT meter switch state control method based on dual-mode communication as described in claim 1, characterized in that, The established encrypted transmission protocol incorporates protocol encryption benefits, which are expressed as follows: , in, , and Indicates the weighting coefficient. This represents the numerical value corresponding to encryption security. This represents the numerical value corresponding to transmission efficiency. This indicates the numerical value corresponding to the compliance of the agreement.

6. The IoT meter switch state control method based on dual-mode communication as described in claim 1, characterized in that, The specific verification rules include format verification, permission verification, and frequency verification; The format verification rules include that the instruction frame must contain the opcode, device ID, random verification code and CRC16 check; if any one is missing or the format is incorrect, it will be discarded directly. Access verification includes enabling high-power loads, which requires an additional dynamic flag; if the flag is missing, execution will be refused. The frequency verification rules include counting the number of identical commands received within a set time period. If the number of commands is consecutive and consistent with the current state, it is determined to be interference and false triggering, and similar commands are blocked.

7. A dual-mode communication-based IoT meter switch state control system employing the dual-mode communication-based IoT meter switch state control method as described in any one of claims 1-6, characterized in that, include: The instruction receiving module is used to receive the control instructions for the switch status of the IoT meter. The communication mode switching module is used to collect the IoT meter switch signals from each terminal, determine the optimal transmission gain required by the current terminal based on the signal quality, and adjust the transmission power and the communication mode used for transmitting IoT meter switch status control commands according to the current terminal environment. It also generates a corresponding switch component switching strategy based on the target communication mode. The switch control module is used to communicate with the IoT external switch based on the preset communication protocol of the corresponding communication mode, and generate control signals to control the opening and closing of the IoT external switch.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the IoT meter switch state control method based on dual-modal communication as described in any one of claims 1-6.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the IoT meter switch state control method based on dual-modal communication as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Dual-mode communication device, dual-mode communication method and electric meter system

    CN112634601A