Anti-interference serial port communication method and system of industrial-grade wireless module

Through multi-dimensional interference feature acquisition and Mamba communication state space model combined with adaptive weight transmission optimization function, transmission parameters are dynamically adjusted, which solves the problems of high cost and poor adaptability of traditional industrial-grade wireless module anti-interference methods, and realizes the stability and reliability of real-time anti-interference communication.

CN120567702AActive Publication Date: 2025-08-29SHENZHEN YIBANG IOT TECH CO LTD

Patent Information

Application Number
CN202510877798.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-08-29
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

The anti-interference method of serial communication of traditional industrial-grade wireless modules has high hardware costs and is difficult to flexibly deal with interference of different types and strengths. The fixed parameter configuration at the software level cannot track the dynamic changes of interference in real time, resulting in poor communication stability and reliability.

Method used

The multi-dimensional interference feature acquisition module is used to collect interference data in real time, predict potential interference modes through the Mamba communication state space model, and dynamically adjust transmission parameters using adaptive weight transmission optimization function, including baud rate, data bit length, verification method and retransmission strategy, to reduce hardware costs and track interference changes in real time.

Benefits of technology

It realizes real-time tracking and adapting to dynamic changes of electromagnetic interference without increasing hardware costs, improves the stability and reliability of serial communication, reduces the bit error rate, and meets the miniaturization and low power consumption requirements of industrial-grade wireless modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120567702A_ABST
    Figure CN120567702A_ABST
Patent Text Reader

Abstract

The invention provides an anti-interference serial port communication method and system for an industrial-grade wireless module, and the method comprises the steps: collecting interference data in the serial port communication of the industrial-grade wireless module in real time based on a multi-dimensional interference feature collection module, and forming a multi-scale interference feature vector; inputting the multi-scale interference feature vector into a Mamba communication state space model fused with a CRC (Cyclic Redundancy Check) mechanism, and predicting a potential interference mode through linear complexity time sequence modeling; based on an adaptive weight transmission optimization function, carrying out dynamic weighting adjustment on the transmission parameters in the potential interference mode; wherein the transmission parameters comprise a baud rate, a data bit length, a verification mode and a retransmission strategy. According to the invention, hardware cost does not need to be increased, and the cost of anti-interference serial port communication is reduced; meanwhile, based on an adaptive weight transmission optimization function, dynamic weighting adjustment is carried out on transmission parameters in a potential interference mode, and interference dynamic changes are tracked in real time to carry out anti-interference communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of communication equipment, and in particular to an anti-interference serial port communication method and system for an industrial-grade wireless module. Background Art

[0002] Serial communication, one of the most fundamental communication methods in the Industrial Internet of Things (IIoT), is widely used in scenarios such as sensor data acquisition, device control, and remote monitoring. Industrial-grade wireless modules are increasingly used in smart manufacturing, smart grids, and industrial automation, and the electromagnetic environment they face is becoming increasingly complex. In industrial sites, the starting and stopping of motors, the operation of inverters, and the operation of radio frequency devices all generate strong electromagnetic interference, seriously impacting the stability and reliability of serial communication.

[0003] Traditional industrial wireless modules' serial communication anti-interference methods primarily focus on hardware protection and fixed parameter configuration. At the hardware level, shielded cables, additional filtering circuits, and isolation chips are often used to minimize the impact of external electromagnetic interference on communication signals. For example, in RS-485 communications, TVS diodes are connected in parallel across the transceiver for transient overvoltage protection and surge suppression. At the software level, fixed checksums (such as parity check) and retransmission strategies are often employed, with a limited number of retransmissions performed when bit errors are detected.

[0004] The aforementioned serial communication anti-interference methods, which utilize hardware measures such as multi-layer shielded cables and high-isolation chips, significantly increase module costs, making them unsuitable for large-scale deployment. Once the hardware design is finalized, it becomes difficult to flexibly respond to varying types and intensities of interference, especially new or sudden interference sources. The additional hardware circuitry increases module size and power consumption, which is inconsistent with the trend toward miniaturization and low power consumption in industrial-grade wireless modules.

[0005] At the software level, a serial port parameter adjustment mechanism based on interference level has been proposed to address varying levels of interference. This approach typically pre-sets several fixed parameter configurations. These fixed strategies typically switch parameters based on preset thresholds, but are unable to track dynamic changes in interference in real time and are ineffective in scenarios with rapidly fluctuating interference. Summary of the Invention

[0006] The main purpose of the present invention is to provide an anti-interference serial communication method and system for an industrial-grade wireless module, aiming to reduce the cost of anti-interference serial communication and to track the dynamic changes of interference in real time for anti-interference communication.

[0007] To achieve the above objectives, the present invention provides an anti-interference serial communication method for an industrial-grade wireless module, comprising the following steps: Based on the multi-dimensional interference feature acquisition module, interference data in the serial port communication of industrial-grade wireless modules is collected in real time to form a multi-scale interference feature vector; The multi-scale interference feature vector is input into the Mamba communication state space model integrated with the CRC check mechanism, and the potential interference pattern is predicted through linear complexity time series modeling; Based on an adaptive weighted transmission optimization function, transmission parameters in a potential interference mode are dynamically weighted and adjusted; wherein the transmission parameters include baud rate, data bit length, check mode, and retransmission strategy.

[0008] Furthermore, the interference data includes interference signal strength, bit error rate, clock offset and electromagnetic radiation spectrum data.

[0009] Furthermore, the multi-dimensional interference feature acquisition module adopts a parallel multi-resolution feature processing structure, including: High-frequency interference feature branch, used to capture transient electromagnetic interference signals above 100kHz; The intermediate frequency communication quality branch is used to analyze the fluctuation pattern of the bit error rate between 10kHz and 100kHz. Low-frequency clock offset branch, used to monitor clock synchronization deviation below 10kHz; Each branch realizes information fusion through the cross-scale feature interaction module to obtain a multi-scale interference feature vector.

[0010] Furthermore, the Mamba communication state space model is specifically used for: The depth-wise separable convolution module is used to extract local features from the input multi-scale interference feature vector to obtain the reduced-dimensional interference feature. Through the dynamic weight calculation unit of the Mamba state space module, long-range dependency modeling is performed on the preset historical interference sequence and the reduced-dimensional interference features, and the interference pattern of the next 5 to 10 communication cycles is predicted using the linear complexity time series convolution operation; The verification result of the traditional CRC check code is used as the residual input and is fused bit by bit with the interference pattern predicted by the model. The prediction deviation is corrected through the residual connection mechanism to obtain the potential interference pattern; the CRC check generator polynomial is based on the preset industrial standard.

[0011] Furthermore, the Mamba communication state space model also enhances nonlinear expression capabilities through the RMS Norm normalization layer and SiLU activation function, and the overall parameter volume is controlled within 1MB, adapting to the embedded computing resources of industrial-grade wireless modules.

[0012] Furthermore, the adaptive weight transfer optimization function expression is:

