Real-time processing method and system for distortion correction of radio frequency signal of communication equipment

By dynamically extracting reference signal segments and device identifiers, hierarchically clustering device association groups, performing multi-timescale characteristic analysis and parameter fusion, and constructing filters for real-time signal correction, the signal distortion problem of low-cost RF modules in dynamic environments is solved, achieving higher real-time performance and adaptability, and improving communication reliability.

CN121690915APending Publication Date: 2026-03-17SCANFIL (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511873816.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In smart home and IoT scenarios, the signals of low-cost radio frequency modules are prone to phase and amplitude distortion in complex dynamic environments. Existing technologies are difficult to adapt to dynamically changing communication environments, resulting in problems such as device response delays and loss of control commands.

Method used

By dynamically extracting reference signal segments, obtaining device identifiers and ideal reference signal templates, hierarchically clustering device association groups, performing multi-time-scale characteristic analysis and confidence-weighted parameter fusion, and constructing phase compensation filters and amplitude equalization filters, real-time signal correction is achieved.

Benefits of technology

It improves the real-time performance and adaptability of signal processing, enabling it to adapt to complex dynamic environments, reduce device response delays and control command loss, and enhance communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121690915A_ABST
    Figure CN121690915A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of signal processing, in particular to a real-time processing method for distortion correction of a radio frequency signal of communication equipment, which comprises the following steps of: dynamically extracting a reference signal fragment from a communication data stream, and acquiring an equipment identifier corresponding to the reference signal fragment; extracting a distortion feature vector based on the reference signal segment and the ideal reference signal template; dividing an equipment association group according to the long-term average received signal strength indication value and the channel pulse response information, and calculating statistical feature data of equipment in the equipment association group according to the historical distortion feature vector; on a time domain scale, acquiring change characteristic information of each device based on the distortion characteristic vector; and classifying the phase distortion component and the amplitude distortion component according to the historical distortion feature vector, the statistical feature data and the change feature information to obtain a distortion type, and generating a final correction parameter based on the distortion type, so that the method has real-time performance, adaptability and reliability, and can adapt to a complex dynamic environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of signal processing, in particular to a real-time processing method and system for correcting radio frequency signal distortion of communication equipment. BACKGROUND

[0002] In the scenarios of smart home, Internet of Things, etc., a central control device needs to maintain stable radio frequency communication with a large number of terminal devices such as smart lamps, temperature controllers, security sensors, smart sockets, etc. These terminal devices generally use low-cost radio frequency transceiver modules and work in the 2.4 GHz ISM frequency band or the Sub-1 GHz frequency band to realize data interaction through Zigbee, Bluetooth LE, etc. In the prior art, in order to ensure the orderliness of concurrent communication of multiple devices, time division multiplexing, multi-channel allocation, etc. are usually used to divide communication resources, and forward error correction coding, basic equalization filtering, etc. are used as signal processing means to reduce signal loss and distortion in the transmission process and improve the basic reliability of the communication link. In addition, some schemes construct a device feature database to store preset ideal reference signal templates and historical correction parameters to provide basic data support for signal distortion correction.

[0003] In actual application environments, radio frequency signals are affected by factors such as fixed devices, wall shielding, human movement, etc. in the transmission process, and multiple propagation paths are superimposed to cause phase and delay differences. At the same time, the inherent non-linear characteristics of low-cost radio frequency hardware and the overlapping interference of multiple device signals in the time-frequency domain will further cause phase distortion and amplitude distortion of the received signal. These distortions will directly destroy the timing and amplitude integrity of the signal, resulting in device response delay and control command loss. In dynamic scenarios, the number of devices increases or decreases, the deployment position is adjusted, and people frequently move, etc. which will cause real-time changes in distortion characteristics. If only the preset parameter equalizer or single-device independent correction in the prior art is used, it cannot adapt to complex dynamic environments. SUMMARY

[0004] The main purpose of the present application is to provide a real-time processing method and system for correcting radio frequency signal distortion of communication equipment, which aims to solve the technical problems proposed in the background.

[0005] The present application provides a real-time processing method for correcting radio frequency signal distortion of communication equipment, comprising: dynamically extracting a reference signal segment from a communication data stream and obtaining a device identifier corresponding to the reference signal segment; obtaining an ideal reference signal template of the corresponding device based on the device identifier, and extracting a distortion feature vector based on the reference signal segment and the ideal reference signal template; obtaining historical distortion feature vectors of each device, long-term average received signal strength indicator values and channel impulse response information, dividing device-associated groups according to the long-term average received signal strength indicator values and the channel impulse response information, and calculating statistical characteristic data of devices in the device-associated groups according to the historical distortion feature vectors; obtaining variation characteristic information of each device based on the distortion feature vectors in the time domain scale, the variation characteristic information including relative instantaneous variation intensity, hardware characteristic index, variation trend rate and standard direction stability index; obtaining phase distortion components and amplitude distortion components according to the distortion feature vectors, classifying the phase distortion components and the amplitude distortion components according to the historical distortion feature vectors, the statistical characteristic data and the variation characteristic information to obtain distortion types, and generating final correction parameters based on the distortion types; constructing and applying phase compensation filters and amplitude equalization filters according to the final correction parameters, the phase distortion components and the amplitude distortion components to obtain final corrected signals; calculating quality indexes of the corrected signals, and dynamically adjusting correction parameters of the phase compensation filters and the amplitude equalization filters based on the quality indexes and device identifications.

[0006] As a preference, the step of obtaining distortion feature vectors based on the reference signal segments and the ideal reference signal templates includes: performing fast Fourier transform on the reference signal segments to obtain first frequency domain representations, and performing fast Fourier transform on the ideal reference signal templates to obtain second frequency domain representations; calculating frequency domain error functions between the first frequency domain representations and the second frequency domain representations; decomposing the frequency domain error functions into phase error components and amplitude error components; performing piecewise linear fitting on the phase error components and the amplitude error components, extracting error values of multiple key frequency points to form distortion feature vectors.

[0007] As a preference, the step of obtaining historical distortion feature vectors of each device, long-term average received signal strength indicator values and channel impulse response information, dividing device-associated groups according to the long-term average received signal strength indicator values and the channel impulse response information, and calculating statistical characteristic data of devices in the device-associated groups according to the historical distortion feature vectors includes: obtaining long-term average received signal strength indicator values of each device; grouping communication devices of the same type and having long-term average received signal strength indicator values differing by no more than a first preset threshold into the same candidate device set to obtain a plurality of candidate device sets; extracting channel impulse response information of devices in the same candidate device set during a reference signal segment, and calculating waveform similarity of the channel impulse response information between devices; dividing a communication device with waveform similarity higher than a second preset threshold to the same device association group; obtaining a historical distortion feature vector of the device association group, calculating a mean vector and a covariance matrix of the historical distortion feature vector of the device association group, and taking the mean vector and the covariance matrix as statistical feature data.

[0008] Preferably, the step of obtaining variation characteristic information of each device based on the distortion feature vector in the time domain scale comprises: calculating a difference vector of the current distortion feature vector and a previous distortion feature vector in a first time scale; calculating a modulus of the difference vector, and comparing the modulus with a median of moduli of difference vectors of other devices in the device association group at the same time to obtain a relative instantaneous variation strength; extracting a projection component of the difference vector in a local crystal oscillator frequency offset direction of the device, and taking the projection component as a hardware characteristic index; in a second time scale, performing linear regression on the distortion feature vector in a preset time window to obtain a variation trend rate, and calculating an included angle variance between continuous difference vectors as an initial direction stability index; obtaining a radio frequency link operating temperature level of each device, mapping the radio frequency link operating temperature level to a dynamic correction coefficient of the direction stability index, adjusting the initial direction stability index according to the dynamic correction coefficient to obtain a standard direction stability index.

[0009] Preferably, the step of obtaining a phase distortion component and an amplitude distortion component from the distortion feature vector, classifying the phase distortion component and the amplitude distortion component according to the historical distortion feature vector, the statistical feature data and the variation characteristic information to obtain a distortion type, and generating a final correction parameter based on the distortion type comprises: obtaining a first preset high quantile threshold by statistically obtaining a historical distribution of a trace of the covariance matrix, and obtaining a second preset high quantile threshold by statistically obtaining a distribution of a ratio of a variance of the phase distortion component to a variance of the amplitude distortion component in the historical distortion feature vector; calculating a ratio of the variance of the phase distortion component to the variance of the amplitude distortion component; establishing a first comprehensive judgment condition according to a comparison result of the ratio and a second preset high-quantile threshold, a comparison result of the rate of change trend and the relative instantaneous change intensity, a comparison result of the standard direction stability index and a preset index threshold, a comparison result of the Mahalanobis distance of the distortion feature vector and the group mean vector, and a comparison result of the hardware characteristic index and a preset hardware characteristic threshold; establishing a second comprehensive judgment condition according to a comparison result of the relative instantaneous change intensity and a preset change intensity threshold, a comparison result of the ratio and a second preset high-quantile threshold, and a comparison result of a current trace value of the covariance matrix and a first preset high-quantile threshold; obtaining a distortion type according to the first comprehensive judgment condition and the second comprehensive judgment condition, wherein the distortion type includes static multipath distortion and dynamic occlusion distortion; calculating a correction confidence factor of each device in the group of associated computing devices, and obtaining a final correction parameter based on the distortion type and the correction confidence factor.

[0010] Preferably, the step of calculating a correction confidence factor of each device in the group of associated computing devices, and obtaining a final correction parameter based on the distortion type and the correction confidence factor includes: obtaining preamble symbol synchronization deviation data according to the reference signal segment, calculating a variance of the preamble symbol synchronization deviation according to the preamble symbol synchronization deviation data, and calculating a correction confidence factor of each device based on the variance of the preamble symbol synchronization deviation; obtaining historical correction parameters of each device in the group of associated devices, and performing weighted averaging according to the correction confidence factors of each device to generate a group recommended correction parameter; calculating real-time correction parameters independently generated by each device through an iterative method, wherein peak value information in the preamble symbol synchronization deviation data is used as an initial iterative value in the generation process of the real-time correction parameters; obtaining a reference weight according to the distortion type, and obtaining a mixing weight according to the reference weight and the correction confidence factor; obtaining a final correction parameter according to the mixing weight, the group recommended correction parameter, and the real-time correction parameter.

[0011] Preferably, the step of constructing and applying a phase compensation filter and an amplitude equalization filter according to the final correction parameter, the phase distortion component, and the amplitude distortion component to obtain a final corrected signal includes: constructing a frequency response of the phase filter according to the phase distortion component; extending the values of the phase distortion component at a plurality of key frequency points to a full frequency band through cubic spline interpolation, and converting the interpolated phase distortion component to the time domain to obtain the coefficients of the finite-length unit impulse response filter. Obtaining a phase component in the final correction parameter, updating a coefficient of the finite-length unit impulse response filter according to the phase component, performing convolution operation on the received signal using a segmented overlap-add method to perform real-time phase compensation, and obtaining a phase-corrected signal; Dividing the phase-corrected signal into a plurality of frequency subbands, and calculating a received signal power of each of the frequency subbands; Comparing the received signal power of each of the frequency subbands with a target power, calculating a gain factor of each subband, obtaining an amplitude component in the final correction parameter, performing gain adjustment on each of the frequency subbands according to the amplitude component, and obtaining an equalized subband signal; Combining all the equalized subband signals into a complete signal inside an amplitude equalization filter to obtain a final corrected signal.

[0012] The application further provides a real-time processing system for distortion correction of a radio frequency signal of a communication device, comprising a plurality of modules for implementing steps of a real-time processing method for distortion correction of a radio frequency signal of a communication device.

[0013] The application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements steps of a real-time processing method for distortion correction of a radio frequency signal of a communication device when executing the computer program.

[0014] The application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program implements steps of a real-time processing method for distortion correction of a radio frequency signal of a communication device when executed by a processor.

[0015] The application has the advantages that: the application implements a radio frequency signal processing scheme for a communication device through reference signal matching, hierarchical clustering, device association group construction, multi-time scale characteristic analysis, confidence weighted parameter fusion, and filter parameter dynamic updating, and is more real-time, adaptive and reliable, and can adapt to a complex dynamic environment. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 The figure is a method flowchart of an embodiment of the application.

[0017] Figure 2 The figure is a system structure diagram of an embodiment of the application.

[0018] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0019] It should be understood that the specific embodiments described herein are merely intended to explain the application and are not intended to limit the application.

