Communication module low-delay switching control method based on HPLC and HRF

By constructing a triangulated analysis region and performing meshing, and calibrating the decision threshold in real time, the problem of inaccurate channel state judgment in HPLC was solved, and efficient and seamless switching of high-speed power line communication was achieved.

CN120956765APending Publication Date: 2025-11-14SHANDONG ZHIYANG ELECTRIC
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511175327.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In high-speed power line communication (HPLC), traditional fixed threshold decision mechanisms are difficult to adapt to the time-varying nature of power line channels, resulting in fluctuations in signal-to-noise ratio and bit error rate. This makes it impossible to monitor communication quality in real time and accurately, leading to misjudgments or delayed identification.

Method used

The signal-to-noise ratio and bit error rate are collected in real time by a pre-configured communication quality monitoring unit. A triangulation analysis region is constructed, and a gridded processing is performed. An adaptive threshold offset is extracted, the decision threshold is calibrated in real time, and the HRF channel negotiation and authentication handshake process is executed in parallel to achieve seamless switching.

Benefits of technology

It improves the accuracy of channel status judgment, reduces the risk of misjudgment or omission, shortens channel switching time, and improves response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956765A_ABST
    Figure CN120956765A_ABST
Patent Text Reader

Abstract

The invention provides a communication module low-delay switching control method based on HPLC and HRF, and relates to the technical field of data processing, and the method comprises the following steps: when an index continuously exceeds a dynamically adjusted judgment threshold, a switching judgment unit generates a mode switching enable signal, and initializes an HRF channel pre-synchronization sequence; based on a pre-stored HRF channel feature vector table, HRF channel negotiation and authentication handshake processes are executed in parallel while HPLC link state monitoring is maintained; through a dual-channel redundancy transmission mechanism, the key fault information is packaged into a final priority protocol data unit before the establishment of the HRF link is not completed, and redundancy forwarding is carried out through a reserved time slot window of the HPLC link; and after the handshake of the HRF link is completed, the switching control unit executes seamless switching of the data transmission channel. According to the invention, the accuracy of channel state judgment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a low-latency switching control method for communication modules based on HPLC and HRF. Background Technology

[0002] In the construction of new power systems, high-speed power line communication (HPLC) technology serves as the core communication method for low-voltage distribution networks, undertaking data transmission tasks for critical services such as distributed energy access and precise load control. However, the time-varying nature of power line channels causes fluctuations in signal-to-noise ratio (SNR) and bit error rate (BER), making traditional fixed-threshold decision mechanisms difficult to adapt to complex scenario requirements.

[0003] In terms of communication quality monitoring, traditional monitoring units often use periodic sampling methods, which makes it difficult to collect key indicators such as signal-to-noise ratio and bit error rate in real time and accurately, and cannot capture dynamic changes in link quality in a timely manner. Threshold judgment mechanisms lack adaptability and usually use fixed initial thresholds to judge communication status without considering the differentiated characteristics of link quality in different scenarios, resulting in delayed or misjudged identification of communication anomalies. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a low-latency switching control method for communication modules based on HPLC and HRF, which improves the accuracy of channel state judgment.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: Firstly, a low-latency switching control method for communication modules between HPLC and HRF is provided, the method comprising: 1. A low-latency switching control method for communication modules based on HPLC and HRF, characterized in that the method includes: Step 1: The signal-to-noise ratio and bit error rate of the HPLC communication link are collected in real time through the pre-configured communication quality monitoring unit. Step 2: Based on the communication quality index, locate three preset reference coordinate points in the multi-dimensional space of the communication quality index. The reference coordinate points constitute a triangulation analysis region. Step 3: Perform sub-region meshing on the triangulation analysis region and extract an adaptive threshold offset based on the generated mesh topology features; Step 4: The initial decision threshold is calibrated in real time using an adaptive threshold offset to obtain the dynamically adjusted decision threshold. Step 5: Logically compare the real-time acquired signal-to-noise ratio and bit error rate indicators with the dynamically adjusted decision threshold; when the indicators continuously exceed the dynamically adjusted decision threshold, switch the decision unit to generate the mode switching enable signal and initialize the HRF channel pre-synchronization sequence. Step 6: Based on the pre-stored HRF channel feature vector table, perform the HRF channel negotiation and authentication handshake process in parallel while maintaining HPLC link status monitoring. Step 7: Before the HRF link is established, the key fault information is encapsulated into the final priority protocol data unit through the dual-channel redundant transmission mechanism, and redundant forwarding is performed through the reserved time slot window of the HPLC link. Step 8: After the HRF link handshake is completed, the switching control unit performs a seamless switch of the data transmission channel.

[0006] Further, in step 1, the signal-to-noise ratio and bit error rate of the HPLC communication link are collected in real time through a pre-configured communication quality monitoring unit, including: Step 11: Using a hardware probe, the training sequence of the physical layer frame header is synchronously captured in each HPLC beacon cycle, its received signal strength indication (RSSI) is measured, and the average error vector magnitude (EVM) over the entire symbol cycle is calculated to obtain the original channel parameters. Step 12: The RSSI and EVM sequences in the original channel parameters are processed by a Kalman filter-based tracking algorithm. That is, the previous signal-to-noise ratio estimate is used as prior information to perform final filtering on the current measurement value, predict and update the state variables, and finally obtain the smoothed accurate estimate of the current signal-to-noise ratio. Step 13: Synchronously monitor the Media Access Control (MAC) layer frame structure, extract the Cyclic Redundancy Check (CRC) field or Forward Error Correction (FEC) parity bit at the end of each received frame; within a configurable sliding time window, accumulate the number of frames that failed to pass the check, and divide this number of failures by the total number of received frames within the window to calculate the real-time bit error rate statistics for that time period.

[0007] Further, in step 2, based on the communication quality index, three preset reference coordinate points are located in the multi-dimensional space of the communication quality index. These reference coordinate points constitute a triangulation analysis region, including: Step 21: Pair the precise signal-to-noise ratio estimate with the real-time bit error rate statistics and align the timestamps to form a complete communication quality index pair; select the signal-to-noise ratio estimate and bit error rate statistics from the most recent statistical period from the historical sequence of the communication quality index pair as the current sampling point; Step 22: Map the current sampling point to a two-dimensional quality plane with the signal-to-noise ratio estimate as the horizontal axis and the bit error rate statistics as the vertical axis. Step 23: On the two-dimensional quality plane, three static reference coordinate points are predefined; the first reference point represents the high-quality channel state with high signal-to-noise ratio and low bit error rate, the second reference point represents the critical channel state with medium signal-to-noise ratio and medium bit error rate, and the third reference point represents the poor-quality channel state with low signal-to-noise ratio and high bit error rate. Step 24: Perform nearest neighbor matching between the current sampling point and three static reference coordinate points to determine the channel state region to which the current sampling point belongs; Step 25: Using the three reference coordinate points as vertices, construct a dynamic triangulation analysis region, which divides the current channel state space into three feature subspaces.

[0008] Further, in step 3, sub-region meshing is performed on the triangulation analysis region, and an adaptive threshold offset is extracted based on the generated mesh topology features, including: Step 31: Using the three reference coordinate points of the triangulation analysis region as boundaries, the triangulation analysis region is divided into multiple uniform grid cells using an equal-spacing partitioning strategy. Each grid cell represents a specific channel state sub-region. Step 32: Calculate the grid cell index of the current sampling point based on its coordinates on the two-dimensional mass plane, and determine the relative distance between the grid cell and the three reference coordinate points; Step 33: Based on the grid cell index and relative distance relationship, query the pre-stored grid feature mapping table, which defines the topological feature value corresponding to each grid cell, including the center density and boundary gradient of the grid cell; Step 34: Based on the topological feature values, a weighted average algorithm is used to fuse the center density and boundary gradient to obtain a preliminary offset estimate. Step 35: Perform dynamic range compression on the preliminary offset estimate and use a nonlinear function to map it to a preset offset range to generate the final adaptive threshold offset.

[0009] Further, in step 4, the initial decision threshold is calibrated in real time using an adaptive threshold offset to obtain a dynamically adjusted decision threshold, including: Step 41: Receive the adaptive threshold offset and read a set of initial decision thresholds pre-stored in non-volatile memory, which includes a first decision threshold for signal-to-noise ratio and a second decision threshold for bit error rate. Step 42: Using the adaptive threshold offset as input, query a pre-configured nonlinear mapping table, which defines the correspondence between the offset and the threshold adjustment magnitude, to obtain a first adjustment magnitude for the signal-to-noise ratio threshold and a second adjustment magnitude for the bit error rate threshold. Step 43: Using a weighted fusion algorithm, the first adjustment magnitude and the first decision threshold are superimposed and calculated, and the second adjustment magnitude and the second decision threshold are superimposed and calculated, wherein the weighting weights are dynamically configured according to the stability of the current channel state. Step 44: Perform upper and lower limit saturation processing on the superimposed signal-to-noise ratio threshold and bit error rate threshold respectively to obtain the dynamic decision threshold after real-time calibration.

