Multi-channel data drift compensation method based on digital information
By calculating the statistical features of multi-channel data to detect drift, establishing an adaptive compensation model for dynamic compensation, and selecting an interpolation strategy based on missing data features for patching, the problems of drift and missing in multi-channel data are solved, and high-quality data output is achieved.
Patent Information
- Application Number
- CN202510188204.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In multi-channel digital information processing, due to the unevenness of hardware circuits, environmental interference and loss factors during signal transmission, data drift and inconsistency are caused. The traditional drift compensation algorithm is difficult to adapt to dynamic changes, and simple difference repair will introduce new errors.
By calculating the mean, standard deviation and correlation coefficient of each channel, we can determine whether there is data drift. If drift is detected, the probability density function is fitted using the kernel density estimation method, an adaptive compensation model is established, the optimal compensation parameters are determined, and dynamic compensation is performed. At the same time, an appropriate interpolation strategy is selected based on the distribution density of the missing data and the local fluctuation characteristics, interpolation patching is performed through local weighted least squares method, and the transition area is smoothed.
Effectively deal with drift and missing problems in multi-channel data, ensure the continuity and smoothness of output data, and improve the quality and availability of data.
Smart Images

Figure CN119646424A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of digital information transmission, and in particular to a multi-channel data drift compensation method based on digital information. Background Art
[0002] In multi-channel digital information processing, the differences and drifts between channels lead to data inconsistency. These differences and drifts are caused by the unevenness of hardware circuits, environmental interference, and loss factors in the signal transmission process. In order to ensure the accuracy and reliability of the data, these differences and drifts need to be compensated and corrected; the traditional drift compensation algorithm is based on a fixed compensation model, which is difficult to adapt to the dynamic changes of multi-channel data. At the same time, simply performing difference repair on the data of each channel will introduce new errors and affect the integrity of the data. The key lies in dynamically adjusting the compensation strategy according to the real-time characteristics of multi-channel data. In the difference repair process, how to choose a suitable interpolation algorithm to fill the data gaps in a smooth transition manner while avoiding the introduction of new distortion.
[0003] The solution provided by the present invention for the above shortcomings is: when processing multi-channel data, first calculate the mean, standard deviation and correlation coefficient of each channel, then determine whether there is data drift based on a preset threshold, if drift is detected, calculate the drift amount, and fit the probability density function through the kernel density estimation method, establish an adaptive compensation model to determine the optimal compensation parameters, and then dynamically compensate and correct the drift channel, and use the cumulative distribution function quantile to perform boundary processing, then, count the proportion and distribution of missing data, select a suitable interpolation strategy according to the distribution density and local fluctuation characteristics, use the local weighted least squares method to interpolate and repair the data vacancy, finally, smooth the repaired transition area, select the optimal smoothing algorithm by minimizing the mean square error and peak signal-to-noise ratio, and finally output high-quality multi-channel data after drift compensation and interpolation repair. Summary of the invention
[0004] In order to solve the problems existing in the above-mentioned prior art, the purpose of the present application is to provide a multi-channel data drift compensation method based on digital information.
[0005] The present application discloses a method for compensating multi-channel data drift based on digital information, comprising the following steps: Step S101, acquiring multi-channel data, calculating the mean, standard deviation and correlation coefficient of each channel, and determining whether the channel has drift according to a preset threshold; Step S102, if there is drift in the channel, the drift amount of the channel is calculated based on the mean estimation and the standard deviation estimation, and the probability density function of the channel data is fitted using the kernel density estimation method to establish an adaptive compensation model; Step S103, determining the optimal compensation parameters for the drift channel through the adaptive compensation model in combination with the dynamic changes of the channel. The selection of the compensation parameters needs to take into account both data smoothness and continuity; Step S104, using the determined compensation parameters to correct the channel data with drift, and using the quantile of the cumulative distribution function to perform boundary processing during the correction process; Step S105, in the drift-corrected multi-channel data, the proportion and distribution of missing data are counted, an interpolation strategy is selected according to the distribution density and local fluctuation characteristics of the missing data, and the order of the interpolation polynomial and the node selection method are determined; Step S106, using the selected interpolation method to repair the data gaps, and using the local weighted least squares method to adjust the weights of the interpolation nodes during the repair; Step S107, smoothing the transition area after interpolation and patching, and selecting the optimal smoothing algorithm by minimizing two distortion measurement indicators, namely, mean square error and peak signal-to-noise ratio; Step S108, outputting the multi-channel data after drift compensation and interpolation repair, wherein the data quality meets the preset continuity and smoothness requirements.
[0006] Preferably, the determining whether drift exists based on a preset threshold value includes: Obtain pre-established mean threshold, standard deviation threshold, and correlation coefficient threshold; The mean, standard deviation and correlation coefficient are compared with corresponding thresholds to obtain a mean judgment value, a standard deviation judgment value and a correlation coefficient judgment value; If at least one of the mean judgment value, the standard deviation judgment value and the correlation coefficient judgment value exceeds the corresponding threshold value, it is determined that an abnormality exists; It is determined whether there is a drift value according to the determination result.
[0007] Preferably, the establishing of the adaptive compensation model comprises: using a mean estimation algorithm to calculate the mean of the channel data; Calculating the standard deviation of the channel data using a standard deviation estimation algorithm; Determine the drift of the channel data using a preset drift calculation formula according to the mean and the standard deviation; For the channel data, a kernel density estimation method is used to fit the probability density function of the channel data; An adaptive compensation model for the channel data is constructed according to the probability density function.
[0008] Preferably, the determining of the optimal compensation parameter comprises: acquiring dynamic change data of the channel, and extracting characteristic values for the drift channel; Establishing an adaptive compensation model according to the characteristic value and determining an initial range of compensation parameters; Using a preset smoothness index to screen the compensation parameters to obtain a preliminary parameter set; Optimizing the preliminary parameter set in combination with a preset continuity index to generate a candidate parameter set; The candidate parameter set is iteratively calculated according to the adaptive compensation model to obtain optimal compensation parameters.
[0009] Preferably, the boundary processing using cumulative distribution function quantiles includes: acquiring original channel data with drift, and determining a compensation parameter set for the data; For the original channel data, the compensation parameters are used to perform data correction processing to obtain corrected channel data; Calculate the cumulative distribution function of the corrected channel data to determine the distribution quantile; Extracting a data boundary threshold according to the distribution quantile; If the corrected channel data exceeds the boundary threshold, the data is truncated using a quantile method to form final corrected data.
[0010] Preferably, the interpolation strategy selected includes: obtaining drift-corrected multi-channel data, counting the number of missing data in each channel, and calculating the missing ratio; Draw a spatial distribution map for missing data, calculate the distribution density value, obtain the local fluctuation amount and generate a fluctuation map; If the distribution density value is greater than the preset threshold and the fluctuation is less than the threshold, the linear interpolation method is selected; If the distribution density value is less than the threshold and the fluctuation is greater than the threshold, the cubic spline interpolation method is selected; In other cases, polynomial interpolation is selected.
[0011] Preferably, the smoothing of the transition area comprises: acquiring a target image after interpolation and patching, wherein the target image comprises the transition area; For the transition area, a Gaussian filter algorithm is used to perform smoothing processing to obtain a first smoothed image; Calculating a mean square error and a peak signal-to-noise ratio of the first smoothed image; If the mean square error is less than a preset mean square error threshold, and the peak signal-to-noise ratio is greater than a preset peak signal-to-noise ratio threshold, the Gaussian filtering algorithm is determined as the optimal smoothing algorithm; If the mean square error is greater than the preset mean square error threshold, or the peak signal-to-noise ratio is less than the preset peak signal-to-noise ratio threshold, a bilateral filtering algorithm is used to smooth the transition region to obtain a second smoothed image.
[0012] The present application discloses a method for compensating for drift of multi-channel data based on digital information. The method has the advantages that, in view of the drift and missing problems existing in multi-channel data, the present invention first detects the drift by calculating the statistical characteristics of each channel, and establishes an adaptive compensation model by using kernel density estimation. For the channel where the drift is detected, the present invention adopts the optimal compensation parameters for correction, and uses the quantile method for boundary processing to avoid introducing new distortion. For the problem of missing data, the present invention selects a suitable interpolation strategy according to the distribution characteristics of the missing data, and improves the interpolation accuracy by using the local weighted least squares method. Finally, the present invention smoothes the repaired data and selects the optimal smoothing algorithm by minimizing the distortion metric.
[0013] The present invention can effectively handle the drift and missing problems in multi-channel data, ensure that the output data meets the continuity and smoothness requirements, and effectively control the distortion in the transition area, thereby improving the quality and availability of multi-channel data. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is the process of a multi-channel data drift compensation method based on digital information described in this application Figure 1 ; Figure 2 This is the process of a multi-channel data drift compensation method based on digital information described in this application Figure 2 . DETAILED DESCRIPTION
[0015] like Figure 1-Figure 2 As shown, a multi-channel data drift compensation method based on digital information described in the present application includes the following steps: Step S101, acquiring multi-channel data, calculating the mean, standard deviation and correlation coefficient of each channel, and determining whether the channel has drift according to a preset threshold; Step S102, if there is drift in the channel, the drift amount of the channel is calculated based on the mean estimation and the standard deviation estimation, and the probability density function of the channel data is fitted using the kernel density estimation method to establish an adaptive compensation model; Step S103, determining the optimal compensation parameters for the drift channel through the adaptive compensation model in combination with the dynamic changes of the channel. The selection of the compensation parameters needs to take into account both data smoothness and continuity; Step S104, using the determined compensation parameters to correct the channel data with drift, and during the correction process, using the quantile of the cumulative distribution function to perform boundary processing to avoid introducing new distortion; Step S105, in the drift-corrected multi-channel data, the proportion and distribution of missing data are counted, an interpolation strategy is selected according to the distribution density and local fluctuation characteristics of the missing data, and the order of the interpolation polynomial and the node selection method are determined; Step S106, using the selected interpolation method to repair the data gap position, and using the local weighted least square method to adjust the weight of the interpolation node during the repair to improve the repair accuracy; Step S107, smoothing the transition area after interpolation and patching, selecting the optimal smoothing algorithm by minimizing two distortion metrics, namely, mean square error and peak signal-to-noise ratio, while considering the influence of edge effects on the smoothing result; Step S108, outputting the multi-channel data after drift compensation and interpolation repair, the data quality meets the preset continuity and smoothness requirements, and the distortion in the transition area is effectively controlled.
[0016] like Figure 1-Figure 2 As shown, in step S101, multi-channel data is acquired, and for each channel, its mean, standard deviation and correlation coefficient are calculated, and whether the channel has drift is determined according to a preset threshold.
[0017] Furthermore, in step S101, multi-channel data is obtained, data values are extracted for each channel, and the data value of each channel is calculated using a mean formula to obtain the mean of each channel; The data value of each channel is processed using the standard deviation formula to obtain the standard deviation of each channel; The correlation coefficient formula is used to process the data values of each channel to obtain the correlation coefficient between channels; Obtain pre-established mean threshold, standard deviation threshold, and correlation coefficient threshold; The mean, standard deviation and correlation coefficient are compared with the corresponding thresholds respectively to obtain the mean judgment value, standard deviation judgment value and correlation coefficient judgment value; If at least one of the mean judgment value, the standard deviation judgment value, and the correlation coefficient judgment value exceeds the corresponding threshold, it is determined that the channel is abnormal; Determine whether there is a drift value according to the determination result, and if there is a drift value, mark the abnormal channel; Output the marking result, which includes the channel number of the abnormal channel.
[0018] Specifically, in step S101, data of 10 channels are first obtained, each channel contains 1000 data points, and then the mean is calculated using the arithmetic mean formula for each channel, including the mean of channel 1 which is 5.2; Then the standard deviation formula is used to process the data of each channel, and the standard deviation of channel 1 is 1.8; The correlation coefficient between channel 1 and channel 2 is calculated using the Pearson correlation coefficient formula to be 0.7; From the preset parameters, the mean threshold is 4.0, the standard deviation threshold is 2.5, and the correlation coefficient threshold is 0.6; The mean value of channel 1, 5.2, standard deviation, 1.8, and correlation coefficient, 0.7, are compared with the threshold values. The mean value and correlation coefficient exceed the threshold values, and it is determined that channel 1 is abnormal. According to the abnormal judgment result, it is confirmed that channel 1 has a drift value, and finally the marking result is output to display the number of channel 1 with drift; The entire process is implemented through automated scripts without manual intervention; The data source is the multi-channel electrical signal collected by the industrial sensor array, the sampling frequency is 1kHz, and the mean calculation formula is: , μ: arithmetic mean of channel data, reflecting the trend of data set, N: total number of channel data points, xi: measured value of the i-th data point; standard deviation calculation formula: , σ: standard deviation of channel data, measuring the degree of data dispersion, μ: arithmetic mean of channel data, reflecting the trend of data concentration, xi: measured value of the i-th data point; the correlation coefficient uses the Pearson formula: , rxy: correlation coefficient between channel x and channel y, range [-1,1], reflecting linear correlation, μx, μy: mean of channels x and y, xi, yi: i-th data point of channels x and y.
[0019] like Figure 1-Figure 2 As shown, in step S102, if there is drift in the channel, the drift amount of the channel is calculated based on the mean estimation and the standard deviation estimation, and the probability density function of the channel data is fitted using the kernel density estimation method to establish an adaptive compensation model.
[0020] Furthermore, in step S102, channel data is obtained, and a mean estimation algorithm is used for the channel data to calculate the mean of the channel data; For the channel data, a standard deviation estimation algorithm is used to calculate the standard deviation of the channel data; Determine the drift of the channel data using a preset drift calculation formula according to the mean and the standard deviation; For the channel data, a kernel density estimation method is used to fit the probability density function of the channel data; According to the probability density function, an adaptive compensation model for the channel data is constructed; using the adaptive compensation model, drift compensation is performed on the channel data to obtain compensated channel data; According to the compensated channel data, updating the mean and standard deviation corresponding to the channel data to obtain an updated mean and an updated standard deviation for subsequent processing; The random forest algorithm is used to optimize the compensation process and establish a correlation model between compensation parameters and data distribution; Based on the association model, automatic compensation processing is performed on subsequent channel data to obtain automatically compensated channel data; The automatically compensated channel data is output as input data for subsequent business processing to ensure that the data quality meets business requirements.
[0021] Specifically, in step S102, historical data of a certain channel is first obtained, and the mean is estimated to be 10.5. At the same time, the standard deviation is calculated using the standard deviation estimation algorithm to be 2.1; According to the mean and standard deviation, the preset drift calculation formula y=0.2x+0.5 is applied, and the drift of the channel data is calculated to be 2.6; Then, the Gaussian kernel function is used to estimate the kernel density of the channel data to fit the probability density function of the data. ; Based on the probability density function, an adaptive compensation model is constructed, and its compensation coefficient is dynamically adjusted according to the data distribution; The model is used to compensate the original data for drift, and the compensated channel data is output. At the same time, the channel mean is updated to 10.3 and the standard deviation is 2.0 according to the compensation results for subsequent adaptive processing; The random forest algorithm is used to optimize the compensation process and establish a correlation model between compensation parameters and data features, with an explainability of more than 85%; The association model is applied to the automatic compensation of subsequent channel data, which significantly improves the data processing efficiency and quality, and achieves seamless connection with downstream business systems, providing reliable data support for business decision-making; Among them, the kernel density estimation uses the Gaussian kernel function, and the bandwidth is selected as the Silverman criterion: , Random Forest algorithm parameters: number of trees = 100, maximum depth = 10, feature subset ratio = 0.7; Kernel density estimation formula: , p(x): probability density function of channel data, : Gaussian kernel function, , h: bandwidth, controls the smoothness of the probability density curve; Silverman Bandwidth Criterion: , σ: standard deviation of channel data, IQR: interquartile range, that is, the difference between the 75% quantile and the 25% quantile of the data, N: number of data points.
[0022] like Figure 1-Figure 2 As shown, in step S103, the optimal compensation parameters for the drift channel are determined through the adaptive compensation model in combination with the dynamic changes of the channel. The selection of the compensation parameters needs to take into account both data smoothness and continuity.
[0023] Further, in step S103, the dynamic change data of the channel is obtained, and characteristic values are extracted for the drift channel, including using a mean estimation algorithm to calculate the mean of the channel data, using a standard deviation estimation algorithm to calculate the standard deviation of the channel data, and according to the mean and the standard deviation, using a preset drift calculation formula to determine the drift amount of the channel data; An adaptive compensation model is established according to the characteristic values to determine the initial range of compensation parameters; For the channel data, the kernel density estimation method is used to fit the probability density function of the channel data, and an adaptive compensation model for the channel data is constructed according to the probability density function; The compensation parameters are screened using a preset smoothness index to obtain a preliminary parameter set; If the preliminary parameter set meets the smoothness index, proceed to the next step; If not satisfied, return to the previous step and filter again; Optimize the preliminary parameter set in combination with the preset continuity index to generate a candidate parameter set; If the candidate parameter set meets the continuity index, proceed to the next step; If not satisfied, return to the previous step and optimize again; Iteratively calculate the candidate parameter set according to the adaptive compensation model to obtain the optimal compensation parameter; Adopting an adaptive compensation model, drift compensation is performed on channel data to obtain compensated channel data; Applying the optimal compensation parameters to the drift channel to generate compensated channel data; According to the compensated channel data, the mean and standard deviation corresponding to the channel data are updated to obtain an updated mean and an updated standard deviation for use in subsequent processing; Verify the compensated channel data through the adaptive compensation model to determine whether the compensated channel data meets the preset smoothness and continuity requirements; If it meets the requirements, the compensated channel data is output; If it does not meet the requirements, return to iterate and calculate the optimal compensation parameters again; According to the compensated channel data and the correlation between channels, the compensation parameters of adjacent channels are optimized to ensure the data continuity and consistency between adjacent channels; The optimized compensation parameters are applied to adjacent channels to generate the final compensated channel data as input for subsequent data processing and analysis.
[0024] Specifically, in step S103, when acquiring the channel dynamic change data, a mean estimation algorithm is used to calculate the mean of the channel data, including calculating a mean of 10.5, and a standard deviation estimation algorithm is used to calculate the standard deviation of the channel data, including calculating a standard deviation of 2.1, and then according to the mean of 10.5 and the standard deviation of 2.1, a preset drift calculation formula is used, including drift = mean × 10% + standard deviation × 5%, and the drift of the channel data is calculated to be 1.155; Next, an adaptive compensation model is established based on the calculated eigenvalues, and the initial range of the compensation parameters is determined, including [-1.5, 1.5]. Then, for the channel data, a kernel density estimation method is used to fit the probability density function of the channel data, including fitting using a Gaussian kernel function. Based on the probability density function obtained by fitting, an adaptive compensation model for the channel data is constructed. When screening compensation parameters, the preset smoothness index, including the difference in slope between a data point and its adjacent points not exceeding 0.1, is used to screen the compensation parameters to obtain a preliminary parameter set, including [-1.2, -0.8, 0.5, 1.1]. Then, the preset continuity index, including the difference in value between adjacent data points not exceeding 0.5, is combined to optimize the preliminary parameter set to generate a candidate parameter set, including [-1.0, 0.6, 0.9]. Iteratively calculate the candidate parameter set according to the adaptive compensation model to obtain the optimal compensation parameter, including 0.8, apply the optimal compensation parameter 0.8 to the drift channel to generate compensated channel data, and update the mean and standard deviation corresponding to the channel data according to the compensated channel data to obtain an updated mean of 10.8 and an updated standard deviation of 1.9 for subsequent processing; Finally, the compensated channel data is verified by the adaptive compensation model to determine whether the compensated channel data meets the preset smoothness requirements and continuity requirements. If so, the compensated channel data is output; If it does not meet the requirements, the optimal compensation parameters are iteratively calculated again until the requirements are met; On this basis, the compensation parameters of adjacent channels can be optimized according to the compensated channel data and the correlation between channels, including the correlation coefficient of adjacent channel data being greater than 0.8, to ensure the data continuity and consistency between adjacent channels. Finally, the optimized compensation parameters are applied to adjacent channels to generate the final compensated channel data as input for subsequent data processing and analysis. Among them, the smoothness index is defined as the difference in slopes of adjacent data points ≤ 0.1, and the continuity index is defined as the difference in data points ≤ 0.5; The candidate parameters were optimized using the gradient descent method, with a learning rate of 0.01 and iterations of 1000; Smoothness index: , : The slope difference between adjacent data points ensures smooth transition of data, yi: the value of the i-th data point; Continuity indicators: , : The absolute difference between adjacent data points to ensure data continuity.
[0025] Specifically, in step S103, the method of iteratively calculating the candidate parameter set according to the adaptive compensation model to obtain the optimal compensation parameter also includes the following specific steps: First, the candidate parameters are initialized. Based on the PDF features (μ, σ) and drift Δ of the current channel, an initial parameter set is generated: ; Including: When Δ=2.6, ; Next, the dual-indicator constraint screening filters invalid parameters through the smoothness (S) and continuity (C) indicators: Smoothness constraint: The slope change of adjacent data is ≤0.1, that is
[0026] Continuity constraint: The difference between adjacent data is ≤ 0.5, that is , Then, the gradient descent is iteratively optimized, and the objective function is the weighted loss function: , Iteration formula: , Dynamically adjust the learning rate: , After completion, parameter convergence is determined: Convergence condition: loss change ΔL<0.01 for three consecutive iterations; Termination condition: reaching the maximum number of iterations (100 times) or ΔL<0.005; Finally, the parameters are dynamically calibrated, and the final parameters are corrected by weighted average according to the adjacent channel parameters θ_adjacent: , Bring in a preset calculation example: Assume that the initial parameters of a channel are , retained after double index screening : First iteration: θ = 0.8 → MSE = 0.12, PSNR = 28dB → L = 0.7 × 0.12 + 0.3 × 0.72 = 0.276; Second iteration: θ = 0.9 → MSE = 0.08, PSNR = 32dB → L = 0.7 × 0.08 + 0.3 × 0.68 = 0.236; Third iteration: θ = 0.85 → MSE = 0.05, PSNR = 35dB → L = 0.7 × 0.05 + 0.3 × 0.65 = 0.215; Convergence judgment: ΔL=0.215-0.236=-0.021<0.01→output θ_opt=0.85; Finally, combining the adjacent channel θ_adjacent=0.75, we get θ_final=0.8×0.85+ 0.2×0.75=0.83; The above completed model responds to changes in data distribution in real time (μ from 10.5→10.8, σ from 2.1→1.9) through a sliding window and feedback mechanism, and takes into account both smoothness and continuity to avoid overfitting of a single indicator. The gradient descent method is combined with a dynamic learning rate and converges within 10 iterations (the measured average number of iterations is ≈15).
[0027] like Figure 1-Figure 2 As shown, in step S104, the determined compensation parameters are used to correct the channel data with drift, and the quantile of the cumulative distribution function is used to perform boundary processing during the correction process to avoid introducing new distortion.
[0028] Furthermore, in step S104, original channel data with drift is obtained, and a compensation parameter set for the data is determined; For the original channel data, the compensation parameters are used to perform data correction processing to obtain the corrected channel data; Calculate the cumulative distribution function of the corrected channel data and determine the distribution quantile; Extract data boundary threshold according to distribution quantile; If the corrected channel data exceeds the boundary threshold, the quantile method is used to truncate the data to form the final corrected data; Compare the final corrected data with the original channel data to confirm that no new distortion has been introduced; The random forest algorithm is used to optimize the correction process and establish a correlation model between correction parameters and data distribution; Based on the correlation model, automatic correction processing is performed on subsequent channel data to obtain correction results; Compare the calibration results with the preset quality indicators to determine whether they meet the expected requirements. If not, return for iterative optimization.
[0029] Specifically, in step S104, for the original channel data with drift, compensation parameters are determined by comparing the stable period in the historical data, including a translation amount of ±0.5 and a scaling factor of 1.2; The original data is corrected using the determined compensation parameters, and the corrected channel data is obtained through linear transformation; The cumulative distribution function is calculated based on the corrected data, and the 95% and 5% quantiles are taken as reasonable boundary thresholds of the data; When the corrected data exceeds the threshold range, it can be truncated to the threshold boundary to obtain the final correction result; Compare the correction results with the original data and confirm through signal correlation analysis that no new distortion is introduced during the correction process; On this basis, the random forest algorithm is used to establish the association model between the correction parameters and the data distribution characteristics, and the optimal parameter combination is determined by cross-validation of the training set and the test set. The number of trees: 100, indicating the total number of decision trees in the model, the maximum depth: 10, the maximum number of levels of a single decision tree, to prevent overfitting, and the feature subset ratio: 0.7, the ratio of features randomly selected in each tree; The model can be directly called later to automatically determine the correction parameters and perform correction in combination with the channel data acquired in real time. The correction results are compared with the preset quality indicators, including a signal-to-noise ratio greater than 20dB. If the standards are not met, a new round of iterative optimization is automatically triggered to continuously update the model to adapt to data changes. Among them, the quantile truncation method: take the 95% and 5% quantiles of the corrected data as the boundary thresholds, and replace the excess with the threshold boundary value; Quantile definition: 95% quantile (Q0.95): 95% of the values in the data are less than or equal to the threshold; 5% quantile (Q0.05): 5% of the values in the data are less than or equal to this threshold.
[0030] like Figure 1-Figure 2 As shown, in step S105, in the drift-corrected multi-channel data, the proportion and distribution of missing data are counted, an interpolation strategy is selected according to the distribution density of the missing data and the local fluctuation characteristics, and the order of the interpolation polynomial and the node selection method are determined.
[0031] Further, in step S105, the drift-corrected multi-channel data is obtained, the number of missing data in each channel is counted, and the missing ratio is calculated; Draw a spatial distribution map for missing data, calculate the distribution density value, obtain the local fluctuation amount and generate a fluctuation map; Select the interpolation strategy based on the distribution density value and the local fluctuation amount; If the distribution density value is greater than the preset threshold and the fluctuation amount is less than the threshold, the linear interpolation method is selected; If the distribution density value is less than the threshold and the fluctuation is greater than the threshold, the cubic spline interpolation method is selected; In other cases, choose polynomial interpolation; Determine the interpolation polynomial order and select nodes based on the distribution density value. The higher the density value, the smaller the node interval. The missing data are completed using the selected interpolation strategy, and the predicted values of the missing points are calculated using the interpolation polynomial; Fill the missing data positions with predicted values to obtain a complete multi-channel data set; Conduct continuity and smoothness tests on the interpolated and patched data to determine whether they meet the preset quality requirements; If the quality does not meet the requirements, adjust the interpolation strategy parameters until it meets the requirements; The multi-channel data is output after drift compensation and interpolation repair, and the distortion in the transition area is effectively controlled.
[0032] Specifically, in step S105, after acquiring the data of 1000 channels after drift correction, statistics show that the missing data ratio is 5%; A 100×100 spatial distribution heat map was drawn for the missing data, and the average distribution density was calculated to be 0.8, and the mean and variance of the local fluctuation were 0.2 and 0.05 respectively; Since the distribution density 0.8 is greater than the preset threshold 0.6, and the fluctuation mean 0.2 is less than the threshold 0.3, the linear interpolation method is selected; The interpolation polynomial order is set to 1, 50 nodes are selected in proportion according to the distribution density value, and 25 adjacent nodes are selected on both sides of the missing data point to construct the interpolation equation system; Solve the linear equations to get the predicted values of the missing points, and fill them in the corresponding positions to generate a complete data set; After inspection, the continuity error of the interpolated data is less than 0.01, the smoothness meets the preset standard, and the distortion peak value in the transition area is controlled within 0.05; The final output is 1000 channels of data after drift compensation and interpolation repair, and the data quality meets the application requirements.
[0033] like Figure 1-Figure 2As shown, in step S106, the data missing position is repaired using the selected interpolation method, and the weights of the interpolation nodes are adjusted using the local weighted least squares method during the repair to improve the repair accuracy.
[0034] Further, in step S106, the drift-corrected multi-channel data is obtained, the number of missing data in each channel is counted, and the missing ratio is calculated; Draw a spatial distribution map for missing data, calculate the distribution density value, obtain the local fluctuation amount and generate a fluctuation map; If the distribution density value is greater than the preset threshold and the fluctuation amount is less than the threshold, the linear interpolation method is selected; If the distribution density value is less than the threshold and the fluctuation is greater than the threshold, the cubic spline interpolation method is selected; In other cases, choose polynomial interpolation; Determine the interpolation polynomial order and select nodes based on the distribution density value. The higher the density value, the smaller the node interval. According to the selected interpolation method, obtain the corresponding interpolation function and its parameters, and take the coordinates of the missing data points as input; For each interpolation node, the local weighted least squares method is used to calculate the node weight and adjust the interpolation function in combination with the distribution characteristics of the surrounding data points; Using the adjusted interpolation function, interpolate the data points at the missing positions one by one to obtain an estimated value; Fill the estimated values into the missing positions of the original data to form a complete patched data set; Evaluate the degree of fit between the repaired data and the original data, calculate the mean square error index, and determine whether the repair accuracy meets the requirements. If not, return to continue adjusting until the preset accuracy target is reached.
[0035] Specifically, in step S106, for a certain data set, after drift correction, it is statistically found that the missing ratio of each channel is between 5% and 20%; By drawing the spatial distribution map and calculating the density value, it is found that the missing points show local clustering characteristics, with a density peak of 0.8 and a fluctuation of only 0.1; Since the conditions of density greater than 0.7 and fluctuation less than 0.2 are met, linear interpolation is selected; Considering the high density, the interpolation node spacing is set to 2 data points; According to the coordinates of the missing points, the endpoint values of the interpolation interval are extracted as input, and the linear function y=0.5x+2.1 is fitted using the least squares method; For each missing point in the interval, extract 4 data points in its left and right neighborhoods, calculate the local mean weighted by the inverse of the distance, and substitute the mean into the linear function to obtain the estimated value; Finally, the estimated value is filled into the corresponding position of the original data and compared with the true value. It is found that the mean square error is 0.05, which meets the accuracy requirements and completes the data patching task; Among them, the weight function of the local weighted least squares method is: ,in, : The weight of the ith neighboring data point decays exponentially with increasing distance, xi: the position of the neighboring data point, x: the position of the missing data point, h: bandwidth, which controls the weight decay speed and is set to 1.5 times the distance between the missing point neighborhood data.
[0036] like Figure 1-Figure 2 As shown, step S107, the transition area after interpolation and patching is smoothed, and the optimal smoothing algorithm is selected by minimizing two distortion metrics, namely, mean square error and peak signal-to-noise ratio, while considering the influence of edge effects on the smoothing results.
[0037] Furthermore, in step S107, a target image after interpolation and repair is obtained, wherein the target image includes a transition area; For the transition area, a Gaussian filter algorithm is used to perform smoothing processing to obtain a first smoothed image; Calculating a mean square error and a peak signal-to-noise ratio of the first smoothed image; If the mean square error is less than a preset mean square error threshold, and the peak signal-to-noise ratio is greater than a preset peak signal-to-noise ratio threshold, the Gaussian filtering algorithm is determined as the optimal smoothing algorithm; If the mean square error is greater than the preset mean square error threshold, or the peak signal-to-noise ratio is less than the preset peak signal-to-noise ratio threshold, a bilateral filtering algorithm is used to smooth the transition region to obtain a second smoothed image, and the mean square error and peak signal-to-noise ratio of the second smoothed image are recalculated; If the mean square error of the second smoothed image is still greater than the preset mean square error threshold, or the peak signal-to-noise ratio of the second smoothed image is still less than the preset peak signal-to-noise ratio threshold, a non-local mean filtering algorithm is used to smooth the transition region to obtain a third smoothed image; Extracting edge information of the transition area according to a preset edge detection algorithm; performing edge protection processing on the first smoothed image, the second smoothed image or the third smoothed image according to the edge information; Through edge protection processing and smoothing algorithm selection, the final smoothing result is obtained, which minimizes the two distortion metrics of mean square error and peak signal-to-noise ratio while taking into account the influence of edge effect on the smoothing result.
[0038] Specifically, in step S107, a target image after interpolation and restoration is obtained, and the image includes a transition area with a width of 20 pixels; For the transition area, a Gaussian filter algorithm with a standard deviation of 1.5 is used for smoothing to obtain a first smoothed image; The mean square error of the first smoothed image is calculated to be 0.05, and the peak signal-to-noise ratio is 35dB; Since the mean square error is less than the preset threshold of 0.1 and the peak signal-to-noise ratio is greater than the preset threshold of 30 dB, the Gaussian filter algorithm is determined as the optimal smoothing algorithm, where the Gaussian filter parameters are: standard deviation σ = 1.5, window size = 5 × 5, and bilateral filter parameters: spatial domain standard deviation = 1.5, gray domain standard deviation = 0.1; The edge information of the transition area is extracted according to the Canny edge detection algorithm, the edge protection processing is performed on the first smoothed image, and the morphological expansion operation is performed using a 3x3 structure element to avoid edge distortion; Finally, the smoothing result is obtained through edge protection and Gaussian filtering. Compared with the original transition area, the mean square error is reduced from 0.2 to 0.05, the peak signal-to-noise ratio is increased from 28dB to 35dB, and the clear edge contour is retained; Among them, Gaussian filtering: ,σ: standard deviation, controls the smoothing strength of the filter, x,y: pixel position coordinates; Bilateral filtering: ; σs: standard deviation in spatial domain, controls the weight of spatial distance, σr: standard deviation in grayscale domain, controls the weight of pixel value difference, Ip, Iq: grayscale values of pixels p and q.
[0039] like Figure 1-Figure 2 As shown, in step S108, the multi-channel data after drift compensation and interpolation repair is output, the data quality meets the preset continuity and smoothness requirements, and the distortion in the transition area is effectively controlled.
[0040] Further, in step S108, multi-channel raw data is acquired, drift features in the multi-channel raw data are identified, and a drift compensation algorithm is implemented for the drift features to obtain compensated multi-channel data; The interpolation algorithm is used to repair the missing parts of the compensated multi-channel data. The interpolation strategy is selected according to the distribution density and local fluctuation characteristics of the missing data, the order of the interpolation polynomial and the node selection method are determined, and the data continuity model is established. Among them, the distribution density threshold is 0.6, the local fluctuation threshold is 0.3, the mean square error threshold is 0.1, and the peak signal-to-noise ratio threshold is 30dB. Introducing a distortion control mechanism in the transition region of the compensated multi-channel data, obtaining a smoothness parameter of the transition region, and comparing the smoothness parameter with a preset requirement; If the smoothness parameter does not meet the preset requirements, the adaptive correction process is started, and the parameters of the correction algorithm are dynamically adjusted according to the deviation degree and local characteristics of the smoothness parameter to obtain the corrected multi-channel data; According to the preset data quality evaluation indicators, comprehensively judge whether the corrected multi-channel data meets the preset standards in terms of data continuity, smoothness, and distortion; If the corrected multi-channel data meets the preset standard, the corrected multi-channel data is output as the final processing result, and the relevant parameters are stored to optimize the subsequent processing flow; If the corrected multi-channel data does not meet the preset standard, the process returns to the drift compensation step, uses the corrected multi-channel data for iterative optimization, and dynamically adjusts the compensation and interpolation strategies based on the results of the previous round of processing; By setting the maximum number of iterations and convergence conditions, the automatic termination of the optimization process is controlled to prevent overfitting or oscillation, thus ensuring the efficiency and quality of data processing; Summarize key parameters and statistical information in the processing process to form a data quality report, provide a basis for optimizing data processing processes and improving algorithms, and monitor abnormal data processing situations and adjust processing strategies in a timely manner.
[0041] Specifically, in step S108, after acquiring the multi-channel raw data, the mean and variance of each channel data are counted to identify the channels with a mean shift exceeding 0.5 or a variance greater than 1.2, and they are marked as channels with obvious drift characteristics. Then, the Kalman filter algorithm is used to compensate for drift in these channels. After 5 rounds of iterations, the number of channels with obvious drift characteristics is reduced by 80%; For the compensated multi-channel data, statistics show that 2% of the data points are missing, of which 90% are distributed in 10 local areas. The data fluctuations in these areas are significantly higher than those in other areas. Therefore, the cubic spline interpolation algorithm is selected to repair the missing data, and the density of interpolation nodes is appropriately increased in the local area. In the compensated and repaired data transition area, the first-order and second-order differences of the data were calculated, and it was found that the smoothness of 5 areas was lower than 0.8, which did not meet the preset requirements. The adaptive weighted average algorithm was used to correct these areas. After 3 rounds of iterations, the smoothness of all transition areas exceeded 0.95. Finally, the preset data quality evaluation indicators, including data continuity, smoothness and distortion, were used to comprehensively evaluate the corrected multi-channel data. The results showed that 98% of the data points met the preset standards and could be output as the final processing results.
[0042] For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of this application.
Claims
1. A multi-channel data drift compensation method based on digital information, characterized in that: The following steps are involved: Step S101, acquiring multi-channel data, calculating the mean, standard deviation and correlation coefficient of each channel, and determining whether the channel has drift according to a preset threshold; Step S102, if there is drift in the channel, the drift amount of the channel is calculated based on the mean estimation and the standard deviation estimation, and the probability density function of the channel data is fitted using the kernel density estimation method to establish an adaptive compensation model; Step S103, determining the optimal compensation parameters for the drift channel through the adaptive compensation model in combination with the dynamic change of the channel; Step S104, using the determined compensation parameters to correct the channel data with drift, and during the correction process, using the quantile of the cumulative distribution function to perform boundary processing; Step S105, in the drift-corrected multi-channel data, the proportion and distribution of missing data are counted, an interpolation strategy is selected according to the distribution density and local fluctuation characteristics of the missing data, and the order of the interpolation polynomial and the node selection method are determined; Step S106, using the selected interpolation method to repair the data gaps, and using the local weighted least squares method to adjust the weights of the interpolation nodes during the repair; Step S107, smoothing the transition area after interpolation and patching, and selecting the optimal smoothing algorithm by minimizing two distortion measurement indicators, namely, mean square error and peak signal-to-noise ratio; Step S108, outputting the multi-channel data after drift compensation and interpolation repair, wherein the data quality meets the preset continuity and smoothness requirements.
2. According to claim 1, a multi-channel data drift compensation method based on digital information is characterized in that: In step S101, the preset thresholds include a mean threshold, a standard deviation threshold, and a correlation coefficient threshold. If any of the mean, standard deviation, or correlation coefficient exceeds the corresponding preset threshold, it is determined that drift exists.
3. According to claim 1, a multi-channel data drift compensation method based on digital information is characterized in that: In step S102, the kernel density estimation method uses a Gaussian kernel function, and the bandwidth is selected according to the Silverman criterion: , in, is the standard deviation of channel data, IQR is the interquartile range, and N is the number of data points.
4. According to claim 1, a multi-channel data drift compensation method based on digital information is characterized in that: In step S103, the selection of the optimal compensation parameter includes: Extract the characteristic values of the drift channel and establish the initial range of compensation parameters; Through iterative optimization using the gradient descent method, parameters that meet the smoothness index and continuity index are selected; The compensation parameters are optimized by combining the correlation of adjacent channels.
5. The method for compensating multi-channel data drift based on digital information according to claim 1, characterized in that: In step S104, the boundary processing specifically includes: Calculate the 95% and 5% quantiles of the corrected data as boundary thresholds; The data exceeding the threshold are truncated, and the truncation parameters are optimized by the random forest algorithm.
6. The method for compensating multi-channel data drift based on digital information according to claim 1, characterized in that: In step S105, the selection condition of the interpolation strategy is: If the distribution density is greater than 0.6 and the local fluctuation is less than 0.3, linear interpolation is selected; If the distribution density is less than 0.6 and the local fluctuation is greater than 0.3, cubic spline interpolation is selected.
7. The method for compensating multi-channel data drift based on digital information according to claim 1, characterized in that: In step S106, the weight function of the local weighted least squares method is: , Among them, h is 1.5 times the distance between the neighborhood data, xi is the position of the neighboring data point, and x is the position of the missing point.
8. The method for compensating multi-channel data drift based on digital information according to claim 1, characterized in that: In the step S107, the smoothing process includes: Gaussian filtering, bilateral filtering and non-local mean filtering algorithms are used in turn; The optimal algorithm is selected based on mean square error and peak signal-to-noise ratio, and Canny edge detection is combined to protect the edges of the transition area.
9. The method for compensating multi-channel data drift based on digital information according to claim 1, characterized in that: In the step S108, before outputting the data, a data quality assessment step is also included: Calculate continuity error, smoothness parameter and distortion peak; If the preset standard is not reached, iterative optimization is triggered to dynamically adjust the compensation and interpolation parameters.
10. The method for compensating multi-channel data drift based on digital information according to claim 9, characterized in that: The maximum number of iterations in the iterative optimization process is set to 10 times, and the convergence condition is that the change in mean square error after two consecutive optimizations is less than 0.01.
Citation Information
Patent Citations
Probabilistic power flow data acquisition method based on renewable energy uncertainty
CN109066688A
Crop growth prediction method based on multi-source data fusion analysis
CN119398284A
Virtual volume scan data generation method and system for radar data stream
CN119474939A
Determining noise and sound power level differences between primary and reference channels
US20180047412A1
Cited By
Low-temperature environment LNG (Liquefied Natural Gas) metering sensor drift compensation method and system
CN120994951A
Primary mirror surface type error correction method based on multi-mode interference data fusion
CN121504772A
Radio frequency chip phase deviation calibration method based on multichannel sampling data analysis
CN121656938A