[0020] like Figure 1 As shown, this application provides a real-time processing method for radio frequency signal distortion correction in communication devices, including: S1, dynamically extract reference signal segments from the communication data stream and obtain the device identifier corresponding to the reference signal segments; when a new device communication is detected to start, mark the received signal of a preset symbol period as a reference segment to be verified, parse the frame header of the reference segment to be verified to obtain the device identifier, match the device identifier with the known device database, if the match is successful, retrieve the device-specific ideal reference signal template from the device feature database, and pass the reference segment to be verified as a reference signal segment with a device identifier tag to the subsequent correction processing steps; if the match fails, perform preliminary processing using general correction parameters, and store the reference segment to be verified in a temporary buffer for subsequent parameter learning; S2, obtain the ideal reference signal template of the corresponding device based on the device identifier, and extract the distortion feature vector based on the reference signal segment and the ideal reference signal template; S3, obtain the historical distortion feature vector, long-term average received signal strength indication value and channel impulse response information of each device, divide the device association group according to the long-term average received signal strength indication value and channel impulse response information, and calculate the statistical feature data of the devices in the device association group according to the historical distortion feature vector; S4. On the time domain scale, based on the distortion feature vector, obtain the change characteristic information of each device. The change characteristic information includes relative instantaneous change intensity, hardware characteristic indicators, change trend rate and standard direction stability indicators. S5. Obtain the phase distortion component and amplitude distortion component according to the distortion feature vector, classify the phase distortion component and amplitude distortion component according to the historical distortion feature vector, the statistical feature data and the change characteristic information to obtain the distortion type, and generate the final correction parameter based on the distortion type. S6. Construct and apply a phase compensation filter and an amplitude equalization filter based on the final correction parameters, the phase distortion component and the amplitude distortion component to obtain the final corrected signal; S7, calculate the quality index of the corrected signal, and dynamically adjust the correction parameters of the phase compensation filter and amplitude equalization filter based on the quality index and device identifier.

[0021] As described in steps S1-S7 above, during the transmission of radio frequency signals, the signals are affected by multipath propagation factors such as fixed equipment (e.g., electrical equipment, mechanical equipment), wall obstruction, and human movement, resulting in signal superposition of multiple propagation paths and phase delay differences. At the same time, the inherent nonlinear characteristics of low-cost radio frequency hardware (e.g., crystal oscillator frequency drift, power amplifier gain deviation) and the overlapping interference of signals from multiple devices in the time-frequency domain will further cause phase and amplitude distortion of the received signal. These distortions will directly destroy the timing and amplitude integrity of the signal, manifesting as device response delay (e.g., delayed lighting after receiving control commands for smart lights) and loss of control commands (e.g., the alarm signal of a security sensor is not received by the controller). In dynamic scenarios, changes in the number of devices, adjustments in deployment locations, and frequent personnel movement can cause distortion characteristics to change in real time. Relying solely on existing technologies with preset parameter equalizers or independent calibration of individual devices cannot adapt to complex dynamic environments. Therefore, this invention addresses the above problems by employing a scheme that combines reference signal matching, hierarchical clustering to construct device association groups, multi-timescale characteristic analysis, confidence-weighted parameter fusion, and dynamic updating of filter parameters. This approach also offers real-time performance, adaptability, and reliability.

[0022] Specifically, this invention dynamically extracts reference signal segments from the communication data stream and obtains the device identifier corresponding to the reference signal segment. In actual communication, the communication data stream contains service data and reference signals. The reference signal segment originates from the preamble portion of the standard training sequence in the digital baseband signal sequence (such as the 32-symbol preamble of the Zigbee protocol). This portion has fixed timing and phase characteristics and is suitable as a distortion comparison benchmark. When a new device communication is detected (triggered by the first detection via the frame synchronization signal), the system marks the received signal with a preset symbol period (such as 8 symbol periods, covering the complete preamble) as the reference segment to be verified, parses the frame header to obtain the device identifier (the frame header carries the device ID or MAC address), and matches it with the known device database: if the match is successful, the ideal reference signal template specific to the device is retrieved from the device feature database (generated through factory testing or historical correction data), and the reference segment to be verified is passed to subsequent steps as a reference signal segment with the device identifier; if the match fails, a general correction parameter (the average correction value of similar devices) is used for preliminary processing, and the reference segment to be verified is stored in a temporary buffer. Subsequently, a device-specific template is generated through multiple rounds of data learning.

[0023] To more accurately obtain the distortion distribution at each frequency point and provide a quantitative basis for subsequent classification, this invention achieves independent quantification of phase and amplitude distortion through frequency domain separation and key frequency point fitting, while avoiding the waste of computational power in full-band sampling. To improve correction reliability by utilizing group commonalities, this invention uses channel impulse response waveform similarity clustering to classify similar devices into device association groups. To more accurately identify the instantaneous and long-term characteristics of distortion, it extracts the changing characteristic information of devices from the time domain scale and obtains a more comprehensive basis through multi-dimensional characteristic extraction. It achieves accurate classification of distortion types through multi-dimensional conditional cross-validation, and generates weighted fusion final correction parameters by combining correction confidence factors. This enables the correction strategy to cope with stable distortion of static multipath and adapt to sudden distortion of dynamic occlusion, while taking into account both correction accuracy and reliability. By constructing and applying phase compensation filters and amplitude equalization filters, the final correction parameters are transformed into actual signal correction operations, enabling the correction parameters to be accurately implemented.

[0024] By calculating the quality metrics of the corrected signal (bit error rate, signal-to-noise ratio, etc., obtained from demodulated data), the filter parameters are dynamically adjusted and historical data is updated. When the bit error rate exceeds a preset threshold (e.g., 10), the filter is activated. -5 When the current distortion feature vector, correction parameters, and quality indicators are stored together, historical distortion data and device feature database are updated so that subsequent corrections can be optimized based on the latest data to maintain long-term communication stability.

