Early pregnancy intelligent detection method based on electrocardiogram

Through deep learning, processing ECG signals, combining adaptive cutting and wavelet denoising algorithms, the improved ResNet-18 model is designed, which solves the problem of insufficient data quality and model generalization ability in automatic ECG diagnosis, and achieves high quality for early pregnancy Accuracy recognition and low-cost detection.

CN119302666APending Publication Date: 2025-01-14CHENGDU SIXTH PEOPLES HOSPITAL (CHENGDU GENERAL MEDICAL CENT)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411572720.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The prior art has problems with insufficient data quality, model interpretability and generalization ability in the automatic diagnosis of electrocardiogram, and it is difficult to effectively assist in the early identification and diagnosis of early pregnancy.

Method used

Using deep learning methods based on ECG signals, ECG data is processed through adaptive cropping and wavelet adaptive denoising algorithms, and an improved ResNet-18 model is designed, including convolutional layer, pooling layer, and intermediate residual blocks. layer, DenseNet residual block layer, global average pooling layer and fully connected layer for early pregnancy detection.

Benefits of technology

The accurate identification of early pregnancy was achieved, with an accuracy rate of 99.44%, and the accuracy rate and recall rate of 99.36%, reducing the detection time and application cost, and it has the characteristics of non-invasive, hidden and fast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119302666A_ABST
    Figure CN119302666A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent early pregnancy detection method based on an electrocardiogram, is applied to the field of medical image artificial intelligence, and aims to solve the problem that intelligent detection means for early pregnancy are lacked at present. The method comprises the following steps: firstly, carrying out self-adaptive cutting on an obtained twelve-lead electrocardiosignal; removing other noises such as muscles from the cut data by using a wavelet adaptive denoising algorithm to obtain pure and noiseless electrocardiosignal data; secondly, designing an improved ResNet-18 model, training the improved ResNet-18 model by adopting the obtained pure and noiseless electrocardiosignal data, and finally detecting the early pregnancy electrocardiogram based on the trained ResNet-18 model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of medical image artificial intelligence, and in particular relates to an image detection technology. Background Art

[0002] Pregnancy is a very common phenomenon in the world, with an incidence of unplanned pregnancy of about 30%. In my country, there are about 90 million women, many of whom are unaware of their pregnancy. However, they undergo routine electrocardiograms during school entrance examinations or physical examinations. If 1% of these women are pregnant in routine electrocardiograms, an average of 900,000 women can be found out each year through this method. Therefore, the electrocardiogram examination of early pregnancy is concealed, non-invasive, and inexpensive. Through the examination of electrocardiograms, a new early diagnosis method is provided for women with early pregnancy.

[0003] Pregnancy can cause changes in multiple organ functions, including cardiac electrophysiological changes. The electrocardiogram is more sensitive to changes in cardiac electrical activity and structure, and is popular, simple and practical. In theory, the use of changes in routine electrocardiograms to identify pregnancy early can serve as an important supplementary diagnostic method to HCG (human chorionic gonadotropin) and uterine color ultrasound.

[0004] Studies have shown that there are more ECG changes during pregnancy. Such as sinus arrhythmia, bundle branch block, premature contraction, short PR change, and ST-T change. By early detection of the above ECG changes, a new early diagnosis is provided for early pregnant women. At present, through literature review, it is found that some abnormal ECGs can be used for ECG diagnosis through automatic diagnosis and analysis of ECG. The important value of ECG management system lies in the management and collection of patients' ECG information, and the use of information technology means to complete the classification of various types of information, and then apply it in the field of clinical diagnosis. The research on ECG automatic diagnosis technology is of great significance to improve the accuracy and real-time nature of ECG diagnosis and reduce the labor intensity of medical staff. Therefore, it can be seen that the ECG information management system itself has significant networking and digital features, which can effectively avoid ECG information errors and help hospitals to give accurate ECG monitoring and detection conclusions. Under this premise, the most basic clinical application points of the ECG information management system need to be clarified, and the progress trend should be explored in combination with the current status of the system. By using ECG technology combined with digital model building, a model is established in some variable ECG manifestations to achieve an accurate, error-free and simple detection method.

