Multi-lead signal filtering method and system based on IIR (Infinite Impulse Response) high-pass filter

By performing signal prediction and optimizing the filtering coefficients of multi-lead signals, the problem of poor filtering quality of traditional IIR high-pass filters is solved, thereby improving the reliability and accuracy of the signals.

CN120880388APending Publication Date: 2025-10-31SHEN ZHEN SPRING TECH IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510989037.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Traditional multi-lead signal filtering methods based on IIR high-pass filters suffer from poor filtering quality and low signal reliability and accuracy.

Method used

Signal prediction is performed by acquiring historical input signal sequences of multi-lead signals. The filtering coefficients of IIR high-pass filters are randomly configured, the filtering cost is calculated by combining historical filtering coefficients, and the filtering coefficients are optimized by combining prediction error coefficients and signal fitness to obtain the optimal filtering coefficients for filtering.

Benefits of technology

It improves the quality of multi-lead signal filtering, thereby enhancing the reliability and accuracy of the signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880388A_ABST
    Figure CN120880388A_ABST
Patent Text Reader

Abstract

The invention relates to the field of signal processing, in particular to a multi-lead signal filtering method and system based on an IIR (Infinite Impulse Response) high-pass filter. Acquiring a plurality of historical input signal sequences of the multi-lead signals in the previous time zone, and respectively performing signal prediction to obtain a plurality of predicted input signal sequences; randomly configuring a plurality of filtering coefficients, and calculating to obtain historical filtering cost and multi-lead filtering cost in combination with a plurality of historical filtering coefficients; performing correction calculation on the multi-lead filtering cost according to the plurality of prediction input signal sequences in combination with the prediction error coefficient to obtain a corrected multi-lead filtering cost; and according to the plurality of predicted input signal sequences and the plurality of filtering coefficients, carrying out filtering prediction, obtaining signal fitness, carrying out correction calculation on historical filtering cost, obtaining corrected historical filtering cost, carrying out filtering coefficient optimization, obtaining a plurality of optimal filtering coefficients, and carrying out filtering processing. The quality of multi-lead signal filtering is improved, and the reliability and accuracy of signals are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing, and in particular to a multi-lead signal filtering method and system based on an IIR high-pass filter. Background Technology

[0002] In the field of signal processing, filtering of multi-lead signals, such as electrocardiograms (ECG) and electroencephalograms (EEG) in biomedical signals, is an important technique. IIR high-pass filters, due to their excellent high-pass filtering characteristics, are widely used in multi-lead signal filtering. However, traditional multi-lead signal filtering methods based on IIR high-pass filters typically employ fixed filter coefficients or simple empirical adjustment methods, resulting in poor filtering quality and low signal reliability and accuracy. Summary of the Invention

[0003] This invention addresses the technical problems of poor filtering quality and low signal reliability and accuracy in existing technologies by providing a multi-lead signal filtering method and system based on an IIR high-pass filter.

[0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0005] In a first aspect, the present invention provides a multi-lead signal filtering method based on an IIR high-pass filter, comprising: acquiring multiple historical input signal sequences of multi-lead signals in the previous time zone, performing signal prediction on each sequence to obtain multiple predicted input signal sequences; randomly configuring multiple filtering coefficients of an IIR high-pass filter for filtering the multi-lead signals, and calculating historical filtering costs and multi-lead filtering costs by combining multiple historical filtering coefficients; correcting the multi-lead filtering costs based on the multiple predicted input signal sequences and prediction error coefficients to obtain corrected multi-lead filtering costs; performing filtering prediction based on the multiple predicted input signal sequences and multiple filtering coefficients to obtain signal fitness, correcting the historical filtering costs to obtain corrected historical filtering costs, calculating filtering quality parameters by combining the corrected multi-lead filtering costs and signal fitness, optimizing the filtering coefficients to obtain multiple optimal filtering coefficients, and performing filtering processing.

[0006] Optionally, multiple historical input signal sequences of multi-lead signals in the previous time zone are acquired, and signal prediction is performed on each sequence to obtain multiple predicted input signal sequences. This includes: acquiring multiple historical input signal sequences of multi-lead signals in the previous time zone; calling a signal predictor; inputting the multiple historical input signal sequences into the signal predictor; and predicting and outputting multiple predicted input signal sequences.

[0007] The training steps of the signal predictor include: collecting multiple historical input signal sequence sets based on multi-lead signal filtering data over a historical period, and collecting the input signal sequence within the time zone after each historical input signal sequence to obtain multiple sample predicted input signal sequence sets; constructing multiple signal prediction branches for multi-lead signals; and supervising the training of the multiple signal prediction branches until convergence using the multiple historical input signal sequence sets and the multiple sample predicted input signal sequence sets respectively to obtain the signal predictor.

[0008] Optionally, multiple filter coefficients of the IIR high-pass filter used to filter the multi-lead signal are randomly configured, and the historical filtering cost and multi-lead filtering cost are calculated by combining multiple historical filter coefficients. This includes: randomly configuring multiple filter coefficients of the IIR high-pass filter used to filter the multi-lead signal, wherein the range of the filter coefficients is 0 to 1; calculating the variation amplitude of the multiple filter coefficients and the multiple historical filter coefficients respectively, and calculating the average value to obtain the historical filtering cost; calculating the deviation amplitude of each filter coefficient from other filter coefficients, and calculating the average value to obtain the multi-lead filtering cost.