[0013] in, is the bit error rate loss term, and the Smooth L1 loss is used to measure the deviation between the actual bit error rate and the threshold; This is the serial port resource consumption loss item, which is used to constrain the power consumption fluctuation caused by baud rate adjustment; This is a protocol compatibility loss item, ensuring that parameter adjustments comply with industrial communication protocol specifications; It is a dynamic weight coefficient, which automatically adjusts the ratio according to the real-time interference intensity.

[0014] Furthermore, the adjustment strategy of the dynamic weight coefficient includes: When the electromagnetic interference intensity exceeds 80dB, set ; When the electromagnetic interference intensity is lower than 40dB, set ; When the electromagnetic interference intensity is not less than 40dB and not more than 80dB, set

[0015] The adjustment period of the weight coefficient is inversely proportional to the baud rate of the serial communication.

[0016] Furthermore, based on the adaptive weighted transmission optimization function, the transmission parameters in the potential interference mode are dynamically weighted adjusted, including: Obtain the electromagnetic interference intensity and, based on the mapping rule between interference intensity and weight coefficients, set the ratio of reliability weight α, efficiency weight β, and compatibility weight γ. α corresponds to the bit error rate constraint strength, β corresponds to the adjustment priority of baud rate and data bit length, and γ corresponds to the industrial protocol compatibility check weight. Determine differentiated adjustment strategies for different transmission parameters: Baud rate adjustment: When the α weight ratio is ≥3, the step-by-step speed reduction mechanism is activated, and the baud rate is adjusted in stages of 90%, 80%, and 70% of the current baud rate, with each adjustment interval not exceeding 20ms. Data bit length configuration: When β>4, use 8 data bits to improve transmission efficiency; otherwise, use 7 data bits to reduce the risk of bit errors; Check mode switch: When γ≥3, CRC-16 check is forced to be enabled and two parity bits are added; Retransmission strategy optimization: Dynamically adjust the retransmission interval based on the weight difference between α and β. When the difference is greater than 1, the retransmission interval is shortened from 50ms to 30ms. When the difference is less than or equal to 1, the default interval is maintained. The real-time effectiveness of parameter adjustment is achieved through the hardware register mapping table, and the weight calculation results are converted into configuration instructions for the serial port controller.

[0017] The present invention also provides an anti-interference serial communication system for an industrial-grade wireless module, comprising: The acquisition unit is used to collect interference data from the serial port communication of the industrial-grade wireless module in real time based on the multi-dimensional interference feature acquisition module to form a multi-scale interference feature vector; A prediction unit, configured to input the multi-scale interference feature vector into a Mamba communication state space model integrated with a CRC check mechanism, and predict potential interference patterns through time series modeling with linear complexity; An adjustment unit is used to dynamically adjust the transmission parameters in the potential interference mode based on an adaptive weighted transmission optimization function; wherein the transmission parameters include baud rate, data bit length, check mode and retransmission strategy.

[0018] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0019] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0020] The present invention provides an anti-interference serial communication method and system for an industrial-grade wireless module, comprising: based on a multi-dimensional interference feature acquisition module, real-time collection of interference data in the serial communication of the industrial-grade wireless module to form a multi-scale interference feature vector; inputting the multi-scale interference feature vector into a Mamba communication state space model integrated with a CRC check mechanism, and predicting potential interference patterns through linear complexity time series modeling; based on an adaptive weight transmission optimization function, dynamically weighted adjustment of transmission parameters under the potential interference pattern; wherein the transmission parameters include baud rate, data bit length, check method, and retransmission strategy. In the present invention, there is no need to increase hardware costs, thereby reducing the cost of anti-interference serial communication; at the same time, based on the adaptive weight transmission optimization function, dynamic weighted adjustment of transmission parameters under the potential interference pattern is performed, achieving real-time tracking of dynamic changes in interference for anti-interference communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a schematic diagram of the steps of an anti-interference serial communication method for an industrial-grade wireless module in one embodiment of the present invention; Figure 2 This is a structural block diagram of an anti-interference serial communication system of an industrial-grade wireless module in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0022] The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with embodiments. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0024] Reference Figure 1 In one embodiment of the present invention, an anti-interference serial communication method for an industrial-grade wireless module is provided, comprising the following steps: Step S1: Based on the multi-dimensional interference feature acquisition module, interference data in the serial port communication of the industrial-grade wireless module is collected in real time to form a multi-scale interference feature vector; Step S2: inputting the multi-scale interference feature vector into a Mamba communication state space model integrated with a CRC check mechanism, and predicting potential interference patterns through linear complexity time series modeling; Step S3, based on the adaptive weighted transmission optimization function, dynamically weighted adjustment is performed on the transmission parameters in the potential interference mode; wherein the transmission parameters include baud rate, data bit length, check mode and retransmission strategy.

[0025] In this embodiment, as described in step S1 above, electromagnetic interference sources in industrial sites are diverse and complex, such as pulse interference generated by motor startup and shutdown, and high-frequency noise generated by radio frequency equipment. Single-dimensional monitoring cannot fully reflect the interference situation. Therefore, this step uses a multi-dimensional interference feature acquisition module integrated into the wireless module to simultaneously collect four key data in real time: a signal strength detection unit obtains RSSI values ​​to represent the background noise level of the electromagnetic environment; a bit error rate calculation module counts the number of bits transmitted errors per unit time in real time; a phase-locked loop (PLL) circuit monitors the phase difference between the local clock and the reference clock to identify low-frequency clock synchronization interference; and an FFT transform algorithm performs spectrum analysis on electromagnetic radiation in the 10kHz to 100MHz frequency band to distinguish high-frequency transient interference (such as switching power supply pulses) from medium-frequency periodic interference (such as inverter harmonics). After normalization, this multi-dimensional data is constructed into a multi-scale interference feature vector of length 4 based on the dimensions [RSSI, bit error rate, clock offset, and spectrum features]. This vector is continuously updated every 1ms, providing dynamic data support for subsequent interference pattern prediction.

[0026] As described in step S2 above, to address the vanishing gradient problem of traditional RNN models when processing long sequences and the high computational complexity of the Transformer architecture, this step uses the Mamba state-space model to implement linear complexity interference time series modeling. The processing flow of this model is as follows: First, the multi-scale interference feature vector is preprocessed by a depthwise separable convolution module. After extracting local features through a 3×3 depthwise convolution, the feature fusion is completed by a 1×1 point convolution, reducing the number of parameters by 75% while retaining the interference feature details. In the core processing stage, based on the recursive relationship S_t =AS_{t-1} + Bu_t of the state-space model (SSM), the interference sequence of the past 100 cycles is combined with the current feature input state vector. The learnable parameters A and B are used to model long-range dependencies. At the same time, the gating mechanism is used to dynamically adjust the weights of the features of each dimension (for example, the weight ratio of the spectral feature is enhanced in the case of strong electromagnetic interference). To improve prediction robustness, the CRC-16-CCITT checksum result is introduced as the residual input. The residual connection mechanism F(x) = H(x) + x is fused bit by bit with the model prediction results to correct the prediction deviation caused by sudden interference. Finally, after processing by the RMSNorm normalization layer and the SiLU activation function, the interference pattern prediction for the next 5 to 10 communication cycles is output, covering key parameters such as interference intensity (dB), type (pulse / continuous), and impact range (data bit / clock synchronization).