[0005] With the rapid increase in the number of electrocardiograms and the subdivision of clinical diagnostic evidence, doctors are increasingly influenced by subjective factors during the diagnosis process. There is an urgent need for computer analysis to assist in diagnosis and improve the accuracy and efficiency of diagnosis. It has been verified that deep learning methods can classify a variety of different diseases, and because the neural network learning method can avoid the limitations of manual design, its classification effect is more accurate and efficient than traditional methods. At present, many researchers have carried out research on deep learning in the medical field, especially in the classification and diagnosis of ECG signals. Zhang et al. proposed a method based on deep convolutional neural network (DCNN). After using Fourier transform to transform ECG (electrocardiogram) signals into time-frequency domain, they designed a deep CNN (Convolutional Neural Networks) architecture involving two-dimensional convolution. Its architecture trains a specific DCNN for ECG samples of a specific length, learns the features of ECG wave signals from the time domain in an end-to-end manner, and classifies them. It transforms ECG signals into two-dimensional spectrograms as input, and the time-frequency features of the signal can be obtained from the spectrograms, which has better classification accuracy. Li Duan et al. used a 20-layer deep residual convolutional network to classify 5 types of ECG abnormalities after applying a wavelet adaptive threshold denoising algorithm to ECG signals, with a classification accuracy of over 99%. They proposed a 10-layer deep convolutional neural network model with a block structure, which trained and verified all ECG lead signals separately. The model produced over 99% accuracy and sensitivity performance, suitable for wearable devices and intensive care units. Fan et al. used DCNN combined with multi-scale fusion technology for single-lead short ECG signals for screening atrial fibrillation. Acharya et al. proposed an 11-layer CNN network model that does not require denoising and R peak detection. Teplitzky et al. used a 12-layer CNN model for the classification of fully automatic ventricular ectopic beats in mobile telemetry, with a specificity and sensitivity of 99%. They built a 34-layer convolutional neural network to map 29,163 ECG samples to 12 types of classification, with performance that surpassed expert diagnosis. And CNN is applied to the feature learning mechanism of ECG to screen the patient's signal. Its learning mechanism can generate robust features without professional domain knowledge and feature selection algorithm. At the same time, the paper compares CNN with other standard classifiers, namely K-nearest neighbor SVM and multilayer perceptron (MLP) network. The experimental results show that the end-to-end performance of CNN is better than the performance achieved by integrating CNN with other classifiers.In the early days, Kiranyaz et al. used the translation-invariant binary wavelet transform to extract morphological features. In order to avoid the dimensionality disaster phenomenon, the principal component analysis method was used to further reduce the redundant information in the high-dimensional data space. Their network achieved an accuracy of 99% on the MIT-BIH database.

[0006] In summary, neural networks have made significant progress in ECG detection and analysis, providing new possibilities for early diagnosis and treatment of diseases. However, further research and efforts are still needed to address challenges in data quality, model interpretability, and generalization ability to promote the application and development of deep learning in clinical practice. Summary of the invention

[0007] In order to solve the above technical problems, the present invention proposes an early pregnancy intelligent detection method based on electrocardiogram, which has the advantages of accuracy, rapidity, concealment, non-invasiveness, low cost and convenience.

[0008] The technical solution adopted by the present invention is: an early pregnancy intelligent detection method based on electrocardiogram, comprising:

[0009] S1, obtaining a data set of twelve-lead ECG signals;

[0010] S2, using an adaptive cropping algorithm to preliminarily process the twelve-lead ECG signal;

[0011] S3, using a wavelet adaptive denoising algorithm to remove noise from the adaptively cropped data to obtain pure and noise-free ECG signal data;

[0012] S4. Establish an improved ResNet-18 model; the improved ResNet-18 model includes an input layer, a convolutional layer, a pooling layer, an intermediate residual block layer, a DenseNet residual block layer, a global average pooling layer, a fully connected layer and an output layer in sequence;