[0010] Further, in step 5, the real-time acquired signal-to-noise ratio and bit error rate indicators are logically compared with the dynamically adjusted decision thresholds; when the indicators continuously exceed the dynamically adjusted decision thresholds, the decision unit generates a mode switching enable signal and initializes the HRF channel pre-synchronization sequence, including: Step 51: Receive the latest accurate signal-to-noise ratio estimate and bit error rate statistics from the communication quality monitoring unit in real time, and receive the dynamic decision threshold; Step 52: In the switching decision unit, two independent hysteresis comparators are set in parallel: the first comparator compares the real-time signal-to-noise ratio estimate with the signal-to-noise ratio decision threshold, and the second comparator compares the real-time bit error rate statistics with the bit error rate decision threshold. Step 53: When the outputs of the two comparators simultaneously indicate that the communication quality indicators have deteriorated, i.e. the signal-to-noise ratio is lower than its decision threshold and the bit error rate is higher than its decision threshold, a degradation event flag is triggered. Step 54: Start a configurable continuous monitoring time window and count the degradation event flags within the window; when the cumulative count exceeds the preset event number threshold, it is determined that the channel state continuously exceeds the dynamically adjusted decision threshold. Step 55: The switching decision unit immediately generates a highly active mode switching enable signal and sends the signal to the HRF communication control module; the HRF communication control module initializes the transmission of the pre-synchronization sequence according to the pre-stored HRF channel parameters and begins the HRF channel establishment process.

[0011] Furthermore, step 6 includes: Step 61: Upon receiving the mode switching enable signal, the HRF communication control module immediately wakes up from the low-power standby mode and loads the pre-stored HRF channel feature vector table. Step 62: Based on the HRF channel feature vector table, select the HRF channel with the best signal strength as the preferred negotiation channel, and generate a channel negotiation request frame. Step 63: While continuously monitoring the HPLC link status, periodically send channel negotiation request frames through the HRF physical layer interface and start a response timeout timer. Step 64: Listen for negotiation response frames on the HRF channel; if a valid response frame is received before the response timeout timer expires, parse the network allocation vector and session key in the frame to complete the link layer connection of the HRF channel. Step 65: If no valid response is received after the response timeout timer expires, the system will automatically switch to the suboptimal backup channel according to the HRF channel feature vector table, resend the negotiation request frame and restart the response timeout timer until the HRF channel handshake is completed or all backup channels have been tried. Step 66: During the entire HRF channel negotiation process, if the communication quality monitoring unit of the HPLC link reports that the channel index has returned to the normal range, the HRF channel negotiation process will be terminated immediately, and the HRF communication control module will be put back into low-power standby mode.

[0012] Furthermore, step 7 includes: Step 71: During the overlapping period after the mode switching enable signal is valid and before the HRF link is confirmed to be established, the switching control unit activates the dual-channel redundant transmission mechanism. Step 72: The critical fault information generated by the application layer is submitted to the protocol encapsulation unit, which encapsulates the fault information, the current timestamp, and the sequence number into a specific final priority protocol data unit. Step 73: The final priority protocol data unit is simultaneously submitted to the HPLCMAC layer transmission queue and the HRF transmission buffer queue. Step 74: The HPLCMAC layer scheduler identifies the specific identifier of the final priority protocol data unit, dynamically allocates a dedicated reserved time slot window for it, and immediately inserts it into the idle time slot of the current transmission frame for priority transmission. Step 75: On the HRF link, the final priority protocol data unit is retrieved from the HRF transmit buffer queue and transmitted only after the HRF channel handshake is completed; Step 76: After successfully receiving the final priority protocol data unit through any link, the receiving end returns an acknowledgment to its sending source; after receiving the acknowledgment, the sending end removes the copy of the protocol data unit from the sending queues of HPLC and HRF.

[0013] The above-described solution of the present invention has at least the following beneficial effects: This mechanism constructs a triangulated analysis region based on a multi-dimensional space of communication quality indicators and extracts adaptive threshold offsets through sub-region meshing, enabling real-time calibration of the initial decision threshold. Compared to some fixed threshold schemes, this mechanism can flexibly adjust the decision criteria according to actual changes in link quality, effectively reducing the risk of misjudgment or missed judgment due to environmental differences.

[0014] When the monitored indicators continuously exceed the dynamic threshold, the HRF channel pre-synchronization sequence is started synchronously, and the HRF channel negotiation and authentication handshake process is executed in parallel while maintaining HPLC link status monitoring. This breaks the limitations of the traditional serial processing mode, shortens the overall time of channel switching, and improves the response speed of link switching. Attached Figure Description

[0015] Figure 1 This is a schematic flowchart of a low-latency switching control method for communication modules based on HPLC and HRF provided in an embodiment of the present invention. Detailed Implementation

[0016] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0017] like Figure 1 As shown, embodiments of the present invention propose a low-latency switching control method for communication modules based on HPLC and HRF, the method comprising the following steps: Step 1: The signal-to-noise ratio and bit error rate of the HPLC communication link are collected in real time through the pre-configured communication quality monitoring unit. Step 2: Based on the communication quality index, locate three preset reference coordinate points in the multi-dimensional space of the communication quality index. The reference coordinate points constitute a triangulation analysis region. Step 3: Perform sub-region meshing on the triangulation analysis region and extract an adaptive threshold offset based on the generated mesh topology features; Step 4: The initial decision threshold is calibrated in real time using an adaptive threshold offset to obtain the dynamically adjusted decision threshold. Step 5: Logically compare the real-time acquired signal-to-noise ratio and bit error rate indicators with the dynamically adjusted decision threshold; when the indicators continuously exceed the dynamically adjusted decision threshold, switch the decision unit to generate the mode switching enable signal and initialize the HRF channel pre-synchronization sequence. Step 6: Based on the pre-stored HRF channel feature vector table, perform the HRF channel negotiation and authentication handshake process in parallel while maintaining HPLC link status monitoring. Step 7: Before the HRF link is established, the key fault information is encapsulated into the final priority protocol data unit through the dual-channel redundant transmission mechanism, and redundant forwarding is performed through the reserved time slot window of the HPLC link. Step 8: After the HRF link handshake is completed, the switching control unit performs a seamless switch of the data transmission channel.

[0018] In this embodiment of the invention, a triangulation analysis region is constructed based on a multi-dimensional space of communication quality indicators, and an adaptive threshold offset is extracted through sub-region meshing processing to achieve real-time calibration of the initial decision threshold. Compared with some fixed threshold schemes, this mechanism can flexibly adjust the decision criteria according to the actual changes in link quality, effectively reducing the risk of misjudgment or missed judgment due to environmental differences.

[0019] When the monitored indicators continuously exceed the dynamic threshold, the HRF channel pre-synchronization sequence is started synchronously, and the HRF channel negotiation and authentication handshake process is executed in parallel while maintaining HPLC link status monitoring. This breaks the limitations of the traditional serial processing mode, shortens the overall time of channel switching, and improves the response speed of link switching.

[0020] In a preferred embodiment of the present invention, step 1, which involves real-time acquisition of the signal-to-noise ratio and bit error rate of the HPLC communication link through a pre-configured communication quality monitoring unit, includes: Step 11: Using a hardware probe, synchronously capture the training sequence of the physical layer frame header within each HPLC beacon period, measure its Received Signal Strength Indication (RSSI), and calculate the average Error Vector Magnitude (EVM) over the entire symbol period to obtain the original channel parameters. Specifically, this includes: Hardware probe configuration: Employing a hardware probe matched to the physical layer protocol of the HPLC communication link, with its sampling frequency synchronized with the HPLC signal symbol rate; Within each HPLC beacon period (the beacon period is configurable, ranging from 10ms to 100ms, dynamically adjusted according to the link communication frequency), the hardware probe monitors the physical layer frame structure in real time. When the end-of-frame-header preamble is detected, synchronously start capturing the training sequence. The acquisition mechanism continuously acquires the complete symbol period signal of the training sequence; within each symbol period of the training sequence, a stable segment of the symbol is selected for signal strength sampling, and the maximum and minimum values ​​of the sampled values ​​are removed, and the arithmetic mean is taken to obtain the Received Signal Strength Indication (RSSI) for that symbol period; the captured received symbols of the training sequence are compared point by point with the ideal training sequence symbols stored locally, and the Error Vector Magnitude (EVM) of each sampling point is calculated, which is the magnitude of the vector difference between the received symbol and the ideal symbol; the arithmetic mean of all EVM values ​​in the entire symbol period (containing 64-256 sampling points, determined according to the symbol rate) is taken to obtain the average EVM of that symbol period, which is used as one of the original channel parameters.