[0025] In one embodiment, the step of obtaining the ideal reference signal template of the corresponding device based on the device identifier, and extracting the distortion feature vector based on the reference signal segment and the ideal reference signal template includes: S21, perform a fast Fourier transform on the reference signal segment to obtain a first frequency domain representation, and perform a fast Fourier transform on the ideal reference signal template to obtain a second frequency domain representation; S22, Calculate the frequency domain error function between the first frequency domain representation and the second frequency domain representation; S23, decompose the frequency domain error function into phase error components and amplitude error components; S24, perform piecewise linear fitting on the phase error component and amplitude error component, extract the error values ​​of multiple key frequency points, and form a distortion feature vector.

[0026] As described in steps S21-S24 above, during the transmission of radio frequency signals, the phase and amplitude characteristics deviate from the ideal state due to the influence of multipath propagation (such as the superposition of multiple propagation paths formed by indoor wall reflection and furniture obstruction), hardware nonlinearity (such as the gain nonlinearity of power amplifiers in low-cost radio frequency modules and crystal frequency drift), and multi-device interference (such as the overlap of signals from different devices in the same frequency band). This manifests as phase delay differences and amplitude attenuation fluctuations. These distortions are only reflected as overall waveform distortion in the time domain signal, making it difficult to directly distinguish the independent effects of phase and amplitude. However, frequency domain analysis can separate the two. The phase value and amplitude value of each frequency point in the frequency domain can be extracted independently. The phase difference corresponds to the distortion caused by timing offset, and the amplitude difference corresponds to the distortion caused by signal strength fluctuation. Therefore, based on the ideal reference signal template for each device and the dynamically extracted reference signal segment, this invention uses frequency domain transformation, error decomposition, and piecewise fitting techniques to transform the phase distortion and amplitude distortion of radio frequency signals into quantifiable distortion feature vectors, which can more accurately locate the type and degree of distortion.

[0027] This invention uses Fast Fourier Transform (FFT) to convert a reference signal segment and an ideal reference signal template from the time domain to a first frequency domain representation and a second frequency domain representation. The reference signal segment comes from a reference segment to be verified with an attached device identifier (the preamble of a standard training sequence, such as the 32-symbol preamble of the Zigbee protocol). The ideal reference signal template is retrieved from a device feature database (based on device identifier matching, generated from factory testing or historical data learning). The number of FFT points is set according to the communication protocol bandwidth (e.g., 256 or 512 points) to ensure that the frequency domain resolution covers the effective bandwidth. The frequency domain error function is calculated using the complex form of MSE to comprehensively reflect the overall difference in phase and amplitude at each frequency point.

[0028] To accurately separate the phase error component from the amplitude error component, the complex forms of the first and second frequency domain representations are first transformed into polar coordinates to extract the amplitude and phase values ​​at each frequency point. Then, the amplitude and phase errors are calculated for each frequency point, and the error values ​​at all frequency points are categorized to form amplitude and phase error components. For example, at a frequency of 2.41 GHz, the first frequency domain representation has an amplitude of 0.8V and a phase of -45°, while the second frequency domain representation has an amplitude of 1.0V and a phase of -15°. Therefore, the amplitude error at this point is -0.2V (-2dB), and the phase error is -30°, which are then categorized into their respective components. These steps completely separate the originally superimposed phase and amplitude errors, allowing subsequent correction to be tailored to different distortion types: for example, when phase distortion is dominant, the phase compensation filter is adjusted; when amplitude distortion is dominant, the amplitude equalization filter is focused on, avoiding the wasted precision caused by a one-size-fits-all correction.

[0029] This invention extracts key frequency error values ​​through piecewise linear fitting to form a distortion feature vector, balancing distortion details with computational power consumption. At the physical level... Because radio frequency signal distortion is not uniformly distributed across the entire frequency band, such as more significant amplitude distortion in the high-frequency band and prominent phase distortion in the low-frequency band of the 2.4GHz band, full-band sampling will generate a large amount of redundant data. Therefore, this invention extracts the error values ​​of key frequency points through piecewise linear fitting to form a distortion feature vector. Specifically, the effective bandwidth is first divided into continuous sub-intervals (such as 2.4GHz-2.42GHz, 2.42GHz-2.44GHz). One or two key frequency points (signal energy concentration points or the midpoint of the sub-interval) are selected in each sub-interval. Then, the phase and amplitude error components of each sub-interval are linearly fitted, and the error values ​​of the key frequency points on the fitted line are read. Finally, the phase and amplitude error values ​​of the key frequency points are alternately combined in frequency order to form a distortion feature vector. For example, selecting one key frequency point from each of the three sub-intervals yields phase errors of -30°, -50°, and -75°, and amplitude errors of -4dB, -7dB, and -9dB. The feature vector is then [-30°, -4dB, -50°, -7dB, -75°, -9dB]. Compared to full-band sampling, replacing redundant data with a small number of key frequency points (e.g., reducing 512 frequency points to 10-20) significantly reduces the data volume, improving the speed of real-time correction calculation. Simultaneously, linear fitting smooths out transient noise interference, such as anomalies in errors at a single frequency point, ensuring that the key frequency point error values ​​reflect the true distortion trend.

[0030] In one embodiment, the steps of obtaining the historical distortion feature vectors, long-term average received signal strength indication values, and channel impulse response information of each device, dividing the devices into association groups based on the long-term average received signal strength indication values ​​and channel impulse response information, and calculating the statistical feature data of the devices within the device association groups based on the historical distortion feature vectors include: S31, obtain the long-term average received signal strength indication value of each device; S32, communication devices of the same type and whose long-term average received signal strength indication values ​​differ by no more than a first preset threshold are grouped into the same candidate device set to obtain several candidate device sets; S33, for devices in the same set of candidate devices, extract their channel impulse response information during the reference signal segment, and calculate the waveform similarity of the channel impulse response information between each device; the channel impulse response is obtained by estimating the preamble I / Q sampling sequence; S34, the communication devices whose waveform similarity is higher than the second preset threshold are grouped into the same device association group; S35, obtain the historical distortion feature vector of the device association group, calculate the mean vector and covariance matrix of the historical distortion feature vector of the device association group, and use the mean vector and covariance matrix as statistical feature data.

[0031] As described in steps S31-S35 above, in multi-device scenarios such as smart homes and the Internet of Things, the communication environment of devices (such as propagation paths and interference intensity) is strongly correlated with their deployment location and hardware type. Devices in the same or similar environments (such as smart lights and thermostats in the same bedroom, and smart sockets of the same model) share commonalities in the multipath propagation effects (such as the number of wall reflections and furniture obstruction) and hardware nonlinear interference (such as crystal oscillator drift range and amplifier gain deviation) on their radio frequency signals, and their corresponding distortion characteristics also exhibit similar patterns. If correction is performed solely based on the independent data of a single device, it is easy to cause correction deviations due to individual noise interference or sudden anomalies. In existing technologies, solutions for multi-device correction often adopt the approach of processing individual devices independently or uniformly correcting the entire system. The former maintains independent correction data for each device, which can adapt to individual differences, but lacks group verification and is susceptible to individual sudden noise interference; the latter generates universal correction parameters based on the average data of all devices in the system, which simplifies the calculation, but ignores the environmental and hardware differences between devices, resulting in insufficient correction accuracy in scenarios where devices are distributed widely and environmental differences are large. This invention employs a hierarchical clustering design that first screens devices by signal strength and then refines them by channel response. This design groups devices with similar environmental and hardware characteristics into one category. By using the statistical characteristics of the group data (such as mean vector and covariance matrix) as a reference benchmark, it can more accurately identify groups of devices with similar environmental and hardware characteristics. This approach preserves the commonalities of devices within the group, effectively reduces the impact of individual errors, and improves the stability of distortion judgment and correction parameters.