[0013] S5. Using steps S1-S3 to obtain pure and noise-free ECG signal data with known early pregnancy or non-early pregnancy labels, train the improved ResNet-18 model in step S4;

[0014] S6. Use steps S1-S3 to obtain pure and noise-free ECG signal data with unknown early pregnancy or no early pregnancy labels, and input the data into the trained improved ResNet-18 model for early pregnancy detection.

[0015] Each Bottleneck residual block has the same structure, and all use 1x1 and 3x3 convolutions alternately to achieve feature extraction, including the first 1x1 convolution, the first 3x3 convolution, the second 1x1 convolution, and the third 1x1 convolution in sequence. The output of the first 1x1 convolution is used as the input of the first 3x3 convolution after passing through the first ReLU function, and the output of the first 3x3 convolution is used as the input of the second 1x1 convolution after passing through the second ReLU function. The output of the second 1x1 convolution and the output of the first 1x1 convolution are connected to the residual through the third 1x1 convolution, and the output of the third 1x1 convolution after passing through the third ReLU function is used as the output of the Bottleneck residual block.

[0016] Beneficial effects of the present invention: The intelligent detection method of the present invention can achieve early detection of early pregnant women, especially unexpected pregnancies, and provide important information for later clinical intervention, thereby enabling young women to improve their concept of rehabilitation and health care during pregnancy, avoid the occurrence of unexpected miscarriage, and further protect the life and health of young women. The social and economic benefits are enormous. The intelligent detection method for early pregnancy based on electrocardiogram proposed by the present invention has the following advantages:

[0017] 1. The method of the present invention adopts the intelligent diagnosis technology of early pregnancy based on ECG signal data, and uses advanced machine learning algorithms and deep learning models to process and analyze ECG data; it adopts the residual neural network with excellent classification performance at present, and improves it to achieve the best performance in ECG signal classification, especially in the task of early pregnancy classification. These algorithms and models can efficiently extract feature information from ECG data and identify physiological signal features related to early pregnancy, so as to achieve more accurate identification of early pregnancy status; the embodiment of the present invention collects a large batch of early pregnancy data, and according to more than 4,000 experimental and clinical data verification, our early pregnancy ECG recognition method has an accuracy rate of 99.44%, a precision rate of 99.36%, and a recall rate of 99.36%;

[0018] 2. During the application process, the test hardware environment used by the present invention is Intel i7-12700KF, NVIDIA GeForce RTX 3070, the model loading time only takes 1s, and the average detection time per person is only 2.4ms; the hardware environment of this test is close to the actual application scenario, and the detection efficiency is high; after the final software development, you only need to download the packaged software to use it, the operation is simple, and the personnel can use it after simple guidance, so the application cost is low;

[0019] 3. The present invention adopts the innovative use of electrocardiogram signals, a physiological characteristic of the human body, to detect early pregnancy, without the need for any invasive examination methods such as blood sampling, ultrasound, etc., and is therefore highly non-invasive. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of a twelve-lead early pregnancy electrocardiogram signal data set required by the present invention;

[0021] Figure 2 The data preprocessing module structure of the present invention;

[0022] Figure 3 This is the neural network structure for residual classification of the present invention. DETAILED DESCRIPTION

[0023] To facilitate those skilled in the art to understand the technical content of the present invention, the present invention is further explained below with reference to the accompanying drawings.

[0024] The present invention provides an electrocardiogram-based early pregnancy intelligent detection method, which first collects electrocardiogram signals and summarizes them into a twelve-lead early pregnancy electrocardiogram signal data set. The data set is then sent to a data preprocessing module to obtain pure electrocardiogram signal data. The electrocardiogram signal data is then sent to a designed and constructed neural network for training to obtain a model with the best performance, and finally the detection model is used for early pregnancy detection. The implementation process of the method of the present invention includes the following steps:

[0025] Step 1: Get a dataset of 12-lead ECG signals. This dataset contains data with known labels of early pregnancy: women aged 18-35 years old with early pregnancy (<12 weeks), HCG positive, and heart, lung, liver, kidney and other diseases have been excluded through medical history survey, cardiac ultrasound, chest X-ray, biochemical examination, etc.; control group data with known labels of non-pregnancy: healthy women aged 18-35 years old who are not pregnant. Our experimental and training data are within the allowed range, and more than 4,000 cases have been collected, which is a real, autonomous and reliable dataset.

