Oscilloscope sampling waveform data processing method based on reinforcement learning

Through the reinforcement learning-based oscilloscope sampling waveform data processing method, the acquisition strategy and time processing are dynamically adjusted, which solves the problems of high energy consumption, low precision and resource waste of traditional oscilloscopes in new energy vehicle applications, and realizes efficient and accurate signal sampling and resource optimization.

CN120804670AInactive Publication Date: 2025-10-17HANGZHOU TAIDING TESTING TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511270583.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional oscilloscopes have difficulty balancing the acquisition of high-frequency details and low-frequency trends in new energy vehicle applications, resulting in high energy consumption, reduced sampling accuracy, and an inability to effectively capture complex signals. Parallel sampling also introduces errors, making it impossible to target key frequency bands for reconfigurable sampling, resulting in a waste of resources.

Method used

An oscilloscope sampling waveform data processing method based on reinforcement learning analyzes phase offset through multi-dimensional feature matrix and reinforcement learning, dynamically adjusts data acquisition strategy, combines Hilbert transform and scale perturbation mechanism, optimizes sampling parameters and time processing strategy, and achieves accurate sampling and efficient resource utilization.

Benefits of technology

It achieves comprehensive coverage and precise quantification of signal information, reduces phase offset error, improves sampling efficiency, enhances system adaptability and real-time response capabilities, and avoids resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804670A_ABST
    Figure CN120804670A_ABST
Patent Text Reader

Abstract

The invention discloses an oscilloscope sampling waveform data processing method based on reinforcement learning, and relates to the technical field of waveform signal processing, and the method comprises the steps: obtaining a plurality of groups of original waveform signals, including a first waveform signal and a second waveform signal, collected by an oscilloscope based on a pre-configured data collection strategy, extracting waveform features and constructing a multi-dimensional vector matrix; introducing reinforcement learning into the multi-dimensional vector matrix to analyze phase deviation caused by hardware energy consumption, determining an influence weight of the phase deviation on waveform quality, and feeding back and adjusting a data acquisition strategy; based on the adjusted data acquisition strategy, a third waveform signal is obtained, comprehensive characteristic deviation is obtained through Hilbert transform, the comprehensive characteristic deviation is compared with a preset deviation threshold value, and if the comprehensive characteristic deviation exceeds the preset deviation threshold value, a scale disturbance mechanism is introduced, secondary time processing is executed, and the third waveform signal is corrected; according to the invention, the sampling precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of waveform signal processing, in particular to an oscilloscope sampling waveform data processing method based on reinforcement learning. BACKGROUND

[0002] As a core tool for signal analysis, the oscilloscope plays an irreplaceable role in key systems such as battery management, motor control, and autonomous driving. However, as new energy vehicle technology evolves towards high integration and intelligence, the precision and real-time requirements of waveform analysis continue to increase, and signal features become increasingly complex. The inherent defects of traditional oscilloscopes in waveform data processing are further amplified in automotive application scenarios: Firstly, traditional fixed-parameter data acquisition and processing are single and cannot balance high-frequency details and low-frequency trends. The pursuit of maximum range for new energy vehicles often uses a fixed-parameter high-resolution acquisition mode, which is usually accompanied by high energy consumption. Long-term operation will significantly increase the energy consumption of the vehicle's low-voltage battery. The decline in hardware performance in low-power mode (such as limited amplifier bandwidth) may cause phase shift and increased noise. Secondly, traditional oscilloscopes cannot effectively capture the signal segments of interest when capturing complex sporadic signals. For example, they cannot capture the voltage drop signal before battery thermal runaway or the weak vibration waveform generated by early bearing wear, thereby burying potential safety hazards. Not only does this result in waste of test resources, but it also affects overall sampling accuracy due to complex system architecture, making it difficult to accurately sample such steady-state signals (e.g., signal segments in non-critical time regions). Thirdly, traditional oscilloscopes often use parallel sampling architecture, such as time-alternating sampling through increased parallel structures. However, large-scale parallelism introduces more errors, affecting sampling accuracy. In addition, test scenarios such as communication are often only interested in specific frequency band signals (e.g., signal segments in critical time regions), while traditional test instruments use a full-bandwidth sampling method that cannot target key priority bands for reconfigurable sampling, resulting in a large amount of invalid data and waste of sampling resources. SUMMARY

[0003] (I) Technical problems solved In view of the deficiencies of the prior art, the oscilloscope sampling waveform data processing method based on reinforcement learning is provided, different dimension waveform signals are obtained through the first and second sampling parameters, a multi-dimensional feature matrix is constructed, and the phase shift caused by energy consumption is analyzed combined with reinforcement learning, the influence weight of the phase shift on the waveform quality is determined, then the data acquisition strategy is fed back and adjusted, the third waveform signal is obtained according to the adjusted data acquisition strategy, and the secondary time processing correction processing is realized, the multi-dimensional feature matrix is realized, and the data acquisition strategy and the time processing strategy are dynamically adjusted according to the waveform signal characteristics, and the problems in the background art are solved.