[0009] Optionally, based on the plurality of predicted input signal sequences and in conjunction with the prediction error coefficients, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost. This includes: calculating the signal deviation of the plurality of predicted input signal sequences; testing and obtaining the error rates of the plurality of signal prediction branches within the signal predictor, and calculating the average to obtain the prediction error coefficients; performing error compensation on the signal deviation based on the prediction error coefficients to obtain the compensated signal deviation; and correcting the multi-lead filtering cost based on the ratio of the signal deviation to a preset signal deviation to obtain the corrected multi-lead filtering cost.

[0010] Optionally, filtering prediction is performed based on the multiple predicted input signal sequences and multiple filter coefficients to obtain signal fitness, and the historical filtering cost is corrected and calculated to obtain a corrected historical filtering cost. This includes: inputting the multiple predicted input signal sequences and multiple filter coefficients into a filter predictor respectively, outputting multiple predicted signal fitnesss, and calculating the average to obtain the signal fitness. The filter predictor is trained using a set of sample input signal sequences, a set of sample filter coefficients, and a set of sample signal fitnesss. The sample signal fitness includes a signal filtering quality coefficient. The historical filtering cost is corrected and calculated based on the ratio of a preset signal fitness to the signal fitness to obtain the corrected historical filtering cost.

[0011] Optionally, by combining the modified multi-lead filtering cost and signal fitness, filter quality parameters are calculated, filter coefficients are optimized to obtain multiple optimal filter coefficients, and filtering is performed. This includes: calculating the filtering cost based on the modified multi-lead filtering cost and the modified historical filtering cost; calculating the filter quality parameters based on the filtering cost and signal fitness; iteratively adjusting and optimizing multiple filter coefficients until convergence, obtaining multiple optimal filter coefficients with the largest filter quality parameters, and performing filtering.

[0012] Secondly, the present invention provides a multi-lead signal filtering system based on an IIR high-pass filter, comprising:

[0013] The input signal prediction module is used to acquire multiple historical input signal sequences of multi-lead signals in the previous time zone, perform signal prediction on each sequence, and obtain multiple predicted input signal sequences.

[0014] The filtering cost calculation module is used to randomly configure multiple filtering coefficients of the IIR high-pass filter for filtering multi-lead signals, and calculate the historical filtering cost and multi-lead filtering cost by combining multiple historical filtering coefficients.

[0015] The filter cost correction module is used to calculate and correct the multi-lead filter cost based on the multiple predicted input signal sequences and the prediction error coefficients, so as to obtain the corrected multi-lead filter cost.

[0016] The filter coefficient optimization module is used to perform filter prediction based on the multiple predicted input signal sequences and multiple filter coefficients, obtain signal fitness, correct the historical filter cost to obtain corrected historical filter cost, combine the corrected multi-lead filter cost and signal fitness to calculate filter quality parameters, optimize the filter coefficients to obtain multiple optimal filter coefficients, and perform filtering processing.

[0017] By implementing this invention, it is possible to acquire multiple historical input signal sequences of multi-lead signals in the previous time zone, perform signal prediction on each sequence, obtain multiple predicted input signal sequences, and use historical data to predict signals. This provides a prediction reference based on historical patterns for subsequent filtering processes, making the subsequent filtering process more reliable and helping to improve the accuracy and reliability of filtering.

[0018] By implementing this invention, it is possible to randomly configure multiple filtering coefficients of an IIR high-pass filter for filtering multi-lead signals, and calculate the historical filtering cost and multi-lead filtering cost by combining multiple historical filtering coefficients. Randomly configuring the filtering coefficients can expand the search range and increase the possibility of finding better filtering coefficients. By calculating the historical filtering cost and multi-lead filtering cost, the merits of the currently configured filtering coefficients can be measured from two dimensions: historical experience and the relationship between multi-leads. This provides a quantitative reference index for subsequent correction calculations and filtering coefficient optimization.

[0019] By implementing this invention, it is possible to calculate and correct the multi-lead filtering cost based on the multiple predicted input signal sequences and the prediction error coefficients, thereby obtaining the corrected multi-lead filtering cost. Introducing the prediction error coefficients to correct the multi-lead filtering cost enables the multi-lead filtering cost to more accurately reflect the actual situation, reduces the deviation caused by prediction errors, and provides a more reliable basis for subsequent filter coefficient optimization, thus improving the filtering effect.

[0020] By implementing this invention, it is possible to perform filtering prediction based on the multiple predicted input signal sequences and multiple filtering coefficients to obtain signal fitness; to perform corrected calculations on the historical filtering costs to obtain corrected historical filtering costs; to calculate filtering quality parameters by combining the corrected multi-lead filtering costs and signal fitness; to optimize the filtering coefficients to obtain multiple optimal filtering coefficients; to perform filtering processing; and to optimize the filtering coefficients by combining the corrected multi-lead filtering costs, signal fitness, and the calculated filtering quality parameters. This allows for comprehensive consideration of multiple factors to find the optimal filtering coefficients, thereby improving filtering quality and making the filtered signal more compliant with requirements.

[0021] In summary, by implementing this invention, the quality of multi-lead signal filtering can be improved, and the reliability and accuracy of the signal can be enhanced. Attached Figure Description