[0032] Specifically, the long-term average received signal strength indication value is obtained based on continuous sampling data of the device within a preset period. For example, if a 1-minute statistical period is set, the instantaneous received signal strength indication value is collected every 100ms (read directly from the signal detection unit of the device's RF module). After removing extreme values ​​within the sampling period (such as sudden rises / falls caused by sudden interference), the arithmetic mean of the remaining sampled values ​​is calculated to obtain the long-term average received signal strength indication value of the device. This reflects the overall strength level of the received signal of the device. The signal strength is directly related to the deployment location of the device, the distance from the controller, and the propagation path loss. For example, the long-term average received signal strength indication value of a device 5 meters away from the controller in the same room may be concentrated in the range of -55 to -45 dBm, while that of a device 20 meters away outdoors may be in the range of -85 to -75 dBm. This difference in strength indirectly reflects the initial commonality between the environment and the hardware. Preliminary clustering of devices is performed based on long-term average received signal strength (RSSI) values ​​to form candidate device sets. Specifically, firstly, the classification criteria for device types are clarified (e.g., Zigbee devices and Bluetooth LE devices according to communication protocols, or sensing devices and control devices according to functions) to ensure that the hardware RF characteristics (e.g., transmit power and receive sensitivity) of devices of the same type are consistent. Then, a first preset threshold is set (this threshold is based on signal attenuation test calibration for devices of the same type, for example, 5dBm; if the long-term average RSSI values ​​of devices of the same type differ by no more than 5dBm, their propagation path loss difference is usually less than 10%, which can be judged as a preliminary similar environment). Finally, devices of the same type and whose long-term average RSSI differences do not exceed the first preset threshold are grouped into the same candidate device set. For example, among all Zigbee devices, those with long-term average RSSI values ​​between -55 and -50dBm are grouped into candidate set A, and those between -50 and -45dBm are grouped into candidate set B. Through this double screening, devices with large differences in hardware characteristics and significant differences in environmental loss can be excluded, narrowing the scope of subsequent clustering and reducing computational complexity.

[0033] This invention achieves accurate clustering of candidate devices by utilizing the waveform similarity of channel impulse response (CTR) information. The CTR information is estimated from a reference signal segment, specifically using a cross-correlation matching algorithm for preamble I / Q sampling sequences: the received preamble I / Q sequence is cross-correlated with the ideal preamble I / Q sequence. The peak value of the cross-correlation result corresponds to the signal propagation delay, and the peak amplitude corresponds to path attenuation. This generates a CTR waveform that reflects the characteristics of the signal propagation path (each peak in the waveform represents a propagation path, the peak position corresponds to the delay, and the peak height corresponds to the attenuation). For example, the CTR waveform of a certain device contains two main peaks, corresponding to the direct path (delay 0.1 μs, amplitude 0.9 V) and the wall reflection path (delay 0.3 μs, amplitude 0.5 V), respectively. This waveform directly reflects the multipath propagation characteristics of the environment in which the device is located. After obtaining the channel impulse response information of all devices in the same candidate device set, the waveform similarity between each device is calculated. The normalized cross-correlation coefficient is used as the similarity index, with a value range of [0,1]. The closer it is to 1, the more similar the propagation path characteristics (such as the number of paths, delay distribution, and attenuation degree) of the two devices are. Compared with the limitations of existing schemes that rely solely on signal strength clustering, the channel impulse response waveform can more accurately depict the detailed features of the propagation path. For example, two devices may have similar long-term average RSSI (both are -50dBm), but one is mainly due to the direct path (single peak of the channel impulse response), while the other is due to multiple reflection paths (multiple peaks), resulting in significant differences in their distortion characteristics. By calculating the waveform similarity, such pseudo-similar devices can be eliminated. Devices with waveform similarity higher than a second preset threshold in the same candidate device set are grouped into the same device association group. The second preset threshold is calibrated through environmental adaptability testing. Taking 0.8 as an example, when the normalized cross-correlation coefficient is greater than 0.8, the difference in multipath propagation paths between the two devices is small enough, and the similarity of distortion features is high enough. For example, in candidate device set A, there are devices 1-5. The waveform similarity between devices 1 and 2 is 0.85, between devices 2 and 3 is 0.82, and between devices 4 and 5 is 0.9. Then devices 1-3 are assigned to association group 1, and devices 4-5 are assigned to association group 2. Through precise screening of waveform similarity, a group of devices with highly similar environments and propagation paths is finally determined, which can ensure that the distortion features of devices within the group are strongly correlated.

[0034] Historical distortion feature vectors are obtained through a historical feature database. Each device generates a distortion feature vector in each correction cycle, which is then stored in association with the device identifier and timestamp to form the historical feature database. The statistical period for the data in the historical feature database is set to 100 correction cycles (approximately 10 minutes, to ensure sufficient sample size to reflect stable patterns). After obtaining the historical distortion feature vectors of all devices within the group, the mean vector and covariance matrix are calculated: The mean vector is obtained by taking the arithmetic mean of the corresponding dimensions (such as the phase error value and amplitude error value at each key frequency point) of all historical distortion feature vectors. For example, if there are 3 devices in the group, and the phase error values ​​at a certain key frequency point in the historical vectors are -30°, -28°, and -32° respectively, then the mean of that dimension is -30°. The mean vector as a whole reflects the average level of distortion of the devices within the group. The covariance matrix is ​​obtained by calculating the covariance between the error values ​​of each dimension. For example, calculating the covariance between "2.41GHz phase error" and "2.43GHz phase error" reflects the correlation between the distortion changes of these two dimensions. The covariance matrix as a whole reflects the dispersion of the distortion features of the devices within the group and the correlation between dimensions. Through the above steps, a quantitative benchmark for the normal distortion range of the group is constructed.

[0035] In one embodiment, the step of obtaining the change characteristic information of each device based on the distortion feature vector at the time domain scale, wherein the change characteristic information includes relative instantaneous change intensity, hardware characteristic indicators, change trend rate, and standard direction stability indicators, includes: S41, at the first time scale, calculate the difference vector between the current distortion feature vector and the distortion feature vector at the previous time. S42, calculate the magnitude of the difference vector and compare it with the median of the magnitude of the difference vectors of other devices in the device association group at the same time to obtain the relative instantaneous change intensity; S43, extract the projection component of the difference vector in the direction of the local crystal oscillator frequency offset of the device, and use the projection component as a hardware characteristic indicator. S44, on the second time scale, perform linear regression on the distortion feature vector within the preset time window to obtain the rate of change trend, and calculate the variance of the angle between continuous difference vectors as the initial direction stability index. S45, obtain the RF link operating temperature level of each device, map the RF link operating temperature level to a dynamic correction coefficient of the directional stability index, and adjust the initial directional stability index according to the dynamic correction coefficient to obtain the standard directional stability index.

[0036] As described in steps S41-S45 above, the distortion of radio frequency signals is not static and constant, but exhibits different patterns of change over time: static multipath distortion is affected by a fixed propagation path, and the distortion characteristics change slowly and the trajectory is stable; dynamic occlusion distortion is caused by sudden occlusion (such as human movement or temporary obstruction by objects) leading to abrupt changes in the propagation path, and the distortion characteristics will fluctuate violently in an instant. At the same time, the hardware characteristics of the equipment (such as crystal oscillator frequency drift) and environmental factors (such as changes in the temperature of the radio frequency link) will also interfere with the distortion characteristics. For example, high temperature will exacerbate crystal oscillator drift, leading to a decrease in the stability of phase distortion. Relying solely on a single time scale or a single dimension of characteristics makes it difficult to distinguish between "distortion changes caused by environmental channels" and "distortion changes caused by the hardware itself," and also fails to accurately identify the instantaneous and long-term characteristics of distortion. Therefore, this invention extracts information on the changing characteristics of the device through multi-dimensional analysis at the time domain scale, specifically including relative instantaneous change intensity, hardware characteristic indicators, change trend rate, and standard direction stability indicators. It quantifies the dynamic characteristics of distortion from four dimensions: instantaneous fluctuation, hardware influence, long-term trend, and evolutionary stability, providing key judgment criteria for accurately distinguishing between static multipath distortion and dynamic occlusion distortion, thereby improving the accuracy of distortion classification and the adaptability of correction strategies.

[0037] Specifically, this invention calculates the difference vector between the current distortion feature vector and the previous time step on a first time scale (short time scale) to capture the instantaneous changes in distortion. The setting of the first time scale needs to match the response requirements of the instantaneous changes in distortion, such as 10 communication frame periods (approximately 100ms, which can cover the duration of a single sudden blockage and avoid noise false triggering due to excessively short time). The difference vector is calculated by subtracting each dimension, that is, subtracting the corresponding dimension value of the vector at the previous time step from each dimension value of the current vector (such as the phase error and amplitude error of each key frequency point). The resulting difference vector directly reflects the instantaneous change in distortion in that dimension. Calculating the relative instantaneous change intensity based on the difference vector involves eliminating individual noise interference through group comparison and quantifying the degree of anomalousness of the device's instantaneous change relative to the group. Technically, the magnitude of the difference vector is first calculated using the vector magnitude formula, comprehensively reflecting the instantaneous change amplitude of distortion across all dimensions. For example, if the difference vector is [-2°, -0.5dB, -3°, -1dB], its magnitude can be obtained by taking the square root of the sum of the squares of each dimension value, representing the overall instantaneous fluctuation level of the device's current distortion. Next, the difference vector magnitudes of other devices within the device's associated group at the same time are retrieved (this data is also retrieved from the feature history database by device association group identifier and timestamp). The median of these magnitudes is calculated (the median is used instead of the average because it has stronger resistance to extreme values ​​and can more accurately reflect the normal instantaneous change level of the group). Finally, the difference vector magnitude of the current device is compared with this median to obtain the relative instantaneous change intensity. For example, if the current device's modulus is 0.6, and the median modulus of other devices in the group at the same time is 0.2, then the relative instantaneous change intensity is 3.0. This indicates that the instantaneous distortion change of this device is significantly higher than the group level, and there is a high probability of sudden distortion such as dynamic occlusion. If the ratio is 0.8, it means that the change is within the normal range of the group, and it is more likely to be a slow fluctuation of static multipath. By introducing the group median as a reference benchmark, we can effectively distinguish between "individual sudden distortion" and "group common fluctuation" (such as increased instantaneous changes of all devices due to enhanced overall environmental interference), avoiding the problem of misjudging group common fluctuations as individual sudden distortion, thereby improving the accuracy of instantaneous change determination.

[0038] To quantify the contribution of hardware clock drift to distortion by projecting the differential vector onto the crystal oscillator frequency offset direction, it is necessary to first clarify the calibration method of the crystal oscillator frequency offset direction. At the factory, the frequency offset of the crystal oscillator is measured under different temperatures and voltages, and the corresponding phase change direction is recorded (crystal frequency offset causes the signal phase to change linearly with time, and the offset direction corresponds to the positive or negative trend of the phase change). This direction is stored as a unit vector in the device feature database as the reference direction for subsequent projection calculations. Then, the projection component of the differential vector onto this reference direction is calculated. The projection is achieved using the vector dot product formula, i.e., the dot product of the differential vector and the unit vector of the crystal oscillator frequency offset direction. The magnitude of this component directly reflects the proportion of distortion change caused by crystal oscillator drift in the differential vector. For example, if the magnitude of the differential vector is 0.6, its projection component onto the crystal oscillator frequency offset direction is 0.2, indicating that approximately 33% of the current instantaneous distortion change is caused by crystal oscillator drift, and the remaining part is caused by changes in the environmental channel. Existing solutions typically attribute all distortion changes to the environmental channel, ignoring the influence of the hardware itself. This leads to misjudging the distortion type when hardware drift is significant (such as in high-temperature environments) (misjudging phase changes caused by crystal drift as dynamic occlusion). However, this solution, by extracting the projection components, can clearly define the contribution ratio of hardware factors, providing a basis for eliminating hardware interference in distortion classification.

[0039] By analyzing the features of the second time scale (long time scale), the rate of change and the stability index of the initial direction are extracted, which can quantify the long-term variation law and evolution trajectory stability of distortion. Technically, the second time scale is set to 100 communication frame periods (approximately 1 second, which can cover the slow change period of static multipath distortion while avoiding trend lag due to excessive time). The rate of change is calculated using a linear regression algorithm, with time as the independent variable (e.g., 100 frame periods correspond to the time series t1-t100), and the values ​​of each dimension of the distortion feature vector within a preset time window as the dependent variable (e.g., 2.41 for each time point). The GHz phase error value is fitted using the least squares method to a linear equation y=kt+b, where the slope k is the rate of change in that dimension. The mean or maximum value of all dimensional rates is taken as the overall rate of change. The smaller the absolute value of the rate, the smoother the long-term distortion change, which conforms to the characteristics of static multipath. The initial directional stability index is obtained by calculating the variance of the angle between continuous difference vectors. The continuous difference vectors are derived from the calculation results of adjacent time points in the previous steps. The angle is calculated using the vector angle formula (cosine theorem). The variance reflects the degree of dispersion of the angle. The smaller the variance, the smoother the directional change of the difference vector, that is, the more stable the distortion evolution trajectory. Through long-term trend and direction analysis, complementing the instantaneous change analysis, a long-term dimension basis is provided for distinguishing between slow and stable static distortion and instantaneous dynamic distortion.

[0040] To eliminate the interference of hardware temperature drift on stability assessment, a dynamic correction for the initial directional stability index is introduced by using RF link operating temperature levels. These RF link operating temperature levels are acquired in real-time by the device's built-in temperature sensor and are categorized into three levels: low temperature (<10℃), normal temperature (10℃-35℃), and high temperature (>35℃). The acquisition frequency is synchronized with the generation frequency of the distortion feature vector (e.g., every 100ms). Subsequently, a mapping relationship is established between the temperature levels and the dynamic correction coefficient. This mapping is calibrated based on hardware test data; for example, in low-temperature environments, crystal oscillator drift is smaller, and the correction coefficient is 0.8 (minus...). The initial directional stability index is set to 1.0 (uncorrected) at room temperature, while at high temperatures, crystal oscillator drift intensifies, resulting in a correction factor of 1.2 (enhanced index weight). The logic behind setting the correction factor is that the further the temperature deviates from room temperature, the greater the interference of hardware on directional stability. By adjusting the index through the correction factor, it is ensured that the index can truly reflect the stability caused by the environmental channel. Finally, the initial directional stability index is multiplied by the corresponding dynamic correction factor to obtain the standard directional stability index, thereby more accurately reflecting the distortion stability of the environmental channel and ensuring that the judgment benchmark of the directional stability index is consistent under different temperature environments, thus improving the environmental adaptability of distortion classification.

[0041] In one embodiment, the steps of obtaining phase distortion components and amplitude distortion components based on the distortion feature vector, classifying the phase distortion components and amplitude distortion components based on the historical distortion feature vector, the statistical feature data, and the change characteristic information to obtain the distortion type, and generating final correction parameters based on the distortion type include: S51, obtain a first preset high quantile threshold by statistically analyzing the historical distribution of the trace of the covariance matrix, obtain a second preset high quantile threshold by statistically analyzing the distribution of the variance ratio of the phase distortion component and the amplitude distortion component in the historical distortion feature vector, and set a periodic update strategy. S52, calculate the ratio of the variance of the phase distortion component to the variance of the amplitude distortion component; S53, establish a first comprehensive judgment condition based on the comparison results of the ratio with the second preset high quantile threshold, the comparison results of the change trend rate and the relative instantaneous change intensity, the comparison results of the standard direction stability index with the preset index threshold, the comparison results of the Mahalanobis distance between the distortion feature vector and the group mean vector, and the comparison results of the hardware characteristic index with the preset hardware characteristic threshold. S54, establish a second comprehensive judgment condition based on the comparison result of the relative instantaneous change intensity and the preset change intensity threshold, the comparison result of the ratio and the second preset high quantile threshold, and the comparison result of the current trace value of the covariance matrix and the first preset high quantile threshold. S55, obtain the distortion type according to the first comprehensive judgment condition and the second comprehensive judgment condition, wherein the distortion type includes static multipath distortion and dynamic occlusion distortion; S56, calculate the correction confidence factor of each device in the device association group, and obtain the final correction parameters based on the distortion type and the correction confidence factor.

[0042] As described in steps S51-S56 above, due to the different sources of radio frequency signal distortion, their variation patterns and correction requirements differ fundamentally: static multipath distortion is caused by fixed propagation paths (such as reflections from walls or furniture), with slow changes in distortion characteristics and stable trajectories, requiring reliance on common group data to improve correction stability; dynamic occlusion distortion is caused by sudden changes in propagation paths (such as human movement or temporary occlusion), with instantaneous and drastic fluctuations in distortion characteristics, requiring priority adaptation to individual real-time data for rapid response. Simultaneously, device hardware characteristics (such as crystal oscillator drift) and environmental interference (such as electromagnetic noise) can interfere with distortion characteristics. To prevent hardware-induced distortion from being confused with channel-induced distortion, resulting in insufficient accuracy in stable scenarios or delayed response in sudden scenarios, this invention constructs a multi-dimensional judgment system and a confidence-weighted parameter generation mechanism to achieve accurate distortion classification and optimized correction parameters.

[0043] Specifically, the first preset high quantile threshold is obtained by statistically analyzing the historical distribution of the trace of the covariance matrix within the group of related devices. The trace of the covariance matrix reflects the overall dispersion of distortion characteristics within the group. The covariance matrices of the past 100 calibration cycles are retrieved from historical statistical feature data, the trace of each matrix is ​​calculated, and the 75th percentile is taken as the first preset high quantile threshold after sorting by size from smallest to largest (this quantile eliminates extreme value interference and reflects the normal dispersion level of the group). The second preset high quantile threshold is obtained by statistically analyzing the distribution of the ratio of the variance of the phase distortion component to the variance of the amplitude distortion component in the historical distortion feature vector. Historical distortion feature vectors of devices within the group are retrieved from the feature history database, the ratio of the phase variance to the amplitude variance of each vector is calculated, and the 75th percentile is also taken as the second preset high quantile threshold (used to distinguish the dominant position of phase and amplitude distortion). A periodic update strategy is also set, such as re-statistically updating the two thresholds every 100 calibration cycles, to ensure that the benchmark can adapt to long-term environmental changes (such as hardware characteristic drift caused by seasonal temperature changes). By calculating the ratio of the variance of the current phase distortion component to the variance of the amplitude distortion component, we can provide a basis for the classification of distortion based on whether phase or amplitude is dominant. If the ratio is greater than 1, it indicates that the phase distortion fluctuation is more significant, which is consistent with the phase-dominant characteristics of static multipath distortion. If the ratio is less than 1, it indicates that the amplitude distortion fluctuation is more significant, which is consistent with the amplitude-dominant characteristics of dynamic occlusion distortion.

[0044] By constructing a multi-condition cross-validation of the first and second comprehensive judgment conditions, respectively used to determine static multipath distortion and dynamic occlusion distortion, accurate classification of distortion types can be achieved. The first comprehensive judgment condition integrates multi-dimensional indicators to exclude hardware interference and dynamic interference. Specifically, the comparison result between the ratio and the second preset high quantile threshold is calculated using the formula Cur... Rat >k1×Rat nor In the formula, Cur Rat Rat represents the ratio. nor The second preset high quantile threshold, k1 is set to 1.2, ensures that the phase distortion is significantly higher than the normal level of the group and conforms to the phase-dominant characteristics of static multipath. Secondly, the rate of change (reflecting the speed of long-term change) is less than the relative instantaneous change intensity (reflecting instantaneous fluctuation), indicating that the distortion is slow in the long term and the instantaneous fluctuation is only noise, which conforms to the stable characteristics of static multipath. Thirdly, the standard direction stability index is lower than the preset index threshold (e.g., 0.5), indicating that the distortion evolution trajectory is stable and there is no sudden change in direction. At the same time, the Mahalanobis distance between the current distortion feature vector and the group mean vector (calculated based on the covariance matrix, which can eliminate dimensional correlation) is lower than k2 times the historical average of this distance (k2 is set to 1.5), indicating that the individual distortion conforms to the commonality of the group and there is no abnormal deviation. Finally, the hardware characteristic index (obtained from S43, reflecting the contribution of crystal oscillator drift) is lower than the preset hardware characteristic threshold (e.g., 0.3), indicating that the distortion is mainly caused by the channel and hardware interference is excluded. When all conditions are met at the same time, it is initially judged as static multipath distortion. The second comprehensive judgment criterion focuses on sudden characteristics and group interference: First, the relative instantaneous change intensity is greater than the preset change intensity threshold (the preset change intensity threshold is 2.0 to ensure that the instantaneous change is significantly higher than the normal level of the group and meets the sudden characteristics of dynamic occlusion); second, Cur... Rat <Rat nor This indicates that amplitude distortion is dominant, consistent with signal attenuation characteristics caused by occlusion. Furthermore, the current trace value of the covariance matrix is ​​greater than k3×Tra. nor (Tra) nor The first preset high quantile threshold (k3 is set to 1.3) indicates an abnormally high degree of dispersion in group distortion, possibly due to large-scale occlusion interference (such as multiple people moving simultaneously causing abrupt changes in the propagation path of multiple devices). When all conditions are met simultaneously, it is judged as dynamic occlusion distortion. It should be noted that the preset index thresholds, preset change intensity thresholds, and preset hardware characteristic thresholds in the above scheme are obtained through laboratory scenario testing or on-site adaptation calibration. If the maximum value within the normal range is taken, k1, k2, and k3 are determined through multi-scenario measured data, and their effectiveness is verified through parameter iteration and misclassification rate statistics. This multi-dimensional cross-validation scheme can eliminate the one-sidedness of a single index, prevent misclassification, and thus improve classification accuracy.

[0045] Based on the judgment results, the distortion type can be clearly identified as static multipath distortion or dynamic occlusion distortion. If only the first comprehensive judgment condition is met, it is judged as static multipath distortion; if only the second comprehensive judgment condition is met, it is judged as dynamic occlusion distortion; if neither is met, a general correction parameter is temporarily used and the device is marked as abnormal. The final correction parameters are obtained based on the distortion type and the correction confidence factor, ensuring that the correction parameters accurately adapt to the current state of the device in both static multipath distortion and dynamic occlusion distortion scenarios, while balancing correction accuracy and response speed.

[0046] In one embodiment, the step of obtaining the final correction parameters based on the distortion type and the correction confidence factor of each device within the computing device association group includes: S561, Obtain preamble symbol synchronization deviation data based on the reference signal segment, calculate the variance of the preamble symbol synchronization deviation based on the preamble symbol synchronization deviation data, and calculate the correction confidence factor for each device based on the variance of the preamble symbol synchronization deviation, using the following formula: ; In the formula, This indicates the corrected confidence factor. This indicates the confidence factor corrected at the previous time step. This represents the weighting coefficient for the corrected residuals. This represents the preamble synchronization deviation weighting coefficient. This indicates the mean of the corrected residual exponential decay. The variance of the preamble symbol synchronization deviation is represented, where the mean of the exponential decay of the corrected residual and the variance of the preamble symbol synchronization deviation are normalized results. S562, obtain the historical calibration parameters of each device in the device association group, and generate the group recommended calibration parameters by weighting the calibration confidence factor of each device. S563 calculates the real-time correction parameters generated independently by each device through an iterative method. In the process of generating the real-time correction parameters, the peak information in the preamble symbol synchronization deviation data is used as the initial iteration value. S564, Obtain a baseline weight based on the distortion type, and obtain a mixed weight based on the baseline weight and the correction confidence factor; S565, the final correction parameters are obtained based on the mixed weights, the group-recommended correction parameters, and the real-time correction parameters, using the following formula: ; In the formula, Indicates the final correction parameters. Indicates real-time correction parameters. Indicates the recommended calibration parameters for the group. Indicates mixed weights, ;in, The baseline weights are set based on the distortion type. This indicates the corrected confidence factor. This represents the fine-tuning coefficient. This represents the confidence level neutral point.

[0047] As described in steps S561-S565 above, RF signal correction needs to address both "group-wide common stability requirements" and "individual instantaneous adaptation requirements": devices within a device association group have similar environments and hardware, and their historical correction parameters have group reference value, making them suitable for stable scenarios such as static multipath. However, when facing sudden distortions such as dynamic occlusion, group data updates lag, failing to respond promptly to individual instantaneous changes. On the other hand, real-time correction parameters generated independently by each device can accurately capture the current distortion state, making them suitable for dynamic scenarios, but they are susceptible to individual noise interference and lack stability. Furthermore, different devices exhibit varying correction reliability (e.g., some devices have small past correction residuals, high synchronization accuracy, and higher confidence). Applying the same weight to all devices would result in the underutilization of experience from high-reliability devices and amplification of errors from low-reliability devices. Therefore, this invention quantifies device reliability through a correction confidence factor and dynamically adjusts the fusion weight based on distortion type to achieve an optimal balance between group and individual. In both static multipath distortion and dynamic occlusion distortion scenarios, correction parameters can accurately adapt to the current state of the devices, while simultaneously balancing correction accuracy and response speed.

[0048] Specifically, the previous moment's correction confidence factor is retrieved from the device correction database by device identifier and timestamp, with an initial value of 1.0; the correction residual weight coefficient is 0.6 (emphasizing past correction effects), and the preamble synchronization deviation weight coefficient is 0.4 (a higher coefficient indicates emphasis on the current correction). Both are normalized weights, and their sum equals 1; the mean of correction residual exponential decay is calculated from historical correction data, retrieving the correction residuals (errors between the corrected signal and the ideal signal) from the past 10 correction cycles, and calculating them using the exponential decay formula. The smaller the residual, the closer the mean of correction residual exponential decay is to 0, the closer the exponential term is to 1, and the higher the confidence level; the variance of the preamble symbol synchronization deviation is obtained from the preamble synchronization data. The preamble symbol synchronization deviation is the difference between the actual arrival time and the ideal time when receiving the preamble. The variance of this deviation sequence is calculated. The smaller the synchronization deviation, the smaller the variance of the preamble symbol synchronization deviation, the closer the exponential term is to 1, and the higher the confidence level. By fusing preamble synchronization deviation data with correction residual data, the reliability of equipment correction can be quantified.

[0049] By integrating the collective experience of device association groups, stable benchmark calibration parameters are generated. Specifically, the historical calibration parameters of all devices within the group are retrieved from the group's historical calibration database (each device's historical parameters must be stored in association with a calibration confidence factor). A weighted average is then calculated based on the calibration confidence factor. The group's recommended calibration parameter is equal to the sum of the calibration confidence factor multiplied by the device's historical calibration parameter for all devices, divided by the sum of the calibration confidence factors for all devices. Devices with higher confidence levels have greater weights on their historical parameters, effectively reducing the interference of low-reliability devices on the group's recommended calibration parameters. For example, if a device association group has 3 devices, with device 1 having a calibration confidence factor of 0.9 and a historical calibration parameter of 1.2, device 2 having a calibration confidence factor of 0.8 and a historical calibration parameter of 1.1, and device 3 having a calibration confidence factor of 0.6 and a historical calibration parameter of 0.8, then the group recommended calibration parameter is the sum of 0.9*1.2 + 0.8*1.1 + 0.6*0.8, divided by the sum of 0.9 + 0.8 + 0.6, which is approximately 1.06. The group recommended calibration parameter incorporates the experience of high-reliability devices, has strong stability, and is suitable for static multipath distortion scenarios.

