A Smart Grid Communication Optimization Method and System Based on HPLC and HRF Dual-Mode Communication

By using a dual-mode communication optimization method combining HPLC and HRF, and leveraging deep neural networks and reinforcement learning to dynamically adjust the power grid communication path and modulation coding, the problem of data packet loss and interruption in traditional smart grid communication systems under complex environments is solved, achieving efficient and reliable power grid communication.

CN120658673BActive Publication Date: 2026-06-30STATE GRID INFO TELECOM GREAT POWER SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID INFO TELECOM GREAT POWER SCI & TECH
Filing Date
2025-05-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional smart grid communication systems cannot dynamically adapt to changes in grid conditions when faced with complex grid environments and diverse device access, leading to data packet loss and service interruptions, making it difficult to meet real-time and reliability requirements.

Method used

A smart grid communication optimization method based on HPLC and HRF dual-mode communication is adopted. The dual-channel time-frequency domain features are extracted by deep neural network and a routing strategy model is constructed by reinforcement learning. The optimal path and modulation and coding scheme are dynamically selected to achieve adaptive optimization of channel state.

Benefits of technology

It significantly improves the state awareness capability and service transmission quality in complex scenarios of smart grid communication, ensures reliable transmission of high-priority services, and avoids the performance bottleneck of traditional single-mode communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658673B_ABST
    Figure CN120658673B_ABST
Patent Text Reader

Abstract

This invention relates to a smart grid communication optimization method based on HPLC and HRF dual-mode communication, characterized by the following steps: S1: Acquire and preprocess grid communication data; S2: Based on the preprocessed smart grid communication data, automatically extract dual-channel time-frequency domain features using a feature extractor based on a deep neural network, and dynamically weight the feature importance of different modes through an attention mechanism to obtain a fused unified channel state matrix (CSM); S3: Construct a routing strategy model based on reinforcement learning, and obtain the optimal path decision based on the CSM matrix, grid network topology, and service priority labels; S4: Based on the path obtained from the optimal path decision, adopt adaptive modulation and coding to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions; S5: Perform communication based on the optimal modulation and coding scheme and dynamically adapted channel conditions. This invention significantly improves the communication state awareness capability in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication optimization, and in particular to a smart grid communication optimization method and system based on HPLC and HRF dual-mode communication. Background Technology

[0002] With the global energy transition towards renewable energy and the advancement of "dual carbon" goals, smart grids are upgrading from traditional one-way power supply networks to integrated energy systems with bidirectional interaction and intelligent control capabilities. In these new power systems, a large number of diverse devices, such as distributed power sources, energy storage devices, and electric vehicle charging stations, are being integrated, creating massive demands for real-time monitoring, remote control, and bidirectional data exchange. For example, distribution networks need to support over 1000 smart terminals communicating simultaneously per square kilometer, and relay protection services require end-to-end latency of less than 20ms and a bit error rate controlled within 10%. -9 This places extremely high demands on the reliability, real-time performance, and capacity of the communication system.

[0003] Traditional smart grid communication mainly relies on single technologies such as high-speed power line carrier (HPLC) or high-frequency wireless communication (HRF). HPLC uses power lines as the transmission medium, which has the advantages of low deployment cost and wide coverage, but it is susceptible to harmonic interference from power equipment and signal attenuation caused by line aging, resulting in insufficient transmission stability in long-distance or complex topology scenarios. HRF technology (such as 2.4GHz / 5.8GHz wireless communication) has high bandwidth and low latency characteristics, but it suffers from high signal loss through walls and is susceptible to weather (such as heavy rain and sandstorms) and electromagnetic interference, making it difficult to achieve full coverage in remote mountainous areas or underground cable scenarios.

[0004] Existing communication systems mostly employ static routing protocols (such as OSPF and RIP) and fixed modulation and coding schemes, which cannot dynamically adapt to changes in the power grid's operating status. For example, when a surge in power grid load leads to increased noise in the power line channel, or when sudden heavy rain causes wireless signal fading, static strategies cannot switch communication paths or adjust transmission parameters in a timely manner, easily resulting in data packet loss and service interruption, making it difficult to meet the QoS requirements of real-time services in smart grids. Summary of the Invention

[0005] To address the aforementioned problems, the present invention aims to provide a smart grid communication optimization method and system based on HPLC and HRF dual-mode communication, which effectively improves the communication quality and efficiency of smart grids.

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

[0007] A smart grid communication optimization method based on HPLC and HRF dual-mode communication includes the following steps:

[0008] S1: Acquire and preprocess power grid communication data;