[0022] Figure 1 A flowchart illustrating the multi-lead signal filtering method based on an IIR high-pass filter provided by this invention;

[0023] Figure 2 A schematic diagram of the structure of the multi-lead signal filtering system based on an IIR high-pass filter provided by the present invention.

[0024] In the attached diagram, the components represented by each number are as follows:

[0025] Input signal prediction module 11, filter cost calculation module 12, filter cost correction module 13, and filter coefficient optimization module 14. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0028] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.

[0029] Example 1, as Figure 1 As shown, this embodiment of the invention provides a multi-lead signal filtering method based on an IIR high-pass filter, including:

[0030] S100: Obtain multiple historical input signal sequences of multi-lead signals in the previous time zone, perform signal prediction on each sequence, and obtain multiple predicted input signal sequences.

[0031] S200: Randomly configure multiple filtering coefficients of the IIR high-pass filter for filtering multi-lead signals, and calculate the historical filtering cost and multi-lead filtering cost by combining multiple historical filtering coefficients.

[0032] S300: Based on the multiple predicted input signal sequences and combined with the prediction error coefficients, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost;

[0033] S400: Based on the multiple predicted input signal sequences and multiple filter coefficients, perform filter prediction to obtain signal fitness, correct the historical filter cost to obtain corrected historical filter cost, combine the corrected multi-lead filter cost and signal fitness to calculate filter quality parameters, optimize filter coefficients to obtain multiple optimal filter coefficients, and perform filtering processing.

[0034] In step S100 of this application embodiment, multiple historical input signal sequences of multi-lead signals in the previous time zone are obtained, and signal prediction is performed on each sequence to obtain multiple predicted input signal sequences, including:

[0035] Obtain multiple historical input signal sequences of multi-lead signals in the previous time zone;

[0036] Call the signal predictor;

[0037] The multiple historical input signal sequences are input into the signal predictor, and the prediction output yields multiple predicted input signal sequences.

[0038] In this embodiment, the multi-lead signal is a collection of signals synchronously acquired from multiple independent signal channels, i.e., leads. Each lead reflects different dimensions or observation angles of the same physical phenomenon. Common multi-lead signals include 12-lead signals from electrocardiogram (ECG) and multi-channel EEG signals from electroencephalogram (EEG), with each lead corresponding to electrical activity at different electrode locations.

[0039] The multi-lead signal in the previous time zone refers to the entire multi-lead signal collected within a fixed time window, i.e., the "previous time zone," based on the current processing time. The length of this time zone can be adjusted according to the signal characteristics; for example, 10 seconds can be selected for biological signals. For instance, for electrocardiogram (ECG) signals, the multi-lead signal in the previous time zone can be 12 time series of a 12-lead ECG within 10 seconds.

[0040] The aforementioned multiple historical input signal sequences are independent sequences formed by arranging the original signals of each lead in the previous time zone in chronological order. They are a subdivided representation of multi-lead signals, where each signal sequence reflects the trajectory of a single lead in the time dimension, such as the P-QRS-T wave sequence of a certain lead in ECG.

[0041] In this embodiment, by inputting the multiple historical input signal sequences into the signal predictor, multiple predicted input signal sequences can be obtained as predicted outputs. The predicted input signal sequences are sequences of predicted values ​​for each lead within a future time period, obtained by extrapolating from the historical input signal sequences using the signal predictor.

[0042] In step S100 of this embodiment, the training step of the signal predictor includes:

[0043] According to the filtered data of multi-lead signals within a historical time period, collect multiple sets of sample historical input signal sequences, and collect the input signal sequences within the time zone after each sample historical input signal sequence to obtain multiple sets of sample predicted input signal sequences;

[0044] Construct multiple signal prediction branches for multi-lead signals;

[0045] Respectively use the multiple sets of sample historical input signal sequences and multiple sets of sample predicted input signal sequences to supervise and train the multiple signal prediction branches until convergence to obtain a signal predictor.

[0046] In the embodiment of the present application, the training data of the signal predictor is a set of sample historical input signal sequences. The set of sample historical input signal sequences contains multiple sample historical input signal sequences. The sample historical input signal sequence is historical multi-lead signal data divided by a fixed time window, such as 100 ms. Each window corresponds to a sample historical input sequence. For example, for 3-lead signals, each sample is 3 sets of time series with a length of N, where N is the number of sampling points within the window, that is, the window length.

[0047] The supervised data of the signal predictor is a set of sample predicted input signal sequences. The set of sample predicted input signal sequences contains multiple sample predicted input signal sequences. The multiple sample predicted input signal sequences take the end moment of each sample historical input signal sequence as the starting point, and collect the actual input signals of the subsequent fixed duration, such as 50 ms, as prediction labels to form a set of sample predicted input signal sequences corresponding to the historical input signal sequences. The sequence length of the prediction label, that is, the prediction length is M, M < N. For example, when M = 5, it represents predicting the next 5 sampling points.

[0048] According to the prediction requirements of the signal predictor, a multi-layer LSTM (Long Short-Term Memory Network) can be used as the core architecture, and a signal prediction branch is independently constructed for each lead, with a total of X branches. The structures of each branch are the same but the parameters are independently trained, where X is the number of leads.