[0050] The generation of real-time correction parameters can adapt to the current instantaneous distortion of the device, generating individual parameters with rapid response. These parameters are calculated using an iterative method (such as the Least Mean Square Error (LMS) algorithm): with phase distortion and amplitude distortion components as error targets, the iterative goal is to minimize the corrected error. The key innovation lies in the selection of the initial iteration value. Instead of using traditional random initial values, it reuses the peak information (the maximum or minimum value in the deviation sequence) from the preamble symbol synchronization deviation data. This peak directly reflects the most significant timing offset of the current device (e.g., abrupt changes in the propagation path caused by dynamic occlusion will increase the synchronization deviation peak). Using this as the initial value allows the iterative algorithm to start from a range "close to the optimal value," significantly reducing the number of iterations. This not only reduces computational power consumption and adapts to the hardware limitations of low-cost devices but also offers faster computation speed, meeting the requirements of real-time correction. Simultaneously, the correction residual needs to be calculated in real-time during the iteration process. The iteration stops when the residual is less than a preset threshold (e.g., 0.1 dB), and the real-time correction parameters are output.

[0051] The calculation of the hybrid weights begins by setting a baseline weight based on the distortion type. When the distortion is determined to be static multipath distortion, since this type of distortion is caused by a fixed propagation path, the stability of the group's historical parameters is more valuable for reference. Therefore, the baseline hybrid weight is set to 0.2, favoring the group's recommended correction parameters. When the distortion is determined to be dynamic occlusion distortion, this type of distortion is caused by sudden changes in the propagation path. Individual real-time parameters can more accurately capture instantaneous changes. Therefore, the baseline hybrid weight is set to 0.7, favoring real-time correction parameters. When the distortion is determined to be unknown or a hybrid type (such as the simultaneous presence of slight multipath and transient occlusion), since the dominant distortion type cannot be clearly identified, the baseline hybrid weight is set to 0.5, maintaining a neutral stance and balancing group and individual parameters. Subsequently, the hybrid weights are fine-tuned using a formula based on the correction confidence factor. The fine-tuning coefficient can be 0.2 (calibrated through scene testing to ensure both the fine-tuning effect and avoid excessive deviation from the baseline), and 0.5 is the confidence neutral point. When the calibration confidence factor is greater than 0.5, it indicates that the current calibration basis of the device is reliable, the mixed weight is reduced, and the calibration parameters recommended by the more trusted group are relied upon. When the calibration confidence factor is less than 0.5, it indicates that the current calibration basis of the device is not stable enough, the mixed weight is increased, and the device relies more on real-time calibration parameters. By adjusting the two dimensions of distortion type (scenario requirements) and confidence (device reliability), adaptive optimization of the weights is achieved, ensuring that the optimal fusion ratio can be selected under different scenarios and device conditions.