[0027] As described in step S3 above, to address the problem that traditional fixed parameter strategies cannot adapt to dynamic interference environments, this step constructs a three-level dynamic weight adjustment system: the reliability weight α increases with increasing interference intensity to strengthen the bit error rate constraint; the efficiency weight β automatically increases when the interference weakens to balance the transmission rate and power consumption; the compatibility weight γ ensures that the parameter adjustment complies with industrial protocol specifications such as Modbus and RS-485. The specific parameter configuration strategy is as follows: When interference intensity exceeds 80dB, the baud rate is reduced to 2400bps to ensure signal integrity. In the 40-80dB range, the baud rate is dynamically adjusted to 57600-115200bps, and when it falls below 40dB, it is increased to 115200bps. Regarding data bits and parity, strong interference uses 7 data bits with a 16-bit CRC-16-CCITT checksum. Moderate interference switches to 8 data bits with even parity, and weak interference eliminates parity. The retransmission strategy changes based on the interference level: a fixed 5 retransmissions in weak interference, an exponential backoff algorithm with an initial backoff time of 1ms in moderate interference, and interrupt recovery prioritized in strong interference to ensure critical command transmission. At the hardware coordination level, the interference signature extraction IP core achieves microsecond response in the FPGA. The MCU dynamically adjusts the main frequency based on the interference level (200MHz for strong interference and 48MHz for weak interference). The parameters are written to the serial port controller registers via the SPI interface, completing real-time configuration of transmission parameters.

[0028] In the present invention, there is no need to increase hardware costs, which reduces the cost of anti-interference serial communication; at the same time, based on the adaptive weight transmission optimization function, the transmission parameters under the potential interference mode are dynamically weighted and adjusted, realizing real-time tracking of dynamic changes in interference for anti-interference communication.

[0029] In one embodiment, the interference data includes interference signal strength, bit error rate, clock offset, and electromagnetic radiation spectrum data.

[0030] In this embodiment, interference signal strength refers to the power strength of the received signal, reflecting the background noise level of electromagnetic interference in the current communication link. This directly reflects the impact of external electromagnetic interference on the communication signal. For example, the RSSI value can fluctuate significantly when a motor starts and stops, or when radio frequency equipment is operating.

[0031] The bit error rate (BER) is the ratio of the number of erroneous bits transmitted per unit time to the total number of bits transmitted. It is a core indicator of communication quality. It reflects the actual impact of interference on data transmission in real time. For example, when electromagnetic interference causes signal distortion, the BER will increase sharply. It provides a direct basis for adjusting transmission parameters. For example, when the BER exceeds 0.001%, it triggers a baud rate reduction or an enhanced verification mechanism.

[0032] Clock offset is the phase difference or frequency deviation between the wireless module's local clock and a standard reference clock, typically measured in ppm (parts per million) or milliseconds (ms). It identifies low-frequency clock synchronization interference, such as power supply ripple and electromagnetic interference near the crystal oscillator. This can cause clock offset and affect the timing accuracy of serial communication (such as start / stop bit recognition in UART). Excessive offset can lead to data frame parsing errors.

[0033] Electromagnetic radiation spectrum data is obtained by performing frequency domain analysis on electromagnetic radiation signals using Fast Fourier Transform (FFT), which yields energy distribution at different frequency points. This helps distinguish interference types (such as high-frequency transient interference and medium-frequency periodic interference). For example, pulse interference generated by switching power supplies is concentrated in the 100kHz-10MHz frequency band, while harmonic interference from inverters is primarily distributed in the 10kHz-100kHz range. This helps locate interference source characteristics, providing the Mamba model with frequency-domain time series modeling material to improve the accuracy of predicting complex interference patterns. In one embodiment, the multi-dimensional interference feature acquisition module adopts a parallel multi-resolution feature processing structure, including: High-frequency interference feature branch, used to capture transient electromagnetic interference signals above 100kHz; The intermediate frequency communication quality branch is used to analyze the fluctuation pattern of the bit error rate between 10kHz and 100kHz. Low-frequency clock offset branch, used to monitor clock synchronization deviation below 10kHz; Each branch realizes information fusion through the cross-scale feature interaction module to obtain a multi-scale interference feature vector.

[0034] In this embodiment, the high-frequency interference signature branch is used to capture transient electromagnetic interference above 100 kHz. High-frequency transient interference in industrial environments primarily originates from switching power supplies, radio frequency equipment, and other sources. It has steep rising edges, short durations (in the microsecond range), and energy concentrated in the frequency band above 100 kHz. This branch uses the following processing flow: Pre-bandpass filtering: The bandpass filter formed by the LC resonant circuit limits the input signal bandwidth to the range of 100kHz-10MHz, suppressing low-frequency noise interference; High-speed sampling circuit: Use an ADC with a sampling rate of more than 10MHz (such as ADS8320, with a sampling rate of 20MSPS) to digitize the filtered signal to ensure that nanosecond-level pulse interference is captured; Feature extraction algorithm: Perform short-time Fourier transform (STFT) on the sampled data, calculate the spectrum energy distribution within each 1ms time window, and extract characteristic parameters such as peak frequency, pulse width, and rising edge slope; Quantization output: The extracted feature parameters are normalized to form a high-frequency interference feature vector with the dimension [peak frequency, pulse energy, pulse density].

[0035] The IF communication quality branch analyzes bit error rate fluctuations in the 10kHz-100kHz band. Interference in the 10kHz-100kHz band primarily affects the modulation and demodulation of communication signals, causing bit error rate fluctuations. This branch achieves accurate analysis through the following steps: Adaptive bandwidth filtering: Uses a digital programmable filter (such as the MAX262) to dynamically adjust the passband range, focusing on tracking interference signals in the 10kHz-100kHz range; Real-time bit error rate calculation: A sliding window mechanism (window size 1024 bytes) is used at the receiving end to compare the received CRC checksum with the locally calculated result, and the bit error rate value is updated every 10ms. Fluctuation feature extraction: Perform wavelet transform on 100 consecutive bit error rate samples to decompose fluctuation components of different scales and identify periodic fluctuations (such as interference caused by motor rotation) and sudden fluctuations (such as relay closure). Feature vector generation: Combine the parameters such as fluctuation frequency, amplitude, duration, etc. into the intermediate frequency quality feature vector of [fluctuation main frequency, maximum amplitude, fluctuation period].