[0049] Among them, in the construction of the signal predictor, it mainly includes three parts: an input layer, a hidden layer, and an output layer. Among them, the input dimension of each branch of the input layer is [window length N, 1] for processing multiple single-lead sequences. The hidden layer is set with 2 LSTM layers, with 128 neurons in each layer, and the activation function is tanh. Dropout is used to avoid overfitting. The output layer is a fully connected layer, and the output dimension is [prediction length M, 1], and the activation function is a linear function. The weight parameters of each branch of the signal predictor are independently optimized, allowing different leads to capture unique signal features, such as the waveform differences between limb leads and chest leads in ECG.

[0050] For training the signal predictor, the total number of samples was no less than 100,000, covering at least 24 hours of continuous signal data, such as 24-hour dynamic monitoring data of ECG. 80% of this data was used as the training set, 10% as the validation set, and 10% as the test set. The optimizer used was the Adam optimizer with an initial learning rate of 0.001 and a cosine annealing decay strategy. The training batch size was 64. The loss function used was mean squared error (MSE). Training consisted of 200 epochs, with each epoch iterating through all training samples, and performance evaluated on the validation set every 10 epochs.

[0051] The signal predictor is considered converged when the validation set MSE stabilizes below 0.01. To obtain the signal predictor, input multiple historical input signal sequences of multi-lead signals from the previous time zone, and it can predict and output multiple corresponding predicted input signal sequences.

[0052] In step S200 of this application embodiment, multiple filtering coefficients of the IIR high-pass filter used to filter the multi-lead signal are randomly configured. Combining these multiple historical filtering coefficients, the historical filtering cost and the multi-lead filtering cost are calculated, including:

[0053] Multiple filter coefficients of an IIR high-pass filter for filtering multi-lead signals are randomly configured, wherein the range of the filter coefficients is 0 to 1;

[0054] Calculate the variation range of multiple filter coefficients and multiple historical filter coefficients respectively, and calculate the average value to obtain the historical filtering cost;

[0055] Calculate the deviation of each filter coefficient from the other filter coefficients, and calculate the mean to obtain the cost of multi-lead filtering.

[0056] In this embodiment, the IIR high-pass filter refers to an Infinite Impulse Response (IIR) high-pass filter, which is a filter that allows high-frequency signals to pass through while suppressing low-frequency signals. The difference equation of a typical IIR high-pass filter is y[n] = α·y[n-1] + (1-α)·(x[n] - x[n-1]), where x[n] is the current input signal, y[n] is the current output signal, and α is the filter coefficient (0 < α < 1). When α is close to 1, the smoothing effect of the filter on the signal is enhanced.

[0057] The filtering coefficients mentioned above in this embodiment, i.e., the α value, are parameters used to control the frequency response and filtering effect of the IIR high-pass filter. The larger α is, the higher the weight of the historical output y[n-1], and the smoother the filtered signal. The smaller α is, the higher the weight of the current input change (x[n]-x[n-1]), and the more signal details are preserved.

[0058] The historical filter coefficients are a set of historically effective filter coefficients used in IIR high-pass filter processing. They record the filter coefficient values ​​obtained through optimization at past moments, such as α1, α2, ..., αk, where k is the number of historical records. These historical filter coefficients serve as a reference benchmark for current filter coefficient optimization. By comparing the differences between historical coefficients and the current configuration coefficients, the rationality of the new coefficients is evaluated.

[0059] In this embodiment, after randomly configuring multiple filter coefficients of the IIR high-pass filter for filtering multi-lead signals, it is necessary to evaluate the effectiveness of the filter coefficients. This evaluation metric is the historical filtering cost. The historical filtering cost is a quantitative indicator that measures the degree of difference between the currently randomly configured filter coefficients and historical filter coefficients. It is obtained by calculating the average value of the coefficient variation. The smaller the cost, the closer the current coefficients are to the historical effective coefficients, and the higher the stability of the filtering effect; conversely, it indicates that the coefficients change drastically, which may lead to fluctuations in the filtering effect.

[0060] The cost of multi-lead filtering is a quantitative indicator that measures the degree of difference between the filter coefficients configured in each lead of a multi-lead signal. It is obtained by calculating the average value of the coefficient deviation. The smaller the cost of multi-lead filtering, the closer the coefficients of each lead are, and the higher the consistency of filtering processing of the multi-lead signal. For example, in ECG, each lead can synchronously suppress baseline drift. Conversely, a large cost of multi-lead filtering may lead to excessive differences in the filtering effect of each lead, affecting the overall signal analysis.

[0061] In one possible implementation, assume there are three leads, I, II, and III. The historical filter coefficients are two sets of effective coefficients obtained from previous optimizations, recorded as follows: Historical Group 1: [α1 = 0.85, α2 = 0.82, α3 = 0.83], Historical Group 2: [α1 = 0.88, α2 = 0.86, α3 = 0.87]. The random configuration range of the filter coefficients is α ∈ (0, 1), rounded to two decimal places.

[0062] Next, multiple filter coefficients of the IIR high-pass filter used to filter the multi-lead signal need to be randomly configured. A uniformly distributed random number generator can be used to configure one filter coefficient for each of the three leads. For example: Lead I: α1 = 0.79; Lead II: α2 = 0.86; Lead III: α3 = 0.91. All configured filter coefficients are in the range (0,1).