[0026] The twelve-lead early pregnancy ECG signal data in this embodiment is as follows Figure 1 As shown, Figure 1 Channel 1, 2, and 3 refer to the three channel signals of the original twelve-lead ECG signal as a data example. The horizontal axis times represents the sampling point, and the vertical axis microvolts (uV) represents the voltage value of the ECG signal.

[0027] Step 2: Use the adaptive cropping algorithm to preliminarily process the ECG signals collected in step 1. The original data includes data redundancy caused by mechanical jitter and machine delay during the acquisition process. The adaptive cropping algorithm is used to crop the redundant data. The adaptive cropping algorithm cuts off the ECG signals retained for training based on the signal area variance and PR estimation.

[0028] Select a time window of the ECG signal. Calculate the average signal strength of each data point in the window, recorded as mean_window. For each data point, calculate the square of the difference between it and mean_window. Define the average of these square values ​​as the variance. Assume that there is a 1-second signal sampling window containing 1000 sampling points. After the variance is calculated, if the variance is less than a certain set threshold (such as the noise level threshold), it is considered that the signal area is relatively stable and noise-free and can be used for subsequent analysis. Otherwise, the area marked may be affected by noise and needs further cropping.

[0029] The PR interval is the time interval from the start of the P wave to the start of the R wave in the electrocardiogram, reflecting the conduction time between the atrium and the ventricle. The change of the PR interval can be used as a basis for cutting. First, the time points of the start of the P wave and the start of the R wave are detected. The P wave and the R wave can be identified by waveform analysis of the ECG signal. To calculate the PR interval, that is:

[0030] P-RInterval=tR-tP

[0031] Among them, t P and t R They are the starting time of P wave and R wave respectively, and PR Interval represents the PR interval.

[0032] According to medical standards, the normal PR interval is usually between 120 and 200 milliseconds. If the estimated PR interval is much larger or smaller than this range, it can be judged that the segment is abnormal, which may be noise or artifacts. For example, in the detected ECG segment, suppose the calculated PR interval is 250 milliseconds, which exceeds the normal range. At this time, this segment of ECG data can be considered unstable and can be cut off or marked as unqualified data.

[0033] Through the dual screening of signal area variance and PR interval, ECG signal fragments containing noise or abnormal conduction can be effectively removed to ensure the high quality of the data used for training. The example calculation of this process can be further refined into code implementation to make cutting more automated and efficient.

[0034] Step 3: Use the wavelet adaptive denoising algorithm to remove muscle and other noise from the cropped data to achieve better training results and detection accuracy. As a low-frequency and low-amplitude physiological signal, the ECG signal is easily mixed with complex noise caused by various factors, which makes the low-frequency components in the signal easily submerged, thus affecting the effective extraction of early pregnancy features. First, a wavelet basis suitable for the ECG signal is selected through frequency value analysis, and it satisfies orthogonality and compact support. After the signal is decomposed by wavelet, the ECG signal wavelet coefficient is larger and the noise wavelet coefficient is smaller. A suitable threshold is selected by calculation. The wavelet coefficient greater than the threshold is considered to be generated by the signal and retained. The wavelet coefficient less than the threshold is considered to be generated by noise and set to zero to achieve the purpose of denoising.

[0035] Step 4: In step 3, pure and noise-free ECG signal data is successfully obtained. In order to further mine the information of these data, the present invention adopts deep learning technology and performs classification task training on this basis. Traditional neural networks have the following problems in processing ECG data classification:

[0036] Insufficient feature extraction capabilities:

[0037] Medical data (such as ECG signals) have complex timing and feature details, and traditional neural networks (such as multi-layer perceptrons) have a weak ability to extract these features. They are usually only suitable for simple linear or low-complexity feature data, and cannot effectively process the rich waveform changes, noise and other features in the ECG. In addition, traditional data only has single-channel analysis, which is far from the twelve-lead channel used in this article.