[0004] (II) Technical solutions To achieve the above object, the following technical solutions are adopted: The application provides an oscilloscope sampling waveform data processing method based on reinforcement learning, which comprises the following steps: Based on the pre-configured data acquisition strategy, a plurality of groups of original waveform signals collected by the oscilloscope are obtained, wherein the original waveform signals include a first waveform signal corresponding to a first sampling parameter and a second waveform signal corresponding to a second sampling parameter; Based on the first waveform signal and the second waveform signal, waveform features are extracted and a multi-dimensional vector matrix is constructed; Reinforcement learning is introduced into the multi-dimensional vector matrix to analyze the phase shift caused by hardware energy consumption, the influence weight of the phase shift on the waveform quality is determined, and the data acquisition strategy is fed back and adjusted; Based on the adjusted data acquisition strategy, a third waveform signal corresponding to a third sampling parameter is obtained, Hilbert transform is performed on the third waveform signal to obtain a comprehensive feature deviation, the comprehensive feature deviation is compared with a preset deviation threshold, wherein if the comprehensive feature deviation exceeds the preset deviation threshold, a scale disturbance mechanism is introduced, secondary time processing is performed, and the third waveform signal is corrected; if the comprehensive feature deviation does not exceed the preset deviation threshold, the third waveform signal is directly output.

[0005] Further, the feedback adjustment of the data acquisition strategy comprises: dividing the influence weight of the phase shift on the waveform quality into a plurality of levels, and dynamically adjusting the execution intensity of the data acquisition strategy or switching the data acquisition mode based on the level of the weight.

[0006] Further, the reinforcement learning is introduced into the multi-dimensional vector matrix to analyze the phase shift caused by hardware energy consumption, the influence weight of the phase shift on the waveform quality is determined, and the data acquisition strategy is fed back and adjusted, which comprises: The multi-dimensional vector matrix is taken as a left node, and the hardware energy consumption is taken as a right node to form a bipartite graph model; wherein, the hardware energy consumption includes energy consumption parameters corresponding to an ADC module, a display screen and a probe driving circuit, and at least includes a sampling rate, brightness and a power supply voltage; and a Pearson correlation coefficient of the multi-dimensional vector matrix and the energy consumption parameters is taken as an edge weight of the bipartite graph model; and a bipartite graph maximum matching is performed based on the edge weight to optimize a total edge weight of a matching edge; Meanwhile, the first waveform signal and the second waveform signal are time-aligned, and for signal segments of the same time period, a time offset, an attenuation ratio and a total harmonic distortion degree are extracted as an evaluation parameter set; a training set is constructed by data collection and sampling, a mapping relationship between each evaluation parameter and the matching degree is fitted, and a weight coefficient of the phase influence index is trained with a mean square error as a target; Based on the total edge weight of the bipartite graph model, a state space of reinforcement learning is constructed, and the state space at least includes multi-dimensional characteristic parameters, energy consumption parameters and a phase influence index; a phase influence index minimum and a total energy consumption parameter minimum are taken as a reward function, each edge weight is optimized through policy iteration, and influence weights of each multi-dimensional vector matrix and hardware energy consumption are output; Based on the influence weights, a plurality of influence levels are divided, at least one of the first waveform signal and the second waveform signal or a combination thereof is optimized, and an adjusted data acquisition strategy is obtained.

[0007] Further, the bipartite graph maximum matching based on the edge weight includes: A dynamic threshold of the edge weight is set, edges with an edge weight lower than the dynamic threshold of the edge weight are filtered out, and a filtered bipartite graph model is obtained; The matching state of each node is initialized as unmatching; For each left node in the filtered bipartite graph model, the right nodes are matched in descending order of the edge weight of the adjacent edges.

[0008] Further, the mapping relationship between each evaluation parameter and the matching degree is fitted, and the weight coefficient of the phase influence index is trained, including: A cosine similarity algorithm is used to calculate the correlation degree of the evaluation parameter set and the matching degree, a set G is obtained in ascending order of the correlation degree, and a training set g is constructed every three samples; The training set g is trained, a linear relationship between the correlation degree and the weight coefficient is measured by using a mean square error method, and the weight coefficient is automatically assigned.

[0009] Further, based on the influence weights, a plurality of influence levels are divided, including: If the influence weight is in a first influence interval, it is determined as a first-level weight; If the influence weight is in a second influence interval, it is determined as a second-level weight; If the influence weight is in a third influence interval, it is determined as a third-level weight; If the influence weight is in the fourth influence interval, it is determined as a fourth-level weight; Wherein, the first influence interval is smaller than the second influence interval, the second influence interval is smaller than the third influence interval, and the third influence interval is smaller than the fourth influence interval.

[0010] Further, the Hilbert transform is performed on the third waveform signal to obtain a comprehensive feature deviation, including: Based on the Hilbert transform, the envelope line is formed by analyzing the third waveform signal, the envelope surface is obtained by fitting the envelope line through time dimension expansion, and the slope of the envelope surface is obtained, and the statistical features including the maximum value, the average value, the distribution skewness and the distribution kurtosis are extracted based on the slope; the relative deviation of each statistical feature is calculated to form each deviation index, and the weighted sum of each deviation index is obtained to obtain the comprehensive feature deviation.

[0011] Further, a scale perturbation mechanism is introduced, including: The first time processing scale and the second processing time scale are preset, and the first time processing scale and the second processing time scale are dynamic quantities, the first processing time scale and the second processing time scale are constructed into a processing time scale array, and are randomly disturbed to obtain several groups of different processing time scale arrays; The several groups of different processing time scale arrays are respectively applied to the first processing and the second processing to obtain the waveform feature extraction accuracy data and the processing resource consumption uniformity data in each processing; wherein the waveform feature extraction accuracy data at least includes signal-to-noise ratio, and the processing resource consumption uniformity data at least includes CPU load; Based on the feature extraction accuracy data and the processing resource consumption uniformity data, the Pareto optimal solution is found to correct the first time processing scale and the second processing time scale.