[0063] Then, it is necessary to calculate the variation range of multiple filter coefficients and multiple historical filter coefficients, and calculate the average value to obtain the historical filtering cost. Specifically, this can be done by first calculating the absolute difference between the current filter coefficient and each group of historical coefficients. For example, the differences between the randomly configured filter coefficient and historical group 1 are |0.79-0.85|=0.06, |0.86-0.82|=0.04, and |0.91-0.83|=0.08, respectively; and the differences between the filter coefficient and historical group 2 are |0.79-0.88|=0.09, |0.86-0.86|=0.00, and |0.91-0.87|=0.04, respectively. Then, the average of all differences is calculated to obtain the historical filtering cost. For example, the total sum of differences = 0.06 + 0.04 + 0.08 + 0.09 + 0.00 + 0.04 = 0.31, and the historical filtering cost = total sum of differences / (number of historical groups × number of leads) = 0.31 / (2 × 3) ≈ 0.052. The historical filtering cost can be calculated using the above method.

[0064] Furthermore, it is necessary to calculate the deviation of each filter coefficient from other filter coefficients and calculate the average to obtain the multi-lead filtering cost. Specifically, this can be done by first calculating the absolute difference between the filter coefficients of each lead. For example, the absolute difference between the filter coefficients of leads I and II is |0.79-0.86|=0.07; the absolute difference between the filter coefficients of leads I and III is |0.79-0.91|=0.12; and the absolute difference between the filter coefficients of leads II and III is |0.86-0.91|=0.05. Then, the average of the absolute differences of the filter coefficients of each lead is calculated to obtain the multi-lead filtering cost, such as multi-lead filtering cost = (0.07+0.12+0.05) / 3 = 0.24 / 3 = 0.08. The multi-lead filtering cost can be calculated using the above method.

[0065] In step S300 of this embodiment, the multi-lead filtering cost is corrected and calculated based on the plurality of predicted input signal sequences and the prediction error coefficients to obtain the corrected multi-lead filtering cost, including:

[0066] Calculate the signal deviation of the plurality of predicted input signal sequences;

[0067] The error rates of multiple signal prediction branches within the signal predictor are obtained through testing, and the average is calculated to obtain the prediction error coefficient.

[0068] Based on the prediction error coefficient, the signal deviation is compensated to obtain the compensated signal deviation.

[0069] Based on the ratio of the signal deviation to the preset signal deviation, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost.

[0070] In this embodiment, it is necessary to calculate the signal deviation of the multiple predicted input signal sequences. The signal deviation is the difference between the predicted signal and the historical signal, and it is calculated using the root mean square error (RMSE). That is, the difference between the predicted sequence and the historical sequence for each lead is calculated point by point, the squares are calculated, summed, and the average value is taken, then the square root is taken. For example, the RMSE for lead I is 0.07, the RMSE for lead II is 0.09, and the RMSE for lead III is 0.08. In multi-lead scenarios, the average deviation of each lead can be taken. For example, the signal deviation in a 3-lead scenario can be (0.07 + 0.09 + 0.08) / 3 ≈ 0.08.

[0071] Furthermore, it is necessary to test and obtain the error rates of multiple signal prediction branches within the signal predictor, and calculate the average to obtain the prediction error coefficient. The error rate of each signal prediction branch can be the mean square error (MSE) value, and then the average of the error rates is calculated as the prediction error coefficient. For example, if the error rate of branch I is 0.05, the error rate of branch II is 0.07, and the error rate of branch III is 0.06, then the prediction error coefficient = (0.05 + 0.07 + 0.06) / 3 ≈ 0.06.

[0072] Furthermore, the signal deviation needs to be compensated based on the prediction error coefficient to obtain the compensated signal deviation. Specifically, the compensated signal deviation can be calculated as follows: Compensated signal deviation = Signal deviation * (1 + Prediction error coefficient). For example, in the above example, the compensated signal deviation = 0.08 × (1 + 0.06) = 0.0848.

[0073] Furthermore, the multi-lead filtering cost needs to be corrected based on the ratio of the signal deviation to the preset signal deviation, resulting in a corrected multi-lead filtering cost. Specifically, the corrected multi-lead filtering cost can be calculated as: Corrected multi-lead filtering cost = Multi-lead filtering cost * (Compensated signal deviation / Preset signal deviation). The preset signal deviation can be set based on historical experience, representing an acceptable prediction error level, and can be adaptively adjusted according to the signal type; for example, this value can be set to 0.1. For instance, in the above example, the corrected multi-lead filtering cost = 0.08 × (0.0848 / 0.1) ≈ 0.0678.

[0074] In step S400 of this application embodiment, filtering prediction is performed based on the plurality of predicted input signal sequences and the plurality of filtering coefficients to obtain signal fitness, and the historical filtering cost is corrected and calculated to obtain the corrected historical filtering cost, including:

[0075] The multiple predicted input signal sequences and multiple filter coefficients are respectively input into the filter predictor, and multiple predicted signal fitnesss are obtained by outputting the average value to obtain the signal fitness. The filter predictor is trained using a set of sample input signal sequences, a set of sample filter coefficients, and a set of sample signal fitnesss. The sample signal fitness includes the signal filtering quality coefficient.

[0076] The historical filtering cost is corrected by calculating the ratio of the preset signal fitness to the signal fitness, and the corrected historical filtering cost is obtained.

[0077] In this embodiment, the function of the filter predictor is to predict the fitness of the predicted signal based on the predicted input signal sequence and the filter coefficients. A multilayer fully connected neural network can be used as the filter predictor, which can effectively handle the nonlinear mapping relationship between the signal sequence and the filter coefficients.