[0021] Step 12: The RSSI and EVM sequences in the original channel parameters are processed using a Kalman filter-based tracking algorithm. This involves using the previous time-stamped SNR estimate as prior information to filter the current measurement, predicting and updating the state variables, ultimately obtaining a smoothed, accurate estimate of the current SNR. Specifically, this includes: defining the state variables: setting the current SNR estimate as the state variable to characterize the dynamic trend of link communication quality; assuming the SNR change follows a first-order Markov process based on the time-varying characteristics of the link channel, meaning the current state is only related to the previous state, and setting the state transition coefficients based on historical link stability data (0.9-0.95 for stable links, 0.7-0.8 for fluctuating links); using the obtained average RSSI and EVM values ​​as the observation input, converting the observations into SNR measurements through a preset mapping relationship; and collecting training data: simulating different interference scenarios (such as power frequency interference, pulse interference, and multipath interference) in a laboratory environment, collecting the original RSSI and EVM data and corresponding data for each scenario. The actual signal-to-noise ratio (SNR) benchmark value is used to form a training dataset. Parameter optimization: Based on the training dataset, the least squares criterion is used to adjust the filter model parameters, including process noise covariance (reflecting the uncertainty of link state changes, with a value range of 0.01-0.1 in stable scenarios and 0.1-0.5 in strong interference scenarios) and measurement noise covariance (reflecting the error characteristics of the observations, with a value range of 0.05-0.3), until the deviation between the model estimate and the benchmark value is less than a preset threshold (usually ≤5%). The SNR estimate of the previous time step is used as prior information, and the prior estimate of the current time step is calculated in combination with the state transition coefficient. The RSSI and EVM measurements of the current time step are obtained and converted into SNR measurements. The Kalman gain is calculated in combination with the measurement noise covariance (with a value range of 0.1-0.8, dynamically reflecting the reliability of the measurement values). Based on the prior estimate, Kalman gain, and measurement residual (the difference between the measurement value and the prior estimate), the posterior SNR estimate of the current time step is calculated, the state update is completed, and the smoothed accurate SNR estimate is obtained.

[0022] Step 13: Synchronously monitor the Media Access Control (MAC) layer frame structure, extract the Cyclic Redundancy Check (CRC) field or Forward Error Correction (FEC) parity bit at the end of each received frame; within a configurable sliding time window, accumulate the number of frames with failed checks, and divide this number by the total number of received frames within the window to calculate the real-time bit error rate statistics for that time period. Specifically, this includes: MAC layer frame monitoring: Real-time monitoring of the HPLC communication link's Media Access Control (MAC) layer frame transmission through the protocol parsing module, extracting the frame structure information of each received frame, locating the Cyclic Redundancy Check (CRC) field or Forward Error Correction (FEC) parity bit at the end of the frame (the number of bits is determined according to the FEC coding efficiency, such as the length of the check bit in a convolutional code); configuring an adjustable sliding time window, with a window duration range of 1s-1 second. 0s (set according to the real-time requirements of communication services for bit error rate monitoring; 1s-3s for services with high real-time requirements, and 5s-10s for non-real-time services). The window sliding step size is consistent with the HPLC frame transmission period (usually 10ms-100ms). For each received frame within the window, CRC check or FEC check is performed: if the CRC check result does not match the frame header check value, it is determined as a check failure; if there are still uncorrected error bits after FEC decoding (the number of error bits exceeds the FEC error correction capability), it is determined as a check failure. Within each sliding window period, the total number of received frames (including successfully received and failed check frames) and the number of failed check frames are counted. The ratio of the number of failed frames to the total number of received frames is used as the real-time bit error rate statistic for that time period. The statistical results are updated in real time as the window slides.

[0023] In this embodiment of the invention, hardware-synchronized sampling and symbol stability segment selection ensure the synchronization and accuracy of RSSI and EVM measurements, avoiding parameter deviations caused by asynchronous sampling. Dynamic adjustment and training optimization based on the Kalman filter model effectively filters out the impact of channel noise and sudden interference on the measured values, resulting in smoother and more accurate signal-to-noise ratio estimates, solving the problem of large data fluctuations in traditional direct measurement methods. A configurable sliding window combined with real-time judgment using a check field enables dynamic and real-time statistics of the bit error rate. This accurately reflects sudden changes in link quality within a short period and can adapt to the monitoring needs of different services through window adjustment, improving the flexibility and practicality of bit error rate statistics.

[0024] In a preferred embodiment of the present invention, step 2 involves locating three preset reference coordinate points in the multidimensional space of the communication quality index, based on the communication quality index. These reference coordinate points constitute a triangulation analysis region, including: Step 21: Pair and timestamp-align the precise signal-to-noise ratio (SNR) estimate with the real-time bit error rate (BER) statistics to form a complete communication quality indicator (CQI) pair. From the historical sequence of CQI pairs, select the SNR estimate and BER statistics from the most recent statistical period as the current sampling point. Specifically, this involves: calibrating the timestamps of the precise SNR estimate and BER statistics using a time synchronization module (supporting NTP or IEEE 1588 precise time protocol) to ensure that the time deviation between the two does not exceed 1ms. Pair the SNR estimate and BER statistics at the same time point to form a (SNR, BER) formatted CQI pair, storing them in a circular buffer (buffer capacity is 1000-5000 pairs, dynamically configured according to the link data volume). Set the statistical period range to 5-30 minutes (adjustable through the system configuration interface, default 10 minutes), and extract all CQI pairs from the historical sequence of CQI pairs within the most recent statistical period. The signal-to-noise ratio estimate and bit error rate statistics for the period are arithmetically averaged (removing 10% of the extreme values ​​within the period) to obtain the representative signal-to-noise ratio estimate and bit error rate statistics for the period, which are then combined to form the coordinate data of the current sampling point.

[0025] Step 22: Map the current sampling point to a two-dimensional quality plane using the signal-to-noise ratio (SNR) estimate as the horizontal axis and the bit error rate (BER) statistics as the vertical axis. Specifically, this includes: constructing a two-dimensional quality plane coordinate system, where the horizontal axis (X-axis) represents the SNR dimension, with a scale range of 0-40 dB and a minimum scale unit of 0.1 dB; the vertical axis (Y-axis) represents the BER dimension, using a linear scale with a range of 1 × 10⁻⁶. -6 -1×10 -4 The smallest scale unit is 1×10 -7 The origin of the coordinate system is (0dB, 1×10). -6 The positive direction of the horizontal axis indicates an increase in signal-to-noise ratio (SNR), and the positive direction of the vertical axis indicates an increase in bit error rate (BER). The SNR estimate of the current sampling point is mapped to the horizontal axis scale, and the BER statistics are mapped to the vertical axis scale. The position of the sampling point is marked on the two-dimensional quality plane using a coordinate positioning algorithm. If the SNR estimate exceeds the 0-40dB range, the boundary value is automatically taken (0dB if below 0dB, 40dB if above 40dB). The same process is applied when the BER statistics exceed the range, ensuring that the sampling point always falls within the effective range of the coordinate system.

[0026] Step 23: On the two-dimensional quality plane, three static reference coordinate points are predefined; the first reference point represents a high-quality channel state with high signal-to-noise ratio and low bit error rate, the second reference point represents a critical channel state with medium signal-to-noise ratio and medium bit error rate, and the third reference point represents a poor-quality channel state with low signal-to-noise ratio and high bit error rate. Specifically, the first reference point (high-quality channel state) has the following preset coordinates: (25-40dB, 1×10⁻⁶). -6-1×10 -5 The specific value is determined through high-quality state sampling during the link debugging phase (e.g., default (30dB, 5×10)). -6 The first reference point represents the state where the communication link is free from significant interference and data transmission is stable; the second reference point (critical channel state) has preset coordinates of (15-25dB, 1×10). -5 -1×10 -3 ), default value (20dB, 5×10) -4 The third reference point (poor channel condition) represents a transitional state where link quality begins to decline and requires close monitoring; the preset coordinates are (0-15dB, 1×10). -3 -1×10 -1 ), default value (10dB, 5×10) -2 The system represents the state of the link being subject to strong interference and the data transmission reliability being low. In a laboratory environment, different channel states are simulated (controllable interference is injected through a signal generator), and actual index pairs under each state are collected and compared with the preset benchmark point. If the actual high-quality state index pair deviates from the first benchmark point by more than 10%, the benchmark point coordinates are adjusted to the actual average value to ensure that the benchmark point can accurately represent the corresponding channel state.

[0027] Step 24: Perform nearest neighbor matching between the current sampling point and three static reference coordinate points to determine the channel state region to which the current sampling point belongs. Specifically, this includes: calculating the coordinate differences between the current sampling point and the three reference points; the horizontal difference is the difference between the absolute values ​​of the signal-to-noise ratio (SNR) of the sampling point and the SNR of the reference points, and the vertical difference is the difference between the absolute values ​​of the bit error rate (BER) of the sampling point and the BER of the reference points; evaluating the overall distance using a weighted summation method (SNR weight set to 0.6, BER weight set to 0.4, based on their respective impact on communication quality); and setting the distance threshold range to (5dB, 5×10⁻⁶). -4 That is, when the lateral difference between the sampling point and a certain reference point is ≤5dB and the longitudinal difference is ≤5×10 -4 When the sampling point is located, it is determined that it belongs to the channel state region corresponding to the reference point. If the distance between the sampling point and multiple reference points is less than the threshold, the region to which the reference point with the smallest overall distance belongs is selected; if all distances are greater than the threshold, it is determined to be a transition region, triggering an additional state warning mechanism.

