Data analysis method and device, electronic equipment and storage medium
By performing convolution and segmentation operations on electrocardiogram (ECG) signals, combined with recognition models and slope update techniques, the problem of low accuracy in ECG signal detection was solved, achieving efficient and accurate feature waveform recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGYU KANGJIAN INNOVATION MEDICAL TECH CHENGDU CO LTD
- Filing Date
- 2024-10-28
- Publication Date
- 2026-04-28
AI Technical Summary
Existing electrocardiogram (ECG) signal characteristic waveform detection technologies lack adaptability, resulting in low detection accuracy.
By performing convolution and segmentation operations on the data to be identified, the starting and ending points of the feature waveforms are determined, and the detection accuracy is improved by using a pre-trained recognition model and slope update technology.
It improves the accuracy and efficiency of characteristic waveform detection, enabling accurate identification of abnormal signals in the early stages of heart disease.
Smart Images

Figure CN121935575A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal analysis technology, and in particular to a data analysis method, apparatus, electronic device and storage medium. Background Technology
[0002] Currently, in the field of cardiology, doctors typically use the detection of characteristic waveforms in electrocardiogram (ECG) signals to help diagnose various types of heart disease. Precise characteristic waveform detection technology can detect abnormalities in ECG signals even when early signs of heart disease are not obvious.
[0003] Currently, open-source software is commonly used to detect electrocardiogram (ECG) signals. However, these software programs typically rely on signal processing algorithms to detect feature waveforms. They lack sufficient adaptability when analyzing feature waveforms in ECG signals, resulting in low accuracy in feature waveform localization. Summary of the Invention
[0004] In view of the above, it is necessary to propose a data analysis method, device, electronic device and storage medium to solve the technical problem of low accuracy of characteristic waveform analysis.
[0005] This application provides a data analysis method applied to an electronic device. The method includes: performing a convolution operation on pre-stored data to be identified to obtain sample data; wherein the data to be identified includes a first feature waveform; performing a segmentation operation on the sample data to obtain segmented data, the segmentation operation including encoding and decoding operations; wherein the segmented data includes multiple regions; determining the start and end points of multiple second feature waveforms in the data to be identified by comparing the data to be identified with the segmented data; wherein the start point of each region corresponds to the start point of the second feature waveform, and the end point of each region corresponds to the end point of the feature.
[0006] In some embodiments, the method further includes: Determine the slope between every two signal points in the data to be identified; Determining the updated start point of each second characteristic waveform based on the slope, and determining the updated end point of each second characteristic waveform based on the slope, includes: determining the arbitrary signal point as the start point when the slope corresponding to any signal point is greater than a first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are equal to the first value; determining the start point closest to any second characteristic waveform as the start point of the arbitrary second characteristic waveform; determining the arbitrary signal point as the end point when the slope corresponding to any signal point is equal to the first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are greater than the first value; determining the end point closest to any second characteristic waveform as the end point of the arbitrary second characteristic waveform; and determining the positions of the multiple second characteristic waveforms in the detection signal based on the updated start point and the updated end point.
[0007] In some embodiments, the method for determining the data to be identified includes: acquiring a pre-stored signal to be detected, wherein the signal to be detected is used to characterize electrocardiogram (ECG) data; and determining the data to be identified from the signal to be detected based on a first characteristic waveform, wherein the data to be identified includes ECG data of at least one sinus rhythm.
[0008] In some embodiments, determining the data to be identified from the signal to be detected based on the first characteristic waveform includes: determining the peak point of the first characteristic waveform; and determining the data to be identified from the signal to be detected based on the peak point.
[0009] In some embodiments, the dimension of the sample data is greater than that of the data to be identified.
[0010] This application also provides a data analysis device, including a convolution module for performing convolution operations on pre-stored data to be identified to obtain sample data; wherein the data to be identified includes a first feature waveform; a segmentation module for performing segmentation operations on the sample data to obtain segmented data, wherein the segmentation operations include encoding operations and decoding operations; wherein the segmented data includes multiple regions; and a comparison module for determining the start and end points of multiple second feature waveforms in the data to be identified by comparing the data to be identified with the segmented data; wherein the start point of each region corresponds to the start point of the second feature waveform, and the end point of each region corresponds to the end point of the feature.
[0011] In some embodiments, the apparatus further includes an optimization module for determining the slope between every two signal points in the data to be identified; determining an updated start point for each second feature waveform based on the slope, and determining an updated end point for each second feature waveform based on the slope, including: determining the arbitrary signal point as a start point when the slope corresponding to any signal point is greater than a first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are equal to the first value; determining the start point closest to any second feature waveform as the start point of the arbitrary second feature waveform; determining the arbitrary signal point as an end point when the slope corresponding to any signal point is equal to the first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are greater than the first value; determining the end point closest to any second feature waveform as the end point of the arbitrary second feature waveform; and determining the positions of the multiple second feature waveforms in the detection signal based on the updated start point and the updated end point.
[0012] In some embodiments, the apparatus further includes an interception module for acquiring a pre-stored signal to be detected, wherein the signal to be detected is used to characterize electrocardiogram (ECG) data; and determining the data to be identified from the signal to be detected based on the first characteristic waveform, wherein the data to be identified includes ECG data of at least one sinus rhythm.
[0013] In some embodiments, the interception module is further configured to determine the peak point of the first feature waveform; and to determine the data to be identified from the signal to be detected based on the peak point.
[0014] In some embodiments, the dimension of the sample data is greater than that of the data to be identified.
[0015] This application also provides an electronic device, which includes: a memory storing at least one instruction; and a processor executing the instructions stored in the memory to implement the data analysis method.
[0016] This application also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the data analysis method described above.
[0017] As can be seen from the above technical solutions, the embodiments of this application determine the detection window based on the first feature waveform in the signal to be detected, and determine the data to be identified in the signal to be detected based on the detection window. This can reduce the amount of data involved in the detection of the second feature waveform, thereby improving the efficiency of detecting the second feature waveform. Furthermore, the data to be identified is standardized and subjected to dimensionality-upgrading processing to determine sample data, thereby improving data quality and thus improving the accuracy of determining the second feature waveform. The sample data is processed using a recognition model to obtain the start and end points of the second feature waveform, and the start and end points are updated according to the slope between every two signal points in the signal to be detected. This further improves the accuracy of determining the start and end points, and thus improves the accuracy of determining the position of the second feature waveform in the signal to be detected. Attached Figure Description
[0018] Figure 1 This is an application scenario diagram of a data analysis method provided in an embodiment of this application.
[0019] Figure 2 This is a flowchart of a data analysis method provided in an embodiment of this application.
[0020] Figure 3 This is a schematic diagram of a convolution operation provided in an embodiment of this application.
[0021] Figure 4 This is a schematic diagram of convolution operation provided in another embodiment of this application.
[0022] Figure 5 This is a schematic diagram of convolution operation provided in another embodiment of this application.
[0023] Figure 6 This is a flowchart of a data analysis method provided in another embodiment of this application.
[0024] Figure 7 This is a schematic diagram of an electrocardiogram signal provided in an embodiment of this application.
[0025] Figure 8 This is a flowchart of a method for determining a detection window provided in an embodiment of this application.
[0026] Figure 9 This is a flowchart of a method for updating the start and end points of a second characteristic waveform according to an embodiment of this application.
[0027] Figure 10 This is a functional block diagram of a data analysis device provided in an embodiment of this application.
[0028] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] To better understand the purpose, features, and advantages of this application, a detailed description of the application is provided below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other. Numerous specific details are set forth in the following description to provide a thorough understanding of this application; the described embodiments are only a part of the embodiments of this application, and not all of them.
[0030] Furthermore, 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 technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0032] This application provides a data analysis method that can be applied to one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0033] Electronic devices can be any electronic product that allows human-computer interaction with a customer, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.
[0034] Electronic devices may also include network devices and / or client devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0035] The networks in which electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).
[0036] like Figure 1 As shown, the data analysis method provided in this application can be applied to an electronic device 100, which is communicatively connected to a server 200. The electronic device 100 is used to acquire a signal to be detected from the server 200; determine a first characteristic waveform in the signal to be detected; determine a detection window based on the first characteristic waveform; determine data to be identified in the signal to be detected based on the detection window; determine sample data based on the data to be identified; input the sample data into a pre-trained recognition model to obtain the start point and end point of a second characteristic waveform; wherein the recognition model is used to identify multiple second characteristic waveforms in the data to be identified; and update the start point and end point of the second characteristic waveform according to the slope between every two signal points in the signal to be detected to obtain the updated start point and end point.
[0037] like Figure 2 The diagram shown is a flowchart of a data analysis method according to an embodiment of this application. The order of the steps in the flowchart can be changed, and some steps can be omitted, depending on different needs. The data analysis method provided in this embodiment includes the following steps.
[0038] S20, perform convolution operation on the pre-stored data to be identified to obtain sample data; wherein, the data to be identified includes the first feature waveform.
[0039] In one embodiment of this application, the data to be identified is a portion of the signal points in the signal to be detected. Specifically, the data to be identified can be determined from the data to be detected based on a detection window. Specifically, the method for determining the data to be identified includes: acquiring a pre-stored signal to be detected, wherein the signal to be detected is used to characterize electrocardiogram (ECG) data; determining the data to be identified from the signal to be detected based on the first characteristic waveform, wherein the data to be identified includes ECG data from at least one sinus rhythm event.
[0040] In one embodiment of this application, determining the data to be identified from the signal to be detected based on the first characteristic waveform includes: determining the peak point of the first characteristic waveform; and determining the data to be identified from the signal to be detected based on the peak point.
[0041] In one embodiment of this application, the first characteristic waveform can be the R-wave waveform in an electrocardiogram (ECG) signal, and the second characteristic waveform can be any characteristic waveform in the ECG signal. The R-wave peak represents the first upward inflection point in the QRS complex of an ECG, typically occurring during ventricular depolarization. It is one of the most prominent features in an ECG waveform, exhibiting significant amplitude and slope. Specifically, the R-wave peak can be used to determine the onset of ventricular contraction, a crucial stage in cardiac electrical activity. Furthermore, by detecting the R-wave peak in an ECG, the heart rate (the number of beats per minute) can be calculated. Detecting the R-wave peak allows for the extraction of key information from the ECG, such as heart rate and RR interval, providing doctors with crucial information about cardiac health. R-wave peak detection is also an important step in ECG signal processing. Through preprocessing, feature extraction, and peak detection, the R-wave peak can be accurately detected, providing strong support for ECG signal analysis and diagnosis. Methods for determining the R-wave peak include, but are not limited to, amplitude methods, area methods, slope methods, and algorithms based on digital signal processing technology. Different methods for determining the peak value of the R-wave are suitable for different application scenarios and needs. For example, the slope method detects the peak value of the R-wave by calculating the difference in the electrocardiogram signal and setting a threshold, which has the advantages of fast processing speed and ease of implementation; while neural network-based algorithms can use prior knowledge to detect the peak value of the R-wave more accurately, but the training process may be more complex.
[0042] In one embodiment of this application, in order to determine a portion of data points from the signal to be detected and thus obtain the data to be identified for feature waveform recognition, a detection window can be determined from the signal to be detected, and then the data to be identified can be extracted from the signal to be detected using the detection window. The detection window includes a window start point and a window end point. The window start point corresponds to one signal point in the signal to be detected, and the window end point corresponds to another signal point in the signal to be detected.
[0043] In one embodiment of this application, in order to improve the efficiency of subsequent second feature waveform detection, convolution operation can be performed on the data to be identified during the segmentation process to obtain sample data, thereby ensuring that the dimension of the sample data meets the format requirements of the recognition model used for feature waveform detection. Subsequently, second feature waveform detection can be performed based on the sample data. In this way, each second feature waveform in the signal to be detected can be determined without preprocessing the detection signal, which can improve the efficiency of subsequent second feature waveform detection.
[0044] In one embodiment of this application, determining sample data based on the data to be identified includes: standardizing the data to be identified to obtain standardized data to be identified; and performing dimensionality-upgrading on the standardized data to be identified to obtain the sample data. Standardizing the data to be identified reduces the negative impact of dimensional differences between different signal points on subsequent identification of the second feature waveform, thereby improving the accuracy of identifying the second feature waveform. Performing dimensionality-upgrading on the standardized data to be identified increases the dimensionality of the data participating in the identification of the second feature waveform, thus improving the accuracy of determining the second feature waveform.
[0045] In one embodiment of this application, the step of performing dimensionality-upgrading processing on the standardized data to be identified to obtain the sample data includes: performing convolution operations on the standardized data to be identified based on at least one preset convolution kernel to obtain the sample data; wherein the dimension of the sample data is greater than the dimension of the data to be identified.
[0046] For example, such as Figure 3 The diagram shown is a schematic representation of a convolution operation provided in an embodiment of this application. The first data to be identified, 310, is one-dimensional input data. Figure 3 The term "1D input" in the text indicates that the first data to be identified, 310, is one-dimensional input data, such as... Figure 3 The “1×512” shown indicates that the first data to be identified 310 is a one-dimensional data with 1 row and 512 columns; the first convolution kernel 320 is used to perform convolution operations on the first data to be identified 310, such as Figure 3 The “512×1×1” shown refers to the dimension of the first convolutional kernel 320, indicating that the first convolutional kernel 320 is 512 rows, 1 column, and 1 channel of data; the first sample data 330 is the two-dimensional output data, such as... Figure 3 The “2D output” shown is used to characterize the first sample data 330 as two-dimensional output data, such as Figure 3 The “512×512” shown is used to characterize the first sample data 330 as data consisting of 512 rows and 512 columns.
[0047] For example, such as Figure 4 The diagram shown is a schematic representation of a convolution operation provided in another embodiment of this application. The second data to be identified, 410, is one-dimensional input data, such as... Figure 4 The “1×512” shown indicates that the second data to be identified 410 is a one-dimensional data with 1 row and 512 columns; the second convolution kernel 420 is used to perform convolution operation on the second data to be identified 410 to obtain the first intermediate data 430, such as Figure 4 The “64×1×1” shown indicates that the second convolution kernel 420 is composed of 64 rows, 1 column, and 1 channel of data. Figure 4The “64×512” shown indicates that the first intermediate data 430 is 64 rows and 512 columns; the third convolution kernel 440 is used to perform a convolution operation on the first intermediate data 430 to obtain the second sample data 450, as shown. Figure 4 The "128×64×1" shown indicates that the third convolution kernel 440 is a 128-row, 64-column, 1-channel dataset. Figure 4 The “128×512” shown is used to characterize the second sample data 450 as 128 rows and 512 columns of data.
[0048] For example, such as Figure 5 The diagram shown is a schematic representation of a convolution operation provided in another embodiment of this application. The third data to be identified, 510, is one-dimensional input data, such as... Figure 5 The “1×512” shown indicates that the third data to be identified 510 is a one-dimensional data with 1 row and 512 columns; the fourth convolution kernel 520 is used to perform convolution operation on the third data to be identified 510 to obtain the second intermediate data 530, as shown. Figure 5 The “512×1×1” shown indicates that the first convolution kernel 520 is composed of 512 rows, 1 column, and 1 channel of data. Figure 5 The “512×512” shown indicates that the second intermediate data 530 is 512 rows and 512 columns; the fifth convolution kernel 540 is used to perform a convolution operation on the second intermediate data 530 to obtain the third sample data 550, as shown. Figure 5 The “1×1×1” shown indicates that the fifth convolution kernel 540 is a 1-row, 1-column, 1-channel data structure. Figure 5 The “512×512” shown is used to characterize the third sample data 550 as 512 rows and 512 columns of data.
[0049] S21, Perform segmentation operations on the sample data to obtain segmented data. The segmentation operations include encoding and decoding operations. The segmented data includes multiple regions.
[0050] In one embodiment of this application, in order to determine the second feature waveform in the data to be identified based on sample data, a pre-trained recognition model can be used to process the sample data to obtain the start point and end point of the second feature waveform. The start point and end point of the second feature waveform can be used to determine the position of the second feature waveform in the data to be detected.
[0051] In one embodiment of this application, the pre-trained recognition model can be a 2DUnet model. This recognition model is used to perform segmentation operations on sample data to obtain segmented data, wherein the segmented data includes multiple regions. Specifically, each region includes multiple signal points in the sample data, used to characterize signal points in the sample signal belonging to different feature waveforms. The 2DUnet model includes an encoder and a decoder, wherein the encoder is used to encode the sample data during the segmentation operation, and the decoder is used to decode the sample data during the segmentation operation.
[0052] S22, by comparing the data to be identified with the segmented data, the start point and end point of multiple second feature waveforms in the data to be identified are determined; wherein, the start point of each region corresponds to the start point of the second feature waveform, and the end point of each region corresponds to the end point of the feature.
[0053] In one embodiment of this application, the segmented data includes multiple regions, each region including a start point and an end point, used to characterize the start and end time points of each region. Each region corresponds to a second feature waveform, and the start and end points of multiple second feature waveforms in the data to be identified can be determined by comparing the data to be identified and the segmented data. Specifically, the start point of the corresponding second feature waveform in the data to be identified is determined based on the time point corresponding to the start point of any region, and the end point of the corresponding second feature waveform in the data to be identified is determined based on the time point corresponding to the end point of that region.
[0054] like Figure 6 The diagram shown is a flowchart of a data analysis method according to another embodiment of this application. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different needs. The data analysis method provided in this embodiment includes the following steps.
[0055] S30, determine the first characteristic waveform in the signal to be detected, and determine the detection window based on the first characteristic waveform.
[0056] In one embodiment of this application, the signal to be detected is time-series data acquired by an electronic device, including multiple signal points, each signal point corresponding to a timestamp. For example, the signal to be detected can be an electrocardiogram signal, or time-series data sent by sensors monitoring the operating status of industrial equipment, such as current, voltage, and power data of the industrial equipment.
[0057] An electrocardiogram (ECG) is a medical examination method that records and interprets changes in the heart's electrical activity. Specifically, an ECG captures the weak electrical signals generated during a heartbeat and converts these signals into waveforms. The ECG waveform represents the heart's contraction and relaxation processes, providing important information about heart rhythm, heart rate, myocardial hypertrophy, myocardial ischemia, and arrhythmias. Figure 7 The diagram shown is a schematic of an electrocardiogram (ECG) provided in this application. The horizontal axis of the ECG is used for characterization; the vertical axis represents voltage or potential difference, typically measured in millivolts (mV), used to display the magnitude or intensity of the cardiac electrical signal. Specifically, the height or depth of different waveforms (such as P waves, QRS complexes, T waves, etc.) on the vertical axis reflects their corresponding electrical signal intensity.
[0058] In one embodiment of this application, the first characteristic waveform can be the R wave waveform in an electrocardiogram (ECG) signal, and the second characteristic waveform can be any characteristic waveform in the ECG signal. The R wave peak represents the first upward inflection in the QRS complex of the ECG, which usually occurs during ventricular depolarization. It is one of the most prominent features of the ECG waveform, with a large amplitude and slope.
[0059] Specifically, the R-wave peak value can be used to determine the onset of ventricular contraction, a crucial stage in cardiac electrical activity. Furthermore, by detecting the R-wave peak value in an electrocardiogram (ECG), the heart rate (the number of times the heart beats per minute) can be calculated. Detecting the R-wave peak value allows for the extraction of key information from the ECG, such as heart rate and the RR interval, providing doctors with important information about heart health. R-wave peak value detection is also a crucial step in ECG signal processing. Through preprocessing, feature extraction, and peak detection, the R-wave peak value can be accurately detected, providing strong support for ECG signal analysis and diagnosis.
[0060] Methods for determining the peak value of the R-wave include, but are not limited to, the amplitude method, the area method, the slope method, and algorithms based on digital signal processing techniques. Different methods for determining the peak value of the R-wave are suitable for different application scenarios and needs. For example, the slope method detects the peak value of the R-wave by calculating the difference in the electrocardiogram signal and setting a threshold, which has the advantages of fast processing speed and ease of implementation; while neural network-based algorithms can use prior knowledge to perform more accurate R-wave peak value detection, but the training process may be more complex.
[0061] In one embodiment of this application, the Pan-Tompkins algorithm, based on a series of signal processing steps, is used to accurately locate and measure the QRS waveform, particularly the R-wave peak, from ECG signals. This algorithm combines techniques such as bandpass filtering, derivative operations, squaring, moving average filtering, and threshold detection. Specifically, the method for determining the R-wave peak in the ECG signal includes: preprocessing, bandpass filtering: First, the ECG signal is preprocessed using a bandpass filter to eliminate irrelevant noise signals (such as high-frequency noise and baseline drift) and highlight the QRS waveform; derivative operations: The filtered signal is subjected to derivative operations to enhance the slope and amplitude of the QRS waveform, making it easier to identify; squaring: The signal after derivative operations is squared to further highlight the peak of the QRS waveform and ensure that all signal amplitudes are positive, avoiding the problem of downward-sloping peaks; moving average filtering: The signal after square operations is smoothed using a moving average filter to reduce noise interference with QRS waveform detection; peak detection: Peaks are detected in the smoothed signal by setting a threshold; threshold screening: A dual-threshold detection method is used. The algorithm employs several mechanisms: a first, higher threshold for initial screening of potential R-wave peaks; a second, lower threshold (typically half the first) for reassessing and confirming R-wave peaks under specific conditions (e.g., excessively long RR intervals); a time interval check to ignore all peaks within a specific time window (e.g., 200ms) before and after larger peaks to prevent misclassification of multiple parts of the same QRS waveform as multiple R-waves; a double-peak detection to determine whether two similar peaks belong to the same QRS waveform based on their relative position and amplitude; a backtracking re-judgment to search for potential R-wave peaks using a lower threshold if no R-wave appears within a specific multiple of the average RR interval (e.g., 1.5 times); and optimization and adjustment to improve detection accuracy and robustness by optimizing and adjusting parameters (e.g., thresholds, time windows) based on application requirements and signal characteristics.
[0062] In one embodiment of this application, in order to determine a portion of data points from the signal to be detected and thus obtain the data to be identified for feature waveform recognition, a detection window can be determined from the signal to be detected, and then the data to be identified can be extracted from the signal to be detected using the detection window. The detection window includes a window start point and a window end point. The window start point corresponds to one signal point in the signal to be detected, and the window end point corresponds to another signal point in the signal to be detected. Specifically, for the method of determining the detection window based on the first feature waveform, please refer to [link to relevant documentation]. Figure 8 The corresponding detailed explanation.
[0063] S31, determine the data to be identified in the signal to be detected according to the detection window.
[0064] In one embodiment of this application, to reduce the complexity of analyzing the signal to be detected, a portion of the signal points in the signal to be detected can be determined as data to be identified based on the detection window, thereby reducing the amount of data subsequently used for second feature waveform recognition and improving the efficiency of second feature waveform detection. Specifically, all data points between the data point corresponding to the start point of the detection window and the data point corresponding to the end point of the window can be determined as data to be identified.
[0065] For example, when the timestamp of the signal point corresponding to the start point of the window to be detected is 10:00:00 and the timestamp of the signal point corresponding to the end point of the window is 10:10:00, it can be determined that all signal points between the signal point with timestamp of 10:00:00 and the signal point with timestamp of 10:10:00 in the signal to be detected are data to be identified.
[0066] S32, determine sample data based on the data to be identified.
[0067] In one embodiment of this application, in order to improve the efficiency of subsequent second feature waveform detection, convolution operation can be performed on the data to be identified during the segmentation process to obtain sample data, thereby ensuring that the dimension of the sample data meets the format requirements of the recognition model used for feature waveform detection. Subsequently, second feature waveform detection can be performed based on the sample data. In this way, each second feature waveform in the signal to be detected can be determined without preprocessing the detection signal, which can improve the efficiency of subsequent second feature waveform detection.
[0068] In one embodiment of this application, determining sample data based on the data to be identified includes: standardizing the data to be identified to obtain standardized data to be identified; and performing dimensionality-upgrading on the standardized data to be identified to obtain the sample data. Standardizing the data to be identified reduces the negative impact of dimensional differences between different signal points on subsequent identification of the second feature waveform, thereby improving the accuracy of identifying the second feature waveform. Performing dimensionality-upgrading on the standardized data to be identified increases the dimensionality of the data participating in the identification of the second feature waveform, thus improving the accuracy of determining the second feature waveform.
[0069] In one embodiment of this application, the step of performing dimensionality-upgrading processing on the standardized data to be identified to obtain the sample data includes: performing convolution operations on the standardized data to be identified based on at least one preset convolution kernel to obtain the sample data; wherein the dimension of the sample data is greater than the dimension of the data to be identified.
[0070] S33, Input the sample data into the pre-trained recognition model to obtain the start point and end point of the second feature waveform; wherein, the recognition model is used to recognize multiple second feature waveforms in the data to be recognized.
[0071] In one embodiment of this application, in order to determine the second feature waveform in the data to be identified based on sample data, a pre-trained recognition model can be used to process the sample data to obtain the start point and end point of the second feature waveform. The start point and end point of the second feature waveform can be used to determine the position of the second feature waveform in the data to be detected.
[0072] In one embodiment of this application, the second characteristic waveform can be various waveforms in the signal to be detected. For example, when the signal to be detected is an electrocardiogram (ECG) signal, the second characteristic waveform can be a P wave, representing atrial depolarization (i.e., electrical signal conduction before atrial contraction). The P wave is usually small and rounded, located at the beginning of each heartbeat cycle; the QRS complex, composed of the Q wave, R wave, and S wave, is the most prominent part of the ECG, and its morphology and amplitude reflect the electrical activity of the ventricles; the J point, the inflection point between the end of the QRS complex and the beginning of the ST segment, marks the end of ventricular depolarization and the beginning of repolarization; the ST segment, the straight line segment from the J point to the beginning of the T wave, represents the process of slow ventricular repolarization; under normal circumstances, the ST segment should remain in the same position. The heart is on a horizontal plane, but it may be elevated or depressed due to factors such as myocardial ischemia; the T wave represents ventricular repolarization (i.e., electrical signal conduction during ventricular relaxation); the direction of the T wave is usually consistent with the direction of the main wave of the QRS complex, and changes in its morphology and amplitude can provide important information about the health of the heart; the QT interval, the time interval from the beginning of the QRS complex to the end of the T wave, represents the time required for the ventricle to go from depolarization to complete repolarization; prolongation of the QT interval may be related to certain heart diseases or drug side effects; the U wave, a small wave that can sometimes be observed after the T wave, the significance of which is not fully understood, but may be related to the late stage of ventricular repolarization.
[0073] In one embodiment of this application, the pre-trained recognition model can be a 2DUnet model. This recognition model is used to perform segmentation operations on sample data to obtain segmented data, wherein the segmented data includes multiple regions. Specifically, each region includes multiple signal points in the sample data, used to characterize signal points in the sample signal belonging to different feature waveforms. The 2DUnet model includes an encoder and a decoder, wherein the encoder is used to encode the sample data during the segmentation operation, and the decoder is used to decode the sample data during the segmentation operation.
[0074] S34, the start point and end point of the second characteristic waveform are updated according to the slope between every two signal points in the signal to be detected, so as to obtain the updated start point and end point.
[0075] In one embodiment of this application, since there may be errors in the start and end points of the second feature waveform obtained by processing sample data using the recognition model, the slope between every two signal points in the signal to be detected can be determined, and the start and end points of the second feature waveform can be updated according to the slope, thereby improving the accuracy of determining the position of the second feature waveform.
[0076] In one embodiment of this application, the method for updating the start and end points of the second characteristic waveform can be found in [reference needed]. Figure 9 The corresponding detailed explanation.
[0077] As can be seen from the above technical solutions, the embodiments of this application determine the detection window based on the first feature waveform in the signal to be detected, and determine the data to be identified in the signal to be detected based on the detection window. This can reduce the amount of data involved in the detection of the second feature waveform, thereby improving the efficiency of detecting the second feature waveform. Furthermore, the data to be identified is standardized and subjected to dimensionality-upgrading processing to determine sample data, thereby improving data quality and thus improving the accuracy of determining the second feature waveform. The sample data is processed using a recognition model to obtain the start and end points of the second feature waveform, and the start and end points are updated according to the slope between every two signal points in the signal to be detected. This further improves the accuracy of determining the start and end points, and thus improves the accuracy of determining the position of the second feature waveform in the signal to be detected.
[0078] like Figure 8 The diagram shown is a flowchart of a method for determining a detection window according to an embodiment of this application. The order of the steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements. The method for determining a detection window provided in this embodiment includes the following steps.
[0079] S40, determine the first signal point corresponding to the peak of the first characteristic waveform in the signal to be detected.
[0080] In one embodiment of this application, the first characteristic waveform can be the R-wave peak in the ECG signal, which is a very important second characteristic waveform in the electrocardiogram (ECG) signal. The R-wave peak represents the first upward inflection in the QRS complex in the ECG, usually occurring during ventricular depolarization. It is one of the most prominent features of the ECG waveform, with a large amplitude and slope.
[0081] Specifically, the R-wave peak value can be used to determine the onset of ventricular contraction, a crucial stage in cardiac electrical activity. Furthermore, by detecting the R-wave peak value in an electrocardiogram (ECG), the heart rate (the number of times the heart beats per minute) can be calculated. Detecting the R-wave peak value allows for the extraction of key information from the ECG, such as heart rate and the RR interval, providing doctors with important information about heart health. R-wave peak value detection is also a crucial step in ECG signal processing. Through preprocessing, feature extraction, and peak detection, the R-wave peak value can be accurately detected, providing strong support for ECG signal analysis and diagnosis.
[0082] In one embodiment of this application, when the first characteristic waveform is an R-wave, the first signal point can be the signal point corresponding to the peak value of the R-wave in the signal to be detected.
[0083] S41, determine the window start point in the signal to be detected based on the preset number of first signal points and the first signal points.
[0084] In one embodiment of this application, when the signal to be detected is an electrocardiogram (ECG) signal, the time differences between different second characteristic waveforms in the signal to be detected are relatively close. Therefore, a signal point before the first signal point can be determined as the starting point of the window. The number of signal points between the starting point of the window and the first signal point is a preset number of first signal points. For example, when the number of first signal points is 170, the 170th signal point can be determined as the starting point of the window based on the first signal point and in chronological order from late to early.
[0085] S42, determine the window termination point in the signal to be detected based on the preset number of second signal points and the first signal points.
[0086] In one embodiment of this application, when the signal to be detected is an electrocardiogram (ECG) signal, the time differences between different second characteristic waveforms in the signal to be detected are relatively close. Therefore, a signal point after the first signal point can be determined as the window termination point. The number of signal points between the window termination point and the first signal point is a preset number of second signal points. For example, when the number of second signal points is 342, the 342nd signal point can be determined as the window termination point based on the first signal point and in chronological order from earliest to latest.
[0087] S43, determine the detection window based on the window start point and the window end point.
[0088] like Figure 9The diagram shown is a flowchart of a method for updating the start and end points of a second characteristic waveform according to an embodiment of this application. The order of steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements. The method for updating the start and end points of a second characteristic waveform provided in this embodiment includes the following steps.
[0089] S50, determine the slope between every two signal points in the data to be identified.
[0090] In one embodiment of this application, in order to determine the variation range of signal intensity at different signal points in the signal to be detected, the slope between every two signal points in the signal to be detected can be determined, and the start point and end point of the second characteristic waveform in the signal to be detected can be updated based on the slope between every two signal points.
[0091] For example, if the signal value of any signal point is 4 and the signal value of the adjacent signal point is 2, then the slope of the signal point is 2.
[0092] S51, determine the starting point of each second characteristic waveform according to the slope, and determine the ending point of each second characteristic waveform according to the slope.
[0093] In one embodiment of this application, determining the starting point of each second characteristic waveform based on the slope includes: when the slope corresponding to any signal point is greater than a first value, and the slopes corresponding to multiple signal points before the any signal point are the first value, determining the any signal point as the starting point; and determining the starting point closest to any second characteristic waveform as the starting point of the any second characteristic waveform.
[0094] In one embodiment of this application, determining the termination point of each second characteristic waveform based on the slope includes: when the slope corresponding to any signal point is the first value, and the slopes corresponding to multiple signal points before the any signal point are greater than the first value, determining the any signal point as the termination point; and determining the termination point closest to any second characteristic waveform as the termination point of the any second characteristic waveform.
[0095] In one embodiment of this application, the first value can be 0. When the slope corresponding to any signal point is greater than 0, it indicates that the signal to be detected is trending upward at that signal point. When the slopes corresponding to multiple signal points before that signal point are all 0, it indicates that the signal value of the signal to be detected before that signal point has not fluctuated. Therefore, that signal point is the starting point of the second characteristic waveform. When the slope corresponding to any signal point is less than 0, it indicates that the signal to be detected is trending downward at that signal point. When the slopes corresponding to multiple signal points before that signal point are all 0, it indicates that the signal value of the signal to be detected before that signal point has not fluctuated. Therefore, that signal point is the ending point of the second characteristic waveform.
[0096] S52, determine the position of the various second characteristic waveforms in the detection signal based on the starting point and the ending point.
[0097] In one embodiment of this application, determining the position of the plurality of second feature waveforms in the detection signal based on the start point and the end point includes: determining all signal points between the start point and the end point of any second feature waveform as the position of the any second feature waveform in the detection signal.
[0098] Please see Figure 10 , Figure 10 This is a functional block diagram of a data analysis device provided in one embodiment of this application. A data analysis device 61 includes a convolution module 610, a segmentation module 611, a comparison module 612, an optimization module 613, and a truncating module 614. The module / unit referred to in this application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and perform a fixed function, and are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0099] The convolution module 610 is used to perform convolution operations on the pre-stored data to be identified to obtain sample data; wherein, the data to be identified includes a first feature waveform; The segmentation module 611 is used to perform segmentation operations on the sample data to obtain segmented data. The segmentation operations include encoding operations and decoding operations. The segmented data includes multiple regions. The comparison module 612 is used to determine the start and end points of multiple second feature waveforms in the data to be identified by comparing the data to be identified with the segmented data; wherein, the start point of each region corresponds to the start point of the second feature waveform, and the end point of each region corresponds to the end point of the feature.
[0100] The optimization module 613 is used to determine the slope between every two signal points in the data to be identified; determine the updated start point of each second feature waveform based on the slope, and determine the updated end point of each second feature waveform based on the slope, including: when the slope corresponding to any signal point is greater than a first value, and the slopes corresponding to multiple signal points before the signal point are equal to the first value, determining the signal point as the start point; determining the start point closest to any second feature waveform as the start point of the second feature waveform; when the slope corresponding to any signal point is equal to the first value, and the slopes corresponding to multiple signal points before the signal point are greater than the first value, determining the signal point as the end point; determining the end point closest to any second feature waveform as the end point of the second feature waveform; and determining the positions of the multiple second feature waveforms in the detection signal based on the updated start point and the updated end point.
[0101] The interception module 614 is used to acquire a pre-stored signal to be detected, wherein the signal to be detected is used to characterize electrocardiogram data; and to determine the data to be identified from the signal to be detected based on the first characteristic waveform, wherein the data to be identified includes at least one electrocardiogram data of sinus rhythm.
[0102] The interception module 614 is further configured to determine the peak point of the first feature waveform; and to determine the data to be identified from the signal to be detected based on the peak point.
[0103] Please see Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 100 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 executes the computer-readable instructions stored in the memory to implement a data analysis method as described in any of the above embodiments.
[0104] In one embodiment of this application, the electronic device 100 further includes a bus and a computer program stored in the memory 12 and executable on the processor 13, such as a feature waveform detection program.
[0105] Figure 11 Only an electronic device 100 with memory 12 and processor 13 is shown; those skilled in the art will understand that... Figure 11 The structure shown does not constitute a limitation on the electronic device 100, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0106] Combination Figure 2The memory 12 in the electronic device 100 stores a plurality of computer-readable instructions to implement a data analysis method. The processor 13 can execute the plurality of instructions to: determine a first feature waveform in a signal to be detected; determine a detection window based on the first feature waveform; determine data to be identified in the signal to be detected based on the detection window; determine sample data based on the data to be identified; input the sample data into a pre-trained recognition model to obtain the start point and end point of a second feature waveform; wherein the recognition model is used to identify multiple second feature waveforms in the data to be identified; update the start point and end point of the second feature waveform according to the slope between every two signal points in the signal to be detected to obtain the updated start point and end point.
[0107] Specifically, the processor 13's implementation method for the above instructions can be found in [reference needed]. Figure 2 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0108] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. The electronic device 100 may be a bus-type structure or a star-type structure. The electronic device 100 may also include more or fewer other hardware or software than shown in the diagram, or different component arrangements. For example, the electronic device 100 may also include input / output devices, network access devices, etc.
[0109] It should be noted that electronic device 100 is only an example. Other existing or future electronic products that are suitable for this application should also be included within the scope of protection of this application and are incorporated herein by reference.
[0110] The memory 12 includes at least one type of readable storage medium, which can be non-volatile or volatile. The readable storage medium includes flash memory, portable hard drives, multimedia cards, card-type memory (e.g., SD or DX memory), magnetic storage, magnetic disks, optical disks, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 100, such as the portable hard drive of the electronic device 100. In other embodiments, the memory 12 can also be an external storage device of the electronic device 100, such as a plug-in portable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 100. The memory 12 can be used not only to store application software and various types of data installed on the electronic device 100, such as the code of a characteristic waveform detection program, but also to temporarily store data that has been output or will be output.
[0111] In some embodiments, the processor 13 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control unit of the electronic device 100, connecting to various components of the electronic device 100 via various interfaces and lines. It executes programs or modules stored in the memory 12 (e.g., executing a characteristic waveform detection program) and calls data stored in the memory 12 to perform various functions of the electronic device 100 and process data.
[0112] The processor 13 executes the operating system of the electronic device 100 and various installed applications. The processor 13 executes the applications to implement the steps in each of the above-described data analysis method embodiments, for example... Figure 2 The steps are shown.
[0113] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete this application. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device 100. For example, the computer program may be divided into a convolution module 610, a segmentation module 611, a comparison module 612, an optimization module 613, and a truncation module 614.
[0114] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute portions of the data analysis method described in the various embodiments of this application.
[0115] If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.
[0116] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, and other memory.
[0117] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.
[0118] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, in... Figure 11 The symbol is represented by only one arrow, but this does not indicate that there is only one bus or one type of bus. The bus is configured to enable communication between the memory 12 and at least one processor 13, etc.
[0119] This application also provides a computer-readable storage medium (not shown), which stores computer-readable instructions that are executed by a processor in an electronic device to implement a data analysis method described in any of the above embodiments.
[0120] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0121] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0123] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in the specification may also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A data analysis method applied to electronic devices, characterized in that, The method includes: The pre-stored data to be identified is subjected to a convolution operation to obtain sample data; wherein, the data to be identified includes the first feature waveform; The sample data is segmented to obtain segmented data, and the segmentation operation includes encoding and decoding operations; wherein the segmented data includes multiple regions; By comparing the data to be identified with the segmented data, the start and end points of multiple second feature waveforms in the data to be identified are determined; wherein, the start point of each region corresponds to the start point of the second feature waveform, and the end point of each region corresponds to the end point of the feature.
2. The data analysis method as described in claim 1, characterized in that, The method further includes: Determine the slope between every two signal points in the data to be identified; Determining the updated starting point of each second characteristic waveform based on the slope, and determining the updated ending point of each second characteristic waveform based on the slope, includes: determining the arbitrary signal point as the starting point when the slope corresponding to any signal point is greater than a first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are equal to the first value; determining the starting point closest to any second characteristic waveform as the starting point of the arbitrary second characteristic waveform; determining the arbitrary signal point as the ending point when the slope corresponding to any signal point is equal to the first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are greater than the first value; and determining the ending point closest to any second characteristic waveform as the ending point of the arbitrary second characteristic waveform. The positions of the various second feature waveforms in the detection signal are determined based on the updated start point and the updated end point.
3. The data analysis method as described in claim 1, characterized in that, The method further includes: Acquire a pre-stored signal to be detected, wherein the signal to be detected is used to characterize electrocardiogram data; The data to be identified is determined from the signal to be detected based on the first characteristic waveform, wherein the data to be identified includes at least one electrocardiogram data of sinus rhythm.
4. The data analysis method as described in claim 3, characterized in that, The step of determining the data to be identified from the signal to be detected based on the first characteristic waveform includes: Determine the peak point of the first characteristic waveform; The data to be identified is determined from the signal to be detected based on the peak point.
5. The data analysis method as described in claim 1, characterized in that, The dimension of the sample data is greater than that of the data to be identified.
6. A data analysis device, characterized in that, The device includes: The convolution module is used to perform convolution operations on the pre-stored data to be identified to obtain sample data; wherein, the data to be identified includes the first feature waveform; A segmentation module is used to perform segmentation operations on the sample data to obtain segmented data. The segmentation operations include encoding and decoding operations. The segmented data includes multiple regions. The comparison module is used to determine the start and end points of multiple second feature waveforms in the data to be identified by comparing the data to be identified with the segmented data; wherein, the start point of each region corresponds to the start point of the second feature waveform, and the end point of each region corresponds to the end point of the feature.
7. The data analysis device as described in claim 6, characterized in that, The device also includes an optimization module for determining the slope between every two signal points in the data to be identified; Determining the updated starting point of each second characteristic waveform based on the slope, and determining the updated ending point of each second characteristic waveform based on the slope, includes: determining the arbitrary signal point as the starting point when the slope corresponding to any signal point is greater than a first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are equal to the first value; determining the starting point closest to any second characteristic waveform as the starting point of the arbitrary second characteristic waveform; determining the arbitrary signal point as the ending point when the slope corresponding to any signal point is equal to the first value, and the slopes corresponding to multiple signal points preceding the arbitrary signal point are greater than the first value; and determining the ending point closest to any second characteristic waveform as the ending point of the arbitrary second characteristic waveform. The positions of the various second feature waveforms in the detection signal are determined based on the updated start point and the updated end point.
8. The data analysis device as described in claim 6, characterized in that, The device further includes an interception module for acquiring a pre-stored signal to be detected, wherein the signal to be detected is used to characterize electrocardiogram data; The data to be identified is determined from the signal to be detected based on the first characteristic waveform, wherein the data to be identified includes at least one electrocardiogram data of sinus rhythm.
9. The data analysis device as described in claim 8, characterized in that, The interception module is further configured to determine the peak point of the first feature waveform; and to determine the data to be identified from the signal to be detected based on the peak point.
10. The data analysis apparatus as described in claim 6, characterized in that, The dimension of the sample data is greater than that of the data to be identified.
11. An electronic device, characterized in that, The electronic device includes a processor and a memory, the processor being used to implement the data analysis method as described in any one of claims 1 to 5 when executing a computer program stored in the memory.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data analysis method as described in any one of claims 1 to 5.