Dual-mode communication method, system and electronic device between an electric meter and a terminal, and storage medium
By simultaneously activating the HPLC and HRF interfaces in dual-mode communication between the meter and the terminal, constructing a primary and backup path set using a lightweight long short-term memory network and ant colony algorithm, and dynamically adjusting the channel output power, the problem of insufficient single-path transmission in existing dual-mode communication is solved, achieving high-reliability and low-latency data transmission.
Patent Information
- Application Number
- CN202511536811.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-27
AI Technical Summary
Existing dual-mode communication schemes use a single path for transmission, failing to achieve dual-channel concurrency and lacking dual-mode coordination.
By simultaneously activating the HPLC and HRF interfaces, initial channel parameters are acquired in real time. A channel evaluation model is constructed based on a lightweight long short-term memory network. A primary and backup path set is constructed by combining the ant colony algorithm. The channel output power is dynamically adjusted to achieve dynamic channel evaluation and node networking with multi-parameter fusion.
It improves data transmission success rate, reduces transmission failure rate, ensures routing reliability and low latency, and solves the problem of easy interruption of single path in traditional static routing.
Smart Images

Figure CN121056097B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart grid communication technology, and in particular to a dual-mode communication method, system, electronic device, and storage medium for electricity meters and terminals. Background Technology
[0002] The State Grid's electricity information collection system adopts a hierarchical architecture of concentrators and electricity meters. The local communication module between the electricity meter and the concentrator is the core carrier for achieving data interoperability at the "last mile." The reliability and efficiency of the local communication module directly affect grid dispatching, electricity billing, and user electricity experience. Currently, the mainstream technologies for local communication are HPLC (High-Speed Power Line Carrier) and low-power wireless. HPLC technology utilizes existing power lines, eliminating the need for cabling and offering wide coverage. However, the channel is highly time-varying due to grid noise (switching power supplies, frequency converters) and load fluctuations. Cross-phase / cross-transformer communication requires relays (significant path loss), and the 2-12MHz band experiences significant attenuation over long distances. Low-power wireless technology is unaffected by power line interference and supports point-to-multipoint communication, but suffers from high penetration loss (20-40dB attenuation through concrete walls). The 2.4GHz band is subject to interference from WiFi and Bluetooth, and its coverage radius without relays is less than 1km (line-of-sight environment).
[0003] To compensate for the shortcomings of single-mode technology and improve reliability, the existing communication module adopts "HPLC + low-power wireless" dual-mode fusion communication. However, the dual-mode solution uses a single path for transmission, fails to achieve dual-channel concurrency, and has insufficient dual-mode coordination. Summary of the Invention
[0004] The technical problem to be solved by this application is that the existing dual-mode schemes use a single path for transmission, fail to achieve dual-channel concurrency, and have insufficient dual-mode coordination.
[0005] In order to solve the above problems, or at least partially solve the above technical problems, this application provides a dual-mode communication method, system, electronic device, and storage medium for electricity meters and terminals.
[0006] In a first aspect, the present invention discloses a dual-mode communication method between an electricity meter and a terminal, which specifically includes the following steps:
[0007] The HPLC interface and HRF interface are activated simultaneously, and the initial channel parameters corresponding to the activated HPLC interface and HRF interface are acquired in real time to obtain the first initial channel parameters and the second initial channel parameters; the initial channel parameters include signal-to-noise ratio, bit error rate, channel utilization, and data throughput.
[0008] A channel evaluation model is constructed based on a lightweight long short-term memory network. The channel health is evaluated by inputting a first initial channel parameter and a second initial channel parameter to obtain the real-time optimal channel. The channel evaluation model is trained using the first initial channel parameter and the second initial channel parameter for a preset time period.
[0009] Obtain node data and path data between any two nodes. Construct a primary and backup path set based on the real-time optimal channel and node data. The primary and backup path set includes one primary path and two backup paths. Real-time detection of data transmission rate and data transmission volume in each path in the primary and backup path set. Switch between primary and backup paths in the primary and backup path set according to the data transmission rate. Calculate real-time channel utilization data based on the data transmission volume of each path. Adjust the channel output power value based on the real-time channel utilization.
[0010] Preferably, the synchronous activation of the HPLC interface and the HRF interface, and the real-time acquisition of the initial channel parameters corresponding to the activation of the HPLC interface and the HRF interface to obtain the first initial channel parameters and the second initial channel parameters, specifically includes the following steps:
[0011] When the energy meter and concentrator are powered on, the interfaces on the energy meter and concentrator are activated simultaneously. The interfaces include an HPLC interface and an HRF interface.
[0012] Send a test signal to the HPLC interface and acquire the first initial channel parameters corresponding to the HPLC interface in real time;
[0013] Send a test signal to the HRF interface and obtain the second initial channel parameters corresponding to the HRF interface in real time;
[0014] The first initial parameter and the second initial parameter are stored in the energy meter or concentrator according to the time sequence, and the first initial channel parameter and the second initial channel parameter are matched with the corresponding timestamp.
[0015] Preferably, the channel evaluation model constructed based on a lightweight long short-term memory network, which inputs a first initial channel parameter and a second initial channel parameter to perform channel health evaluation processing to obtain the real-time optimal channel, specifically includes the following steps:
[0016] A channel evaluation model is constructed based on a lightweight long short-term memory network. The model is used to evaluate the corresponding channel health score by inputting a first initial channel parameter and a second initial channel parameter. The channel evaluation model is trained based on historical initial channel parameters.
[0017] Obtain real-time communication delay data and real-time transmission power value from the energy meter or concentrator, construct a reward function model, and calculate the reward function value by inputting the real-time communication delay data and real-time transmission power value.
[0018] A Q-learning algorithm model is constructed, and the Q-value of the corresponding channel is calculated by inputting channel data. The optimal channel and optimal transmit power value are determined based on the Q-value. Real-time channel data includes channel health score, reward function value, real-time communication delay data, and real-time transmit power value.
[0019] Preferably, after obtaining the real-time optimal channel, the following steps are included:
[0020] A preset set of handover trigger thresholds is used to compare the first initial channel parameters and the second initial channel parameters acquired in real time with the set of handover trigger thresholds, and to trigger channel handover processing based on the comparison results; the handover trigger thresholds include signal-to-noise ratio, channel utilization, and signal-to-interference-plus-noise ratio;
[0021] Obtain the current service type identifier, and select the optimal channel based on the corresponding algorithm model according to the service type identifier;
[0022] The current service is an emergency service. A greedy algorithm model is used to evaluate the channel with the highest health score, which is then selected as the optimal channel.
[0023] The current service is a routine service, and the Q-learning algorithm model is used to predict the long-term optimal channel.
[0024] Preferably, the process involves acquiring node data and path data between any two nodes, constructing a primary and backup path set based on the real-time optimal channel and node data, wherein the primary and backup path set includes one primary path and two backup paths, real-time detection of data transmission rate and data transmission volume in each path of the primary and backup path set, switching between the primary and backup paths in the primary and backup path set according to the data transmission rate, calculating real-time channel utilization data based on the data transmission volume of each path, and adjusting the channel output power value based on the real-time channel utilization. Specifically, this includes the following steps:
[0025] Obtain node data and path data between any two nodes, construct an ant colony algorithm model, combine real-time optimal channel and node data to filter paths, and construct a primary and backup path set, which includes one primary path and two backup paths.
[0026] Real-time detection of data transmission rate of each path in the primary and backup path set; switching between primary and backup paths in the primary and backup path set based on data transmission rate; if the number of switching exceeds a preset number, reconstructing the primary and backup path set.
[0027] The system monitors the data transmission volume of each path in the primary and backup path set in real time, calculates the real-time channel utilization data based on the data transmission volume of each path, and adjusts the channel output power value based on the real-time channel utilization.
[0028] Preferably, the steps of acquiring node data and path data between any two nodes, constructing an ant colony algorithm model, filtering paths by combining real-time optimal channel and node data, and constructing a primary and backup path set, wherein the primary and backup path set includes one primary path and two backup paths, specifically include the following steps:
[0029] Obtain node connection status data from the local node management module to get the path data between any two nodes;
[0030] A path selection model is constructed based on the ant colony algorithm model, and the model parameters are initialized, including pheromone concentration, volatility factor, and link quality heuristic factor.
[0031] The path selection probability is calculated for the input node data and path data of the filtering model. The path is filtered according to the path selection probability. The path with the highest selection probability is selected as the primary path, and the two paths with the second highest selection probability are selected as backup paths, thus obtaining a set of primary and backup paths.
[0032] Preferably, the real-time detection of the data transmission rate of each path in the primary and backup path set, and the switching of the primary or backup path in the primary and backup path set according to the data transmission rate, and the reconstruction of the primary and backup path set if the number of switching exceeds a preset number, specifically includes the following steps:
[0033] Real-time monitoring of the data transmission rate of each path in the primary and backup path set; when the rate is equal to 0 or the number of switching times exceeds the preset number due to low rate, a path reconstruction information is issued.
[0034] Mark the paths in the primary and backup path sets, and remove the paths and nodes from the primary and backup path sets from the node data and path data to obtain the node data and path data after removal.
[0035] The path filtering model is re-invoked, the model parameters are updated, and the removed node data and path data are input for filtering to obtain the updated primary and backup path set.
[0036] Secondly, the present invention discloses a dual-mode communication system for an electricity meter and a terminal, which includes the aforementioned dual-mode communication method for an electricity meter and a terminal.
[0037] Thirdly, the present invention discloses an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0038] Memory, used to store computer programs;
[0039] When the processor executes the program stored in the memory, it implements the steps of the above-described dual-mode communication method between the electricity meter and the terminal.
[0040] Fourthly, the present invention discloses a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the dual-mode communication method between the meter and the terminal as described above.
[0041] The technical solution provided in this application has the following advantages compared with the prior art:
[0042] This application provides a dual-mode communication method, system, electronic device, and storage medium for electricity meters and terminals. The dual-mode communication method for electricity meters and terminals mentions that it uses multi-parameter fusion combined with a lightweight long short-term memory network for dynamic channel evaluation, selects the optimal communication channel and mode in real time, implements node networking through an ant colony algorithm, configures one primary path and two backup paths for data transmission, and improves data transmission success rate and reduces transmission failure rate by using multi-dimensional channel health scoring and a set of primary and backup paths. Furthermore, it constructs a redundant topology of one primary path and two backup paths based on the optimal channel to solve the problem of easy interruption of a single path in traditional static routing. Simultaneously, it uses an ant colony algorithm to select high-quality links, ensuring routing reliability and low latency. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating a dual-mode communication method between an electricity meter and a terminal provided in this application;
[0046] Figure 2 A detailed flowchart illustrating step S1 of the dual-mode communication method between an electricity meter and a terminal provided in this application;
[0047] Figure 3 A detailed flowchart of step S2 of the dual-mode communication method between an electricity meter and a terminal provided in this application. Figure 1 ;
[0048] Figure 4 A detailed flowchart of step S2 of the dual-mode communication method between an electricity meter and a terminal provided in this application. Figure 2 ;
[0049] Figure 5A detailed flowchart illustrating step S3 of the dual-mode communication method between an electricity meter and a terminal provided in this application;
[0050] Figure 6 A detailed flowchart illustrating step S31 of the dual-mode communication method between an electricity meter and a terminal provided in this application;
[0051] Figure 7 A schematic diagram illustrating the specific steps of step S32 in the dual-mode communication method between an electricity meter and a terminal provided in this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0053] Firstly, see Figures 1-7 This invention discloses a dual-mode communication method between an electricity meter and a terminal, which specifically includes the following steps:
[0054] Step S1: Synchronously activate the HPLC interface and HRF interface, and collect the initial channel parameters corresponding to the activated HPLC interface and HRF interface in real time to obtain the first initial channel parameters and the second initial channel parameters; the initial channel parameters include signal-to-noise ratio, bit error rate, channel utilization, and data throughput;
[0055] Step S2: Construct a channel evaluation model based on a lightweight long short-term memory network, input the first initial channel parameters and the second initial channel parameters to perform channel health evaluation processing, and obtain the real-time optimal channel; the channel evaluation model is trained using the first initial channel parameters and the second initial channel parameters for a preset time period;
[0056] Step S3: Obtain node data and path data between any two nodes. Construct a primary and backup path set based on the real-time optimal channel and node data. The primary and backup path set includes one primary path and two backup paths. Real-time detection of data transmission rate and data transmission volume in each path in the primary and backup path set. Switch between the primary path and backup path in the primary and backup path set according to the data transmission rate. Calculate real-time channel utilization data based on the data transmission volume of each path. Adjust the channel output power value based on the real-time channel utilization.
[0057] Specifically, in step S1, after the energy meter or concentrator is powered on, a synchronous start command is sent to the dual-mode communication single chip (integrating an HPLC transceiver and an HRF transceiver), simultaneously activating the HPLC interface and the HRF interface. The HPLC interface is configured for the 0.7–12MHz frequency band and loaded with the IEEE 1901.1 protocol; the HRF interface is configured for the 470–510MHz frequency band and loaded with the simplified LoRa protocol, ensuring that both interfaces enter the working state simultaneously and avoiding asynchronous start-up delays. The HPLC interface is controlled to send 10 sets of test carrier signals to the low-voltage power line, and the HRF interface sends 10 sets of test wireless signals to the surrounding area. The receiving end collects the core parameters of the two types of interfaces in real time: signal-to-noise ratio (SNR), bit error rate (BER), channel utilization (U), and data throughput (Throughput). The average value of each parameter within 100ms is taken to form the first initial channel parameters corresponding to the HPLC interface and the second initial channel parameters corresponding to the HRF interface. Establish the hardware and protocol foundation for dual-mode communication, ensure that the HPLC and HRF interfaces can transmit and receive signals normally, provide a prerequisite for subsequent channel evaluation and networking, obtain the initial state baseline of the two types of channels, and clarify the initial quality differences between the HPLC interface and the HRF interface.
[0058] Specifically, in step S2, a lightweight Long Short-Term Memory (LSTM) network model is deployed on the edge computing unit of the energy meter. The model's input layer is set to signal-to-noise ratio, bit error rate, channel utilization, and data throughput, while the output layer is the channel health score. The number of hidden layer nodes is set to 32 (balancing accuracy and computing power). The model is trained using a pre-set time period of data, aiming to minimize the error between the health score and the actual communication quality. The model weights are iteratively optimized through backpropagation, enabling the model to accurately quantify channel quality. The obtained first and second initial channel parameters are input into the trained model, and the model outputs health scores for the HPLC and HRF interfaces, respectively. The channel with the higher score is selected as the real-time optimal channel. The time-series changes of channel parameters are dynamically captured, solving the problem that traditional static weight evaluation cannot adapt to the time-varying characteristics of the channel. By quantifying the health score, the real-time superiority or inferiority of the two types of channels is clarified, avoiding the use of inferior channels caused by traditional fixed primary / backup switching.
[0059] Specifically, in step S3, "node data" (including all energy meter IDs, relay node IDs, concentrator IDs, and device types) is read from the local node management module. A detection signal is broadcast via the dual-mode interface to obtain path data between any two nodes. Based on the real-time optimal channel, paths supporting that channel are prioritized for selection. The path quality value of each path is calculated, and the path with the highest quality value is selected as the primary path. The next two highest-quality paths are selected as backup paths, forming a primary and backup path set. One rate monitoring unit is deployed on each primary and backup path to collect the data transmission rate (in kbps) once per second, recording the primary path rate V.主 The backup path rate is V. 备1 V 备2 Set the rate switching threshold; if V 主 <0.7×max(V 主 V 备1 V 备2 If V is compared, then V is compared. 备1 With V 备2 The system sets the higher-speed backup path as the new primary path, and the original primary path is downgraded to a backup path. It calculates the real-time channel utilization by tracking the cumulative data transmission volume of the primary and backup paths over a preset period and considering the channel bandwidth. If the real-time channel utilization is greater than a preset threshold, it adopts full-power transmission mode; if the real-time channel utilization is less than the preset threshold, it reduces transmission power; when the real-time channel utilization is zero, it directly enters sleep mode. This system constructs a redundant topology of 1 primary and 2 backup paths to solve the problem of data loss after a traditional single-path interruption, improves routing reliability, tracks path transmission rates in real time, ensures that the path with the optimal rate is always used, avoids increased transmission delay caused by "continuous use after the primary path rate decreases," and dynamically optimizes transmission power based on channel load to balance transmission efficiency and energy consumption control, avoiding the problems of insufficient power during congestion and wasted power during idle periods associated with traditional fixed-power systems.
[0060] It is understandable that by using multi-parameter fusion in conjunction with a lightweight long short-term memory network for dynamic channel evaluation, the optimal communication channel and communication mode are selected in real time. Node networking is achieved through ant colony algorithm, and one primary path and two backup paths are configured for data transmission. Data transmission is improved by using multi-dimensional channel health scoring and primary / backup path sets. This increases the data transmission success rate and reduces the transmission failure rate. In addition, a redundant topology of one primary path and two backup paths is constructed based on the optimal channel to solve the problem of easy interruption of a single path in traditional static routing. At the same time, the ant colony algorithm is used to select high-quality links to ensure routing reliability and low latency.
[0061] Step S1 specifically includes the following steps:
[0062] Step S11: Power on the energy meter and concentrator, and simultaneously activate the interfaces on the energy meter and concentrator, including the HPLC interface and the HRF interface;
[0063] Step S12: Send a test signal to the HPLC interface and acquire the first initial channel parameters corresponding to the HPLC interface in real time;
[0064] Step S13: Send a test signal to the HRF interface and obtain the second initial channel parameters corresponding to the HRF interface in real time;
[0065] Step S14: Store the first initial parameter and the second initial parameter in the energy meter or concentrator according to the time sequence, and match the first initial channel parameter and the second initial channel parameter with the corresponding timestamp.
[0066] Specifically, after the energy meter and concentrator are connected to the mains power, they send a synchronization start command to the dual-mode communication chip via their internal bus, initiating a 100ms ACK timeout timer. Upon receiving the command, the chip simultaneously activates the HPLC and HRF interfaces. The HPLC interface switches to the 0.7–12MHz frequency band and loads the State Grid Q / GDW11612 protocol stack; the HRF interface switches to the 470–510MHz frequency band and loads a low-power wireless communication protocol. After interface activation, a ready signal is returned, ensuring that both interfaces enter the working state at the same time. The control unit of the energy meter / concentrator sends a test signal generation command to the HPLC interface, generating 10 sets of fixed-frequency carrier test signals, each lasting 100ms with a 50ms interval to avoid signal superposition. The control unit also sends a test signal generation command to the HRF interface, generating 10 sets of wireless test signals, each lasting 100ms, using a frequency hopping mechanism to avoid co-channel interference. The HPLC interface transmits test signals via the power line, while the receiving end (such as a concentrator / other energy meter) acquires the signals in real time to obtain the first initial channel parameters. The HRF interface transmits test signals via its built-in antenna, and the receiving end acquires the signals in real time to obtain the second initial channel parameters. These channel parameters include signal-to-noise ratio (SNR), bit error rate (BER), channel utilization (U), and data throughput (Throughput). The first and second initial channel parameters are encapsulated in the format "channel type-parameter name-value-unit," and a precise timestamp is added to each set of parameters. The timestamp is taken from the device's built-in real-time clock, ensuring that the timestamp error between the first initial channel parameters (HPLC) and the second initial channel parameters (HRF) is ≤10ms. The timestamped parameters are stored in the local Flash memory of the energy meter / concentrator in chronological order of acquisition time, and an index table (recording parameter type, storage address, and timestamp range) is generated for easy subsequent time-based lookup. By ensuring synchronization and acquiring multi-dimensional parameters, the initial states of the HPLC interface and the HRF interface can be directly compared. Through time-series storage and timestamps, high-quality historical data is provided for subsequent dynamic evaluation, ultimately improving the system's perception accuracy of channel status and decision reliability.
[0067] Step S2 specifically includes the following steps:
[0068] Step S21: Construct a channel evaluation model based on a lightweight long short-term memory network, input the first initial channel parameters and the second initial channel parameters to evaluate the corresponding channel health score; the channel evaluation model is trained based on historical initial channel parameters;
[0069] Step S22: Obtain real-time communication delay data and real-time transmission power value from the electricity meter or concentrator, construct a reward function model, and calculate the reward function value by inputting the real-time communication delay data and real-time transmission power value;
[0070] Step S23: Construct a Q-learning algorithm model, input channel data to calculate the corresponding Q value of the channel, and determine the optimal channel and optimal transmit power value based on the Q value; real-time channel data includes channel health score, reward function value, real-time communication delay data, and real-time transmit power value.
[0071] Specifically, a historical sequence of channel parameters for nearly 10 seconds is read from the local Flash cache and input into the channel evaluation model deployed on the edge computing unit of the electricity meter. The channel evaluation model parameters are initialized, and dynamic weight coefficients α (SNR weight), β (BER weight), and γ (Throughput weight) are trained using the backpropagation algorithm, with initial weight preset values (α=0.4, β=0.3, γ=0.3). The channel health score is calculated based on the trained weight coefficients.
[0072] Output health scores for HPLC and HRF respectively. Dynamically capture the temporal trends of channel parameters (e.g., increased grid noise causing a continuous decrease in HPLC SNR) to generate multi-dimensional quantitative health indicators, solving the problem that traditional static weights cannot adapt to the time-varying characteristics of the channel. Collect the time difference between data frame transmission and ACK return from the receiver using a hardware timer of the energy meter / concentrator, updating it every 100ms. Read the current transmit power through the power management unit of the dual-mode communication module. Construct a dual-objective reward function model:
[0073] ;
[0074] in: , The weights are dynamically adjusted through distributed reinforcement learning, with each node acting as an independent agent and the input being the delay. With transmission power By setting weights v1 and v2, a balance is found between reducing latency and energy consumption, ensuring that the reward value r is consistent with the optimization objective and adapting to different scenario requirements. The two core optimization objectives of latency and power are transformed into a single reward value, providing a clear evaluation standard for Q-learning.
[0075] The Q-value is iteratively updated using the Q-learning core formula:
[0076] ;
[0077] Wherein: State (s) reflects the combined state of the current channel and action; Action (a): the communication configuration operation that the system can execute under the combined state of the current channel and action; Q(s,a) represents the long-term cumulative reward expectation of executing action a in state s, parameter α is the learning rate, parameter r is the reward function value, s' is the next state after executing action a, and maxQ(s',a') is the maximum Q value under s'. The reward function r is the goal-oriented core of the Q-learning update strategy, and Q-learning is the learning execution process that optimizes action selection through reward feedback. After Q-value convergence, the optimal transmit power and channel allocation strategy is output. Through iterative learning of Q-values, in scenarios where the channel state changes over time, the long-term optimal channel and power configuration is continuously found, avoiding the limitations of traditional fixed strategies.
[0078] Step S2 also includes the following steps:
[0079] Step S24: Preset a set of handover trigger thresholds, compare the real-time acquired first initial channel parameters and second initial channel parameters with the set of handover trigger thresholds, and trigger channel handover processing based on the comparison results; the handover trigger thresholds include signal-to-noise ratio, channel utilization, and signal-to-interference-plus-noise ratio;
[0080] Step S25: Obtain the current service type identifier, and select the optimal channel based on the corresponding algorithm model according to the service type identifier;
[0081] Step S26: The current service is an emergency service. The channel with the highest health score is evaluated using a greedy algorithm model and selected as the optimal channel.
[0082] Step S27: The current service is a regular service. The Q-learning algorithm model is used to predict the long-term optimal channel.
[0083] Specifically, to meet the core requirements of power communication, three key parameter thresholds are preset (based on historical fault data and protocol standards): signal-to-noise ratio (SNR) threshold, channel utilization (U) threshold, and signal-to-interference-plus-noise ratio (SINR) threshold. Real-time parameters (SNR, U, SINR) are collected every second from the HPLC / HRF interface and compared one by one with the threshold set. If at least one parameter of any channel exceeds the standard, the channel quality is determined to be degraded, triggering channel switching. A switching command is generated, interrupting the current channel transmission through the communication module and activating the target channel, with a switching delay ≤100ms. Through hard threshold comparison, switching is immediately triggered when channel parameters suddenly deteriorate, avoiding communication interruption or quality drastic drops. Cross-validation of multiple parameters (SNR / U / SINR) avoids erroneous switching caused by fluctuations in a single parameter, improving response speed. Emergency services include reporting power outages and alarming meter malfunctions, while routine services include timed meter readings and load statistics. The service type identifier is embedded in the data frame header. When the energy meter / concentrator receives a service request, it parses the header field to obtain the identifier and automatically calls the corresponding algorithm model based on the parsed service type identifier. Emergency services call a greedy algorithm to save computing power, while routine services call a global optimization algorithm to improve long-term performance and achieve on-demand allocation of computing resources.
[0084] Step S3 specifically includes the following steps:
[0085] Step S31: Obtain node data and path data between any two nodes, construct an ant colony algorithm model, combine real-time optimal channel and node data to filter paths, and construct a set of primary and backup paths, which includes one primary path and two backup paths.
[0086] Step S32: Real-time detection of the data transmission rate of each path in the primary and backup path set; switching between primary and backup paths in the primary and backup path set according to the data transmission rate; if the number of switching exceeds the preset number, reconstructing the primary and backup path set.
[0087] Step S33: Real-time detection of data transmission volume in each path of the primary and backup path set, calculation of real-time channel utilization data based on the data transmission volume of each path, and adjustment of the channel output power value based on the real-time channel utilization.
[0088] Specifically, the system obtains information on all participating nodes from the node management module of the energy meter / concentrator, including node ID, node type, location coordinates, and supported communication channels. It broadcasts path probe frames via a dual-mode interface, receives response frames from the receiving nodes, and parses the path data between any two nodes, including connectivity, channel type, and link quality parameters, including average SNR, average BER, and transmission delay. The system then initializes algorithm parameters and pheromone concentration. =1 (initial value, i is the starting node, j is the ending node), pheromone evaporation factor ρ=0.3, heuristic factor Path selection probability formula:
[0089] ;
[0090] Where α is the pheromone weight and β is the heuristic factor weight, the maximum number of hops in the path is limited to ≤3.
[0091] Based on the real-time optimal channel, the system prioritizes filtering from paths supporting that channel, iteratively calculating the selection probability of each path, and selecting the path with the highest probability as the primary path. The two paths with the next highest probabilities are selected as backup paths, forming a primary and backup path set. The path node sequence, hop count, and link quality parameters are stored. This one-primary-two-backup path design solves the problem of data loss after a traditional single-path interruption. Combined with real-time optimal channel filtering, it ensures that the primary and backup paths prioritize using the currently highest-quality channel, avoiding the drag on transmission efficiency from inferior channels. The ant colony algorithm, through pheromone accumulation and evaporation, quickly focuses on high-quality paths, reducing invalid route exploration. By monitoring the rate in real-time and dynamically switching paths, the system ensures that it always uses the path with the current optimal rate, avoiding increased latency caused by continuing to use the primary path even after its rate decreases. A switching threshold is set; if the number of primary and backup path switching exceeds the threshold within one hour, the current path set is deemed unsuitable for channel changes; the ant colony algorithm is triggered to re-collect path data and construct a new primary and backup path set. Utilization is calculated using transmission volume to intuitively reflect the channel congestion level. Power is increased to enhance the signal during congestion and reduced during idle periods.
[0092] Step S31 specifically includes the following steps:
[0093] Step S311: Obtain node connection status data from the local node management module to get the node data and the path data between any two nodes;
[0094] Step S312: Construct a path filtering model based on the ant colony algorithm model and initialize the model parameters, including pheromone concentration, volatile factor, and link quality heuristic factor;
[0095] Step S313: Calculate the path selection probability for the input node data and path data of the filtering model, filter the paths according to the path selection probability, select the path with the highest selection probability as the main path, and the two paths with the second highest selection probability as backup paths, to obtain the set of main and backup paths.
[0096] Specifically, the local node management module deployed on the concentrator or core relay node periodically broadcasts heartbeat detection frames, receives response frames from each node, and parses them to obtain node data and path data. Node data includes a unique node ID, node type, current online status, supported communication channels, and signal transmission capabilities; path data includes the connection relationship between any two nodes, the connection channel type, and link quality parameters. Invalid data is filtered, and valid data is stored in a fixed format to form a structured path list. A path selection model is constructed based on the ant colony algorithm principle. The model inputs are node data and path data, and the output is the selection probability of each path. Algorithm parameters and pheromone concentration are initialized. (Initial values, i is the starting node, j is the ending node), pheromone evaporation factor ρ = 0.3, heuristic factor Path selection probability formula:
[0097] ;
[0098] Where α is the pheromone weight and β is the heuristic factor weight, the maximum number of hops in the path is limited to ≤3.
[0099] Based on the real-time optimal channel, the algorithm prioritizes filtering from paths that support that channel, iteratively calculating the selection probability of each path, and selecting the path with the highest probability as the primary path. The two paths with the next highest probabilities are selected as backup paths, forming a primary and backup path set. The path node sequence, hop count, and link quality parameters are stored. This one-primary-two-backup path design solves the problem of data loss after a traditional single-path interruption. Combined with real-time optimal channel filtering, it ensures that the primary and backup paths prioritize using the currently highest-quality channel, avoiding the drag of poor-quality channels on transmission efficiency. The ant colony algorithm, through pheromone accumulation and evaporation, quickly focuses on paths with high link quality, reducing unnecessary route exploration.
[0100] Step S32 specifically includes the following steps:
[0101] Step S321: Real-time detection of the data transmission rate of each path in the primary and backup path set. When the rate is equal to 0 or the number of switching exceeds the preset number due to the low rate, a path reconstruction information is issued.
[0102] Step S322: Mark the paths in the primary and backup path sets, and remove the paths and nodes from the primary and backup path sets from the node data and path data to obtain the removed node data and path data;
[0103] Step S323: Recall the path filtering model, update the model parameters, input the removed node data and path data for filtering processing, and obtain the updated primary and backup path set.
[0104] Specifically, a rate monitoring unit is deployed on each link segment of the primary and backup paths to collect the actual data transmission rate of the link segment once per second; the average rate of each complete path is calculated, and the duration of a rate of 0 is recorded. If either a link interruption or frequent switching condition is met, a path reconstruction message is sent to the path filtering module. The link interruption condition is when the average rate of any path is 0 for 3 consecutive seconds, directly triggering reconstruction; the frequent switching condition is a preset threshold for the number of switching attempts. If the number of switching attempts on the primary and backup paths exceeds the threshold within one hour, it is determined that the current path set can no longer adapt to channel changes, triggering reconstruction. The reconstructed path information is received, and invalid paths are marked, such as the primary path with a rate of 0 or the backup path involved in frequent switching. Key failed nodes in the invalid paths are further marked. If a node exists in ≥2 invalid paths simultaneously, it is determined to be a key failed node and marked as a node to be excluded. From the original node data, nodes to be excluded are removed, and the remaining online and fault-free nodes are retained to form the node data after removal. From the original path data, invalid paths and all paths containing nodes to be excluded are removed, retaining only those where both ends are in the node data after removal, forming the path data after removal. The ant colony algorithm path selection model was re-launched, with a focus on updating the pheromone concentration and link quality heuristic parameters. All candidate paths in the removed path data were then analyzed. Setting the threshold to 1.2 prioritizes exploring paths in the new candidate pool. Based on the real-time SNR, BER, and latency of the removed path data, the heuristic factor is recalculated to ensure that the factor reflects the current link quality, while the volatile factor remains unchanged, balancing new path exploration with stability. The removed node and path data are input into the updated model, and the selection probability of each candidate path is calculated according to probability calculation rules. The paths are sorted from highest to lowest probability, and the path ranked 1st is selected as the new primary path, while the paths ranked 2nd and 3rd are selected as new backup paths. Simultaneously, the node overlap rate of the new primary and backup paths is ensured to be ≤30% to avoid new paths relying on the same potentially faulty node. An updated set of primary and backup paths is output, including the node sequence, average rate, BER, SNR, and other parameters of the new paths, and synchronized to the rate monitoring unit, replacing the original primary and backup path data. This approach accurately identifies failed paths and nodes, reduces invalid calculations through data filtering, ensures the quality of new paths through model parameter updates, and ultimately quickly generates a reliable set of new primary and backup paths. This avoids the communication interruption problem after traditional static routing failures, significantly improving the fault tolerance and transmission continuity of the power dual-mode communication network.
[0105] Step S33 specifically includes the following steps:
[0106] Step S331: Read the cumulative data transmission volume and real-time channel utilization rate over the past 5 minutes, preset the data transmission threshold and utilization rate threshold, compare the real-time data transmission volume and real-time channel utilization rate with the corresponding thresholds, and adjust the channel output power accordingly.
[0107] Step S332: If the cumulative data transmission volume is greater than the data transmission threshold or the real-time channel utilization is greater than the utilization threshold, output the full power mode command to control the HPLC and HRF interface to communicate at full speed with power consumption ≤2W.
[0108] Step S333: If the cumulative data transmission volume is less than or equal to the data transmission threshold or the real-time channel utilization rate is less than or equal to the utilization rate threshold, output the power saving mode command, the HRF interface listens for the signal once every 5 seconds, the HPLC interface enters the standby state, and the power consumption is ≤0.5W.
[0109] Step S334: If the cumulative data transmission volume is 0, output the sleep mode command, turn off the power supply of the HRF interface, and the HPLC interface only retains the carrier wake-up function (it can be woken up by receiving the concentrator carrier signal), with a power consumption of ≤0.1W.
[0110] Specifically, the cumulative data transmission volume over the past 5 minutes is read from the traffic statistics unit of the primary and backup paths, and statistics are collected separately for the HPLC channel and the HRF channel. Real-time channel utilization is calculated based on a formula, with separate calculations for the HPLC and HRF channels. Threshold presets and comparison judgments use a comparison rule: the real-time cumulative transmission volume is compared with the transmission threshold, and the real-time utilization rate is compared with the utilization rate threshold. If either exceeds the threshold, power is increased; if neither exceeds the threshold, power is decreased; and if the transmission volume is 0, the system enters sleep mode to determine the power adjustment direction (full power / energy saving / sleep). In full power mode, signal strength and anti-interference capability are maximized, solving the problems of high retransmission rates and large delays caused by insufficient power during channel congestion. During moderate traffic periods, energy consumption is reduced through intermittent operation and low power while ensuring basic communication needs are met. During periods without traffic, power consumption is minimized, solving the energy waste problem of traditional equipment operating 24 / 7.
[0111] It is understandable that the energy consumption is dynamically adjusted according to the data volume and channel load to avoid the energy waste caused by the traditional full-power constant start; at the same time, the sleep mode extends the battery life of the energy meter (for battery-powered scenarios) or reduces grid losses (for mains-powered scenarios). The tiered mode adapts to different load scenarios, and the power consumption in sleep mode is ≤0.1W, which is 87.5% lower than the sleep power consumption (0.8W) of the traditional dual-mode module; the HPLC carrier wake-up function ensures that data requests can be responded to quickly during sleep, with a wake-up delay of <50ms.
[0112] Step S3 is followed by the following steps:
[0113] Step S4: Calculate the interruption probability of the real-time optimal channel at the physical layer, compare the interruption probability with the preset probability threshold, and perform a second determination of the optimal channel.
[0114] Step S5: Determine the selected path from the primary and backup path set, calculate the real-time collision probability of the channel based on the number of data frame verification failures caused by multiple nodes simultaneously transmitting on the path, calculate the adjustment coefficient through the collision probability function, dynamically adjust the contention window parameters of the MAC layer, send the adjusted contention window parameters to the physical layer transceiver, and adjust the random waiting time before data transmission.
[0115] Step S6: Combining the adjusted contention window parameters with the secondary determination of the optimal channel, data frames are sent using the channel throughput as the transmission rate. The receiving end receives the data frames, verifies the CRC16 check field, and returns an ACK confirmation signal to the ACK timeout timer if the verification passes. If the verification fails, a retransmission request is returned. If the retransmission fails 3 times, an interrupt detection is triggered.
[0116] Step S7: Receive ACK signal. If all data frames to be transmitted are successfully received or retransmitted 3 times, the data transmission is determined to be complete. A transmission completion signal is generated, and an idle timer is started. The timer value is updated once per second from the time of transmission completion. If a new data request signal is received during the timer, the timer is immediately reset to 0, the current timer is stopped, and the data transmission preparation process is triggered.
[0117] Specifically, in step S4, key parameters of the real-time optimal channel are extracted from the physical layer, including the instantaneous signal-to-interference-plus-noise ratio (SINR) and the channel fading coefficient. The SINR is sampled 100 times per second, and the average is calculated. The channel fading coefficient is obtained based on the frequency-selective fading of power line / HPLC or the shadowing fading model of HRF. The interruption probability is calculated using the following formula:
[0118]
[0119] Where γ th The demodulation threshold represents the probability of communication interruption when the SINR falls below this value. The physical layer selects either the HPLC or HRF channel based on the interruption probability. A preset probability threshold is set: ≤1% for emergency services and ≤5% for routine services. If the current interruption probability is less than or equal to the threshold, the original optimal channel is confirmed as valid. If the current interruption probability is greater than the threshold, a secondary screening process is triggered, recalculating the interruption probability from backup channels and selecting the first channel that meets the threshold as the new optimal channel. This quantifies channel interruption risk from the underlying signal characteristics, compensating for potential instantaneous physical layer degradation that might be overlooked in upper-layer evaluations. Through secondary verification, channels with high scores but high actual interruption risk are eliminated, ensuring the physical layer reliability of the final channel. Combined with physical layer hard parameters, transmission failures caused by upper-layer scoring biases are avoided. Thresholds are set for different services to balance high reliability with efficient resource utilization.
[0120] Specifically, in step S5, the number of data frame verification failures for each path in the primary and backup path sets is counted. =Number of conflicting frames / Total frames; Calculate the adjustment factor by calling the conflict avoidance function:
[0121] ;
[0122] in To optimize the real-time utilization of this channel, the contention window is dynamically adjusted to reduce the collision rate by 30%; the MAC layer contention window is also dynamically adjusted.
[0123] ;in ;
[0124] The adjusted CW parameters are sent to the physical layer transceiver to control the random waiting time before data transmission. The waiting time is randomly selected within the range of [0, CW].
[0125] By dynamically adjusting the contention window based on the collision probability, when collisions are frequent, the contention window (CW) is increased to extend the random waiting time and reduce the probability of multiple nodes transmitting simultaneously; conversely, the CW is decreased to shorten the waiting time and improve channel utilization. Since HPLC (Power Line) and HRF (Wireless) have different multi-node access characteristics, the medium access efficiency of the two types of channels is optimized by differentiating the initial CW and dynamically adjusting it.
[0126] Specifically, in step S6, a data frame is sent at the real-time throughput of the optimal channel determined twice, with the data frame structure including: a frame header (service type, length), a payload (valid data), and a CRC16 check field (16-bit cyclic redundancy check code) to ensure that the receiver can verify data integrity. After receiving the data frame, the receiver calculates the CRC16 value and compares it with the frame tail check field. If the verification passes, it immediately returns an ACK confirmation signal (including the frame sequence number) to the sender and resets the ACK timeout timer. If the verification fails, it returns a NACK retransmission request (including the failed frame sequence number). If the sender receives a NACK or ACK timeout, it triggers retransmission (up to 3 times). If all 3 retransmissions fail, it triggers the interruption detection process, calling step S4 to reassess the channel interruption probability and check whether the link is faulty. The CRC16 check can detect 99.997% of random errors, the ACK mechanism ensures that the sender knows whether the frame has been successfully received, the retransmission mechanism compensates for occasional errors, and the interruption detection is triggered after 3 failed retransmissions to avoid infinite retransmissions that waste resources and quickly locate persistent faulty links, such as offline nodes or completely blocked channels. Limit the number of retransmissions to avoid excessive channel resources being occupied by single-frame retransmissions; trigger interruption detection when retransmission fails, reducing link fault location time from 5s to 1s and improving the system's self-healing speed.
[0127] Specifically, in step S7, the sending end receives ACKs for all data frames to be transmitted (or succeeds after 3 retransmissions), determines that data transmission is complete, and generates a transmission completion signal. This signal includes statistics on transmission duration, number of successful frames, and number of retransmissions. An idle timer is started, beginning at the moment of transmission completion with a precision of 1 second, and the timer value is updated in real time. If a new data request signal is received during the timing period, such as a new meter reading command initiated by the concentrator, the timer is immediately reset to 0, the current timing stops, and steps S2 (channel assessment) and S3 (path construction) are re-executed to prepare the optimal channel and path for the new service. The idle timer enables the system to quickly switch from transmission completion to new service preparation, shortening channel idle time. Receiving a new request immediately resets the timer and starts the preparation process, avoiding service delays caused by waiting for the timer to expire and ensuring that new requests can be processed immediately.
[0128] It is understandable that step S4 verifies channel reliability twice through interruption probability, step S5 optimizes MAC layer contention to reduce collisions, step S6 uses checksums and retransmissions to ensure data integrity, and step S7 improves idle response speed through timers. Overall, this forms a closed loop of "lower-level verification - access optimization - transmission assurance - state management," significantly improving the reliability, efficiency, and response speed of the dual-mode communication system, perfectly meeting the core requirements of the power Internet of Things for high reliability, high efficiency, and low latency.
[0129] Secondly, the present invention discloses a dual-mode communication system for an electricity meter and a terminal, which includes the aforementioned dual-mode communication method for an electricity meter and a terminal.
[0130] Specifically, the system implements the first aspect of the method, which mentions a dual-mode communication method between the meter and the terminal. This method involves dynamic channel evaluation through multi-parameter fusion and a lightweight long short-term memory network to select the optimal communication channel and mode in real time. Node networking is achieved through an ant colony algorithm, and one primary path and two backup paths are configured for data transmission. Data transmission is improved by using multi-dimensional channel health scoring and a set of primary and backup paths. This reduces the data transmission success rate and the transmission failure rate. Furthermore, a redundant topology of one primary path and two backup paths is constructed based on the optimal channel to solve the problem of easy interruption of a single path in traditional static routing. At the same time, the ant colony algorithm is used to select high-quality links to ensure routing reliability and low latency.
[0131] Thirdly, the present invention discloses an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0132] Memory, used to store computer programs;
[0133] When the processor executes the program stored in the memory, it implements the steps of the above-described dual-mode communication method between the electricity meter and the terminal.
[0134] Specifically, the processor runs the program in memory to implement the method in the first aspect. The dual-mode communication method between the meter and the terminal mentions that dynamic channel evaluation is performed by combining multi-parameter fusion with a lightweight long short-term memory network to select the optimal communication channel and communication mode in real time. The node networking is achieved through ant colony algorithm, and one primary path and two backup paths are configured for data transmission. Data transmission is improved by using multi-dimensional channel health scoring and primary and backup path sets. In addition, a redundant topology of one primary path and two backup paths is constructed on the basis of the optimal channel to solve the problem of easy interruption of the single path in traditional static routing. At the same time, the high-quality link is selected through ant colony algorithm to ensure routing reliability and low latency.
[0135] Fourthly, the present invention discloses a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the dual-mode communication method between the meter and the terminal as described above.
[0136] Specifically, the storage medium is operated to implement the method of the first aspect, in which the dual-mode communication method between the meter and the terminal is mentioned. Dynamic channel evaluation is performed by multi-parameter fusion and a lightweight long short-term memory network to select the optimal communication channel and communication mode in real time. Node networking is achieved through ant colony algorithm, and one primary path and two backup paths are configured for data transmission. Data transmission is improved by using multi-dimensional channel health scoring and primary and backup path sets to improve data transmission success rate and reduce transmission failure rate. In addition, a redundant topology of one primary path and two backup paths is constructed on the basis of the optimal channel to solve the problem of easy interruption of the single path in traditional static routing. At the same time, high-quality links are selected through ant colony algorithm to ensure routing reliability and low latency.
[0137] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0138] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0139] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0140] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0141] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0142] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. The illustrative expressions of the above terms in this specification should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0143] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0144] The above description describes specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A dual-mode communication method between an electricity meter and a terminal, characterized in that, Specifically, the following steps are included: The HPLC interface and HRF interface are activated simultaneously, and the initial channel parameters corresponding to the activated HPLC interface and HRF interface are acquired in real time to obtain the first initial channel parameters and the second initial channel parameters; the initial channel parameters include signal-to-noise ratio, bit error rate, channel utilization, and data throughput. A channel evaluation model is constructed based on a lightweight long short-term memory network. The channel health is evaluated by inputting a first initial channel parameter and a second initial channel parameter to obtain the real-time optimal channel. The channel evaluation model is trained using the first initial channel parameter and the second initial channel parameter for a preset time period. The process involves acquiring node data and path data between any two nodes, constructing a primary and backup path set based on real-time optimal channel and node data, comprising one primary path and two backup paths, real-time monitoring of data transmission rate and data transmission volume in each path, switching between primary and backup paths based on data transmission rate, calculating real-time channel utilization data based on data transmission volume of each path, and adjusting the channel output power value based on the real-time channel utilization. Specifically, this includes... Obtain node connection status data from the local node management module to get the path data between any two nodes; A path selection model is constructed based on the ant colony algorithm model, and the model parameters are initialized, including pheromone concentration, volatility factor, and link quality heuristic factor. The path selection probability is calculated for the input node data and path data of the screening model. Paths are screened according to the path selection probability. The path with the highest selection probability is selected as the primary path and the two paths with the second highest selection probability are selected as backup paths, thus obtaining a set of primary and backup paths. The set of primary and backup paths includes one primary path and two backup paths. Real-time detection of data transmission rate of each path in the primary and backup path set; switching between primary and backup paths in the primary and backup path set based on data transmission rate; if the number of switching exceeds a preset number, reconstructing the primary and backup path set. The system monitors the data transmission volume of each path in the primary and backup path set in real time, calculates the real-time channel utilization data based on the data transmission volume of each path, and adjusts the channel output power value based on the real-time channel utilization.
2. The method according to claim 1, characterized in that, The simultaneous activation of the HPLC and HRF interfaces, and the real-time acquisition of the corresponding initial channel parameters of the activated HPLC and HRF interfaces to obtain the first initial channel parameters and the second initial channel parameters, specifically includes the following steps: When the energy meter and concentrator are powered on, the interfaces on the energy meter and concentrator are activated simultaneously. The interfaces include an HPLC interface and an HRF interface. Send a test signal to the HPLC interface and acquire the first initial channel parameters corresponding to the HPLC interface in real time; Send a test signal to the HRF interface and obtain the second initial channel parameters corresponding to the HRF interface in real time; The first initial parameter and the second initial parameter are stored in the energy meter or concentrator according to the time sequence, and the first initial channel parameter and the second initial channel parameter are matched with the corresponding timestamp.
3. The method according to claim 1, characterized in that, The channel evaluation model constructed based on a lightweight long short-term memory network, which inputs a first initial channel parameter and a second initial channel parameter to perform channel health evaluation processing to obtain the real-time optimal channel, specifically includes the following steps: A channel evaluation model is constructed based on a lightweight long short-term memory network. The channel health score is evaluated by inputting a first initial channel parameter and a second initial channel parameter. The channel evaluation model is trained based on historical initial channel parameters. Obtain real-time communication delay data and real-time transmission power value from the energy meter or concentrator, construct a reward function model, and calculate the reward function value by inputting the real-time communication delay data and real-time transmission power value. A Q-learning algorithm model is constructed, and the Q-value of the corresponding channel is calculated by inputting channel data. The optimal channel and optimal transmit power value are determined based on the Q-value. Real-time channel data includes channel health score, reward function value, real-time communication delay data, and real-time transmit power value.
4. The method according to claim 3, characterized in that, After obtaining the real-time optimal channel, the following steps are included: A preset set of handover trigger thresholds is used to compare the first initial channel parameters and the second initial channel parameters acquired in real time with the set of handover trigger thresholds, and to trigger channel handover processing based on the comparison results; the handover trigger thresholds include signal-to-noise ratio, channel utilization, and signal-to-interference-plus-noise ratio. Obtain the current service type identifier, and select the optimal channel based on the corresponding algorithm model according to the service type identifier; The current service is an emergency service. A greedy algorithm model is used to evaluate the channel with the highest health score, which is then selected as the optimal channel. The current service is a routine service, and the Q-learning algorithm model is used to predict the long-term optimal channel.
5. The method according to claim 1, characterized in that, The real-time detection of data transmission rates for each path in the primary and backup path set, and the switching between primary and backup paths based on the data transmission rate, if the number of switching exceeds a preset number, involves reconstructing the primary and backup path set. This process includes the following steps: Real-time monitoring of the data transmission rate of each path in the primary and backup path set; when the rate is equal to 0 or the number of switching times exceeds the preset number due to low rate, a path reconstruction information is issued. Mark the paths in the primary and backup path sets, and remove the paths and nodes from the primary and backup path sets from the node data and path data to obtain the node data and path data after removal. The path filtering model is re-invoked, the model parameters are updated, and the removed node data and path data are input for filtering to obtain the updated primary and backup path set.
6. The method according to claim 1, characterized in that, The system monitors the data transmission volume of each path in the primary and backup path set in real time, calculates real-time channel utilization data based on the data transmission volume of each path, and adjusts the channel output power value based on the real-time channel utilization. Specifically, this includes the following steps: Read the cumulative data transmission volume and real-time channel utilization rate over the past 5 minutes, preset the data transmission threshold and utilization rate threshold, compare the real-time data transmission volume and real-time channel utilization rate with the corresponding thresholds, and adjust the channel output power accordingly. If the cumulative data transmission volume is greater than the data transmission threshold or the real-time channel utilization is greater than the utilization threshold, a full-power mode command is output to control the HPLC and HRF interface to communicate at full speed with a power consumption of ≤2W. If the cumulative data transmission volume is less than or equal to the data transmission threshold or the real-time channel utilization rate is less than or equal to the utilization rate threshold, an energy-saving mode command is output. The HRF interface listens for a signal once every 5 seconds, and the HPLC interface enters standby mode with a power consumption of ≤0.5W. If the cumulative data transmission volume is 0, output the sleep mode command, turn off the power supply to the HRF interface, and the HPLC interface only retains the carrier wake-up function, with power consumption ≤0.1W.
7. The method according to claim 1, characterized in that, The process involves acquiring node data and path data between any two nodes, constructing a primary and backup path set based on real-time optimal channel and node data, comprising one primary path and two backup paths, real-time monitoring of data transmission rate and data transmission volume in each path, switching between primary and backup paths based on data transmission rate, calculating real-time channel utilization data based on data transmission volume of each path, and adjusting the channel output power value based on real-time channel utilization. The process then includes the following steps: The interruption probability of the real-time optimal channel is calculated from the physical layer. The interruption probability is compared with a preset probability threshold to determine the optimal channel for a second time. The path selected from the primary and backup path set is determined. The real-time collision probability of the channel is calculated based on the number of data frame verification failures caused by simultaneous transmission by multiple nodes on the path. The adjustment coefficient is calculated through the collision probability function, and the contention window parameters of the MAC layer are dynamically adjusted. The adjusted contention window parameters are sent to the physical layer transceiver to adjust the random waiting time before data transmission. Combining the adjusted contention window parameters with the secondary determination of the optimal channel, data frames are sent using the channel throughput as the transmission rate. The receiving end receives the data frames, verifies the CRC16 check field, and returns an ACK confirmation signal to the ACK timeout timer after the verification passes. If the verification fails, a retransmission request is returned. If the retransmission fails 3 times, an interrupt detection is triggered. Upon receiving the ACK signal, if all data frames to be transmitted are successfully received or retransmitted 3 times, the data transmission is determined to be complete, a transmission completion signal is generated, and an idle timer is started. The timer value is updated once per second from the moment the transmission is completed. If a new data request signal is received during the timer period, the timer is immediately reset to 0, the current timer is stopped, and the data transmission preparation process is triggered.
8. A dual-mode communication system for an electricity meter and a terminal, characterized in that, The method includes the dual-mode communication method between the meter and the terminal as described in any one of claims 1-7.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the dual-mode communication method between an electricity meter and a terminal as described in any one of claims 1-7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the dual-mode communication method between the meter and the terminal as described in any one of claims 1-7.
Citation Information
Patent Citations
Channel fusion method and device for dual-mode communication, electronic equipment and storage medium
CN115134021A
Electric energy meter PCB function test method and device, medium and equipment
CN119846541A