[0028] Step 25: Construct a dynamic triangulation analysis region using three reference coordinate points as vertices. This region divides the current channel state space into three feature subspaces. Specifically, it includes extracting the specific parameters of the three static reference coordinate points: the first reference point (high signal-to-noise ratio - low bit error rate) has coordinates (SNR1, BER1), where SNR1 ranges from 30dB to 40dB, and BER1 ranges from 1×10⁻⁶. -6 -1×10 -5The second reference point (signal-to-noise ratio - bit error rate) is located at coordinates (SNR2, BER2), where SNR2 ranges from 20dB to 30dB and BER2 ranges from 1×10⁻⁶. -5 -1×10 -4 The third benchmark (low signal-to-noise ratio - high bit error rate) is located at (SNR3, BER3), where SNR3 ranges from 10dB to 20dB and BER3 ranges from 1×10⁻⁶. -4 -1×10 -3 The validity of the three reference point coordinates is verified to ensure that the Euclidean distance between any two points is not less than the preset minimum value (set according to the two-dimensional mass plane scale, usually 5dB×10). -5 The coordinate interval is adjusted to avoid blurring of the region division due to vertices being too close together. Three reference vertices are connected by line segments to form a closed triangular region: line segment L1 connects the first reference point and the second reference point, line segment L2 connects the second reference point and the third reference point, and line segment L3 connects the third reference point and the first reference point. A dynamic expansion coefficient is set for each line segment (the value range is 1.1-1.5, adjusted according to the historical fluctuation of the link: 1.3-1.5 for violent fluctuation scenarios and 1.1-1.3 for stable scenarios). The boundary is expanded outward along the vertical direction of the line segment so that the triangular region covers the possible neighborhood range of the current sampling point (the area of ​​the expanded region is 1.2-2.25 times that of the original region). Model construction: Each feature subspace is defined to correspond to a specific channel state feature. The subspace division is based on the three midlines of the triangular region (the lines connecting the vertices to the midpoints of the opposite sides) as boundaries. Among them, subspace S1 takes the first reference point as the vertex and covers the high signal-to-noise ratio and low bit error rate high-quality state region; subspace S2 takes the second reference point as the vertex and covers the medium signal-to-noise ratio and medium bit error rate region. The critical state region; subspace S3, with the third reference point as the vertex, covers the poor state region with low signal-to-noise ratio and high bit error rate; model training: collect at least 1000 pairs of communication quality indicators (including high-quality, critical, and poor-quality states) under different channel scenarios, and determine the ideal subspace to which each pair of indicators belongs through manual annotation; optimize the slope parameter of the midline boundary based on the annotation data (adjustment range is ±0.1) so that the accuracy of subspace division reaches more than 95% (that is, more than 95% of the indicator pairs in the annotation data fall into the corresponding subspace); monitor the positional relationship between the current sampling point (obtained in step 21) and the triangular region in real time: if the sampling point is located outside the region within 3 consecutive statistical periods, start the region dynamic adjustment mechanism; the adjustment method is to expand the reference vertex coordinates proportionally: correct the reference point coordinates in the direction of exceeding the range (when expanding in the direction of signal-to-noise ratio, the SNR value increases by 2dB-5dB; when expanding in the direction of bit error rate, the BER value is amplified by 1.2-1.5 times), regenerate the boundary of the triangular region, and ensure that the current sampling point falls into the adjusted region.

[0029] In this embodiment of the invention, precise alignment via timestamps and optimization of statistical periods ensure the timeliness and representativeness of communication quality indicators, avoiding sampling deviations caused by data asynchrony or instantaneous fluctuations. Standardized mapping of the two-dimensional quality plane visualizes the channel state, clearly presenting the correlation between signal-to-noise ratio and bit error rate, solving the problem that a single indicator cannot comprehensively characterize link quality. Scientific pre-setting and scenario adaptation of static reference points establish clear channel state classification standards, providing quantifiable reference for link quality assessment and enhancing the consistency of state judgment. A weighted distance matching algorithm combined with a threshold judgment mechanism achieves precise positioning of the sampling point's region, improving the accuracy of channel state identification.

[0030] In a preferred embodiment of the present invention, step 3, performing sub-region meshing processing on the triangulation analysis region and extracting an adaptive threshold offset based on the generated mesh topology features, includes: Step 31: Using the three reference coordinate points of the triangulation analysis region as boundaries, the triangulation analysis region is divided into multiple uniform grid cells using an equal-space division strategy. Each grid cell represents a specific channel state sub-region. Specifically, this includes: configuring equal-space division parameters based on the boundary range of the triangulation analysis region (determined by the three reference coordinate points). The division spacing range for the signal-to-noise ratio dimension is 0.5dB-2dB (set according to the channel quality fluctuation amplitude; smaller spacing is used when the fluctuation is large), and the division spacing range for the bit error rate dimension is 0.01-0.1 (expressed as a relative value; smaller spacing is used in low bit error rate regions). Using the three reference coordinate points as vertices, the region is uniformly divided along the horizontal axis of signal-to-noise ratio and the vertical axis of bit error rate at a preset spacing to form multiple triangular or quadrilateral grid cells. The boundary of each grid cell is determined by connecting adjacent dividing points, ensuring that the grid covers the entire triangulation area without overlap. The generated grid cells are uniquely identified in row and column order, and two-dimensional index encoding is used. The index value starts from the lower left corner of the triangulation area, and the row number increases in the direction of increasing signal-to-noise ratio, while the column number increases in the direction of increasing bit error rate.

[0031] Step 32: Based on the coordinates of the current sampling point on the two-dimensional quality plane, calculate the index of the grid cell to which it belongs, and determine the relative distance relationship between the grid cell and the three reference coordinate points. Specifically, this includes: obtaining the signal-to-noise ratio (SNR) coordinate value and bit error rate (BER) coordinate value of the current sampling point on the two-dimensional quality plane, comparing them with the horizontal axis and vertical axis partitioning intervals of the grid cell, and determining the horizontal axis and vertical axis intervals in which the coordinate value falls; combining the row number corresponding to the horizontal axis interval and the column number corresponding to the vertical axis interval to obtain the two-dimensional index code of the grid cell to which the current sampling point belongs, thus completing grid positioning; using the geometric center of the grid cell as the reference point, calculate the straight-line distance from the center to the three reference coordinate points (relative distance is represented by the sum of the squares of the coordinate differences), determine the nearest reference point, the second nearest reference point, and the farthest reference point, and form a distance relationship sort.

[0032] Step 33: Based on the grid cell index and relative distance relationship, query the pre-stored grid feature mapping table. This table defines the topological feature values ​​corresponding to each grid cell. The topological feature values ​​include the center density and boundary gradient of the grid cell. Specifically, this includes: simulating different channel states (high-quality coverage, critical, poor-quality coverage, and transitional states) in a laboratory environment, collecting actual communication quality data corresponding to each grid cell, including characteristic parameters such as signal-to-noise ratio fluctuation variance and bit error rate variation rate; for each grid cell, calculating the center density (the distribution density of historical sampling points within the grid, expressed as the number of sampling points per unit area, ranging from 10 to 100 points per unit area). The boundary gradient (the feature difference between the grid edge and adjacent grids, ranging from 0.1 to 0.5) is used as the topological feature value. A two-dimensional index mapping table is constructed, with the index key being the row and column number encoding of the grid cell, and the value being the corresponding center density and boundary gradient, stored in non-volatile memory. The mapping table is iteratively optimized using actual link test data. When the actual feature value of a grid cell deviates from the value stored in the table by more than 20%, the corresponding feature value in the table is updated to ensure the accuracy of the mapping relationship. Based on the grid cell index determined in step 32, a precise match is performed in the mapping table to read the center density value and boundary gradient value corresponding to the grid cell.

[0033] Step 34: Based on the topological feature values, a weighted average algorithm is used to fuse the center density and boundary gradient to obtain a preliminary offset estimate. Specifically, this includes: presetting the weight coefficients for the center density and boundary gradient, where the center density weight ranges from 0.4 to 0.6, and the boundary gradient weight ranges from 0.4 to 0.6 (dynamically adjusted according to channel stability; the center density weight is higher in stable conditions, and the boundary gradient weight is higher in fluctuating conditions); multiplying the center density value of the grid cell by its weight coefficient to obtain the density contribution value; multiplying the boundary gradient value by its weight coefficient to obtain the gradient contribution value; adding the two contribution values ​​to obtain the preliminary offset estimate; if the preliminary estimate is negative (indicating the offset direction is opposite to the expected direction), its absolute value is taken and multiplied by a correction factor of 0.8 (to suppress the influence of reverse offset); if it is positive, the original value is maintained to ensure that the offset direction is consistent with the channel quality change trend.

[0034] Step 35: Perform dynamic range compression on the preliminary offset estimate. Use a nonlinear function to map it to a preset offset range to generate the final adaptive threshold offset. Specifically, this includes: Preset range definition: Based on the stability requirements of the communication link, define the effective range of the adaptive threshold offset: the signal-to-noise ratio offset range is -1dB to +2dB (negative offset indicates a lower threshold, positive offset indicates a higher threshold), and the bit error rate offset range is -0.1 to +0.3 (expressed as a relative value); Use a piecewise linear function to achieve range compression. The function is divided into a low segment (input ≤ preset lower limit), a middle segment (input within the preset range), and a high segment (input ≥ preset upper limit). The mapping result of the low segment is fixed at the preset lower limit value, the middle segment keeps the input value unchanged, and the mapping result of the high segment is fixed at the preset upper limit value; Input the obtained preliminary offset estimate into the nonlinear mapping function, and constrain it to the preset range through function processing to output the final adaptive threshold offset.