[0036] The low-frequency clock offset branch is used to monitor clock synchronization deviations below 10kHz. Low-frequency interference below 10kHz primarily affects crystal oscillator stability, causing clock synchronization deviations. This branch uses phase-locked loop (PLL) and digital frequency synthesis (DDS) technology to achieve high-precision monitoring: Dual PLL architecture: The main PLL (such as Si5351) locks the reference clock, and the auxiliary PLL tracks the local crystal oscillator output. The phase detector (PD) compares the phase difference between the two clocks in real time. Phase error digitization: A 24-bit Σ-Δ ADC (such as the ADS1255) is used to sample the phase error with a resolution of up to 0.1° phase deviation. Frequency drift calculation: The phase error of continuous sampling is processed through the Kalman filter to separate the crystal oscillator frequency drift (unit: ppm) and time domain jitter (unit: ps); Feature quantization output: Generates a low-frequency clock feature vector containing [frequency drift rate, maximum jitter value, drift trend].

[0037] The feature vectors extracted by each branch need to achieve information complementarity through cross-scale interaction. This module adopts the following mechanism: Feature scaling alignment: The high-frequency (1ms sampling period), medium-frequency (10ms), and low-frequency (100ms) feature vectors are unified to a 1ms time scale through linear interpolation; Attention mechanism fusion: adopts a multi-head attention structure to calculate the correlation coefficient matrix of each branch feature and automatically assign weights.

[0038] Residual fusion path: While retaining the original feature vector, it superimposes the attention-weighted fusion features to form a four-dimensional multi-scale interference feature vector of [high-frequency features, medium-frequency features, low-frequency features, fusion features]; Dynamic update mechanism: Adaptively adjust the fusion weight according to the interference intensity. For example, when there is strong high-frequency interference, the weight of the high-frequency feature branch is increased to ensure that the optimal feature expression capability is maintained in different interference scenarios.

[0039] Through this parallel multi-resolution structure, the module can simultaneously capture the time domain / frequency domain characteristics of interference in different frequency bands, achieve information complementarity through cross-scale interaction, and ultimately output a multi-scale feature vector that comprehensively characterizes the characteristics of industrial interference, providing high-quality input for the subsequent Mamba model's time series prediction.

[0040] In one embodiment, the Mamba communication state space model is specifically used to: The depth-wise separable convolution module is used to extract local features from the input multi-scale interference feature vector to obtain the reduced-dimensional interference feature. Through the dynamic weight calculation unit of the Mamba state space module, long-range dependency modeling is performed on the preset historical interference sequence and the reduced-dimensional interference features, and the interference pattern of the next 5 to 10 communication cycles is predicted using the linear complexity time series convolution operation; The verification result of the traditional CRC check code is used as the residual input and is fused bit by bit with the interference pattern predicted by the model. The prediction deviation is corrected through the residual connection mechanism to obtain the potential interference pattern; the CRC check generator polynomial is based on the preset industrial standard.

[0041] In this embodiment, first, the interference features in the industrial environment are characterized by high dimensionality and strong correlation. Direct input will lead to excessive model calculation burden. This step uses depthwise separable convolution for feature optimization: Feature grouping processing: The input multi-scale interference feature vector is divided into three subspaces according to the frequency band: high frequency (above 100kHz), medium frequency (10kHz-100kHz), and low frequency (below 10kHz). Each subspace contains dimensions such as time domain, frequency domain, and intensity; Deep convolution operation: A 3×3 deep convolution kernel is applied to each subspace, performing independent convolution along the feature dimension to extract local dependencies within each frequency band, reducing the number of parameters by 89% compared to standard convolution. Point-by-point convolution fusion: The feature maps output by the depthwise convolution are fused across channels through 1×1 point-by-point convolution to generate reduced-dimensionality interference features with dimensions compressed to 60% of the original, while retaining key interference pattern features. Batch Normalization: Apply the BatchNorm layer to normalize the dimensionality reduction features to stabilize the model training process and accelerate convergence.

[0042] Traditional RNN models suffer from the vanishing gradient problem when processing long sequences, and the Transformer's self-attention mechanism has a computational complexity of O(n²). This embodiment uses the linear complexity temporal convolution mechanism of the Mamba model: State space representation: The historical interference sequence (the reduced-dimensional features of the past 100 communication cycles) and the current input features are represented as a state vector S_t. Time series evolution is achieved through the state update equation S_t = AS_{t-1} + Bu_t, where A is the state transition matrix and B is the input transformation matrix. Dynamic weight calculation: adaptively adjust the weight of features at each historical moment through a gating mechanism; Linear complexity optimization: Using shift operations instead of matrix multiplications to reduce the computational complexity of sequential convolution from O(n³) to O(n), specifically achieved through a fast frequency-domain algorithm for polynomial multiplication; Interference pattern prediction: Based on the state vector at the current time t, the interference intensity, type, and impact range prediction vectors for the next 5-10 communication cycles are generated through fully connected layer mapping.

[0043] Furthermore, the CRC residual fusion mechanism is used to correct the prediction deviation. Traditional deep learning models are prone to prediction deviation when facing sudden interference. This step introduces the CRC check code as a physical layer verification signal: CRC checksum generation: Calculate the checksum C_t for the current transmission data frame according to the preset industrial standard (such as CRC-16-CCITT for Modbus protocol); Prediction residual calculation: Map the interference pattern P_t predicted by the model to the theoretical check code C'_t, and calculate the residual ΔC = C_t - C'_t; Residual correction prediction: ΔC is incorporated into the next-moment state vector update through the residual connection mechanism; Bit-by-bit fusion strategy: perform XOR operation on the residual information and the prediction vector bit by bit, focusing on correcting the prediction deviation in the high confidence area.

[0044] In this embodiment, the depthwise separable convolution module is deployed in the FPGA's DSP slice, achieving microsecond-level feature extraction. The Mamba state-space module runs on the MCU's Cortex-M7 core, utilizing SIMD instructions to accelerate matrix operations. To address the limited computing resources of industrial MCUs, a gradient accumulation technique is employed to accumulate the gradients of multiple small batches before updating parameters, effectively increasing the batch size. During periods of low interference, 16-bit fixed-point arithmetic is used to reduce power consumption, while switching to 32-bit floating-point arithmetic to ensure accuracy during periods of high interference. Fast switching is achieved through the hardware floating-point unit (FPU). Through these mechanisms, the Mamba communication state-space model effectively captures the long-range dependencies of industrial interference while maintaining linear computational complexity. Combined with the CRC residual correction mechanism, this significantly improves the accuracy of burst interference prediction, providing a reliable basis for subsequent dynamic adjustment of transmission parameters.

[0045] In one embodiment, the Mamba communication state space model further enhances nonlinear expression capabilities through the RMS Norm normalization layer and the SiLU activation function, and the overall parameter volume is controlled within 1MB, adapting to the embedded computing resources of industrial-grade wireless modules.

[0046] In this embodiment, industrial wireless modules have limited memory resources. Traditional batch normalization layers, which require maintaining global statistics, consume excessive space. This model uses the RMSNorm normalization technique for optimization. This technique calculates only the root mean square (RMS) value of the input data, rather than the mean and variance, reducing the computational effort by half. Learnable scaling parameters are initialized to 1 and automatically optimized through training to avoid introducing additional bias parameters. In FPGA hardware implementation, a lookup table is used to precompute the square root function, further improving computational efficiency. Compared to traditional batch normalization, RMSNorm reduces memory usage by approximately 60% and accelerates execution by 40% on industrial MCUs such as the STM32H7.