[0038] Difficulty capturing timing information:

[0039] ECG signals are a kind of continuous time series data, and data points at different time points are correlated. However, traditional neural network structures (such as fully connected networks) cannot retain the structural information of time series and are prone to losing the association in time order.

[0040] The lack of deep residual connections has limited model optimization effects:

[0041] When traditional neural networks have fewer layers, the model capacity is limited and it is difficult to effectively learn complex features; when the number of layers is increased, gradient vanishing or gradient exploding problems are prone to occur, resulting in an unstable training process.

[0042] Taking the example of solving the problems existing in the existing neural network in processing electrocardiogram classification, the present invention designs an improved ResNet-18 model structure, such as Figure 3As shown, the improved ResNet-18 model of the present invention includes: an input layer, a convolutional layer, a pooling layer, a Bottleneck residual block layer, an intermediate residual block layer, a DenseNet residual block layer, a global average pooling layer, a fully connected layer and an output layer.

[0043] In the improved ResNet-18 model, the processing process of the pure and noise-free 12-lead ECG signal obtained in step 3 is as follows:

[0044] Input layer: The input signal is the pure and noise-free 12-lead electrocardiogram signal obtained in step 3, represented by 12 channels. Each channel contains the signal data points processed in step S3.

[0045] Convolutional layer 1: The initial convolutional layer performs a 1D convolution operation on the input signal to generate 64 feature maps and pass the ReLU activation function. The convolution kernel size is 7, the stride is 2, and the input signal is downsampled.

[0046] Pooling layer 1: Next, a maximum pooling layer (MaxPool1d) is used to further reduce the size of the feature map in order to reduce the amount of computation in subsequent processing.

[0047] Intermediate residual blocks (16 Bottleneck): These residual blocks are divided into four groups, using 1x1 and 3x3 convolutions alternately to achieve feature extraction. After the initial convolution layer 1, 64 channels are output as the input of the intermediate residual block. The 16 Bottleneck residual blocks are divided into 4 groups. The first group of residual blocks: 64->256, that is, the input is 64 channels and the output is 256 channels; the second group of residual blocks: 256->512, that is, the input is 256 channels and the output is 512 channels; the third group of residual blocks: 512->1024, that is, the input is 512 channels and the output is 1024 channels; the fourth group of residual blocks: 1024->2048, that is, the input is 1024 channels and the output is 2048 channels; with the downsampling operation, the number of channels is increased while the size of the feature map is reduced. At this time, the model is gradually deepened, so that the model can capture features at different scales.

[0048] Bottleneck residual block: It consists of three convolutional layers and adjusts the dimension through a 1x1 convolution to achieve residual connection. The design of Bottleneck can effectively learn deeper features.

[0049] DenseNet residual block: At the last stage of the model, the signal enters a DenseNet residual block. This part is designed to strengthen the dense connection between features and pass the output of all previous layers to the subsequent layers together. This design makes the information flow smoother and effectively solves the information loss problem that deep networks may encounter.

[0050] Global average pooling (AdaptiveAvgPool1d): Through global average pooling, the feature map is reduced to a fixed size to facilitate subsequent fully connected layer processing.

[0051] Fully connected layer: After global pooling, the feature vector is input into a fully connected layer (linear layer), and the output is 2 categories (early pregnancy and non-early pregnancy).

[0052] Output layer: The final output is the result of classifying the input ECG signal.

[0053] The improved ResNet-18 model structure of the present invention includes a convolutional layer, a pooling layer and a residual block, wherein the residual block adopts a Bottleneck residual unit. In order to better capture the correlation between data, the present invention also introduces a DenseNet residual block for the feature fusion part in the later stage of the model structure. Specifically, this part realizes dense connection of features by directly connecting the feature maps of all previous layers and using the output of the previous layer as the input of the subsequent layer. The DenseNet residual block is used to process the deep convolution feature output in the model, specifically the high-dimensional feature layer (such as the output of 1024 channels) after the Bottleneck structure.