[0035] Piecewise linear function dynamic range compression process: The preset offset output range is [-3, 3] (unit is the threshold adjustment base unit). The input range [0, 1] of the preliminary offset estimate is divided into three segmented intervals: low segment interval [0, 0.3], middle segment interval (0.3, 0.7], and high segment interval (0.7, 1]. Each interval corresponds to a different linear mapping relationship. Low segment interval: When the input value is mapped from 0 to 0.3, the output value is linearly mapped from -0.5 to 0.5, and the mapping slope is (0.5-(-0.5)) / (0.3-0)=3.33 (in actual implementation, the corresponding output value is determined by looking up a table, with an interval of 0). 01. Take a mapping point); Middle segment: When the input value is mapped from 0.3 to 0.7, the output value is linearly mapped from 0.5 to 2, and the mapping slope is (2-0.5) / (0.7-0.3)=3.75 (also achieved through lookup points with an interval of 0.01); High segment: When the input value is mapped from 0.7 to 1, the output value is linearly mapped from 2 to 3, and the mapping slope is (3-2) / (1-0.7)=3.33 (achieved through lookup points with an interval of 0.01); Based on the segment interval to which the preliminary offset estimate belongs, the compressed output value is obtained by querying the linear mapping table of the corresponding interval, which is the final adaptive threshold offset. In this embodiment of the invention, the continuous channel state space is discretized into quantifiable sub-regions by equally spaced grid division, improving the granularity of channel quality analysis and providing a structured foundation for subsequent feature extraction. Precise grid positioning and distance relationship analysis ensure the correlation between the current channel state and baseline features, providing an accurate index for feature mapping. A pre-stored grid feature mapping table, combined with a dynamic optimization mechanism, enables rapid querying and accurate matching of topological features, avoiding the complexity of real-time computation. In a preferred embodiment of the present invention, step 4, which involves real-time calibration of the initial decision threshold using an adaptive threshold offset to obtain a dynamically adjusted decision threshold, includes: Step 41: Receive the adaptive threshold offset and read a set of initial decision thresholds pre-stored in non-volatile memory. This set of initial thresholds includes a first decision threshold for signal-to-noise ratio (SNR) and a second decision threshold for bit error rate (BER). Specifically, this includes: receiving the adaptive threshold offset output from step 3 via the internal data bus. This offset is a value after dynamic range compression, with a preset range of [-0.5, 0.5] (unitless, representing the direction and relative magnitude of threshold adjustment); using EEPROM or Flash type non-volatile memory, with a pre-allocated dedicated area for storing the initial decision thresholds, supporting long-term data retention after power failure, and allowing for later updates via a debugging interface; after system power-on or during link startup, accessing the preset address via a memory read command to read the pre-stored initial decision threshold set: First decision threshold (SNR threshold): pre-configured according to link design standards, with a value range of 10dB-30dB, a typical value of 20dB, used to determine whether the SNR meets communication requirements; Second decision threshold (BER threshold): pre-configured according to service reliability requirements, with a value range of 1×10⁻⁶. -5 -1×10 -3 Typical value is 1×10 -4 It is used to determine whether the bit error rate is within an acceptable range.

[0036] Step 42: Using the adaptive threshold offset as input, query a pre-configured nonlinear mapping table. This table defines the correspondence between the offset and the threshold adjustment magnitude, obtaining a first adjustment magnitude for the signal-to-noise ratio (SNR) threshold and a second adjustment magnitude for the bit error rate (BER) threshold. Specifically, this includes: simulating different channel states (covering high-quality, critical, and low-quality states) in a laboratory environment; collecting the adaptive threshold offset and the corresponding optimal threshold adjustment magnitude (determined manually to optimize link performance) for each state to form a mapping table training dataset; uniformly dividing the adaptive threshold offset range [-0.5, +0.5] into 20-50 continuous intervals (e.g., each interval is 0.02), with each interval corresponding to a unique index value; for each interval, determining the first adjustment magnitude (SNR threshold adjustment) and the second adjustment magnitude (BER threshold adjustment) corresponding to the offset in that interval based on the training dataset, where the first adjustment magnitude ranges from [-5dB, +3dB] and the second adjustment magnitude ranges from [-5×10⁻⁶]. -5 +2×10 -4The adjusted threshold is stored in a mapping table. Through multiple rounds of actual link testing, the performance of the adjusted threshold is compared with the expected target. If the adjustment range of a certain interval causes the misjudgment rate to exceed 5%, the adjustment range of that interval is corrected. With the goal of the misjudgment rate of the adjusted link being less than 2% and the switching response time meeting business requirements, the correspondence in the mapping table is iteratively optimized until all intervals meet the performance requirements. The received adaptive threshold offset is compared with the interval range of the mapping table to determine the index value of the interval to which it belongs. The corresponding first adjustment range and second adjustment range are obtained by index query.

[0037] Step 43: A weighted fusion algorithm is used to calculate the first adjustment magnitude by superimposing it with the first decision threshold, and the second adjustment magnitude by superimposing it with the second decision threshold. The weights are dynamically configured based on the stability of the current channel state, specifically including: Stability index calculation: By statistically analyzing the fluctuation variance of the SNR estimate over the most recent 5-10 sampling periods (the smaller the variance, the more stable the channel), the variance value is mapped to a stability coefficient, with a value range of 0.3-0.8; the higher the stability coefficient (the more stable the channel), the higher the weight assigned to the initial decision threshold and the lower the weight assigned to the adjustment magnitude; conversely, the lower the stability coefficient, the higher the weight assigned to the adjustment magnitude; the specific weight allocation is: initial threshold weight = stability coefficient, adjustment magnitude weight = 1 - stability coefficient; SNR threshold calculation: the first adjustment magnitude is multiplied by its corresponding weight and accumulated with the first decision threshold multiplied by its corresponding weight to obtain the initially adjusted SNR threshold; the second adjustment magnitude is multiplied by its corresponding weight and accumulated with the second decision threshold multiplied by its corresponding weight to obtain the initially adjusted bit error rate threshold.

[0038] Step 44: Perform upper and lower limit saturation processing on the superimposed signal-to-noise ratio (SNR) threshold and bit error rate (BER) threshold to obtain the dynamic decision threshold after real-time calibration. Specifically, this includes: Upper limit of SNR threshold: set to the first decision threshold + 5dB to ensure that the adjusted SNR threshold does not exceed the theoretically maximum acceptable value of the link; Lower limit of SNR threshold: set to the first decision threshold - 3dB to avoid frequent misjudgments due to excessively low thresholds; Upper limit of BER threshold: set to the second decision threshold + 2 × 10⁻⁶. -4 To prevent premature link switching due to excessively high thresholds; the lower limit of the bit error rate threshold is set to the second decision threshold - 5 × 10. -5 To avoid the link from deteriorating without switching due to an excessively low threshold, the preliminary adjustment threshold obtained in step 43 is compared with the set upper and lower limits: if the preliminary threshold is higher than the upper limit, the upper limit is used as the final threshold; if the preliminary threshold is lower than the lower limit, the lower limit is used as the final threshold; if it is within the range of the upper and lower limits, the preliminary threshold is directly used as the dynamically adjusted decision threshold. In this embodiment of the invention, the initial threshold is reliably stored in non-volatile memory, ensuring that the reference parameters can be quickly acquired after the system is powered on, providing a stable starting point for threshold calibration. Simultaneously, it supports flexible threshold updates to adapt to different application scenarios. A non-linear mapping table constructed based on measured data achieves accurate conversion from offset to adjustment magnitude, avoiding complex formula calculations and improving the practicality and reliability of threshold adjustment. Furthermore, training optimization ensures adjustment accuracy under different channel conditions. The dynamic weighted fusion algorithm adaptively allocates weights based on channel stability, maintaining a relatively stable threshold when the channel is stable (reducing unnecessary adjustments) and enhancing adjustment sensitivity when the channel fluctuates, achieving a balance between stability and adaptability.