[0012] Further, the second time processing includes: First processing: extracting the signal amplitude variation and frequency distribution of the third waveform signal, introducing a first processing time scale, marking the signal amplitude variation and frequency distribution to generate time regions corresponding to key and non-key priority levels; signal is intercepted or discarded in each time region, and a first waveform scene is obtained; Second processing: based on the first signal scene, introducing a second processing time scale, strengthening the characteristics of the time region of the key priority level, weakening the characteristics of the time region of the non-key priority level, and reconstructing the signal data to obtain a second waveform scene.

[0013] Further, the multi-dimensional vector matrix includes a time domain feature vector, a frequency domain feature vector and a time-frequency joint feature vector.

[0014] (Three) beneficial effects The present application provides an oscilloscope sampling waveform data processing method based on reinforcement learning, which has the following beneficial effects: 1. The present invention obtains waveform signals of different dimensions through the first and second sampling parameters and constructs different feature vectors to achieve comprehensive coverage of signal information. Through matrix integration, the features can be directly used for subsequent analysis, laying a data foundation for subsequent feature-based decision-making; 2. This invention constructs a multidimensional vector matrix by extracting time domain, frequency domain, and time-frequency joint features to comprehensively capture waveform detail features. Combined with reinforcement learning to analyze the complex nonlinear relationship between hardware energy consumption and phase offset, this method can accurately quantify the impact of phase offset on waveform quality. This step improves the system's adaptability and enhances robustness in complex environments. At the same time, the data acquisition strategy is adjusted based on real-time feedback of the phase offset impact weight, finding the optimal balance between hardware energy consumption and waveform quality, reducing decision-making errors caused by phase offset, and better meeting actual application needs, providing a reliable basis for subsequent decision-making. 3. The present invention performs secondary time processing on the third waveform signal, obtains the first waveform scene based on the primary processing, obtains the second waveform scene based on the secondary processing, and obtains the corrected third waveform signal based on the second waveform scene. In this process, by introducing a scale perturbation mechanism, the waveform feature extraction accuracy data and the processing resource consumption uniformity data are accurately balanced to ensure the corresponding feature quality of the critical time area and the non-critical time area, enhance the real-time response capability of the system, reduce processing delays, improve sampling efficiency, and avoid waste of sampling resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 The figure is a schematic diagram showing the steps of a method for processing oscilloscope sampling waveform data according to an exemplary embodiment. DETAILED DESCRIPTION

[0016] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0017] Example: The embodiment of the present invention provides an oscilloscope sampling waveform data processing method based on reinforcement learning; Figure 1 is a schematic diagram showing the steps of a method for processing oscilloscope sampling waveform data according to an exemplary embodiment; Figure 1 , the method comprises the following steps: S1: Acquire multiple groups of original waveform signals acquired by an oscilloscope based on a preconfigured data acquisition strategy, where the original waveform signals include a first waveform signal corresponding to a first sampling parameter and a second waveform signal corresponding to a second sampling parameter different from the first sampling parameter; In this embodiment, the first sampling parameter and the second sampling parameter have different data collection strategies, including but not limited to sampling rate and triggering mode, for example: the first sampling parameter is high sampling (such as continuous sampling) and low trigger threshold, focusing on the high frequency details and weak edges of the signal, and the second sampling parameter is low sampling (such as trigger sampling) and high trigger threshold, focusing on the main profile and stable period of the original waveform signal.