[0052] The final correction parameters are generated by weighted fusion of real-time correction parameters and group-recommended correction parameters through mixed weights. This achieves coordinated optimization of correction accuracy, response speed and signal stability under different distortion scenarios. It solves the problems of insufficient accuracy in static scenarios and lag in response in dynamic scenarios of traditional fixed parameter schemes, and avoids signal distortion caused by over-reliance on individual or group data.

[0053] In one embodiment, the step of constructing and applying a phase compensation filter and an amplitude equalization filter based on the final correction parameters, the phase distortion component, and the amplitude distortion component to obtain the final corrected signal includes: S61, Construct the frequency response of the phase filter based on the phase distortion component; S62, the values ​​of the phase distortion component at multiple key frequency points are extended to the full frequency band by cubic spline interpolation, and the interpolated phase distortion component is converted to the time domain to obtain the coefficients of the finite-length unit impulse response filter; S63, obtain the phase component in the final correction parameters, update the coefficients of the finite-length unit impulse response filter according to the phase component, and perform convolution operation on the received signal using the piecewise overlapping addition method to perform real-time phase compensation and obtain the phase-corrected signal. S64, the phase-corrected signal is divided into multiple frequency sub-bands, and the received signal power of each frequency sub-band is calculated; S65, compare the received signal power of each frequency sub-band with the target power, calculate the gain factor of each sub-band, obtain the amplitude component in the final correction parameter, and adjust the gain of each frequency sub-band according to the amplitude component to obtain the equalized sub-band signal. S66: All equalized sub-band signals are merged into a complete signal within the amplitude equalization filter to obtain the final corrected signal. The peak factor of the phase-corrected signal is monitored in real time, and the adjustment speed of the gain factor is dynamically adjusted according to the relationship between the peak factor and a preset threshold.