[0078] For example, the predicted input signal sequence, which serves as the input feature of the filter predictor, can be a predicted input signal sequence for three leads, namely I, II, and III, each with a length of 100 sampling points. The filter coefficients are the filter coefficients corresponding to the three leads calculated in step S200, such as α1 = 0.79, α2 = 0.86, and α3 = 0.91.

[0079] Collect the predicted input signal sequence, filter coefficients, and signal fitness under the aforementioned input signal sequence and filter coefficient conditions as a set of filter prediction sample data. Prepare no less than 10,000 sets of filter prediction sample data for training the filter predictor.

[0080] Optionally, the filter predictor has a three-layer structure, consisting of an input layer, a hidden layer, and an output layer.

[0081] The input dimension of the input layer can be 303, which is 3 leads × 100 sampling points per lead + 3 filter coefficients; the input data type is the normalized predicted input signal sequence value and filter coefficients.

[0082] The hidden layer consists of two layers. The first layer contains 128 neurons and uses ReLU as the activation function. The second layer also contains 128 neurons and uses ReLU as the activation function. A Dropout layer is introduced with a dropout rate of 0.2 to prevent overfitting.

[0083] The output layer consists of a single neuron and is used to output the fitness of the predicted signal. The activation function is Sigmoid, which ensures that the output range is between 0 and 1.

[0084] For training the filter predictor, the Adam optimizer is selected; the initial learning rate can be set to 0.001, and a cosine annealing decay strategy is adopted; 64 samples are processed per batch; and the mean squared error (MSE) is used as the loss function.

[0085] When the mean squared error (MSE) of the validation set stabilizes below 0.01, convergence is considered achieved, and the filter predictor is obtained. By inputting the multiple predicted input signal sequences and multiple filter coefficients into the filter predictor, multiple predicted signal fitness values ​​can be output.

[0086] Furthermore, the signal fitness needs to be calculated by averaging the fitness values ​​of multiple predicted signals. For example, the predicted sequences and filter coefficients of three leads are input into a filter predictor. The predictor outputs three predicted signal fitness values, and the average value is taken as the final signal fitness. Assuming that the predicted signal fitness for lead I is 0.78, the predicted signal fitness for lead II is 0.82, and the predicted signal fitness for lead III is 0.80, then the signal fitness = (0.78 + 0.82 + 0.80) / 3 ≈ 0.80.

[0087] Finally, the historical filtering cost needs to be corrected based on the ratio of the preset signal fitness to the signal fitness, resulting in a corrected historical filtering cost. Specifically, the corrected historical filtering cost can be calculated as: Corrected historical filtering cost = Historical filtering cost * (Preset signal fitness / Signal fitness). Here, the preset signal fitness is set based on historical experience and represents the fitness of the ideal filtering effect; for example, this value could be 0.8. The historical filtering cost is calculated in step S200, such as 0.052. For example, substituting the data, we get: Corrected historical filtering cost = 0.052 × (0.8 / 0.8) = 0.052.

[0088] In step S400 of this application embodiment, the filter quality parameters are calculated by combining the modified multi-lead filtering cost and signal fitness, the filter coefficients are optimized to obtain multiple optimal filter coefficients, and filtering processing is performed, including:

[0089] The filtering cost is calculated based on the corrected multi-lead filtering cost and the corrected historical filtering cost.

[0090] Based on the filtering cost and signal fitness, the filtering quality parameters are calculated.

[0091] Multiple filter coefficients are iteratively adjusted and optimized until convergence, and the optimal filter coefficients with the largest filter quality parameters are obtained for filtering.

[0092] In this embodiment, the filtering cost can be calculated as follows: Filtering cost = Corrected multi-lead filtering cost * α + Corrected historical filtering cost * β. Here, α and β are weight values, α + β = 1. Their specific values ​​can be adjusted according to the actual scenario; for example, they can be 0.7 and 0.3, reflecting a trade-off between current filtering consistency and historical stability.

[0093] Assuming that the cost of the corrected multi-lead filtering obtained through the aforementioned steps is 0.0678 and the cost of the corrected historical filtering is 0.052, then the filtering cost is approximately 0.0678 × 0.7 + 0.052 × 0.3 ≈ 0.062.

[0094] Optionally, the filter quality parameter can be calculated as: Filter quality parameter = Signal fitness / (1 + Filter cost). If the signal fitness calculated by the above steps is 0.80, then the filter quality parameter = 0.80 / (1 + 0.062) ≈ 0.753. It is easy to see that the higher the signal fitness and the lower the filter cost, the larger the quality parameter.

[0095] Finally, it is necessary to iteratively adjust and optimize multiple filter coefficients until convergence, obtain the multiple optimal filter coefficients with the largest filter quality parameters, and then perform filtering.

[0096] A specific optimization method can be the gradient ascent method. First, three filter coefficients are randomly generated, such as α1 = 0.79, α2 = 0.86, and α3 = 0.91. Then, the gradient is calculated, which is to approximate the partial derivative of the quality parameter with respect to each α using numerical differentiation, with a step size of 0.01. The coefficients are then updated, with a learning rate of 0.05. For example, when the gradient is 0.03, the update process for the filter coefficients is α1 = 0.79 + 0.05 × 0.03 = 0.805. This completes one round of iterative optimization. After each iteration, the filter quality parameters are recalculated. Convergence is considered achieved when the change in quality parameters is less than 0.0001 for five consecutive iterations.