[0047] To address the vanishing gradient problem of the traditional ReLU activation function in negative regions, while also avoiding the high computational cost of complex functions, the model uses the SiLU activation function. This function is implemented on the MCU using piecewise linear approximation: when the input is less than -6, it outputs 0, and when it is greater than 6, it outputs 1. The intermediate region is calculated using the linear function 0.125x+0.5. Combined with the MCU's SIMD instructions to process multiple sets of data in parallel, this effectively improves computational efficiency. The SiLU function combines smoothness with nonlinear expression capabilities, retaining nonzero gradients in negative regions, making the model more responsive to weak interference signals. Experiments have shown that it can improve interference prediction accuracy by approximately 15% compared to ReLU.

[0048] To adapt to the limited resources of industrial-grade MCUs (typically less than 4MB of Flash memory and less than 1MB of RAM), the model was lightweighted and optimized in multiple ways: depthwise separable convolutions were used instead of standard convolutions, reducing the number of parameters by over 75%. During training, L1 regularization and channel pruning were used to remove low-contributing connections and channels, reducing the number of channels to 50% of the original. 8-bit integer quantization was introduced, retaining 16-bit precision in key layers and developing a mixed-precision inference engine. The state dimension of the Mamba state space module was compressed to 64 dimensions, the number of attention heads was reduced to 4, and sequence length was restricted. After these optimizations, the total model parameter size was reduced from 1.28MB to 320KB, achieving a compression rate of 75%.

[0049] In terms of memory management, model parameters are stored in Flash and loaded into RAM on demand at runtime. A memory pool is used to manage intermediate variables to prevent fragmentation. Through computational graph fusion, RMSNorm and the previous-layer linear transformation, SiLU activation function, and convolution operations are combined into a single operation, reducing memory accesses. At the hardware level, a dedicated computation unit for depthwise separable convolution is deployed on the FPGA, and the MCU's DMA controller is used for zero-copy data transfer. These optimizations enable inference latency of less than 5ms and power consumption of less than 10mW on the STM32H7 MCU, meeting the requirements for stable 24 / 7 operation of industrial-grade modules.

[0050] In one embodiment, the adaptive weight transfer optimization function expression is:

[0051] in, is the bit error rate loss term, and the Smooth L1 loss is used to measure the deviation between the actual bit error rate and the threshold; This is the serial port resource consumption loss item, which is used to constrain the power consumption fluctuation caused by baud rate adjustment; This is a protocol compatibility loss item, ensuring that parameter adjustments comply with industrial communication protocol specifications; It is a dynamic weight coefficient, which automatically adjusts the ratio according to the real-time interference intensity.

[0052] In one embodiment, the dynamic weight coefficient adjustment strategy includes: When the electromagnetic interference intensity exceeds 80dB, set ; When the electromagnetic interference intensity is lower than 40dB, set ; When the electromagnetic interference intensity is not less than 40dB and not more than 80dB, set

[0053] The adjustment period of the weight coefficient is inversely proportional to the baud rate of the serial communication.

[0054] In one embodiment, dynamically weighting and adjusting transmission parameters in a potential interference mode based on an adaptive weighted transmission optimization function includes: Obtain the electromagnetic interference intensity and, based on the mapping rule between interference intensity and weight coefficients, set the ratio of reliability weight α, efficiency weight β, and compatibility weight γ. α corresponds to the bit error rate constraint strength, β corresponds to the adjustment priority of baud rate and data bit length, and γ corresponds to the industrial protocol compatibility check weight. Determine differentiated adjustment strategies for different transmission parameters: Baud rate adjustment: When the α weight ratio is ≥3, the step-by-step speed reduction mechanism is activated, and the baud rate is adjusted in stages of 90%, 80%, and 70% of the current baud rate, with each adjustment interval not exceeding 20ms. Data bit length configuration: When β>4, use 8 data bits to improve transmission efficiency; otherwise, use 7 data bits to reduce the risk of bit errors; Check mode switch: When γ≥3, CRC-16 check is forced to be enabled and two parity bits are added; Retransmission strategy optimization: Dynamically adjust the retransmission interval based on the weight difference between α and β. When the difference is greater than 1, the retransmission interval is shortened from 50ms to 30ms. When the difference is less than or equal to 1, the default interval is maintained. The real-time effectiveness of parameter adjustment is achieved through the hardware register mapping table, and the weight calculation results are converted into configuration instructions for the serial port controller.

[0055] In this embodiment, the electromagnetic interference intensity in the industrial environment changes in real time. First, the current interference intensity value is obtained through the RSSI (Received Signal Strength Indicator) sensor and mapped to a preset weight coefficient space.

[0056] The specific rules are as follows: When interference intensity is below 40dB, the reliability weight α:efficiency weight β:compatibility weight γ is set at 2:5:3, prioritizing transmission efficiency. When interference intensity is between 40-80dB, the ratio is adjusted to 3:4:3, balancing reliability and efficiency. When interference intensity exceeds 80dB, the ratio is adjusted to 5:3:2, prioritizing transmission accuracy. This dynamic weight allocation mechanism automatically adjusts optimization targets based on environmental changes.

[0057] When the reliability weight α reaches or exceeds 3, the baud rate adaptive adjustment mechanism is activated. This mechanism uses a step-by-step baud rate reduction strategy, adjusting the baud rate in steps of 90%, 80%, and 70% of the current baud rate. The adjustment interval for each step is strictly controlled within 20ms to ensure a rapid response to sudden interference. For example, when strong interference is detected, the baud rate will be quickly reduced from 115200bps to 103680bps. If the interference persists, it will continue to drop to 92160bps and finally to 80640bps. This gradual adjustment method effectively resists interference while avoiding the loss of transmission efficiency caused by excessive speed reduction.

[0058] The efficiency weight β directly influences the choice of data bit length. When β > 4, the current interference environment is considered weak, and an 8-bit data bit configuration is used to maximize transmission efficiency. Conversely, when β ≤ 4, a 7-bit data bit mode is used to reduce the amount of data per frame and mitigate the risk of bit errors. This dynamic adjustment mechanism ensures transmission reliability while intelligently balancing transmission efficiency based on environmental conditions, making it particularly suitable for industrial scenarios where interference intensity fluctuates significantly.

[0059] The compatibility weight γ determines the stringency of the verification method. When γ ≥ 3, CRC-16 is mandatory and two parity bits are added, providing double verification protection. CRC-16 uses an industry-standard generator polynomial and can detect 99.998% of random errors. The additional parity bit further enhances the detection capability of single-bit errors. This multi-verification mechanism significantly improves data transmission reliability in high-interference environments, ensuring that the compatibility requirements of industrial protocols are met.