[0054] As described in steps S61-S66 above, after the RF signal undergoes distortion classification and parameter generation in the early stage, the correction parameters need to be converted into actual signal correction effects through hardware-implementable filtering operations: phase distortion is caused by signal timing offset (such as delay difference in multipath propagation), and the signal phase needs to be adjusted by time-domain convolution of the phase compensation filter; amplitude distortion is caused by signal strength fluctuations (such as attenuation due to obstruction), and the amplitude consistency needs to be restored by adjusting the subband gain of the amplitude equalization filter. Therefore, based on the final correction parameters, phase distortion components, and amplitude distortion components, this invention constructs and applies phase compensation filters and amplitude equalization filters in stages. Through time-domain convolution, subband gain adjustment, and dynamic optimization of peak factor, it achieves pipelined real-time correction of the received signal, and finally outputs a complete signal after distortion elimination. In both static multipath distortion and dynamic obstruction distortion scenarios, it can more accurately compensate for phase deviation and equalize amplitude fluctuations, while avoiding signal distortion and computational overload.

[0055] Specifically, due to the large intervals between key frequencies (such as 2.41GHz and 2.43GHz), direct use for filtering would lead to abrupt changes in compensation within the frequency band, introducing new distortions. Therefore, cubic spline interpolation is used to smoothly extend the phase compensation amount of the key frequencies to the entire frequency band. This interpolation method ensures a smooth transition in compensation amounts between adjacent frequencies by constructing a second-order continuously differentiable piecewise polynomial. For example, when the compensation is +30° at 2.41GHz and +50° at 2.43GHz, the interpolated compensation amount at 2.42GHz is +40°, without any abrupt change risk. Subsequently, the full-band phase compensation amount is converted into coefficients of a finite-length unit impulse response filter through inverse Fourier transform. The coefficient length is set according to the balance between accuracy and computing power (e.g., 64th order, adaptable to the computing power of low-cost 8-bit MCUs). Compared with the linear interpolation of existing technologies, cubic spline interpolation results in lower phase compensation errors, and is particularly suitable for continuous phase distortion caused by multipath propagation, improving the continuity and accuracy of full-band phase compensation.

[0056] In this scheme, the coefficients of the finite-length unit impulse response filter are not fixed, but dynamically updated based on the phase component in the final correction parameters and the distortion type: In static multipath distortion, the phase component changes slowly, so the coefficients are updated every first preset period (e.g., 100ms) to reduce computational consumption; in dynamic occlusion distortion, the phase component may fluctuate slightly with abrupt amplitude changes, so the coefficients are updated every second preset period (e.g., 20ms), and only the coefficients of the corresponding device-related group are updated to avoid redundant calculations across the entire system. The convolution operation uses a segmented overlapping addition method, dividing the received signal into 256 sampling points. Each segment is convolved with the coefficients of the finite-length unit impulse response filter, and then overlapped by 64 sampling points (1 / 4 of the coefficient length) before being added, avoiding signal truncation distortion. This allows the filter to adapt to changes in distortion type in real time, balancing static accuracy and dynamic response.

[0057] The phase-corrected signal is then divided into multiple frequency sub-bands with a 20MHz bandwidth (e.g., 2.4GHz-2.46GHz divided into 3 sub-bands). The received signal power of each sub-band is calculated (by the mean square of the sampled values ​​within the sub-band). An initial gain factor is then calculated based on the difference between the sub-band power and the target power (e.g., -50dBm, an ideal value set by the protocol). This is then fine-tuned using the amplitude component in the final correction parameters. During dynamic blockage distortion, the amplitude component fluctuates significantly, so the gain adjustment rate is increased from 0.1dB / step to 0.2dB / step to ensure fast response. During static multipath distortion, the amplitude component is stable, so the adjustment rate is reduced to 0.05dB / step to avoid over-adjustment. Compared to the global gain of existing technologies, sub-band fine-tuning results in lower amplitude errors, allowing for more precise correction of non-uniform amplitude distortion across different frequency bands.