[0018] S2: Based on the first waveform signal and the second waveform signal, waveform features are extracted and a multi-dimensional vector matrix is constructed, including time domain feature vectors, frequency domain feature vectors, and time-frequency joint feature vectors; Before extracting the waveform features, the first waveform signal and the second waveform signal need to be preprocessed, including noise filtering and baseline correction, to obtain smoothed waveform signals. In addition, time stamp calibration and interpolation processing are performed on the first waveform signal and the second waveform signal to unify their time resolution, ensuring that the signal data is aligned in the time dimension, facilitating subsequent modeling. The steps of preprocessing are conventional techniques and will not be described here; By extracting time domain features, time domain feature vectors are constructed: time domain features are directly extracted from the time sequence of the signal, reflecting the statistical law and morphological features of the signal changing with time; the time domain feature vector includes but is not limited to rise time, fall time, pulse width, and peak factor; By converting the signal to the frequency domain, the frequency domain feature vector is extracted: the frequency domain feature converts the signal from the time domain to the frequency domain through Fourier transform, revealing the frequency component distribution of the signal (suitable for stationary signals); the frequency domain feature vector includes but is not limited to power spectral density, center frequency, and harmonic distortion; By extracting time-frequency joint features, time-frequency feature vectors are constructed: time-frequency joint features make up for the deficiencies of time domain (lack of frequency information) and frequency domain (lack of time positioning), suitable for non-stationary signals (such as burst pulses, signals with frequency changing over time); the time-frequency joint feature vector includes but is not limited to energy distribution entropy; By extracting features in different domains (such as time domain, frequency domain, and time-frequency features), comprehensive coverage of signal information is achieved, and matrix integration allows features to be directly used for subsequent analysis, laying a data foundation for subsequent feature-based decision-making (such as reinforcement learning); S3: Introducing reinforcement learning analysis of phase shift caused by hardware energy consumption to the multi-dimensional vector matrix, determining the influence weight of phase shift on waveform quality, and feeding back to adjust the data collection strategy; Among them, the feedback adjustment of the data collection strategy includes: dividing the influence weight of the phase shift on the waveform quality into several levels, dynamically adjusting the execution intensity of the data collection strategy or switching the data collection mode based on the level of the weight; The phase shift caused by the analysis of hardware energy consumption by introducing reinforcement learning into a multi-dimensional vector matrix is determined, the influence weight of the phase shift on waveform quality is determined, and the data acquisition strategy is adjusted by feedback, including: The multi-dimensional vector matrix is taken as a left node, and the hardware energy consumption is taken as a right node to form a bipartite graph model; wherein the hardware energy consumption includes energy consumption parameters corresponding to an ADC module, a display screen and a probe driving circuit, at least including a sampling rate, brightness and a power supply voltage; and the Pearson correlation coefficient of the multi-dimensional vector matrix and the energy consumption parameter is taken as an edge weight of the bipartite graph model; the bipartite graph maximum matching is performed based on the edge weight, and the total edge weight of the matching edge is optimized; For example: The correlation coefficient of the pulse width of the time domain feature vector and the sampling rate of the ADC module is calculated, the higher the positive correlation degree of the sampling rate and the pulse width measurement accuracy, the greater the matching degree; The correlation coefficient of the harmonic distortion degree of the frequency domain feature vector and the power supply voltage of the probe driving circuit is calculated, the higher the negative correlation degree of the power supply voltage stability and the harmonic distortion degree, the greater the matching degree; The correlation coefficient of the energy distribution entropy of the time-frequency joint feature vector and the brightness of the display screen is calculated, the lower the positive correlation degree of the brightness fluctuation and the energy distribution entropy measurement error, the greater the matching degree; It should be noted that frequent charging and discharging of the ADC, continuous work of the display screen at high brightness, and uninterrupted power supply of the probe driving circuit will result in high energy consumption; The bipartite graph maximum matching based on the edge weight includes: The edge weight dynamic threshold is set, and the edges with edge weights lower than the edge weight dynamic threshold are filtered to obtain a filtered bipartite graph model; the matching state of each node is initialized as unmatched; wherein the edge weight dynamic threshold is set based on the distribution characteristics of the historical edge weight, and the value is 30% of the quantile value, retaining higher edge weights; For each left node in the filtered bipartite graph model, the edges adjacent to it are sorted in descending order of edge weight and matched in turn; specifically, for any left node x, its adjacent edges are traversed in turn: When a certain edge is traversed, if the right node y corresponding to the edge is not matched, the current left node x and the right node y are matched, and the matching state is recorded; If the right node y corresponding to the edge is matched, the current matching left node z is obtained; the left node z is backtracked to find other unmatched right nodes w, if found, the current left node z and the right node w corresponding to the edge are matched, y is released, x and y are matched, and the matching state is updated; if not found, skip the current edge and continue to try the next adjacent edge of x; The above process is a weighted bipartite graph, and the filtering of low-weight edges and the backtracking attempt are both to make the total weight of the final matching more optimal; while ensuring the maximum matching, the number of matches is also maximized; The first waveform signal and the second waveform signal are time-aligned, and for signal segments of the same time period, a set of evaluation parameters is extracted, including time offset, attenuation ratio, and total harmonic distortion degree; The time offset is calculated by calculating the cross-correlation function of the first waveform signal and the second waveform signal, and obtaining the time offset corresponding to the maximum value of the cross-correlation function; the attenuation ratio is the percentage of the difference between the peak amplitude of the second waveform signal and the peak amplitude of the first waveform signal to the peak amplitude of the first waveform signal; and the total harmonic distortion degree is the ratio of the sum of the powers of each harmonic to the fundamental power after Fourier transform; A training set is constructed by data collection and sorting sampling, and the mapping relationship between each evaluation parameter-matching degree is fitted and the weight coefficient of the phase influence index is trained with the mean square error as the target; The cosine similarity algorithm is used to calculate the correlation between the evaluation parameter set (such as time offset, attenuation ratio, and total harmonic distortion) and the matching degree, and the set G is obtained in ascending order according to the correlation, and the training set g is constructed every 3 samples; It should be noted that there may be continuous similar samples (such as small phase changes and almost repeated parameters), and interval sampling can avoid model overfitting and reduce computational complexity; The training set is used for learning, and the linear relationship between the correlation and the weight coefficient is measured by the mean square error method, and the weight coefficient is automatically assigned; The evaluation parameter set, the matching degree, and the corresponding weight coefficient are weighted and summed to generate the phase influence index, which is: The first weight coefficient is multiplied by (1 minus the matching degree), plus the second weight coefficient multiplied by the total harmonic distortion, plus the third weight coefficient multiplied by the time offset, plus the fourth weight coefficient multiplied by the attenuation ratio. The result of adding these terms is the phase influence index, which comprehensively reflects the influence of phase offset on the system multi-dimensional performance parameters. Before formula calculation, the involved parameters need to be dimensionless to ensure that the formula has physical meaning; It should be noted that the phase influence index integrates the influence of the four core phase problems of insufficient phase matching, harmonic interference, time misalignment and energy attenuation into a comprehensive index through weighted summation; the first weight coefficient multiplied by (1 minus matching degree) represents: the greater the matching degree, the better the matching quality (the higher the total edge weight), the smaller the phase shift influence, the lower the value of the phase influence index, and the better the waveform quality; the smaller the matching degree, the worse the matching quality (the lower the total edge weight), the greater the phase shift influence, the higher the value of the phase influence index, and the worse the waveform quality; the second weight coefficient multiplied by the total harmonic distortion represents: reflecting the degree of distortion of the original phase by the harmonic components (non-fundamental frequency noise) in the signal, the higher the value, the more serious the phase waveform is disturbed (such as harmonic pollution in power systems and distortion of audio signals), that is, the higher the total harmonic distortion, the greater the value of the phase influence index, the greater the phase shift, and the worse the waveform quality; the third weight coefficient multiplied by the time offset represents: measuring the delay or advance of the actual phase relative to the ideal time point (such as phase synchronization error of communication signals and phase time difference of mechanical vibration), the greater the value, the more obvious the phase misalignment in time, that is, the greater the time offset, the greater the value of the phase influence index, reflecting the more serious misalignment of the phase on the time axis, and the worse the waveform quality; the fourth weight coefficient multiplied by the attenuation ratio represents: the energy attenuation degree of the phase signal in the transmission process (such as phase signal loss caused by electromagnetic wave phase attenuation and mechanical wave amplitude attenuation), the higher the ratio, the worse the integrity of the phase signal, that is, the greater the attenuation ratio, the greater the value of the phase influence index, the more serious the phase signal attenuation, the more information loss, and the worse the waveform quality. Based on the total edge weight of the bipartite graph model, the state space of reinforcement learning is constructed, and the state space includes but is not limited to multi-dimensional feature parameters, energy consumption parameters and phase influence indexes; the reward function is the minimum phase influence index and the minimum total energy consumption parameter, that is, the reward function is the weighted combination of the phase influence index and the total energy consumption parameter; the action space is defined, including but not limited to adjusting the sampling rate and adjusting the trigger threshold; the edge weights are optimized through policy iteration, and the influence weights of each multi-dimensional vector matrix and hardware energy consumption are output; Based on the influence weight, several influence levels are divided, including first-level weight, second-level weight, third-level weight and fourth-level weight; at least one of the first waveform signal and the second waveform signal or a combination thereof is optimized to obtain an adjusted data acquisition strategy; wherein the data acquisition strategy includes but is not limited to sampling rate, sampling time length, trigger mode, filtering or gain configuration and data clipping rule; In this embodiment, the influence weight is divided into several levels, including: The preset first influence interval, second influence interval, third influence interval and fourth influence interval are compared with the influence weight: if the influence weight is in the first influence interval, the influence weight at this time is marked as a, and a first-level character is assigned, and the first-level weight is generated by combining a with the first-level character; if the influence weight is in the second influence interval, the influence weight at this time is marked as b, and a second-level character is assigned, and the second-level weight is generated by combining b with the second-level character; if the influence weight is in the third influence interval, the influence weight at this time is marked as c, and a third-level character is assigned, and the third-level weight is generated by combining c with the third-level character; if the influence weight is in the fourth influence interval, the influence weight at this time is marked as d, and a fourth-level character is assigned, and the fourth-level weight is generated by combining d with the fourth-level character; wherein the first influence interval is smaller than the second influence interval, the second influence interval is smaller than the third influence interval, and the third influence interval is smaller than the fourth influence interval; it should be noted that the setting method of different influence intervals is based on the statistics of historical influence weights, and the historical influence weights are sequentially sorted and quartile divided, and the first quartile, the second quartile and the third quartile are used as the division point to divide into four parts to form four intervals; this way can more finely distinguish different degrees of influence and adapt to subsequent more refined data collection strategies; It should be noted that the mapping relationship between the weight level and the data collection strategy is established for the first waveform signal, the second waveform signal or the combination thereof, and in actual execution process, the system monitors the weight change in real time, and once the weight level changes, it is immediately switched to the execution intensity or data collection mode corresponding to the level, that is, the data collection strategy; if the weight is in the same level for a plurality of periods, the strategy parameters (such as filter order, gain adjustment step) are optimized through fine tuning; at the same time, the system continuously records the corresponding relationship between the weight change and the strategy execution effect, and iteratively optimizes the weight level division threshold and the strategy parameter by using the reinforcement learning algorithm to form an adaptive data collection strategy system; For example: in the sampling rate adjustment, the first-level weight indicates that the current phase shift has less influence on the waveform quality, the original data collection strategy is maintained, the basic sampling rate and the trigger mode are maintained, the second-level weight and the third-level weight indicate that the phase shift has a certain influence on the waveform quality, the sampling rate is appropriately increased and the trigger threshold is appropriately reduced to enhance the fineness of data collection, while the core parameters of the original strategy (such as: the second-level weight is adjusted to 1.5 times of the basic value, and the third-level weight is forced to increase to 2 times of the basic value) are reserved; the fourth-level weight indicates that the phase shift has significantly affected the waveform quality, the high-precision data collection mode is switched to, the phase compensation mechanism is enabled, the waveform signal in the signal mutation area is preferentially collected, and prompt information is output, suggesting checking the oscilloscope hardware state to reduce the phase shift; For example, in the trigger mode selection, the first-level weight uses software trigger, the second-level weight uses hardware edge trigger, the third-level weight uses double-edge trigger and calibrated clock, and the fourth-level weight uses phase tracking trigger mechanism. For example, in the filter or gain configuration, the first-level weight turns off the hardware filter, the second-level weight starts the basic hardware filter, the third-level weight enables high-order hardware filter, and the fourth-level weight starts the data repair algorithm based on high-order filter. The above process constructs a multi-dimensional vector matrix by extracting time domain, frequency domain, and time-frequency joint features, comprehensively captures waveform detail features, analyzes the complex nonlinear relationship between hardware energy consumption and phase shift based on reinforcement learning, accurately quantifies the influence degree of phase shift on waveform quality, improves the system adaptive ability and enhances the robustness in complex environments; at the same time, based on the real-time feedback adjustment of the data acquisition strategy based on the influence weight of the phase shift, the optimal balance point between hardware energy consumption and waveform quality is found, the decision error caused by the phase shift is reduced, and it is more in line with the actual application requirements. Provide reliable basis for subsequent decision-making.