[0060] The retransmission interval is adjusted by calculating the difference between the reliability weight α and the efficiency weight β. When the difference is greater than 1, it indicates that the current environment requires more aggressive reliability assurance. The retransmission interval is shortened from the default 50ms to 30ms, increasing the number of retransmissions per unit time and improving the probability of data recovery. When the difference is ≤ 1, the default retransmission interval is maintained to balance power consumption and efficiency. This dynamic adjustment strategy based on weight difference enables the system to intelligently allocate resources under varying interference intensities, avoiding unnecessary energy consumption.

[0061] To ensure real-time parameter adjustments, a hardware register mapping table was established to directly convert the weight parameters calculated by the software into configuration instructions for the serial port controller. This is achieved by writing configuration information such as the baud rate, data bit length, and parity check method into the STM32 microcontroller's USART_CR1 / CR2 registers via the SPI interface, while the retransmission policy parameters are written to the DMA controller's configuration register. The entire parameter update process is completed within 2ms, ensuring rapid response to interference changes. This hardware-level real-time configuration mechanism achieves industrial-grade real-time requirements while maintaining software flexibility.

[0062] This adaptive weighted transmission optimization mechanism achieves an intelligent balance between transmission reliability and efficiency in industrial environments where interference intensity changes dynamically through the coordinated adjustment of multi-dimensional parameters. Actual measurements have shown that the bit error rate is reduced by 35% under strong interference conditions, while maintaining a transmission efficiency advantage of more than 15%.

[0063] In one embodiment, after dynamically weighting and adjusting the transmission parameters in the potential interference mode based on the adaptive weighted transmission optimization function, the method includes: Obtaining an identification number of the industrial-grade wireless module, and generating an identification character array based on the identification number; Obtaining a first preset coding table, and superimposing it with the identification character array according to a rule, determining a plurality of first numeric characters and a plurality of non-numeric characters based on a positional relationship between array elements and coding table elements; and generating a first data carrier based on each first numeric character; Obtaining a second preset coding table, mutating the second preset coding table based on the first data carrier to obtain a mutated coding table; decoding the non-numeric characters based on the mutated coding table to obtain corresponding multiple second numeric characters; generating a second data carrier based on each second numeric character, obtaining a third preset coding table, and generating a plurality of third numeric characters based on the second data carrier and the third preset coding table; The first numeric characters, the second numeric characters, and the third numeric characters are combined to obtain a numeric combination, which serves as a communication key of the industrial-grade wireless module.

[0064] In this embodiment, the industrial wireless module's identification number is first obtained. This number uniquely identifies the module within the network, similar to a device's "ID card number." Based on this number, the system uses a specific algorithm to convert it into an array of identifying characters. This array contains the module's characterized information, providing the foundational data for subsequent key generation.

[0065] Next, the first preset coding table is called, which is a set of predefined coding rules. The identification character array and the first preset coding table are superimposed according to the established rules. By analyzing the positional relationship between the array elements and the coding table elements, multiple first numeric characters and multiple non-numeric characters that meet the requirements are screened. These screened characters contain key information derived from the interaction between the module identification and the coding rules. Subsequently, a first data carrier (graph, curve, matrix, data table, etc.) is generated based on each first numeric character. This carrier carries the valid data after preliminary processing, laying the foundation for subsequent steps.

[0066] Next, a second preset coding table is obtained. This table also uses pre-defined coding rules, but its functionality differs from the first preset coding table. Based on the previously generated first data carrier, a mutation operation is performed on the second preset coding table, altering the structure or parameters of the coding table using the information in the data carrier to generate a variant coding table. Once the variant coding table is generated, it is used to decode the previously filtered non-numeric characters, converting them into corresponding multiple second numeric characters to further mine and extract key information.

[0067] Next, a second data carrier (e.g., a graph, curve, matrix, data table, etc.) is generated based on each second digital character. This carrier further incorporates the newly generated valid data. At this point, a third preset coding table is obtained and combined with the second data carrier to perform calculations to generate multiple third digital characters. This data is then further processed and converted.

[0068] Finally, the first, second, and third digits are combined and combined into a complete digital combination through specific permutations. This digital combination ultimately serves as the communication key for the industrial wireless module and is used for subsequent data encryption, decryption, and authentication operations during communication, ensuring secure and reliable communications.

[0069] In one embodiment, after dynamically weighting and adjusting the transmission parameters in the potential interference mode based on the adaptive weighted transmission optimization function, the method includes: Obtain real-time environmental data from industrial wireless modules, normalize it, and construct an environmental parameter vector; Recalling a preset basic coding template, spirally superimposing the environmental parameter vector with the basic coding template, and screening multiple basic numeric characters and control symbols based on the phase difference relationship between the elements; using the basic numeric characters to generate the initial key fragment; Acquire the working mode characteristics of the industrial-grade wireless module, perform topological deformation on the basic coding template, and generate a dynamic coding network. Use the dynamic coding network to perform path resolution on the control symbols and convert them into multiple extended digital characters. The initial key fragment and the extended digital characters are combined to form an intermediate key. Based on the operating cycle characteristics of the industrial field equipment, the intermediate key is subjected to cyclic shift and modular operation to generate the final digital sequence. The hardware features of the industrial-grade wireless module are extracted, quantified into feature codes, hashed and fused with the final digital sequence, and output as the communication key of the industrial-grade wireless module.

[0070] In this embodiment, various data about the industrial wireless module's environment are first collected in real time, including but not limited to electromagnetic interference intensity, ambient temperature, humidity, and air pressure. These raw data vary in units and magnitudes. To facilitate subsequent processing, they are normalized, mapping all data to a specific interval to eliminate dimensionality effects. Subsequently, an environmental parameter vector is constructed based on this normalized data. This vector integrates this environmental information in a structured form, providing the fundamental data support for key generation.

[0071] Next, a pre-set basic coding template is retrieved, which contains fixed coding rules and data mapping relationships. The environmental parameter vector is spirally superimposed on the basic coding template. This operation is not a simple data merging, but rather an interweaving of the two elements along a spiral trajectory. During the superposition process, the system selects multiple basic numeric characters and control symbols that meet specific conditions based on the phase difference relationship between the elements. Among them, the basic numeric characters contain key information about the environmental data. These characters are used to generate the initial key fragment, which serves as the basic component of the key and initially lays the framework for the key.

[0072] The system then obtains the current operating mode characteristics of the industrial wireless module, such as data transmission rate, communication protocol type, and device operating status. Based on these operating mode characteristics, the system topologically transforms the basic encoding template, changing its structure and connectivity to generate a dynamic encoding network. This network can adapt to the needs of the module's different operating modes. The dynamic encoding network performs path resolution on the previously selected control symbols and, based on the network's connectivity and conversion rules, converts them into multiple extended numeric characters, further enriching the key's information content and increasing its complexity and security.