[0058] To address the signal saturation issue caused by the lack of peak protection in existing technologies, the peak factor, calculated as the ratio of peak power to average power of the phase-corrected signal, is updated in real-time every 10 sampling points. A preset threshold is set based on the signal modulation method (e.g., a threshold of 6dB for QPSK modulation signals; exceeding this threshold can easily lead to the power amplifier's nonlinear region). When the peak factor is less than 6dB, signal amplitude fluctuations are small, and the gain adjustment speed is reduced to 0.05dB / step to avoid over-adjustment and signal instability. When the peak factor is greater than 6dB, the signal has a risk of spikes, so the adjustment speed is increased to 0.2dB / step to quickly suppress spikes. By forming a closed loop through peak feedback, the signal remains within a safe range during amplitude equalization, preventing the introduction of new distortions.

[0059] like Figure 2 As shown, the present invention also provides a real-time processing system for radio frequency signal distortion correction of communication devices, comprising: The signal identification module is used to dynamically extract reference signal segments from the communication data stream and obtain the device identifier corresponding to the reference signal segments; The feature extraction module is used to obtain the ideal reference signal template of the corresponding device based on the device identifier, and to extract the distortion feature vector based on the reference signal segment and the ideal reference signal template. The device grouping module is used to obtain the historical distortion feature vector, long-term average received signal strength indication value and channel impulse response information of each device, divide the device association group according to the long-term average received signal strength indication value and channel impulse response information, and calculate the statistical feature data of the devices in the device association group according to the historical distortion feature vector. The time-varying analysis module is used to obtain the change characteristic information of each device based on the distortion feature vector on a time-domain scale. The change characteristic information includes relative instantaneous change intensity, hardware characteristic indicators, change trend rate and standard direction stability indicators. The distortion classification module is used to obtain phase distortion components and amplitude distortion components based on the distortion feature vector, classify the phase distortion components and amplitude distortion components based on the historical distortion feature vector, the statistical feature data and the change characteristic information to obtain the distortion type, and generate the final correction parameters based on the distortion type. The signal correction module is used to construct and apply a phase compensation filter and an amplitude equalization filter based on the final correction parameters, the phase distortion component and the amplitude distortion component to obtain the final corrected signal. The adjustment module is used to calculate the quality index of the corrected signal and dynamically adjust the correction parameters of the phase compensation filter and amplitude equalization filter based on the quality index and device identification.

[0060] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a real-time processing method for correcting radio frequency signal distortion in a communication device.

[0061] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a real-time processing method for correcting radio frequency signal distortion in a communication device.

[0062] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0063] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A real-time processing method for correcting the distortion of radio frequency signals of a communication device, characterized in that, The method comprises the following steps: extracting a reference signal segment from a communication data stream and obtaining a device identifier corresponding to the reference signal segment; obtaining an ideal reference signal template of a corresponding device based on the device identifier, and extracting a distortion feature vector based on the reference signal segment and the ideal reference signal template; obtaining a historical distortion feature vector, a long-term average received signal strength indicator value and channel impulse response information of each device, dividing a device association group according to the long-term average received signal strength indicator value and the channel impulse response information, and calculating statistical characteristic data of devices in the device association group according to the historical distortion feature vector; obtaining variation characteristic information of each device based on the distortion feature vector in the time domain scale, wherein the variation characteristic information comprises a relative instantaneous variation intensity, a hardware characteristic index, a variation trend rate and a standard direction stability index; obtaining a phase distortion component and an amplitude distortion component based on the distortion feature vector, classifying the phase distortion component and the amplitude distortion component based on the historical distortion feature vector, the statistical characteristic data and the variation characteristic information to obtain a distortion type, and generating a final correction parameter based on the distortion type; constructing and applying a phase compensation filter and an amplitude equalization filter based on the final correction parameter, the phase distortion component and the amplitude distortion component to obtain a final corrected signal; calculating a quality index of the corrected signal, and dynamically adjusting the correction parameters of the phase compensation filter and the amplitude equalization filter based on the quality index and the device identifier.

2. The real-time method for RF signal distortion correction of a communication device according to claim 1, wherein, The step of obtaining an ideal reference signal template of a corresponding device based on the device identifier, and extracting a distortion feature vector based on the reference signal segment and the ideal reference signal template comprises the following steps: performing fast Fourier transform on the reference signal segment to obtain a first frequency domain representation, and performing fast Fourier transform on the ideal reference signal template to obtain a second frequency domain representation; calculating a frequency domain error function between the first frequency domain representation and the second frequency domain representation; decomposing the frequency domain error function into a phase error component and an amplitude error component; performing piecewise linear fitting on the phase error component and the amplitude error component to extract error values of multiple key frequency points, and forming a distortion feature vector.

3. The real-time method for RF signal distortion correction of a communication device according to claim 1, wherein, The step of obtaining a historical distortion feature vector, a long-term average received signal strength indicator value and channel impulse response information of each device, dividing a device association group according to the long-term average received signal strength indicator value and the channel impulse response information, and calculating statistical characteristic data of devices in the device association group according to the historical distortion feature vector comprises the following steps: obtaining a long-term average received signal strength indicator value of each device; grouping communication devices with the same device type and a long-term average received signal strength indicator value difference within a first preset threshold into the same candidate device set to obtain a plurality of candidate device sets; extracting channel impulse response information of devices in the same candidate device set during the reference signal segment, and calculating waveform similarity of the channel impulse response information between devices; grouping communication devices with a waveform similarity higher than a second preset threshold into the same device association group. Obtaining a historical distortion feature vector of the device association group, calculating a mean vector and a covariance matrix of the historical distortion feature vector of the device association group, and taking the mean vector and the covariance matrix as statistical characteristic data.

4. The real-time method for RF signal distortion correction of a communication device according to claim 3, wherein, The step of obtaining the change characteristic information of each device based on the distortion feature vector in the time domain scale comprises: In the first time scale, a difference vector between the current distortion feature vector and the previous distortion feature vector is calculated; The modulus of the difference vector is calculated, and compared with the median of the modulus of the difference vector of other devices in the device association group at the same time to obtain a relative instantaneous change strength; A projection component of the difference vector in the direction of the local crystal oscillator frequency offset of the device is extracted, and the projection component is taken as a hardware characteristic index; In the second time scale, linear regression is performed on the distortion feature vectors in a preset time window to obtain a change trend rate, and an included angle variance between continuous difference vectors is calculated as an initial direction stability index; A radio frequency link operating temperature level of each device is obtained, the radio frequency link operating temperature level is mapped to a dynamic correction coefficient of the direction stability index, and the initial direction stability index is adjusted according to the dynamic correction coefficient to obtain a standard direction stability index.

5. The real-time method for RF signal distortion correction of a communication device according to claim 4, wherein, The step of obtaining the phase distortion component and the amplitude distortion component according to the distortion feature vector, classifying the phase distortion component and the amplitude distortion component according to the historical distortion feature vector, the statistical characteristic data and the change characteristic information to obtain a distortion type, and generating a final correction parameter based on the distortion type comprises: A first preset high-quantile threshold is obtained by statistically analyzing the historical distribution of the trace of the covariance matrix, and a second preset high-quantile threshold is obtained by statistically analyzing the distribution of the ratio of the variance of the phase distortion component to the variance of the amplitude distortion component in the historical distortion feature vector; The ratio of the variance of the phase distortion component to the variance of the amplitude distortion component is calculated; A first comprehensive judgment condition is established according to the comparison result of the ratio and the second preset high-quantile threshold, the comparison result of the change trend rate and the relative instantaneous change strength, the comparison result of the standard direction stability index and a preset index threshold, the comparison result of the Mahalanobis distance between the distortion feature vector and the group mean vector, and the comparison result of the hardware characteristic index and a preset hardware characteristic threshold; A second comprehensive judgment condition is established according to the comparison result of the relative instantaneous change strength and a preset change strength threshold, the comparison result of the ratio and the second preset high-quantile threshold, and the comparison result of the current trace value of the covariance matrix and the first preset high-quantile threshold; The distortion type is obtained according to the first comprehensive judgment condition and the second comprehensive judgment condition, wherein the distortion type comprises static multipath distortion and dynamic occlusion distortion; A correction confidence factor of each device in the device association group is calculated, and a final correction parameter is obtained based on the distortion type and the correction confidence factor.

6. The real-time method for RF signal distortion correction of a communication device according to claim 5, wherein, The step of calculating the correction confidence factor of each device in the device association group and obtaining the final correction parameter based on the distortion type and the correction confidence factor comprises: According to the reference signal segment, preamble symbol synchronization deviation data is obtained, and a variance of the preamble symbol synchronization deviation is calculated according to the preamble symbol synchronization deviation data; a correction confidence factor of each device is calculated based on the variance of the preamble symbol synchronization deviation; A historical correction parameter of each device in the device association group is obtained, and a group recommended correction parameter is generated by weighted average according to the correction confidence factor of each device; A real-time correction parameter independently generated by each device is calculated by an iterative method, wherein peak value information in the preamble symbol synchronization deviation data is used as an initial iterative value in the generation process of the real-time correction parameter; A reference weight is obtained according to the distortion type, and a mixing weight is obtained according to the reference weight and the correction confidence factor; A final correction parameter is obtained according to the mixing weight, the group recommended correction parameter and the real-time correction parameter.

7. The real-time method for RF signal distortion correction of a communication device according to claim 1, wherein, The step of constructing and applying a phase compensation filter and an amplitude equalization filter according to the final correction parameter, the phase distortion component and the amplitude distortion component to obtain a final corrected signal comprises: A frequency response of a phase filter is constructed according to the phase distortion component; The values of the phase distortion component at a plurality of key frequency points are extended to a full frequency band by cubic spline interpolation, and the interpolated phase distortion component is converted to a time domain to obtain the coefficients of a finite-length unit impulse response filter; A phase component in the final correction parameter is obtained, the coefficients of the finite-length unit impulse response filter are updated according to the phase component, and a real-time phase compensation is performed on a received signal by convolution operation using a segmented overlap-and-add method to obtain a phase-corrected signal; The phase-corrected signal is divided into a plurality of frequency subbands, and the received signal power of each frequency subband is calculated; The received signal power of each frequency subband is compared with a target power, a gain factor of each subband is calculated, an amplitude component in the final correction parameter is obtained, and each frequency subband is gain-adjusted according to the amplitude component to obtain an equalized subband signal; All equalized subband signals are combined into a complete signal inside an amplitude equalization filter to obtain a final corrected signal.

8. A real-time processing system for distortion correction of radio frequency signals of a communication device, characterized in that The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.