[0009] S2: Based on the preprocessed smart grid communication data, the feature extractor based on the deep neural network automatically extracts the dual-channel time-frequency domain features, and dynamically weights the feature importance of different modes through the attention mechanism to obtain the fused unified channel state matrix CSM;

[0010] S3: Construct a routing strategy model based on reinforcement learning, and obtain the optimal path decision according to the CSM matrix, power grid network topology and service priority labels;

[0011] S4: Based on the path obtained from the optimal path decision, adaptive modulation and coding are used to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions.

[0012] S5: Communication is performed based on the optimal modulation and coding scheme and dynamically adapted channel conditions.

[0013] Furthermore, the power grid communication data, including raw channel parameters, real-time service data, and environmental data, are as follows:

[0014] The original channel parameters include signal-to-noise ratio, attenuation coefficient, bit error rate, and carrier-to-interference ratio; the HPLC module reads the SNR, attenuation coefficient, and bit error rate calculated in real time from the PHY layer register through the physical layer monitoring interface of the power line carrier communication chip; the HRF module obtains the signal-to-noise ratio, path loss, and carrier-to-interference ratio of the wireless channel through the MAC layer or PHY layer driver interface of the wireless communication chip.

[0015] The real-time service data includes traffic type and QoS requirements; the power distribution service system connects to the power distribution automation master station, metering master station, and load control master station, and obtains service type tags and corresponding QoS requirements through OPC UA or HTTP API; the communication terminal embeds a service identification module in the MAC layer of the HPLC / HRF dual-mode terminal, and identifies the priority of real-time services by parsing the DSCP field of IP data packets or application layer protocols.

[0016] The environmental data includes noise spectrum and weather data. The noise spectrum is obtained by scanning power line noise at a preset frequency resolution using an integrated spectrum analyzer in an HPLC module; and by performing a spectrum scan in the HRF module through the idle time slot of the wireless module to record the center frequency and power of the interference signal.

[0017] Weather data is obtained by deploying local meteorological sensors or by accessing real-time data from the meteorological bureau via a REST API to obtain regional weather parameters.

[0018] Furthermore, preprocessing includes data cleaning, data standardization, and multimodal feature fusion, as detailed below:

[0019] The data cleaning includes missing value handling and outlier detection;

[0020] Missing value handling:

[0021] For missing channel parameters, forward padding is used; for missing environmental data, it is filled in using a time series prediction model based on historical data.

[0022] Outlier detection combines statistical and clustering methods, as detailed below:

[0023] Based on the statistical method Z-score: Set a range for SNR, and mark outliers outside the range as invalid;

[0024] DBSCAN clustering method: Clustering noise spectrum data to filter out isolated high-power outliers;

[0025] Data standardization:

[0026] Channel parameters are standardized using Z-score to eliminate dimensional differences between different modes;

[0027] For business data, the numerical parameters of latency and bandwidth in QoS requirements are normalized using Min-Max and mapped to intervals; business type labels are converted into vectors through one-hot encoding.

[0028] Environmental data: The power values ​​of the noise spectrum are logarithmically normalized, and weather parameters are converted into discrete features using a binning method;

[0029] The cleaned and standardized HPLC channel parameters, HRF channel parameters, service characteristics, and environmental characteristics are concatenated into a multidimensional feature vector after being aligned by time.

[0030] Furthermore, based on the preprocessed smart grid communication data, a feature extractor based on a deep neural network automatically extracts dual-channel time-frequency domain features. The importance of features from different modes is dynamically weighted through an attention mechanism to obtain the fused unified channel state matrix (CSM), as detailed below:

[0031] The preprocessed multimodal data needs to be converted into a three-dimensional tensor, with the structure defined as: Input tensor = [number of samples, time step T, feature dimension F];

[0032] The deep neural network is based on joint feature extraction using CNN and LSTM modules. CNN extracts frequency domain features and LSTM extracts time domain features.

[0033] The CNN module extracts the frequency domain local features of the HPLC / HRF dual-mode channel. The input layer decomposes the features at time step t into HPLC sub-features, HRF sub-features, and environmental service features. The noise spectra of HPLC and HRF are reconstructed into a two-dimensional matrix, which is used as the input of the convolutional layer.

[0034] Convolutional layer: For the HPLC spectrum matrix: use a 1×3 convolution kernel, stride 1, padding same, output 64 feature maps;

[0035] For the HRF spectrum matrix: use a 1×2 convolution kernel, stride 1, padding with the same values, and output 32 feature maps;

[0036] Pooling layer: Performs max pooling on the convolutional output to reduce dimensionality and preserve the main frequency domain features;