[0039] In a preferred embodiment of the present invention, step 5 involves logically comparing the real-time acquired signal-to-noise ratio and bit error rate indicators with the dynamically adjusted decision threshold; when the indicators continuously exceed the dynamically adjusted decision threshold, the decision unit generates a mode switching enable signal and initializes the HRF channel pre-synchronization sequence, including: Step 51: Receive the latest accurate signal-to-noise ratio (SNR) estimate and bit error rate (BER) statistics from the communication quality monitoring unit in real time, and receive dynamic decision thresholds. Specifically, this includes: receiving the latest accurate SNR estimate (updating period consistent with the monitoring unit's sampling period, 1ms-10ms) and BER statistics (dynamically updated with a sliding window, updating at 1s-10s) in real time via a dedicated data interface between the communication quality monitoring unit and the decision unit (using interrupt triggering, with an interface transmission rate of no less than 1Mbps); synchronously receiving the dynamic decision thresholds calibrated in Step 4, including the SNR decision threshold and the BER decision threshold, storing them in the decision unit's temporary buffer (capacity no less than 10 sets of historical threshold data to ensure data continuity), and verifying the time consistency between the indicators and the thresholds through timestamp comparison (accuracy to 1ms).

[0040] Step 52: In the switching decision unit, two independent hysteresis comparators are set up in parallel: the first comparator compares the real-time signal-to-noise ratio (SNR) estimate with the SNR decision threshold, and the second comparator compares the real-time bit error rate (BER) statistics with the BER decision threshold. Specifically, this includes: comparator parameter configuration: Two hysteresis comparators are independently configured in the switching decision unit: First comparator (dedicated to SNR): The hysteresis interval is set to 2dB-5dB (based on channel stability presets, 2dB-3dB for stable channels and 3dB-5dB for fluctuating channels). When the real-time SNR drops from above the threshold to the threshold, the comparator outputs the hysteresis amount of the state switching as the lower limit of the interval; when the SNR rises from below the threshold, the hysteresis amount is the upper limit of the interval; Second comparator (dedicated to BER): The hysteresis interval is set to 1-3 orders of magnitude (e.g., 1×10). -4 Up to 3×10 -4When the bit error rate rises from below the threshold to the threshold, the hysteresis is the lower limit of the interval; when the bit error rate falls back from above the threshold, the hysteresis is the upper limit of the interval; the first comparator outputs a degradation flag if and only if the real-time signal-to-noise ratio is less than the signal-to-noise ratio decision threshold; the second comparator outputs a degradation flag if and only if the real-time bit error rate is greater than the bit error rate decision threshold, and the comparison results are updated in real time (the update frequency is consistent with the index reception period).

[0041] Step 53: When both comparator outputs simultaneously indicate a deterioration in communication quality indicators, i.e., the signal-to-noise ratio is lower than its decision threshold and the bit error rate is higher than its decision threshold, a deterioration event flag is triggered. Specifically, this includes: logical AND judgment: performing an AND operation on the output signals of the two comparators through hardware logic gate circuits. A single-cycle valid deterioration event flag is triggered only when the output of the first comparator deteriorates and the output of the second comparator deteriorates simultaneously (the flag duration is equal to one indicator update cycle); the triggered deterioration event flag is subjected to jitter filtering, and the minimum trigger interval is set to 50ms-200ms (configured according to the channel jitter characteristics) to avoid high-frequency jitter caused by instantaneous interference triggering invalid flags.

[0042] Step 54: Initiate a configurable continuous monitoring time window to count degradation event flags within the window. When the cumulative count exceeds a preset event count threshold, it is determined that the channel state continuously exceeds the dynamically adjusted decision threshold. Specifically, this includes: Monitoring window configuration: Initiate a configurable continuous monitoring time window with a window duration of 1s-10s (1s-3s for scenarios with high real-time requirements, and 5s-10s for anti-interference scenarios), and the window sliding step size is equal to the index update cycle; Accumulate the number of triggers of degradation event flags within the window, using an edge-triggered counting method (counting once for each rising edge of the flag), with a counting range from 0 to the maximum possible number of events within the window (e.g., the maximum count within a 1s window is 100 times, corresponding to a 10ms update cycle); The preset event count threshold is 60%-80% of the theoretical maximum number of events within the window duration (e.g., a 3s window corresponds to 300 theoretical events, and the threshold is set to 180-240 times). When the cumulative count is ≥ this threshold, it is determined that the channel state continuously exceeds the dynamic decision threshold.

[0043] Step 55: The switching decision unit immediately generates a high-active mode switching enable signal and sends it to the HRF communication control module. The HRF communication control module initializes the transmission of the pre-synchronization sequence according to the pre-stored HRF channel parameters and begins the HRF channel establishment process. Specifically, this includes: Enable signal generation: The switching decision unit outputs a high-active mode switching enable signal (signal level 3.3V±0.3V, pulse width not less than 100ms), which is sent to the HRF communication control module via a dedicated control bus, while simultaneously recording the signal transmission timestamp. After receiving the enable signal, the HRF communication control module reads the pre-stored HRF channel parameters (including pre-synchronization sequence length 256bit-1024bit, transmission frequency 433MHz / 868MHz, modulation method FSK / GFSK) from the non-volatile memory, initializes the sequence generator according to the parameters, and starts the periodic transmission of the pre-synchronization sequence (transmission period 50ms-200ms) until an HRF link response is received.

[0044] In this embodiment of the invention, a configurable continuous monitoring window and counting threshold prevent transient interference from triggering invalid handovers, making handover decisions more closely reflect the actual channel conditions. Synchronous generation of a handover enable signal and initialization of HRF pre-synchronization shorten channel handover preparation time, laying the foundation for seamless handover. Parameters such as hysteresis interval and window duration can be dynamically configured to meet the differentiated real-time and stability requirements of various communication scenarios.

[0045] In a preferred embodiment of the present invention, step 6, based on the pre-stored HRF channel feature vector table, involves performing the HRF channel negotiation and authentication handshake process in parallel while maintaining HPLC link status monitoring, including: Step 61: Upon receiving the mode switching enable signal, the HRF communication control module immediately wakes up from the low-power standby mode and loads the pre-stored HRF channel feature vector table. Specifically, after receiving the mode switching enable signal (high level 3.3V±0.3V, duration ≥100ms), the HRF communication control module immediately wakes up from the low-power standby mode (power consumption ≤1mA) and switches to the working mode (power consumption ≤50mA) through the internal power management unit, with a wake-up response time ≤100ms. The pre-stored HRF channel feature vector table is read from non-volatile memory (such as EEPROM, storage capacity ≥1MB). This table contains at least 10 sets of channel parameter records. Each set of records includes channel number (1-16), center frequency (433MHz±100kHz / 868MHz±100kHz), historical signal strength (RSSI) average, communication success rate, and other feature parameters. The loading process ensures data integrity through checksum verification (checksum value pre-stored at the end of the table).

[0046] Step 62: Based on the HRF channel feature vector table, select the HRF channel with the best signal strength as the preferred negotiation channel and generate a channel negotiation request frame. Specifically, this includes: Channel sorting rules: Based on the historical average signal strength (range -100dBm to -50dBm) in the feature vector table, sort all available HRF channels in descending order, and select the top 3 channels with the highest average signal strength as candidate channels. The preferred channel is the channel ranked first in the sorting. Generate a channel negotiation request frame. The frame structure includes a frame header (containing source address and destination address, each occupying 6 bytes), a control field (1 byte, identifying the request type), channel parameter information (2 bytes, containing the preferred channel number and frequency information), and a check field (2-byte CRC check value). The frame length is fixed at 11 bytes.

[0047] Step 63: While continuously monitoring the HPLC link status, periodically send channel negotiation request frames through the HRF physical layer interface and start a response timeout timer. Specifically, this includes: Parallel monitoring of HPLC status: continuously monitoring the HPLC link status through an independent data acquisition channel, receiving the signal-to-noise ratio estimate (update period 1ms-10ms) and bit error rate statistics (update interval 1s-10s) output by the communication quality monitoring unit in real time, and storing the monitoring data in an independent buffer (capacity ≥ 5 sets of the latest data); periodically sending negotiation request frames through the HRF physical layer interface (using FSK modulation, baud rate 9600bps-57600bps), with a sending period configured to 200ms-500ms (dynamically adjusted according to channel quality, taking the smaller value when the signal is weak); and simultaneously starting a response timeout timer with a timing duration of 1s-2s (3-5 times the sending period).

[0048] Step 64: Listen for negotiation response frames on the HRF channel. If a valid response frame is received before the response timeout timer expires, parse the network allocation vector and session key within it to complete the link layer connection of the HRF channel. Specifically, this includes: Response frame verification: Continuously listen for negotiation response frames on the HRF channel. For the received frame, first perform frame header format verification (verify the legality of the source address) and CRC verification. If the verification passes, it is determined to be a valid response frame. If the verification fails, discard the frame and record the number of errors (continue listening if the number of errors is ≤5). Parse the network allocation vector (NAV, occupying 2 bytes, indicating the channel occupancy time) and session key (16 bytes, using AES-128 encryption algorithm) in the valid response frame. Write the NAV value into the HRF media access control layer register, initialize the encryption module using the session key, complete the parameter configuration of the HRF link layer connection, and set the connection establishment flag.

[0049] Step 65: If no valid response is received after the response timeout timer expires, the system automatically switches to the second-best backup channel according to the HRF channel feature vector table, resends the negotiation request frame, and restarts the response timeout timer until the HRF channel handshake is completed or all backup channels have been tried. Specifically, this includes: if the response timeout timer reaches the preset duration and no valid response frame is received, a timeout interrupt is triggered; the system automatically switches to the second-best channel (the second-ranked channel) according to the candidate channel ranking in the feature vector table, and clears the error count record; the negotiation request frame is reconstructed (the channel parameter information field is updated), resent according to the sending cycle of step 63, and the response timeout timer is reset to the initial duration; a maximum of all candidate channels (3 groups) are tried, and if all attempts fail, the link establishment failure status is recorded.

[0050] Step 66: During the entire HRF channel negotiation process, if the communication quality monitoring unit of the HPLC link reports that the channel indicators have recovered to the normal range, the HRF channel negotiation process is immediately terminated, and the HRF communication control module re-enters the low-power standby mode. Specifically, this includes: recovery condition judgment: During the HRF channel negotiation process, the latest monitoring indicators of the HPLC link are compared with the dynamic decision threshold in real time. When the signal-to-noise ratio estimate is greater than or equal to the signal-to-noise ratio decision threshold for three consecutive update cycles, and the bit error rate statistics are less than or equal to the bit error rate decision threshold for two consecutive sliding windows, the HPLC channel is determined to have recovered to normal. The transmission of HRF negotiation request frames is immediately stopped, temporary parameters such as the session key are cleared, and the HRF communication control module switches back to the low-power standby mode through the power management unit. At the same time, the negotiation termination status is fed back to the switching decision unit. The entire termination process takes ≤50ms.

[0051] In this embodiment of the invention, HRF negotiation is performed while HPLC status monitoring is maintained, avoiding the time wasted by serial processing and reducing channel switching preparation time compared to traditional serial schemes. Based on the optimal channel selection and timeout switching mechanism using a feature vector table, channels with weak signals or severe interference are effectively avoided, improving the success rate of HRF link establishment. Upon HPLC recovery, HRF negotiation is promptly terminated and the system switches to standby mode, extending the equipment's battery life.

[0052] In a preferred embodiment of the present invention, step 7, using a dual-channel redundant transmission mechanism, encapsulates critical fault information into a final priority protocol data unit before the HRF link is fully established, and performs redundant forwarding through the reserved time slot window of the HPLC link, including: Step 71: During the overlapping period after the mode switching enable signal is valid and before the HRF link is confirmed to be established, the switching control unit activates the dual-channel redundant transmission mechanism. Specifically, the switching control unit monitors the status of the mode switching enable signal in real time. When it detects that the signal is in a high-level valid state (3.3V±0.3V, duration ≥100ms) and the HRF link establishment flag is in an invalid state (logic 0), the dual-channel redundant transmission mechanism activation process is triggered. An activation command is sent through the internal control bus to switch the transmission mode from single-channel to dual-channel redundant mode, and the redundancy control timer is started (the timing range is 1s-3s, matching the typical establishment time of the HRF link). The mechanism is kept active during this overlapping period. After activation, a mechanical indicator light signal (red light is always on) and a software status word (0x01 indicates activation) are output, which are used for hardware visualization indication and system-level status query, respectively.

[0053] Step 72: The critical fault information generated by the application layer is submitted to the protocol encapsulation unit. This unit encapsulates the fault information, current timestamp, and sequence number into a specific final priority protocol data unit. Specifically, this includes: the critical fault information generated by the application layer (including fault type, location, severity level, etc., with a data length ranging from 32 bytes to 128 bytes) is submitted to the protocol encapsulation unit through a standard interface, with the submission frequency matching the fault occurrence frequency (one encapsulation triggered per fault); and a frame header field (6 bytes): containing the source device address (3 bytes) and the target device address (3 bytes), with the address format conforming to HPLC / HRF communication. Protocol Specification; Control Field (1 byte): The highest bit is fixed at 1 (indicating the final priority), and the lower 7 bits represent the fault level (levels 0-127, with 127 being the highest level); it sequentially encapsulates the original fault information data, the current timestamp (4 bytes, precision to milliseconds, value range 0-4294967295), and a 32-bit sequence number (incrementing from 0, resetting to 0 after overflow); it uses the CRC16 algorithm to calculate the checksum of the frame header, control field, and data field, and pre-stores it in the frame tail; after encapsulation, it performs length verification (total length range 45 bytes-141 bytes) and format verification, and marks it as a valid protocol data unit after passing the verification.

[0054] Step 73: The final priority protocol data unit is simultaneously submitted to the HPLCMAC layer sending queue and the HRF sending buffer queue. Specifically, both the HPLCMAC layer sending queue and the HRF sending buffer queue adopt a first-in-first-out (FIFO) structure, with a queue depth configured as 8-16 units (each unit can store 1 protocol data unit), and support for overflow protection (discarding the lowest priority data when overflow occurs). After a valid protocol data unit is generated, it is simultaneously written to two queues through a dual-port memory: HPLC sending queue: an interrupt is triggered during writing to notify the MAC layer scheduler that there is high-priority data to be sent; HRF sending buffer queue: after writing, it is marked as ready to be sent, waiting for the HRF link ready signal to trigger transmission; queue status maintenance: each queue maintains independent write count and read count, and the queue occupancy rate is monitored in real time through the count difference (an alarm is triggered when the occupancy rate exceeds 80%).

[0055] Step 74: The HPLCMAC layer scheduler identifies the specific identifier of the final priority protocol data unit, dynamically allocates a dedicated reserved time slot window for it, and immediately inserts it into the idle time slot of the current transmission frame for priority transmission. Specifically, the HPLCMAC layer scheduler scans the transmission queue in real time, identifies the final priority identifier by parsing the control field (highest bit is 1) in the protocol data unit frame header, with an identification response time ≤10ms; the scheduler allocates a dedicated reserved time slot from the preset time slot resource pool (total time slot capacity is 20%-30% of the idle bandwidth per frame), and the time slot length is dynamically adjusted according to the actual length of the protocol data unit (minimum 50 bytes, maximum 200 bytes). The allocation process ensures time slot continuity and does not conflict with existing services; the protocol data unit is inserted into the idle time slot header of the current transmission frame, overriding the transmission order of non-priority data, with a transmission interval ≤50ms (ensuring priority transmission of critical data), and the time slot occupancy table is updated after transmission is completed.

[0056] Step 75: On the HRF link, the final priority protocol data unit is retrieved from the HRF transmit buffer queue and transmitted only after the HRF channel handshake is completed. Specifically, the HRF transmit buffer queue continuously monitors the HRF link establishment flag. When the flag changes from 0 to 1 (indicating handshake completion) and the link quality parameters (RSSI ≥ -85dBm, bit error rate ≤ 1×10⁻⁶) are met, the final priority protocol data unit is transmitted. -4When the requirements are met, the transmission trigger signal is activated; the protocol data units in the state to be transmitted are retrieved from the HRF transmission buffer queue in FIFO order. During the retrieval process, a secondary verification is performed (verifying the consistency between the CRC value and the original value). If the verification fails, it is marked as invalid and an error log is recorded; the data is transmitted through the HRF physical layer interface, using the modulation method (FSK / GFSK) and baud rate (9600bps-57600bps) consistent with the link negotiation, and the transmission power is set to the maximum rated power (≤10dBm) to ensure the transmission distance.

[0057] Step 76: After successfully receiving the final priority protocol data unit through any link, the receiving end returns an acknowledgment to its sending source. After receiving the acknowledgment, the sending end removes the copy of the protocol data unit from the HPLC and HRF sending queues. Specifically, after receiving the protocol data unit through any link (HPLC or HRF), the receiving end performs address matching, CRC check, and serial number uniqueness check. If all checks pass, the reception is considered successful. Immediately after successful reception, an acknowledgment frame (containing the original serial number and receiving link identifier) ​​is generated and sent in reverse through the original receiving link. The length of the acknowledgment frame is fixed at 10 bytes. After receiving the acknowledgment frame, the sending end parses the serial number and compares it with the record in the local sending queue. If a match is found, the corresponding protocol data unit is marked as confirmed. For confirmed protocol data units, copies are simultaneously deleted from the HPLC sending queue and the HRF sending buffer queue. The clearing operation is achieved by directly emptying the queue storage unit, taking ≤5ms to ensure the release of queue resources.

[0058] In this embodiment of the invention, a dual-channel redundancy mechanism is employed to prioritize transmission using HPLC-reserved time slots before the HRF link is established. Combined with subsequent HRF retransmission, this improves the success rate of critical fault information transmission and reduces data loss compared to a single-channel solution. Dynamically allocating reserved time slots and prioritizing the scheduling of final-priority data ensures critical business operations while minimizing impact on routine operations, thereby improving time slot utilization.

Claims

1. A low-latency switching control method for communication modules based on HPLC and HRF, characterized in that, The method includes: Step 1: The signal-to-noise ratio and bit error rate of the HPLC communication link are collected in real time through the pre-configured communication quality monitoring unit. Step 2: Based on the communication quality index, locate three preset reference coordinate points in the multi-dimensional space of the communication quality index. The reference coordinate points constitute a triangulation analysis region. Step 3: Perform sub-region meshing on the triangulation analysis region and extract an adaptive threshold offset based on the generated mesh topology features; Step 4: The initial decision threshold is calibrated in real time using an adaptive threshold offset to obtain the dynamically adjusted decision threshold. Step 5: Logically compare the real-time acquired signal-to-noise ratio and bit error rate indicators with the dynamically adjusted decision threshold; when the indicators continuously exceed the dynamically adjusted decision threshold, switch the decision unit to generate the mode switching enable signal and initialize the HRF channel pre-synchronization sequence. Step 6: Based on the pre-stored HRF channel feature vector table, perform the HRF channel negotiation and authentication handshake process in parallel while maintaining HPLC link status monitoring. Step 7: Before the HRF link is established, the key fault information is encapsulated into the final priority protocol data unit through the dual-channel redundant transmission mechanism, and redundant forwarding is performed through the reserved time slot window of the HPLC link. Step 8: After the HRF link handshake is completed, the switching control unit performs a seamless switch of the data transmission channel.

2. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 1, characterized in that, Step 1: Real-time acquisition of the signal-to-noise ratio and bit error rate of the HPLC communication link through a pre-configured communication quality monitoring unit, including: Step 11: Using a hardware probe, the training sequence of the physical layer frame header is synchronously captured in each HPLC beacon cycle, its received signal strength indication (RSSI) is measured, and the average error vector magnitude (EVM) over the entire symbol cycle is calculated to obtain the original channel parameters. Step 12: The RSSI and EVM sequences in the original channel parameters are processed by a Kalman filter-based tracking algorithm. That is, the previous signal-to-noise ratio estimate is used as prior information to perform final filtering on the current measurement value, predict and update the state variables, and finally obtain the smoothed accurate estimate of the current signal-to-noise ratio. Step 13: Synchronously monitor the Media Access Control (MAC) layer frame structure, extract the Cyclic Redundancy Check (CRC) field or Forward Error Correction (FEC) parity bit at the end of each received frame; within a configurable sliding time window, accumulate the number of frames that failed to pass the check, and divide this number of failures by the total number of received frames within the window to calculate the real-time bit error rate statistics for that time period.

3. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 2, characterized in that, Step 2: Based on the communication quality index, locate three preset reference coordinate points in the multi-dimensional space of the communication quality index. These reference coordinate points constitute a triangulation analysis region, including: Step 21: Pair the precise signal-to-noise ratio estimate with the real-time bit error rate statistics and align the timestamps to form a complete communication quality index pair; select the signal-to-noise ratio estimate and bit error rate statistics from the most recent statistical period from the historical sequence of the communication quality index pair as the current sampling point; Step 22: Map the current sampling point to a two-dimensional quality plane with the signal-to-noise ratio estimate as the horizontal axis and the bit error rate statistics as the vertical axis. Step 23: On the two-dimensional quality plane, three static reference coordinate points are predefined; the first reference point represents the high-quality channel state with high signal-to-noise ratio and low bit error rate, the second reference point represents the critical channel state with medium signal-to-noise ratio and medium bit error rate, and the third reference point represents the poor-quality channel state with low signal-to-noise ratio and high bit error rate. Step 24: Perform nearest neighbor matching between the current sampling point and three static reference coordinate points to determine the channel state region to which the current sampling point belongs; Step 25: Using the three reference coordinate points as vertices, construct a dynamic triangulation analysis region, which divides the current channel state space into three feature subspaces.

4. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 3, characterized in that, Step 3: Perform sub-region meshing on the triangulation analysis region, and extract an adaptive threshold offset based on the generated mesh topology features, including: Step 31: Using the three reference coordinate points of the triangulation analysis region as boundaries, the triangulation analysis region is divided into multiple uniform grid cells using an equal-spacing partitioning strategy. Each grid cell represents a specific channel state sub-region. Step 32: Calculate the grid cell index of the current sampling point based on its coordinates on the two-dimensional mass plane, and determine the relative distance between the grid cell and the three reference coordinate points; Step 33: Based on the grid cell index and relative distance relationship, query the pre-stored grid feature mapping table, which defines the topological feature value corresponding to each grid cell, including the center density and boundary gradient of the grid cell; Step 34: Based on the topological feature values, a weighted average algorithm is used to fuse the center density and boundary gradient to obtain a preliminary offset estimate. Step 35: Perform dynamic range compression on the preliminary offset estimate and use a nonlinear function to map it to a preset offset range to generate the final adaptive threshold offset.

5. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 4, characterized in that, Step 4: The initial decision threshold is calibrated in real time using an adaptive threshold offset to obtain a dynamically adjusted decision threshold, including: Step 41: Receive the adaptive threshold offset and read a set of initial decision thresholds pre-stored in non-volatile memory, which includes a first decision threshold for signal-to-noise ratio and a second decision threshold for bit error rate. Step 42: Using the adaptive threshold offset as input, query a pre-configured nonlinear mapping table, which defines the correspondence between the offset and the threshold adjustment magnitude, to obtain a first adjustment magnitude for the signal-to-noise ratio threshold and a second adjustment magnitude for the bit error rate threshold. Step 43: Using a weighted fusion algorithm, the first adjustment magnitude and the first decision threshold are superimposed and calculated, and the second adjustment magnitude and the second decision threshold are superimposed and calculated, wherein the weighting weights are dynamically configured according to the stability of the current channel state. Step 44: Perform upper and lower limit saturation processing on the superimposed signal-to-noise ratio threshold and bit error rate threshold respectively to obtain the dynamic decision threshold after real-time calibration.

6. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 5, characterized in that, Step 5: Logically compare the real-time acquired signal-to-noise ratio and bit error rate indicators with the dynamically adjusted decision thresholds; when the indicators continuously exceed the dynamically adjusted decision thresholds, switch the decision unit to generate a mode switching enable signal and initialize the HRF channel pre-synchronization sequence, including: Step 51: Receive the latest accurate signal-to-noise ratio estimate and bit error rate statistics from the communication quality monitoring unit in real time, and receive the dynamic decision threshold; Step 52: In the switching decision unit, two independent hysteresis comparators are set in parallel: the first comparator compares the real-time signal-to-noise ratio estimate with the signal-to-noise ratio decision threshold, and the second comparator compares the real-time bit error rate statistics with the bit error rate decision threshold. Step 53: When the outputs of the two comparators simultaneously indicate that the communication quality indicators have deteriorated, i.e. the signal-to-noise ratio is lower than its decision threshold and the bit error rate is higher than its decision threshold, a degradation event flag is triggered. Step 54: Start a configurable continuous monitoring time window and count the degradation event flags within the window; when the cumulative count exceeds the preset event number threshold, it is determined that the channel state continuously exceeds the dynamically adjusted decision threshold. Step 55: The switching decision unit immediately generates a highly active mode switching enable signal and sends the signal to the HRF communication control module; the HRF communication control module initializes the transmission of the pre-synchronization sequence according to the pre-stored HRF channel parameters and begins the HRF channel establishment process.

7. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 1, characterized in that, Step 6 includes: Step 61: Upon receiving the mode switching enable signal, the HRF communication control module immediately wakes up from the low-power standby mode and loads the pre-stored HRF channel feature vector table. Step 62: Based on the HRF channel feature vector table, select the HRF channel with the best signal strength as the preferred negotiation channel, and generate a channel negotiation request frame. Step 63: While continuously monitoring the HPLC link status, periodically send channel negotiation request frames through the HRF physical layer interface and start a response timeout timer. Step 64: Listen for negotiation response frames on the HRF channel; if a valid response frame is received before the response timeout timer expires, parse the network allocation vector and session key in the frame to complete the link layer connection of the HRF channel. Step 65: If no valid response is received after the response timeout timer expires, the system will automatically switch to the suboptimal backup channel according to the HRF channel feature vector table, resend the negotiation request frame and restart the response timeout timer until the HRF channel handshake is completed or all backup channels have been tried. Step 66: During the entire HRF channel negotiation process, if the communication quality monitoring unit of the HPLC link reports that the channel index has returned to the normal range, the HRF channel negotiation process will be terminated immediately, and the HRF communication control module will be put back into low-power standby mode.

8. The low-latency switching control method for the communication module based on HPLC and HRF according to claim 7, characterized in that, Step 7 includes: Step 71: During the overlapping period after the mode switching enable signal is valid and before the HRF link is confirmed to be established, the switching control unit activates the dual-channel redundant transmission mechanism. Step 72: The critical fault information generated by the application layer is submitted to the protocol encapsulation unit, which encapsulates the fault information, the current timestamp, and the sequence number into a specific final priority protocol data unit. Step 73: The final priority protocol data unit is simultaneously submitted to the HPLCMAC layer transmission queue and the HRF transmission buffer queue. Step 74: The HPLCMAC layer scheduler identifies the specific identifier of the final priority protocol data unit, dynamically allocates a dedicated reserved time slot window for it, and immediately inserts it into the idle time slot of the current transmission frame for priority transmission. Step 75: On the HRF link, the final priority protocol data unit is retrieved from the HRF transmit buffer queue and transmitted only after the HRF channel handshake is completed; Step 76: After successfully receiving the final priority protocol data unit through any link, the receiving end returns an acknowledgment to its sending source; after receiving the acknowledgment, the sending end removes the copy of the protocol data unit from the sending queues of HPLC and HRF.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the method as described in any one of claims 1 to 8.

10. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Method and system for improving dual-mode communication immunity

    CN121530411A

  • A method and system for improving the immunity of dual-mode communication

    CN121530411B

  • Safety instrument system communication method and system based on redundant control bus

    CN121864528A

  • A safety instrumented system communication method and system based on redundant control bus

    CN121864528B