[0054] The input of the DenseNet residual block is the deep feature map after the Bottleneck residual block (1024 channel output). After processing, it is directly output to the global average pooling layer (AdaptiveAvgPool1d) to further extract global features.

[0055] In the attached Figure 3 In the example, this process is represented by the information flow from the high-dimensional feature map input, after being processed by the DenseNet block, more expressive features are obtained and passed to the global pooling layer. This increases the depth and expressiveness of the model. In the output layer of the model, the present invention sets the depth to 2048 to match the feature map output dimension of ResNet-18, so as to better adapt to our dataset.

[0056] The data set obtained by step S3 is divided into a training set, a validation set and a test set; wherein the training set is composed of ECG data with known labels, and the validation set and the test set are composed of ECG data with unknown labels. In this embodiment, the data ratio of the training set, the validation set and the test set is 7:2:1.

[0057] During the training process, this embodiment adjusts the hyperparameters and structure of the model, including the learning rate, batch size, and regularization parameters. In the experiment, this embodiment adjusts the learning rate at different stages, and finally determines that the initial learning rate is 0.001, and the learning rate is reduced by 50% every 10 epochs. In terms of batch size, the batch size is set to 64 during initial training, but it is found that the memory consumption is large in actual operation, so the batch size is set to 32 during the adjustment process. At the same time, the comparison results of different batch sizes show that the training time and accuracy are well balanced when the batch size is 32, so this setting is used in subsequent training. The initial regularization parameter is set to 0.01, and signs of overfitting are observed on the validation set, indicating that the model may be more complex. After increasing the regularization coefficient to 0.05, the accuracy on the validation set increases steadily, indicating that the regularization parameter at this time helps the generalization ability of the model; finally, the hyperparameter settings of the model in this embodiment are shown in Table 1.

[0058] Table 1 Hyperparameter settings

[0059]

[0060] By adopting this improved neural network structure and training method, we have achieved satisfactory classification results, providing effective support and assistance for early pregnancy detection. Finally, the performance of the trained model is evaluated using the test set. According to the evaluation results of the test set, the hyperparameters and structure of the model are adjusted, including the learning rate, batch size, regularization parameters, etc., to improve the generalization ability and performance of the model.

[0061] The performance of the trained model under the current parameters and structure is evaluated through the test set, and the model is further optimized based on the evaluation results to improve its generalization ability and performance. In terms of performance evaluation, accuracy, precision and recall are used as network classification evaluation indicators during training, and cross-entropy is used as the loss function. The calculation method is as follows:

[0062]

[0063] CE_loss=-{p*log 2 (q)+(1-p)*log 2 (1-q)} (4)

[0064] Among them, the meanings of the parameters in formula (1) to formula (3) are shown in Table 2. In formula (4), p represents the probability that the actual situation is early pregnancy, and q represents the probability that the network predicts early pregnancy. In Table 2, "positive" corresponds to the known label of this embodiment as early pregnancy, and "negative" corresponds to the known label of this embodiment as not early pregnancy.

[0065] Table 2 Parameter meaning

[0066]

[0067] When the accuracy, precision, and recall of the test set corresponding to the output results of the model all reach 99%, it can be considered that the model has met the requirements in performance evaluation and has excellent performance.

[0068] Step 5: Obtain the electrocardiogram data of the patient with unknown early pregnancy status through steps S1-S3, and input it into the training model obtained in step 4 to perform early pregnancy prediction.

[0069] Step 6: Apply and expand the training model obtained in step 4. Through software development, the input mode and structure in the application are set to match the ECG data acquisition device, and the end-to-end output of the test results is achieved to achieve the medical diagnosis effect used in clinical practice.

[0070] The embodiment of the present invention collected a large batch of early pregnancy data. According to more than 4,000 experimental and clinical data verification, the accuracy of the early pregnancy electrocardiogram recognition method of the present invention reached 99.44%, the precision rate was 99.36%, and the recall rate was 99.36%. The accuracy of existing electrocardiogram classification or disease recognition models is usually in the range of 95%-98%. Obviously, the classification accuracy obtained by the method of the present invention is significantly higher than the existing classification technology.