[0037] Fully connected layer: Flatten the pooling results of HPLC / HRF, stitch them together with environmental business features, and output 128-dimensional frequency domain fusion features;

[0038] The LSTM module captures the dynamic changes of channel parameters and service requirements over time. Input layer: The frequency domain fusion features of each time step t are input into the LSTM layer in time sequence. The LSTM layer adopts Bi-LSTM and outputs the hidden state h(t) of each time step, capturing the temporal dependence of the past and future. Output layer: Through a time-distributed fully connected layer, the temporal hidden state output by the LSTM layer is converted into a time-domain feature sequence F_lstm=[h(1),h(2),...,h(T)], where each h(t) corresponds to the time-frequency domain joint feature of time step t.

[0039] The weights of the HPLC / HRF dual-mode features are adaptively adjusted based on real-time channel conditions and service requirements.

[0040] The HPLC / HRF sub-features at each time step t are multiplied by their corresponding weights, and then summed by time step weights to obtain the global fusion feature F. attention Finally, F for all time steps attention (t) are concatenated into a fused feature sequence;

[0041] The feature sequence after attention fusion is concatenated with the business environment features and mapped to a CSM matrix through linear transformation.

[0042] Furthermore, a routing strategy model is constructed based on reinforcement learning, and the optimal path decision is obtained according to the CSM matrix, power grid network topology, and service priority labels, as follows:

[0043] The state space S consists of three parts: the channel state matrix (CSM), the power grid network topology, and the service priority label.

[0044] The action space is defined as a discrete set of actions A = {a1, a2, a3}:

[0045] a1: Select HPLC single-mode path; a2: Select HRF single-mode path; a3: Select hybrid relay path;

[0046] The reward function R employs a multi-objective weighted reward mechanism:

[0047] R=ω1*Rqos+ω2*Refficiency+ω3*Rstability;

[0048] Among them, Rqos is the latency reward: if the service latency is less than the threshold and the bit error rate is less than the preset value, then Rqos = 10 × Priority, where Priority is a 0-1 normalized priority; otherwise, Rqos = -5 × (1-Priority); Refficiency is the resource efficiency reward; Rstability is the stability reward.

[0049] Optimal path decisions are obtained using Deep Q-Network (DQN).

[0050] Furthermore, based on the path obtained from the optimal path decision, adaptive modulation and coding are used to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions, as detailed below:

[0051] Obtain the real-time SNR, attenuation coefficient, noise density or path loss, fading factor and QoS requirements of each link from the routing decision results;

[0052] Based on the SNR-BER safety margin, higher-order modulation is selected first in descending order of SNR, and the lowest-order protection mode is selected by default.

[0053] A lightweight machine learning model is introduced to optimize MCS decision-making under non-stationary channels by combining historical SNR, noise entropy value, and service priority.

[0054] Inner loop: Calculate instantaneous BER every 1ms. If the measured value exceeds twice the target value, trigger MCS degradation.

[0055] Outer ring: The retransmission rate is calculated every 50ms. If the retransmission rate is greater than 10%, the MCS is downgraded synchronously and FEC redundancy is increased (e.g., the coding rate is changed from 3 / 4 to 2 / 3).

[0056] FEC adaptation: Low-order modulation uses LDPC, and high-order modulation is switched to convolutional code and HARQ retransmission mechanism is enabled.

[0057] Based on QoS priority modulation strategies, high-latency-sensitive services are forced to use low-order modulation, sacrificing throughput to ensure reliability; high-throughput services are allowed higher BER and high-order modulation is prioritized; low-power services select the lowest-order modulation and reduce transmit power.

[0058] The weights are dynamically adjusted by combining spectral efficiency, reliability, and power consumption through a weighting function.

[0059] The edge terminal integrates path resolution, state caching, and MCS decision engine, and interacts directly with the physical layer chip through SPI / UART / PCIe interfaces. It pre-generates an SNR-MCS mapping table, which is only updated when the SNR changes by more than 2dB or when the service is switched.

[0060] A real-time coordinated risk scheduling system integrating primary, distribution, and microgrids includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the real-time coordinated risk scheduling method integrating primary, distribution, and microgrids as described above.

[0061] The present invention has the following beneficial effects:

[0062] 1. This invention synchronously collects raw channel parameters, real-time service data, and environmental data, and combines CNN+LSTM deep neural networks to construct a dual-channel time-frequency domain feature extractor. This effectively captures the dynamic changes in the time domain (such as service traffic fluctuations) and the frequency domain noise distribution characteristics (such as environmental interference spectrum) in power grid communication. An attention mechanism is introduced to dynamically weight the dual-mode features of HPLC (high-speed power line carrier) and HRF (high-frequency radio), which can adaptively focus on key modal information (such as prioritizing the enhancement of wireless channel features under severe weather conditions) and generate a fused unified channel state matrix (CSM). This breaks through the limitations of traditional single-mode feature analysis, making the channel state characterization more comprehensive and accurate, providing a reliable data foundation for subsequent routing and modulation optimization, and significantly improving the communication state perception capability in complex scenarios.

[0063] 2. This invention utilizes a routing strategy model built upon reinforcement learning. This model can dynamically generate optimal path decisions for HPLC / HRF / hybrid relays by combining the CSM matrix, power grid topology, and service priority labels (such as the high reliability requirements of distribution network automation and the low latency requirements of user metering) in real time through a deep neural network mapping the state-action space. This method eliminates the dependence of traditional static routing protocols on predefined rules, adapts to changes in power grid topology (such as equipment switching and fault isolation) and fluctuations in service traffic, and prioritizes the transmission quality of high-priority services.

[0064] 3. This invention dynamically selects the modulation and coding scheme (MCS) based on the optimal path decision result and real-time channel conditions (such as signal-to-noise ratio and attenuation coefficient). When channel conditions are favorable, higher-order modulation (such as 64QAM) can be used to improve spectral efficiency, while switching to lower-order modulation (such as QPSK) to enhance anti-interference capabilities when noise interference intensifies. This mechanism achieves dynamic matching between the modulation strategy and channel conditions through closed-loop feedback, avoiding the performance bottleneck of fixed modulation modes in complex environments (such as the spectrum waste caused by the fixed use of BPSK in traditional power line carriers). Attached Figure Description

[0065] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0066] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0067] A smart grid communication optimization method based on HPLC and HRF dual-mode communication includes the following steps:

[0068] S1: Acquire and preprocess power grid communication data;

[0069] S2: Based on the preprocessed smart grid communication data, the feature extractor based on the deep neural network automatically extracts the dual-channel time-frequency domain features, and dynamically weights the feature importance of different modes through the attention mechanism to obtain the fused unified channel state matrix CSM;

[0070] S3: Construct a routing strategy model based on reinforcement learning, and obtain the optimal path decision according to the CSM matrix, power grid network topology and service priority labels;

[0071] S4: Based on the path obtained from the optimal path decision, adaptive modulation and coding are used to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions.

[0072] S5: Communication is performed based on the optimal modulation and coding scheme and dynamically adapted channel conditions.

[0073] In this embodiment, the power grid communication data includes raw channel parameters, real-time service data, and environmental data, as detailed below:

[0074] The original channel parameters include signal-to-noise ratio (SNR), attenuation coefficient (path loss of power line channel / large-scale fading of wireless channel), bit error rate (BER), and carrier-to-interference ratio (CIR). The HPLC module reads the SNR, attenuation coefficient, and bit error rate calculated in real time from the PHY layer register through the physical layer monitoring interface of the power line carrier communication chip (such as ST7538, HPLC-IoT chip). The HRF module obtains the signal-to-noise ratio (via RSSI conversion), path loss (calculated based on free space path loss model), and carrier-to-interference ratio of the wireless channel through the MAC layer or PHY layer driver interface of the wireless communication chip (such as SX1262 in Sub-1GHz, CC2530 in 2.4GHz).

[0075] The real-time service data includes traffic type (control commands / metering data / video surveillance, etc.) and QoS requirements (latency ≤10ms / reliability ≥99.9% / bandwidth ≥1Mbps, etc.);

[0076] The power distribution business system interfaces with the power distribution automation master station, metering master station, and load control master station (LC). It obtains business type tags (such as "protection control", "remote meter reading", "distributed power monitoring") and corresponding QoS requirements through OPC UA or HTTP API. In the communication terminal, a business identification module is embedded in the MAC layer of the HPLC / HRF dual-mode terminal. By parsing the DSCP (Differential Service Code Point) field of IP data packets or application layer protocols (such as IEC 104, DL / T 645), the priority of real-time business is identified (such as "emergency control" corresponding to the highest priority).

[0077] The environmental data includes noise spectrum and weather data. The noise spectrum is obtained by scanning power line noise at a preset frequency resolution (100kHz to 1MHz) using an integrated spectrum analyzer in an HPLC module; and by performing a spectrum scan in the HRF module through the idle time slot of the wireless module to record the center frequency and power of the interference signal.

[0078] Weather data is obtained by using locally deployed meteorological sensors (SHT30 temperature and humidity sensor, AMR100 wind speed sensor) or by accessing real-time data from the meteorological bureau via REST API to obtain regional weather parameters (such as "thunderstorm probability 30%" and "humidity 85%").