[0073] The initial key fragment is then combined with the extended numeric characters to form an intermediate key. This intermediate key already incorporates information about the environment and operating mode. However, to better align it with the actual needs of industrial sites, the intermediate key undergoes a circular shift and modular operation based on the operational cycle characteristics of industrial field equipment, such as equipment start and stop times and operating cycle duration. Circular shifting changes the order of numeric characters, while modular operations constrain and transform the values. This series of operations generates a final numeric sequence, further enhancing its security and applicability.

[0074] Finally, the hardware characteristics of the industrial wireless module, such as chip model parameters, antenna frequency response characteristics, and circuit board layout characteristics, are extracted and quantified into a signature code, digitally representing the module's hardware uniqueness. The signature code is then hashed with the final digital sequence. Leveraging the unidirectionality and obfuscation properties of the hash function, the two are combined to generate a fixed-length output value, which serves as the communication key for the industrial wireless module. This key incorporates multiple dimensions of information, including the environment, operating mode, device operating cycle, and hardware characteristics. It offers strong uniqueness and security, effectively ensuring secure communication within industrial environments.

[0075] In one embodiment, after dynamically weighting and adjusting the transmission parameters in the potential interference mode based on the adaptive weighted transmission optimization function, the method includes: Obtain the power supply voltage fluctuation curve, crystal oscillator frequency offset historical data, and fading depth distribution of the wireless channel of the industrial-grade wireless module, and construct a characteristic map of the module's operating status; Calling the fourth preset coding table, topologically associating the key parameter nodes in the module operation status characteristic map with the elements of the fourth preset coding table, and filtering out multiple basic key numbers and verification identifiers by calculating the connection weights between the nodes; and generating a key core segment using the basic key numbers; Monitor temperature and humidity gradient changes, dust concentration fluctuations, and equipment vibration acceleration peaks at industrial sites, and use an environmental change prediction model to predict environmental changes. Based on the prediction results, perform eigenvalue scaling and element replacement on the fourth preset coding table to generate a dynamic encryption table. Use the dynamic encryption table to transcode the verification identifier to obtain a key extension segment. The key core segment and key extension segment are modularly spliced ​​to form a temporary key structure, and then the temporary key structure is divided into blocks and shuffled and reorganized according to the strobe frequency of the on-site lighting equipment; The antenna pattern offset of the wireless module and the inter-symbol interference strength of the received signal are collected, quantified into a signal feature sequence, and encrypted with the reorganized key architecture through bitwise operations to ultimately generate the communication key for the industrial-grade wireless module.

[0076] In this embodiment, the industrial wireless module's supply voltage fluctuation curve (reflecting power supply stability), historical crystal oscillator frequency offset data (affecting clock synchronization accuracy), and wireless channel fading depth distribution (reflecting signal transmission quality) are collected in real time. These three types of data are then spatially aligned and normalized. A module operational status feature map, containing time-domain dynamic characteristics, is constructed using voltage fluctuation amplitude, frequency offset, and channel fading depth as three-dimensional coordinate axes. This map visualizes the module's comprehensive operating status in an electromagnetic interference environment through a topological structure, providing underlying physical characteristics for key generation.

[0077] Next, a pre-existing fourth preset coding table (a set of topological coding rules based on graph theory) is invoked to establish weighted associations between key parameter nodes in the characteristic graph (such as voltage mutation points, crystal oscillator offset extremes, and channel fading critical points) and coding table elements. By calculating the connection weights between nodes (the weights are determined by the parameter's influence and interference correlation), node mapping results with values ​​greater than a threshold are selected to generate a base key number and a verification identifier. The base key number is binary-encoded to form the key core segment, which carries the core characteristic information of the module's operating status and forms the main framework of the communication key.

[0078] Furthermore, the system monitors the temperature and humidity gradient changes, dust concentration fluctuations, and equipment vibration acceleration peaks at the industrial site in real time. This data is then fed into an environmental change prediction model (based on LSTM neural network training) to predict environmental parameter trends within the next 50ms. Based on the prediction results, the fourth preset coding table is double-transformed: Eigenvalue scaling: adjust the value range of the coding table elements according to the temperature and humidity change rate; Element replacement: Using the dust concentration peak as the seed parameter, the order of the encoding table rows and columns is rearranged through the Fisher-Yates shuffle algorithm to generate a dynamic encryption table.

[0079] Subsequently, a dynamic encryption table is used to perform path transcoding on the verification identifier (mapping the identifier characters into multidimensional vectors and then performing matrix operations) to obtain a key extension segment containing environmental prediction information, which forms information complementarity in the time and space dimensions with the key core segment.

[0080] Next, the key core segment and extended segment are spliced ​​together according to functional modules to form a temporary key structure (for example, the first 16 bits are the operating status code, and the last 16 bits are the environmental prediction code). Because the flicker frequency of industrial lighting equipment (such as 50Hz fluorescent lamps) can cause periodic interference to wireless signals, the system divides the temporary key structure into equal-length data blocks based on the flicker period. The data blocks are shuffled and reorganized according to the flicker phase difference (for example, in the nth cycle, the third block is moved to the first position). This dynamically aligns the key structure with the on-site interference period, enhancing anti-interference capabilities.

[0081] Finally, the wireless module's antenna pattern offset (changes in the radiation pattern due to temperature) and the received signal's intersymbol interference (ISI) strength (reflecting the degree of channel distortion) are collected and quantified into an 8-bit binary signal signature sequence. This sequence is then encrypted bit-by-bit with the reconstructed key structure using an XOR operation, and then compressed using a SHA-256 hash to generate the final 32-bit key. During this process, hardware signatures serve as input to a physically unclonable function (PUF), ensuring the key is uniquely bound to the module hardware. Bitwise encryption incorporates real-time signal distortion characteristics, providing the key with a triple security mechanism: environmental awareness, hardware binding, and dynamic encryption.

[0082] Through the above steps, the generated communication key not only integrates dynamic information such as module operation status and environmental prediction, but also achieves coordinated optimization of anti-interference capability and security through technologies such as topology association, dynamic coding table, and hardware feature binding. It is suitable for industrial-grade wireless communication scenarios in strong electromagnetic interference environments.

[0083] Reference Figure 2 In another embodiment of the present invention, an anti-interference serial communication system of an industrial-grade wireless module is provided, comprising: The acquisition unit is used to collect interference data from the serial port communication of the industrial-grade wireless module in real time based on the multi-dimensional interference feature acquisition module to form a multi-scale interference feature vector; A prediction unit, configured to input the multi-scale interference feature vector into a Mamba communication state space model integrated with a CRC check mechanism, and predict potential interference patterns through time series modeling with linear complexity; An adjustment unit is used to dynamically adjust the transmission parameters in the potential interference mode based on an adaptive weighted transmission optimization function; wherein the transmission parameters include baud rate, data bit length, check mode and retransmission strategy.

[0084] In this embodiment, for the specific implementation of each unit in the above system embodiment, please refer to the above method embodiment, which will not be repeated here.

[0085] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, memory, display screen, input device, network interface and database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above method is implemented.

[0086] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0087] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-described method when executed by a processor. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0088] In summary, the anti-interference serial communication method and system for the industrial-grade wireless module provided in the embodiment of the present invention include: based on a multi-dimensional interference feature acquisition module, real-time collection of interference data in the serial communication of the industrial-grade wireless module to form a multi-scale interference feature vector; inputting the multi-scale interference feature vector into the Mamba communication state space model integrated with the CRC check mechanism, and predicting the potential interference mode through linear complexity time series modeling; based on an adaptive weight transmission optimization function, dynamically weighted adjustment of the transmission parameters under the potential interference mode; wherein the transmission parameters include baud rate, data bit length, check method, and retransmission strategy. In the present invention, there is no need to increase hardware costs, and the cost of anti-interference serial communication is reduced; at the same time, based on the adaptive weight transmission optimization function, the transmission parameters under the potential interference mode are dynamically weighted and adjusted, realizing real-time tracking of dynamic changes in interference for anti-interference communication.