[0097] Extract the maximum filter quality parameter during the iteration process, such as 0.785, and the corresponding multiple filter coefficients, such as α1 = 0.82, α2 = 0.87, and α3 = 0.85, as the optimal filter coefficients. Then, substitute the optimal filter coefficients into the IIR high-pass filter formula to filter the real-time multi-lead signal.

[0098] Example 2, as Figure 2 As shown, based on the same inventive concept as the multi-lead signal filtering method based on an IIR high-pass filter provided in Embodiment 1, this embodiment of the invention also provides a multi-lead signal filtering system based on an IIR high-pass filter, comprising:

[0099] The input signal prediction module 11 is used to acquire multiple historical input signal sequences of multi-lead signals in the previous time zone, perform signal prediction on each sequence, and obtain multiple predicted input signal sequences.

[0100] The filtering cost calculation module 12 is used to randomly configure multiple filtering coefficients of the IIR high-pass filter for filtering multi-lead signals, and calculate the historical filtering cost and multi-lead filtering cost by combining multiple historical filtering coefficients.

[0101] The filtering cost correction module 13 is used to perform correction calculation on the multi-lead filtering cost based on the multiple predicted input signal sequences and the prediction error coefficients, so as to obtain the corrected multi-lead filtering cost.

[0102] The filter coefficient optimization module 14 is used to perform filter prediction based on the multiple predicted input signal sequences and multiple filter coefficients, obtain signal fitness, perform correction calculation on the historical filter cost to obtain corrected historical filter cost, combine the corrected multi-lead filter cost and signal fitness to calculate filter quality parameters, optimize filter coefficients to obtain multiple optimal filter coefficients, and perform filtering processing.

[0103] Furthermore, the input signal prediction module 11 includes the following execution steps:

[0104] Obtain multiple historical input signal sequences of multi-lead signals in the previous time zone;

[0105] Call the signal predictor;

[0106] The multiple historical input signal sequences are input into the signal predictor, and the prediction output yields multiple predicted input signal sequences.

[0107] The training steps of the signal predictor include:

[0108] Based on the multi-lead signal filtering data over a historical period, multiple sets of historical input signal sequences are collected, and the input signal sequence within the time zone after each historical input signal sequence is collected to obtain multiple sets of predicted input signal sequences.

[0109] Construct multiple signal prediction branches for multi-lead signals;

[0110] The signal predictor is obtained by supervising the training of the multiple signal prediction branches until convergence using the multiple historical input signal sequence sets and the multiple predicted input signal sequence sets.

[0111] Furthermore, the filtering cost calculation module 12 includes the following execution steps:

[0112] Multiple filter coefficients of an IIR high-pass filter for filtering multi-lead signals are randomly configured, wherein the range of the filter coefficients is 0 to 1;

[0113] Calculate the variation range of multiple filter coefficients and multiple historical filter coefficients respectively, and calculate the average value to obtain the historical filtering cost;

[0114] Calculate the deviation of each filter coefficient from the other filter coefficients, and calculate the mean to obtain the cost of multi-lead filtering.

[0115] Furthermore, the filter cost correction module 13 includes the following execution steps:

[0116] Calculate the signal deviation of the plurality of predicted input signal sequences;

[0117] The error rates of multiple signal prediction branches within the signal predictor are obtained through testing, and the average is calculated to obtain the prediction error coefficient.

[0118] Based on the prediction error coefficient, the signal deviation is compensated to obtain the compensated signal deviation.

[0119] Based on the ratio of the signal deviation to the preset signal deviation, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost.

[0120] The multiple predicted input signal sequences and multiple filter coefficients are respectively input into the filter predictor, and multiple predicted signal fitnesss are obtained by outputting the average value to obtain the signal fitness. The filter predictor is trained using a set of sample input signal sequences, a set of sample filter coefficients, and a set of sample signal fitnesss. The sample signal fitness includes the signal filtering quality coefficient.

[0121] The historical filtering cost is corrected by calculating the ratio of the preset signal fitness to the signal fitness, and the corrected historical filtering cost is obtained.

[0122] Furthermore, the filter coefficient optimization module 14 includes the following execution steps:

[0123] The filtering cost is calculated based on the corrected multi-lead filtering cost and the corrected historical filtering cost.

[0124] Based on the filtering cost and signal fitness, the filtering quality parameters are calculated.

[0125] Multiple filter coefficients are iteratively adjusted and optimized until convergence, and the optimal filter coefficients with the largest filter quality parameters are obtained for filtering.

[0126] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0127] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0129] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0130] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0131] Although preferred embodiments of the invention have been described, those skilled in the art, once they have learned the basic inventive concept, can make other changes and modifications to these embodiments.

[0132] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of this invention and its equivalents, this invention also intends to include these modifications and variations.

Claims