[0079] In this embodiment, the preprocessing data cleaning, data standardization, and multimodal feature fusion processing are detailed as follows:

[0080] The data cleaning includes missing value handling and outlier detection;

[0081] Missing value handling:

[0082] For missing channel parameters (such as intermittent disconnection of communication modules), forward padding is used; for missing environmental data, it is filled in using a time series prediction model of historical data (such as LSTM).

[0083] Outlier detection combines statistical and clustering methods, as detailed below:

[0084] Based on the statistical method Z-score: Set the range of SNR (HPLC: 0~40dB, HRF: -120~-50dBm), and mark outliers outside the range as invalid;

[0085] DBSCAN clustering method: Clustering noise spectrum data to filter out isolated high-power anomalies (such as power line burst impulse noise);

[0086] Data standardization:

[0087] Channel parameters are standardized using Z-score to eliminate dimensional differences between different modes (HPLC / HRF) (such as the linearity of SNR dB value and attenuation coefficient).

[0088] For business data, the latency and bandwidth numerical parameters in QoS requirements are normalized using Min-Max and mapped to intervals; business type labels (such as "control" and "metering") are converted into vectors through one-hot encoding.

[0089] Environmental data: The power values ​​of the noise spectrum are logarithmically normalized, and weather parameters are converted into discrete features using a binning method;

[0090] The cleaned and standardized HPLC channel parameters (such as [SNR_hplc, attenuation_hplc]), HRF channel parameters (such as [SNR_hrf, path_loss_hrf]), service characteristics (such as [QoS_delay, QoS_reliability]), and environmental characteristics (such as [noise_power, temperature]) are concatenated into a multi-dimensional feature vector after being aligned by time.

[0091] In this embodiment, based on the preprocessed smart grid communication data, a feature extractor based on a deep neural network automatically extracts dual-channel time-frequency domain features. The importance of features from different modes is dynamically weighted using an attention mechanism to obtain the fused unified channel state matrix (CSM), as detailed below:

[0092] The preprocessed multimodal data needs to be converted into a three-dimensional tensor, with the structure defined as: Input tensor = [number of samples, time step T, feature dimension F];

[0093] Wherein: Time step T: Based on the real-time requirements of power grid communication (e.g., control service delay ≤ 10ms), T = 20 (corresponding to a 200ms window, sampling frequency 100Hz) is taken to cover channel fluctuations on short time scales. Feature dimension F: Includes time-frequency domain parameters of HPLC and HRF dual-mode, specifically broken down as follows:

[0094] HPLC channel characteristics (F1): signal-to-noise ratio (SNR_hplc), attenuation coefficient (Att_hplc), power line noise spectrum (100kHz~50MHz, divided into 10 frequency bins) → a total of 12 dimensions.

[0095] HRF channel characteristics (F2): wireless signal-to-noise ratio (SNR_hrf), path loss (PL_hrf), wireless noise spectrum (Sub-1GHz, divided into 8 frequency bins) → 10 dimensions in total.

[0096] Environmental and business characteristics (F3): Temperature, Humidity, and Business Priority (QoS_level, 0-1 normalized) → 3 dimensions in total. Total feature dimensions F = F1 + F2 + F3 = 25 dimensions.

[0097] The deep neural network is based on joint feature extraction using CNN and LSTM modules. CNN extracts frequency domain features and LSTM extracts time domain features.

[0098] The CNN module extracts local frequency domain features of the HPLC / HRF dual-mode channel (such as the frequency band distribution of power line noise and the center frequency of wireless interference). The input layer decomposes the features at time step t into HPLC sub-features (12-dimensional), HRF sub-features (10-dimensional), and environmental service features (3-dimensional). Among them, the noise spectra of HPLC and HRF (a total of 18 dimensions) are recombined into a two-dimensional matrix and used as the input of the convolutional layer.

[0099] Convolutional layer: For the HPLC spectrum matrix: use a 1×3 convolution kernel (covering 3 adjacent frequency bins), stride 1, padding with the same, output 64 feature maps (activation function ReLU);

[0100] For the HRF spectrum matrix: use a 1×2 convolution kernel (covering 2 adjacent frequency bins), stride 1, padding with the same, and output 32 feature maps (activation function ReLU);

[0101] Pooling layer: Max pooling is performed on the convolution output (pooling kernel 1×2, stride 2) to reduce dimensionality and preserve the main frequency domain features;