[0071] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the scope of protection of the present invention is not limited to such specific statements and embodiments. For those skilled in the art, the present invention may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of the claims of the present invention.

Claims

1. An electrocardiogram-based intelligent early pregnancy detection method, characterized in that: include: S1, obtaining a data set of twelve-lead ECG signals; S2, using an adaptive cropping algorithm to preliminarily process the twelve-lead ECG signal; S3, using a wavelet adaptive denoising algorithm to remove noise from the adaptively cropped data to obtain pure and noise-free ECG signal data; S4. Establish an improved ResNet-18 model; the improved ResNet-18 model includes an input layer, a convolutional layer, a pooling layer, an intermediate residual block layer, a DenseNet residual block layer, a global average pooling layer, a fully connected layer and an output layer in sequence; S5. Using steps S1-S3 to obtain pure and noise-free ECG signal data with known early pregnancy or non-early pregnancy labels, train the improved ResNet-18 model in step S4; S6. Use steps S1-S3 to obtain pure and noise-free ECG signal data with unknown early pregnancy or no early pregnancy labels, and input the data into the trained improved ResNet-18 model for early pregnancy detection.

2. The electrocardiogram-based early pregnancy intelligent detection method according to claim 1, characterized in that: The data used in the training process of step S5 include pure and noise-free ECG signal data of a known early pregnancy state and pure and noise-free ECG signal data of a known non-early pregnancy state.

3. The electrocardiogram-based early pregnancy intelligent detection method according to claim 2, characterized in that: Step S3 specifically includes: S31, firstly processing the ECG signal acquired in step S1 according to the signal area variance; S32, processing the ECG signal processed in step S31 by using PR estimation.

4. The electrocardiogram-based early pregnancy intelligent detection method according to claim 3, characterized in that: The specific implementation process of step S31 is as follows: S311, calculating the average signal strength of each data point in the current time window; S312, calculating the square value of the difference between each data point in the current time window and the average value of the signal strength in the time window; and defining the average value of these square values ​​calculated in the time window as the variance; S313, if the variance corresponding to the current time window is greater than or less than the noise level threshold, the data points in the time window are cropped, otherwise return to step S311 to process the next time window, and when the processing of all time windows has been completed, execute step S32.

5. The electrocardiogram-based intelligent early pregnancy detection method according to claim 4, characterized in that: The specific implementation process of step S32 is: S321, detecting the time points of the starting points of adjacent P waves and R waves, and calculating the PR interval; S322. If the PR interval calculated in step S321 is between 120 and 200 milliseconds, it is a normal segment; otherwise, there is noise, and the data in the segment is deleted.

6. The electrocardiogram-based early pregnancy intelligent detection method according to claim 5, characterized in that: The intermediate residual block layer in step S4 includes several Bottleneck residual blocks, which are evenly divided into four groups; the input of the first group of Bottleneck residual blocks is the output of the maximum pooling, the output of the first group of Bottleneck residual blocks is used as the input of the second group of Bottleneck residual blocks, the output of the second group of Bottleneck residual blocks is used as the input of the third group of Bottleneck residual blocks, the output of the third group of Bottleneck residual blocks is used as the input of the fourth group of Bottleneck residual blocks, and the output of the fourth group of Bottleneck residual blocks is used as the input of the DenseNet residual block layer.

7. The electrocardiogram-based early pregnancy intelligent detection method according to claim 6, characterized in that: Each Bottleneck residual block has the same structure, and all use 1x1 and 3x3 convolutions alternately to achieve feature extraction, including the first 1x1 convolution, the first 3x3 convolution, the second 1x1 convolution, and the third 1x1 convolution in sequence. The output of the first 1x1 convolution is used as the input of the first 3x3 convolution after passing through the first ReLU function, and the output of the first 3x3 convolution is used as the input of the second 1x1 convolution after passing through the second ReLU function. The output of the second 1x1 convolution and the output of the first 1x1 convolution are connected to the residual through the third 1x1 convolution, and the output of the third 1x1 convolution after passing through the third ReLU function is used as the output of the Bottleneck residual block.