[0089] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media provided herein and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM.

[0090] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0091] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An anti-interference serial communication method for an industrial-grade wireless module, characterized in that: The following steps are involved: Based on the multi-dimensional interference feature acquisition module, interference data in the serial port communication of industrial-grade wireless modules is collected in real time to form a multi-scale interference feature vector; The multi-scale interference feature vector is input into the Mamba communication state space model integrated with the CRC check mechanism, and the potential interference pattern is predicted through linear complexity time series modeling; Based on an adaptive weighted transmission optimization function, transmission parameters in a potential interference mode are dynamically weighted and adjusted; wherein the transmission parameters include baud rate, data bit length, check mode, and retransmission strategy.

2. The method according to claim 1, characterized in that The interference data includes interference signal strength, bit error rate, clock offset and electromagnetic radiation spectrum data.

3. The method according to claim 1, characterized in that The multi-dimensional interference feature acquisition module adopts a parallel multi-resolution feature processing structure, including: High-frequency interference feature branch, used to capture transient electromagnetic interference signals above 100kHz; The intermediate frequency communication quality branch is used to analyze the fluctuation pattern of the bit error rate between 10kHz and 100kHz. Low-frequency clock offset branch, used to monitor clock synchronization deviation below 10kHz; Each branch realizes information fusion through the cross-scale feature interaction module to obtain a multi-scale interference feature vector.

4. The method according to claim 1, wherein The Mamba communication state space model is specifically used for: The depth-wise separable convolution module is used to extract local features from the input multi-scale interference feature vector to obtain the reduced-dimensional interference feature. Through the dynamic weight calculation unit of the Mamba state space module, long-range dependency modeling is performed on the preset historical interference sequence and the reduced-dimensional interference features, and the interference pattern of the next 5 to 10 communication cycles is predicted using the linear complexity time series convolution operation; The verification result of the traditional CRC check code is used as the residual input and is fused bit by bit with the interference pattern predicted by the model. The prediction deviation is corrected through the residual connection mechanism to obtain the potential interference pattern; the CRC check generator polynomial is based on the preset industrial standard.

5. The method according to claim 4, characterized in that The Mamba communication state space model also enhances nonlinear expression capabilities through the RMS Norm normalization layer and SiLU activation function. The overall parameter size is controlled within 1MB, which is adapted to the embedded computing resources of industrial-grade wireless modules.

6. The method according to claim 1, characterized in that The adaptive weight transfer optimization function expression is: in, is the bit error rate loss term, and the Smooth L1 loss is used to measure the deviation between the actual bit error rate and the threshold; This is the serial port resource consumption loss item, which is used to constrain the power consumption fluctuation caused by baud rate adjustment; This is a protocol compatibility loss item, ensuring that parameter adjustments comply with industrial communication protocol specifications; It is a dynamic weight coefficient, which automatically adjusts the ratio according to the real-time interference intensity.

7. The method according to claim 6, characterized in that The adjustment strategy of the dynamic weight coefficient includes: When the electromagnetic interference intensity exceeds 80dB, set ; When the electromagnetic interference intensity is lower than 40dB, set ; When the electromagnetic interference intensity is not less than 40dB and not more than 80dB, set The adjustment period of the weight coefficient is inversely proportional to the baud rate of the serial communication.

8. The method according to claim 6, characterized in that Based on the adaptive weighted transmission optimization function, dynamic weighted adjustment of transmission parameters in potential interference modes is performed, including: Obtain the electromagnetic interference intensity and, based on the mapping rule between interference intensity and weight coefficients, set the ratio of reliability weight α, efficiency weight β, and compatibility weight γ. α corresponds to the bit error rate constraint strength, β corresponds to the adjustment priority of baud rate and data bit length, and γ corresponds to the industrial protocol compatibility check weight. Determine differentiated adjustment strategies for different transmission parameters: Baud rate adjustment: When the α weight ratio is ≥3, the step-by-step speed reduction mechanism is activated, and the baud rate is adjusted in steps of 90%, 80%, and 70% of the current baud rate. The adjustment interval for each step does not exceed 20ms. Data bit length configuration: When β>4, use 8 data bits to improve transmission efficiency; otherwise, use 7 data bits to reduce the risk of bit errors; Check mode switch: When γ≥3, CRC-16 check is forced to be enabled and two parity bits are added; Retransmission strategy optimization: Dynamically adjust the retransmission interval based on the weight difference between α and β. When the difference is greater than 1, the retransmission interval is shortened from 50ms to 30ms. When the difference is less than or equal to 1, the default interval is maintained. The real-time effectiveness of parameter adjustment is achieved through the hardware register mapping table, and the weight calculation results are converted into configuration instructions for the serial port controller.

9. An anti-interference serial communication system for an industrial-grade wireless module, characterized in that: include: The acquisition unit is used to collect interference data from the serial port communication of the industrial-grade wireless module in real time based on the multi-dimensional interference feature acquisition module to form a multi-scale interference feature vector; A prediction unit, configured to input the multi-scale interference feature vector into a Mamba communication state space model integrated with a CRC check mechanism, and predict potential interference patterns through time series modeling with linear complexity; An adjustment unit is used to dynamically adjust the transmission parameters in the potential interference mode based on an adaptive weighted transmission optimization function; wherein the transmission parameters include baud rate, data bit length, check mode and retransmission strategy.

Citation Information

Patent Citations

  • Anti-interference enhanced UART data receiving device and receiving method thereof

    CN116015324A

  • Anti-interference method of wireless communication in industrial application

    CN117596602A

  • U-Mama-based electromagnetic signal identification method and system

    CN118965070A

  • Wireless signal and thermal imaging multi-mode cooperative detection and directional interference method and system

    CN119395688A

  • Region-level aviation flow prediction method based on Mamba-GCN

    CN120183250A

Cited By

  • Automatic lung function examination data analysis and classification system based on big data

    CN121281864A

  • Method and device for high-speed transmission of large files from PC (Personal Computer) to Android equipment based on serial port protocol

    CN121367697A

  • Modularly-designed mixed signal acquisition and processing system and method

    CN122026914A