[0102] Fully connected layer: Flatten the pooling results of HPLC / HRF and stitch them with environmental business features (3D) to output 128-dimensional frequency domain fusion features;

[0103] The LSTM module captures the dynamic changes of channel parameters and service demands over time (such as instantaneous jumps in power line attenuation and sudden increases in service traffic). Input layer: The frequency domain fusion features of each time step t are input into the LSTM layer in a time sequence. The LSTM layer adopts Bi-LSTM and outputs the hidden state h(t) (128 dimensions) of each time step, capturing the temporal dependence of the past and future (such as predicting the SNR trend of the next time step). Output layer: Through a time-distributed fully connected layer, the temporal hidden state output by the LSTM layer is converted into a time-domain feature sequence F_lstm=[h(1),h(2),...,h(T)], where each h(t) corresponds to the time-frequency domain joint feature of time step t.

[0104] The importance of HPLC / HRF dual-mode features is adaptively adjusted based on real-time channel conditions (such as increasing HRF feature weights when HPLC link fails) and service requirements (such as high-priority control services focusing on low-latency features).

[0105] The HPLC / HRF sub-features at each time step t are multiplied by their corresponding weights, and then summed by time step weights to obtain the global fusion feature F. attention Finally, F for all time steps attention (t) are concatenated into a fused feature sequence;

[0106] The feature sequence after attention fusion is concatenated with the business environment features (3-dimensional, extended to 10-dimensional through full connection), and mapped to a T×D CSM matrix (20×60-dimensional) through linear transformation.

[0107] In this embodiment, a routing strategy model is constructed based on reinforcement learning, and the optimal path decision is obtained according to the CSM matrix, power grid network topology, and service priority labels, as follows:

[0108] The state space S consists of three parts: the channel state matrix (CSM), the power grid network topology, and the service priority label: a one-hot encoded 5-dimensional vector (corresponding to 5 QoS levels, such as protection control / distribution automation / video surveillance / remote meter reading / non-real-time services).

[0109] The action space is defined as a discrete set of actions A = {a1, a2, a3}:

[0110] a1: Select HPLC single-mode path (power line carrier communication); a2: Select HRF single-mode path (high frequency wireless communication); a3: Select hybrid relay path (HPLC + HRF multi-hop forwarding, hop count ≤ 3);

[0111] The reward function R employs a multi-objective weighted reward mechanism:

[0112] R=ω1*Rqos+ω2*Refficiency+ω3*Rstability;

[0113] Among them, Rqos is the latency reward: if the service latency is less than the threshold and the bit error rate is less than the preset value, then Rqos = 10 × Priority, where Priority is a 0-1 normalized priority; otherwise, Rqos = -5 × (1-Priority); Refficiency is the resource efficiency reward; Rstability is the stability reward.

[0114] Optimal path decisions are obtained using Deep Q-Network (DQN).

[0115] In this embodiment, based on the path obtained from the optimal path decision, adaptive modulation and coding is used to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions, as follows:

[0116] Obtain the real-time SNR, attenuation coefficient, noise density or path loss, fading factor and QoS requirements of each link from the routing decision results;

[0117] Based on the SNR-BER safety margin (the target BER is one order of magnitude lower than the theoretical value), higher-order modulation is selected in descending order of SNR, with the lowest-order protection mode (BPSK+1 / 2 coding) as the default.

[0118] A lightweight machine learning model (decision tree / linear regression) is introduced, and historical SNR, noise entropy value and service priority are combined to optimize MCS decision under non-stationary channel conditions;

[0119] Inner loop (physical layer): Calculate instantaneous BER every 1ms. If the measured value exceeds twice the target value, trigger MCS degradation (e.g., 16QAM → QPSK).

[0120] Outer ring (link layer): The retransmission rate is counted every 50ms. If RR>10%, the MCS is downgraded synchronously and FEC redundancy is increased (e.g., the coding rate is changed from 3 / 4 to 2 / 3).

[0121] FEC adaptation: Low-order modulation uses LDPC (high redundancy), and high-order modulation is switched to convolutional code (CC) and HARQ retransmission mechanism is enabled;

[0122] Based on QoS priority modulation strategies, high-latency-sensitive services (such as differential protection) are forced to use low-order modulation (QPSK+1 / 2 coding), sacrificing throughput to ensure reliability; high-throughput services (such as video surveillance) are allowed to use higher BER (≤5×10). -6 Prioritize the use of higher-order modulation (64QAM). For low-power services (such as remote meter reading), select the lowest-order modulation and reduce the transmit power by 30%.

[0123] The weights are dynamically adjusted by combining spectral efficiency, reliability, and power consumption through a weighting function.