[0019] S4: Based on the adjusted data acquisition strategy, a third waveform signal corresponding to a third sampling parameter is obtained, and a comprehensive feature deviation is obtained by Hilbert transform on the third waveform signal. The comprehensive feature deviation is compared with a preset deviation threshold, wherein if the comprehensive feature deviation exceeds the preset deviation threshold, a scale disturbance mechanism is introduced, a second time processing is performed, the third waveform signal is corrected, the oscilloscope is compensated, and the final waveform data is obtained; if the comprehensive feature deviation does not exceed the preset deviation threshold, the third waveform signal is directly output. The Hilbert transform of the third waveform signal obtains a comprehensive feature deviation, which includes: Based on the Hilbert transform, the envelope line of the third waveform signal is analyzed, the envelope surface is obtained by time dimension expansion fitting of the envelope line, and the slope of the envelope surface is obtained. Based on the slope, statistical features are extracted, including maximum value, average value, distribution skewness and distribution kurtosis. It should be noted that the envelope surface is obtained by time dimension expansion fitting of the envelope line, which includes: for a single envelope line, it is expanded into a set of envelope data of multiple time segments, providing a basis for envelope surface construction; its specific way includes: time segment division: the signal time axis is equally divided into time segments T1, T2……T NFor example, if the signal is a periodic waveform, it can be divided by period; if the signal is a non-stationary signal, it can be divided by a fixed time length (1 second); calculate the envelope line by section: for the waveform signal in each time slice, repeat the Hilbert transform to obtain the corresponding envelope line; integrate the envelope data sequence: sort N envelope lines in time order to form an envelope data sequence; fitting: build a smooth curve between discrete data points through B-spline function to ensure the first and second derivatives at the connection are continuous; surface construction: take the time slice number as the horizontal axis (representing the time dimension expansion), the time in each time slice as the vertical axis, and the fitted envelope amplitude as the height to construct the envelope surface in three-dimensional space; Through the above steps, complete conversion from the original waveform signal to the envelope surface can be realized, providing more rich time-varying information for subsequent analysis (such as deviation analysis); The absolute value difference between the corresponding value of each statistical feature and the preset reference threshold is calculated to obtain the relative deviation of each statistical feature, and the relative deviation of each statistical feature is standardized to form a deviation index, and the deviation indexes are weighted and summed to obtain a comprehensive feature deviation; The comprehensive feature deviation is compared with the preset deviation threshold, and if the comprehensive feature deviation exceeds the deviation threshold, the third waveform signal is processed again in time; It should be noted that the preset reference threshold or the preset deviation threshold is determined based on the statistical feature value or the comprehensive feature deviation of historical statistics. In general, the sum of the mean μ and the s times standard deviation σ corresponding to the statistical feature value or the comprehensive feature deviation is directly used to reflect the feature change trend, where s is 1-3; The second time processing of the third waveform signal includes: Primary processing: extract the signal amplitude variation and frequency distribution of the third waveform signal, introduce a primary processing time scale, mark the signal amplitude variation and frequency distribution to generate time regions corresponding to key and non-key priority levels; and obtain a first waveform scene by cutting or discarding the signals in each time region; It should be noted that the more intense the signal amplitude variation and the frequency distribution in the amplitude mutation segment or the resonance frequency segment in a certain signal segment, the higher the priority level, and vice versa, the more subtle the signal amplitude variation and the frequency distribution in the steady state segment or the noise frequency segment, the lower the priority level; For example: For the time region of key priority level: Instantaneous cutting: keep the signal data in the complete region to ensure that the key features are not lost; Delayed discard: unless it is explicitly entered into a low priority region, the signal in this region is kept in the processing queue for subsequent secondary processing; In addition, priority labels (such as key mutation segment and trend turning point) can also be added to the features in the region for rapid positioning by the secondary processing. For non-critical priority time regions: Delay intercept: only record the statistical quantities of features in the region (such as: mean, variance), discard the original sampling point data; Fast discard: when a plurality of low-priority windows appear in succession, only the starting part (such as the first 10% duration) of the first window is retained for signal continuity, and the rest is discarded directly; In addition, non-critical time regions can also be reviewed every few windows (such as 5) for non-critical priority regions, and if the feature fluctuation exceeds the threshold, it is re-labeled as a critical time region; To achieve efficient use of resources and accurate capture of key features, it is necessary to divide the key and non-critical time regions based on the dynamic changes and time scales of signal features, and to carry out signal interception or discard accordingly. The complete signal of the key priority region and the summary data of the non-critical priority region are spliced in time sequence to form the first waveform scene, and if there is discarded data between high and low priority regions, linear interpolation is used to fill in; Secondary processing: based on the first signal scene, introduce a secondary processing time scale, strengthen the features of the key priority time region, weaken the features of the non-critical priority time region, and reconstruct the signal data to obtain the second waveform scene; For example: For key priority time regions, feature enhancement: Detail enhancement: perform higher-point FFT (such as from 1024 points to 4096 points) on the key time region to refine the spectral analysis and identify weak frequency components; oversample the signal within the key region sub-window (such as increase the sampling points by 1 times through linear interpolation) to improve the time domain detail resolution; Feature highlighting: normalize and amplify the signal amplitude of the key time region (saturated distortion needs to be avoided) to improve the visual and algorithmic recognition prominence; use wavelet transform or Hilbert transform on the key time region to generate time-frequency graphs and enhance the color contrast of high-energy regions (such as mapping energy values to a brighter color interval); For non-critical priority time regions, feature weakening: Detail blur: apply a low-order low-pass filter (such as a 2nd order Butterworth filter) to the non-critical time region to weaken high-frequency detail fluctuations; downsample the non-critical time region (such as reducing the sampling rate to 50%-70% of the original) to reduce data volume; Feature simplification: for long continuous non-critical time regions, use segmented compression algorithm (such as RLE run-length encoding) to store, only keep the start value, end value and trend slope of each segment; only calculate basic statistical features (such as mean, variance) for non-critical regions, skip the calculation of high-order features (such as kurtosis, spectral entropy); when displaying the waveform, the color of non-critical regions is grayed or the transparency is reduced, highlighting the visual priority of critical time regions; The enhanced key region sub-window and the weakened non-critical region data are spliced in the original time sequence to ensure time continuity; at the boundary between the key and non-critical regions, a cosine smoothing transition is used to avoid analysis deviation caused by feature mutation; Through the above steps, the secondary processing realizes precise enhancement and intelligent weakening of the first waveform scene, which not only retains the key features with diagnostic or analytical value in the signal, but also reduces the data processing complexity by suppressing redundant information, finally generating a second waveform scene more suitable for the target analysis task, based on which the final third waveform signal is obtained; Among them, the scale perturbation mechanism is introduced, including: The preset primary time processing scale and secondary processing time scale are dynamic quantities, and the primary processing time scale and the secondary processing time scale are constructed into a processing time scale array and randomly perturbed to obtain several groups of different processing time scale arrays; The several groups of different processing time scale arrays are respectively applied to the primary processing and secondary processing to obtain waveform feature extraction accuracy data and processing resource consumption uniformity data at each processing; wherein the waveform feature extraction accuracy data includes but is not limited to signal-to-noise ratio, and the signal-to-noise ratio is used to measure the proportion of effective components and noise in the signal, which can be directly calculated (modern digital oscilloscopes (such as Keysight 3000T series) can directly calculate through built-in analysis functions); the processing resource consumption uniformity data includes but is not limited to CPU load, and the CPU load reflects the processor resource consumption, which can be obtained through software monitoring or hardware sensors; Based on the feature extraction accuracy data and the processing resource consumption uniformity data, the Pareto optimal solution is found to correct the primary time processing scale and the secondary processing time scale, and finally the corrected primary time processing scale and the secondary time scale are used for primary processing and secondary processing again to obtain the final third waveform signal; Through the above steps, the dynamic time scale (the non-dominated time scale combination is found through the Pareto optimal solution) is used to optimize the intelligent decision-making driven by data, which can accurately balance the accuracy (such as signal-to-noise ratio) and resource consumption (such as CPU load), ensuring the quality of features corresponding to the key time regions and non-critical time regions, enhancing the system's real-time response capability, reducing processing delay, improving sampling efficiency, and avoiding waste of sampling resources.