1. A multi-lead signal filtering method based on an IIR high-pass filter, characterized in that, The method includes: Multiple historical input signal sequences of multi-lead signals in the previous time zone are obtained, and signal prediction is performed on each sequence to obtain multiple predicted input signal sequences. Randomly configure multiple filtering coefficients of the IIR high-pass filter for filtering multi-lead signals, and combine multiple historical filtering coefficients to calculate the historical filtering cost and multi-lead filtering cost. Based on the multiple predicted input signal sequences and the prediction error coefficients, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost. Based on the multiple predicted input signal sequences and multiple filter coefficients, filter prediction is performed to obtain signal fitness. The historical filter cost is corrected and calculated to obtain the corrected historical filter cost. Combining the corrected multi-lead filter cost and signal fitness, filter quality parameters are calculated. Filter coefficients are optimized to obtain multiple optimal filter coefficients, and then the filtering process is performed.

2. The multi-lead signal filtering method based on an IIR high-pass filter according to claim 1, characterized in that, Multiple historical input signal sequences of multi-lead signals from the previous time zone are obtained, and signal prediction is performed on each sequence to obtain multiple predicted input signal sequences, including: Obtain multiple historical input signal sequences of multi-lead signals in the previous time zone; Call the signal predictor; The multiple historical input signal sequences are input into the signal predictor, and the prediction output yields multiple predicted input signal sequences.

3. The multi-lead signal filtering method based on an IIR high-pass filter according to claim 2, characterized in that, The training steps for the signal predictor include: Based on the multi-lead signal filtering data over a historical period, multiple sets of historical input signal sequences are collected, and the input signal sequence within the time zone after each historical input signal sequence is collected to obtain multiple sets of predicted input signal sequences. Construct multiple signal prediction branches for multi-lead signals; The signal predictor is obtained by supervising the training of the multiple signal prediction branches until convergence using the multiple historical input signal sequence sets and the multiple predicted input signal sequence sets.

4. The multi-lead signal filtering method based on an IIR high-pass filter according to claim 1, characterized in that, Multiple filter coefficients of an IIR high-pass filter used for filtering multi-lead signals are randomly configured. These coefficients are then combined with multiple historical filter coefficients to calculate the historical filtering cost and the multi-lead filtering cost, including: Multiple filter coefficients of an IIR high-pass filter for filtering multi-lead signals are randomly configured, wherein the range of the filter coefficients is 0 to 1; Calculate the variation range of multiple filter coefficients and multiple historical filter coefficients respectively, and calculate the average value to obtain the historical filtering cost; Calculate the deviation of each filter coefficient from the other filter coefficients, and calculate the mean to obtain the cost of multi-lead filtering.

5. The multi-lead signal filtering method based on an IIR high-pass filter according to claim 1, characterized in that, Based on the multiple predicted input signal sequences and combined with the prediction error coefficients, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost, including: Calculate the signal deviation of the plurality of predicted input signal sequences; The error rates of multiple signal prediction branches within the signal predictor are obtained through testing, and the average is calculated to obtain the prediction error coefficient. Based on the prediction error coefficient, the signal deviation is compensated to obtain the compensated signal deviation. Based on the ratio of the signal deviation to the preset signal deviation, the multi-lead filtering cost is corrected and calculated to obtain the corrected multi-lead filtering cost.

6. The multi-lead signal filtering method based on an IIR high-pass filter according to claim 1, characterized in that, Based on the multiple predicted input signal sequences and multiple filter coefficients, filter prediction is performed to obtain signal fitness. The historical filter cost is then corrected to obtain a corrected historical filter cost, including: The multiple predicted input signal sequences and multiple filter coefficients are respectively input into the filter predictor, and multiple predicted signal fitnesss are obtained by outputting the average value to obtain the signal fitness. The filter predictor is trained using a set of sample input signal sequences, a set of sample filter coefficients, and a set of sample signal fitnesss. The sample signal fitness includes the signal filtering quality coefficient. The historical filtering cost is corrected by calculating the ratio of the preset signal fitness to the signal fitness, and the corrected historical filtering cost is obtained.

7. The multi-lead signal filtering method based on an IIR high-pass filter according to claim 1, characterized in that, Combining the modified multi-lead filtering cost and signal fitness, filter quality parameters are calculated, filter coefficients are optimized to obtain multiple optimal filter coefficients, and filtering processing is performed, including: The filtering cost is calculated based on the corrected multi-lead filtering cost and the corrected historical filtering cost. Based on the filtering cost and signal fitness, the filtering quality parameters are calculated. Multiple filter coefficients are iteratively adjusted and optimized until convergence, and the optimal filter coefficients with the largest filter quality parameters are obtained for filtering.

8. A multi-lead signal filtering system based on an IIR high-pass filter, characterized in that, The system includes: The input signal prediction module is used to acquire multiple historical input signal sequences of multi-lead signals in the previous time zone, perform signal prediction on each sequence, and obtain multiple predicted input signal sequences. The filtering cost calculation module is used to randomly configure multiple filtering coefficients of the IIR high-pass filter for filtering multi-lead signals, and calculate the historical filtering cost and multi-lead filtering cost by combining multiple historical filtering coefficients. The filter cost correction module is used to calculate and correct the multi-lead filter cost based on the multiple predicted input signal sequences and the prediction error coefficients, so as to obtain the corrected multi-lead filter cost. The filter coefficient optimization module is used to perform filter prediction based on the multiple predicted input signal sequences and multiple filter coefficients, obtain signal fitness, correct the historical filter cost to obtain corrected historical filter cost, combine the corrected multi-lead filter cost and signal fitness to calculate filter quality parameters, optimize the filter coefficients to obtain multiple optimal filter coefficients, and perform filtering processing.