[0124] The edge terminal integrates path resolution, state caching, and MCS decision engine, and interacts directly with physical layer chips (such as ST7538 and SX1262) through SPI / UART / PCIe interfaces. It pre-generates an SNR-MCS mapping table (accuracy 0.5dB) and only updates it when the SNR changes by more than 2dB or when the service is switched.

[0125] A real-time coordinated risk scheduling system integrating primary and secondary microgrids includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the real-time coordinated risk scheduling method integrating primary and secondary microgrids as described above.

[0126] 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 a completely hardware embodiment, a completely software embodiment, or an embodiment 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, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] 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.

[0128] 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 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0129] 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.

[0130] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A smart grid communication optimization method based on HPLC and HRF dual-mode communication, characterized in that, Includes the following steps: S1: Acquire and preprocess power grid communication data; S2: Based on the preprocessed smart grid communication data, the feature extractor based on the deep neural network automatically extracts the dual-channel time-frequency domain features, and dynamically weights the feature importance of different modes through the attention mechanism to obtain the fused unified channel state matrix CSM; S3: Construct a routing strategy model based on reinforcement learning, and obtain the optimal path decision based on the CSM matrix, power grid network topology and service priority labels; S4: Based on the path obtained from the optimal path decision, adaptive modulation and coding are used to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions. S5: Communication is performed based on the optimal modulation and coding scheme and dynamically adapted channel conditions; Based on the preprocessed smart grid communication data, a feature extractor using a deep neural network automatically extracts dual-channel time-frequency domain features. An attention mechanism is then used to dynamically weight the feature importance of different modes to obtain the fused unified channel state matrix (CSM), as detailed below: The preprocessed multimodal data needs to be converted into a three-dimensional tensor, with the structure defined as: Input tensor = [number of samples, time step T, feature dimension F]; The deep neural network is based on joint feature extraction using CNN and LSTM modules. CNN extracts frequency domain features and LSTM extracts time domain features. The CNN module extracts the frequency domain local features of the HPLC / HRF dual-mode channel. The input layer decomposes the features at time step t into HPLC sub-features, HRF sub-features, and environmental service features. The noise spectra of HPLC and HRF are reconstructed into a two-dimensional matrix, which is used as the input of the convolutional layer. Convolutional layer: For the HPLC spectral matrix: use a 1×3 convolution kernel, stride 1, padding same, output 64 feature maps; For the HRF spectral matrix: use a 1×2 convolution kernel, stride 1, padding same, and output 32 feature maps; Pooling layer: Performs max pooling on the convolutional output to reduce dimensionality and preserve the main frequency domain features; Fully connected layer: Flatten the pooling results of HPLC / HRF, stitch them together with environmental business features, and output 128-dimensional frequency domain fusion features; The LSTM module captures the dynamic changes of channel parameters and service requirements over time. Input layer: The frequency domain fusion features of each time step t are input into the LSTM layer in time sequence. The LSTM layer adopts Bi-LSTM and outputs the hidden state h(t) of each time step, capturing the temporal dependencies between the past and the future. Output layer: Through a time-distributed fully connected layer, the temporal hidden state output by the LSTM layer is converted into a temporal feature sequence F_lstm = [h(1), h(2), ..., h(T)], where each h(t) corresponds to the time-frequency joint feature of time step t. The weights of the HPLC / HRF dual-mode features are adaptively adjusted based on real-time channel conditions and service requirements. The HPLC / HRF sub-features at each time step t are multiplied by their corresponding weights, and then summed by weights over time steps to obtain the global fusion feature F. attention Finally, F for all time steps attention (t) are concatenated into a fused feature sequence; The feature sequence after attention fusion is concatenated with the business environment features and mapped to a CSM matrix through linear transformation; The specific steps for constructing a routing strategy model based on reinforcement learning and obtaining the optimal path decision according to the CSM matrix, power grid network topology, and service priority labels are as follows: The state space S consists of three parts: the channel state matrix (CSM), the power grid network topology, and the service priority label. The action space is defined as a discrete set of actions A = {a1, a2, a3}: a1: Select HPLC single-mode path; a2: Select HRF single-mode path; a3: Select hybrid relay path; The reward function R employs a multi-objective weighted reward mechanism: R=ω1 Rqos+ω2 Refficiency+ω3 Rstability; Rqos is the latency reward: if the service latency is less than the threshold and the bit error rate is less than the preset value, then Rqos = 10 × Priority, where Priority is a 0-1 normalized priority; otherwise, Rqos = -5 × (1-Priority); Refficiency is the resource efficiency reward; Rstability is the stability reward. Optimal path decisions are obtained using Deep Q-Network (DQN).