[0020] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art can be aware that units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on the specific application and design constraints of the technical solutions.

[0021] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, which can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiments according to actual needs.

[0022] The above describes only the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered by the protection scope of the present application.

Claims

1. An oscilloscope sampling waveform data processing method based on reinforcement learning, characterized in that: The method comprises: Acquire multiple groups of original waveform signals acquired by the oscilloscope based on a preconfigured data acquisition strategy, wherein the original waveform signals include a first waveform signal corresponding to a first sampling parameter and a second waveform signal corresponding to a second sampling parameter; Extracting waveform features and constructing a multidimensional vector matrix based on the first waveform signal and the second waveform signal; Introducing reinforcement learning into the multidimensional vector matrix to analyze the phase offset caused by hardware energy consumption, determining the weight of the impact of the phase offset on the waveform quality, and using feedback to adjust the data acquisition strategy; Based on the adjusted data acquisition strategy, a third waveform signal corresponding to the third sampling parameter is obtained, a Hilbert transform is performed on the third waveform signal to obtain a comprehensive feature deviation, and the comprehensive feature deviation is compared with a preset deviation threshold. If the comprehensive feature deviation exceeds the preset deviation threshold, a scale perturbation mechanism is introduced, secondary time processing is performed, and the third waveform signal is corrected; if the comprehensive feature deviation does not exceed the preset deviation threshold, the third waveform signal is directly output.

2. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 1, characterized in that: The feedback adjustment of the data acquisition strategy includes: dividing the weight of the influence of the phase offset on the waveform quality into several levels, and dynamically adjusting the execution intensity of the data acquisition strategy or switching the data acquisition mode based on the level of the weight.

3. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 1, characterized in that: The step of introducing reinforcement learning into the multidimensional vector matrix to analyze the phase offset caused by hardware energy consumption, determining the weight of the impact of the phase offset on the waveform quality, and providing feedback to adjust the data acquisition strategy includes: A bipartite graph model is formed by using a multidimensional vector matrix as the left node and hardware energy consumption as the right node. Hardware energy consumption includes energy consumption parameters corresponding to the ADC module, display screen, and probe driver circuit, including at least sampling rate, brightness, and supply voltage. The Pearson correlation coefficient between the multidimensional vector matrix and the energy consumption parameters is used as the edge weight of the bipartite graph model. Based on the edge weights, a maximum matching of the bipartite graph is performed to optimize the total edge weight of the matching edges. At the same time, the first waveform signal and the second waveform signal are time-aligned. For signal segments in the same time period, the time offset, attenuation ratio, and total harmonic distortion are extracted as a set of evaluation parameters. A training set is constructed through data aggregation and sorting sampling. With the mean square error as the goal, the mapping relationship between each evaluation parameter and the matching degree is fitted, and the weight coefficient of the phase influence index is trained. Based on the total edge weights of the bipartite graph model, a reinforcement learning state space is constructed, which contains at least multidimensional feature parameters, energy consumption parameters, and a phase influence index. The reward function is the lowest phase influence index and the smallest total energy consumption parameter. Through policy iteration, each edge weight is optimized to output the influence weights of each multidimensional vector matrix and hardware energy consumption. Based on the influence weight, several influence levels are divided, and at least one of the first waveform signal and the second waveform signal or a combination thereof is optimized to obtain an adjusted data acquisition strategy.

4. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 3, characterized in that: The method of performing a maximum matching of a bipartite graph based on edge weights includes: Set a dynamic threshold for edge weights, filter out edges whose weights are lower than the dynamic threshold, and obtain a filtered bipartite graph model; Initialize the matching status of each node to unmatched; For each left node in the filtered bipartite graph model, sort the adjacent edges in descending order of their edge weights and match the right nodes in sequence.

5. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 3, characterized in that: The step of fitting the mapping relationship between each evaluation parameter and the matching degree and training the weight coefficient of the phase influence index includes: The cosine similarity algorithm is used to calculate the correlation between the evaluation parameter set and the matching degree, and the set G is obtained by sorting in ascending order of correlation. The training set g is constructed by sampling every three digits. The training set g is used for training and learning, the mean square error method is used to measure the linear relationship between the correlation degree and the weight coefficient, and the weight coefficient is automatically assigned.

6. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 3, characterized in that: The impact weights are divided into several impact levels, including: If the impact weight is in the first impact interval, it is determined to be a first-level weight; If the impact weight is in the second impact interval, it is determined to be a secondary weight; If the impact weight is in the third impact interval, it is determined to be a level three weight; If the impact weight is in the fourth impact interval, it is determined to be a level 4 weight; The first influence interval is smaller than the second influence interval, which is smaller than the third influence interval, which is smaller than the fourth influence interval.

7. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 1, characterized in that: The performing Hilbert transform on the third waveform signal to obtain a comprehensive characteristic deviation includes: Based on the Hilbert transform, the third waveform signal is analyzed to form an envelope line. The envelope line is fitted by expanding the time dimension to obtain the envelope surface, and the slope of the envelope surface is obtained. Based on the slope, statistical features are extracted, including the maximum value, average value, distribution skewness, and distribution kurtosis. The relative deviation of each statistical feature is calculated to form each deviation index, and the weighted sum of each deviation index is taken to obtain the comprehensive feature deviation.

8. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 1, characterized in that: The introduction of the scale perturbation mechanism includes: Preset a primary time processing scale and a secondary processing time scale, and the primary time processing scale and the secondary processing time scale are dynamic quantities, construct a processing time scale array with the primary processing time scale and the secondary processing time scale, and randomly perturb them to obtain several groups of different processing time scale arrays; Applying several sets of different processing time scale arrays to the primary processing and the secondary processing, respectively, to obtain waveform feature extraction accuracy data and processing resource consumption uniformity data during each processing; wherein the waveform feature extraction accuracy data at least includes a signal-to-noise ratio, and the processing resource consumption uniformity data at least includes a CPU load; Based on the feature extraction accuracy data and the processing resource consumption uniformity data, the Pareto optimal solution is found, and the primary processing time scale and the secondary processing time scale are corrected.

9. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 7, characterized in that: The secondary time processing includes: Primary processing: Extract the signal amplitude change and frequency distribution of the third waveform signal, introduce a primary processing time scale, mark the signal amplitude change and frequency distribution to generate time zones corresponding to critical and non-critical priorities; intercept or discard the signal in each time zone to obtain the first waveform scenario; Secondary processing: Based on the first signal scenario, a secondary processing time scale is introduced to strengthen the time region features of critical priorities and weaken the time region features of non-critical priorities, and reconstruct the signal data to obtain the second waveform scenario.

10. The oscilloscope sampling waveform data processing method based on reinforcement learning according to claim 1, characterized in that: The multi-dimensional vector matrix includes a time domain eigenvector, a frequency domain eigenvector and a time-frequency joint eigenvector.

Citation Information

Cited By

  • Oscillometer sampling mode switching control method applied to instrument data acquisition

    CN122283214A