2. The smart grid communication optimization method based on HPLC and HRF dual-mode communication according to claim 1, characterized in that, The power grid communication data includes raw channel parameters, real-time service data, and environmental data, as detailed below: The original channel parameters include signal-to-noise ratio, attenuation coefficient, bit error rate, and carrier-to-interference ratio; the HPLC module reads the SNR, attenuation coefficient, and bit error rate calculated in real time from the PHY layer register through the physical layer monitoring interface of the power line carrier communication chip; The HRF module obtains the signal-to-noise ratio, path loss, and carrier-to-interference ratio of the wireless channel through the MAC layer or PHY layer driver interface of the wireless communication chip. The real-time service data includes traffic type and QoS requirements; the power distribution service system interfaces with the power distribution automation master station, metering master station, and load control master station, and obtains service type tags and corresponding QoS requirements through OPC UA or HTTP API; the communication terminal embeds a service identification module in the MAC layer of the HPLC / HRF dual-mode terminal, and identifies the priority of real-time services by parsing the DSCP field of IP data packets or application layer protocols; The environmental data includes noise spectrum and weather data. The noise spectrum is obtained by scanning power line noise at a preset frequency resolution using an integrated spectrum analyzer in an HPLC module; and by performing a spectrum scan in the HRF module through the idle time slot of the wireless module to record the center frequency and power of the interference signal. Weather data is obtained by deploying local meteorological sensors or by accessing real-time data from the meteorological bureau via a REST API to obtain regional weather parameters.

3. The smart grid communication optimization method based on HPLC and HRF dual-mode communication according to claim 2, characterized in that, The preprocessing data cleaning, data standardization, and multimodal feature fusion processing are detailed as follows: The data cleaning includes missing value handling and outlier detection; Missing value handling: For missing channel parameters, forward padding is used; for missing environmental data, it is filled in using a time series prediction model based on historical data. Outlier detection combines statistical and clustering methods, as detailed below: Based on the statistical method Z-score: Set a range for SNR, and mark outliers outside the range as invalid; DBSCAN clustering method: Clustering noise spectrum data to filter out isolated high-power outliers; Data standardization: Channel parameters are standardized using Z-score to eliminate dimensional differences between different modes; For business data, the latency and bandwidth numerical parameters in QoS requirements are normalized using Min-Max and mapped to intervals; business type labels are converted into vectors through one-hot encoding. Environmental data: The power values ​​of the noise spectrum are logarithmically normalized, and weather parameters are converted into discrete features using a binning method; The cleaned and standardized HPLC channel parameters, HRF channel parameters, service characteristics, and environmental characteristics are concatenated into a multidimensional feature vector after being aligned by time.

4. The smart grid communication optimization method based on HPLC and HRF dual-mode communication according to claim 1, characterized in that, The path obtained based on the optimal path decision is then used with adaptive modulation and coding to obtain the optimal modulation and coding scheme and dynamically adapted channel conditions, as detailed below: Obtain real-time SNR, attenuation coefficient, noise density or path loss, fading factor and QoS requirements for each link from the routing decision results; Based on the SNR-BER safety margin, higher-order modulation is selected in descending order of SNR, with the lowest-order protection mode as the default. A lightweight machine learning model is introduced to optimize MCS decision-making under non-stationary channels by combining historical SNR, noise entropy value, and service priority. Inner loop: Calculate instantaneous BER every 1ms. If the measured value exceeds twice the target value, trigger MCS degradation. Outer ring: Calculate the retransmission rate every 50ms. If RR > 10%, synchronously downgrade the MCS and increase FEC redundancy. FEC adaptation: Low-order modulation uses LDPC, and high-order modulation is switched to convolutional code and HARQ retransmission mechanism is enabled; Based on QoS priority modulation strategies, high-latency-sensitive services are forced to use low-order modulation, sacrificing throughput to ensure reliability; high-throughput services are allowed higher BER and high-order modulation is prioritized; low-power services select the lowest-order modulation and reduce transmit power. The weights are dynamically adjusted by combining spectral efficiency, reliability, and power consumption through a weighting function. The edge terminal integrates path resolution, state caching, and MCS decision engine, and interacts directly with the physical layer chip through SPI / UART / PCIe interfaces. It pre-generates an SNR-MCS mapping table, which is only updated when the SNR changes by more than 2dB or when the service is switched.

5. A real-time coordinated risk scheduling system integrating main, distribution, and microgrids, characterized in that, It includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the integrated real-time coordination and risk scheduling method for a primary and secondary microgrid as described in any one of claims 1-4.