Fetal health classification method, system and device and storage medium

By constructing the main model of feature classification and the secondary correction model, combining adaptive dynamic adjustment of the wrong classification weight and the multi-head attention mechanism, the problem of imbalance in CTG data categories is solved, the accuracy and reliability of fetal health monitoring is improved, and the misdiagnosis rate is reduced.

CN120260931AActive Publication Date: 2025-07-04CHANGCHUN UNIV

Patent Information

Application Number
CN202510732473.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-07-04
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

In the prior art, classification deviations caused by imbalance in CTG data categories, low recognition rate of minority samples and high misdiagnosis rates are difficult to achieve accurate fetal health status recognition in fetal health monitoring.

Method used

The main model of feature classification and the secondary correction model of feature classification are constructed, and the adaptive dynamic adjustment of the wrong classification weight method and the multi-head attention mechanism are adopted. Joint classification is performed through MAC-NET, the feature classification process is optimized, the ability to identify a few types of samples is enhanced and the misdiagnosis rate is reduced.

Benefits of technology

It improves the classification accuracy of fetal health monitoring, reduces the risk of misdiagnosis and missed diagnosis, provides more reliable intelligent assisted decision-making support, and reduces the diagnostic burden of doctors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120260931A_ABST
    Figure CN120260931A_ABST
Patent Text Reader

Abstract

The invention discloses a fetal health classification method, system and device and a storage medium, belongs to the technical field of fetal health auxiliary diagnosis, and solves the technical problems of classification deviation, low minority class sample recognition rate and high misdiagnosis rate caused by CTG data class imbalance in the prior art. Obtaining a fetus health data set, and performing preprocessing; using MAAL to optimize the feature classification main model, and using the optimized feature classification main model to preliminarily classify the preprocessed fetal health data set to obtain a correct classification result and a wrong classification result; constructing a feature classification secondary correction model, and classifying error samples corresponding to the error classification result based on an error sample extraction mechanism to obtain a classification result; and combining the correct classification result with the classification result, and outputting a final classification result. According to the fetus health classification method, the recognition capability of minority class samples is improved, and meanwhile the misdiagnosis rate and the missed diagnosis rate are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fetal health assisted diagnosis, and particularly relates to a fetal health classification method, system, device and storage medium. Background Art

[0002] CTG (Cardiotocogram) is one of the most commonly used means for fetal health monitoring in clinical practice. By recording FHR (Fetal Heart Rate) and UC (Uterine Contraction) signals, doctors can evaluate the intrauterine condition of the fetus, detect abnormalities in advance and take necessary clinical intervention measures, thereby reducing the incidence of pregnancy complications. Doctors usually classify CTG data according to the standards of FIGO (International Federation of Gynecology and Obstetrics), including three categories: Normal, Suspect and Pathological. However, in practical applications, there is a significant class imbalance problem in CTG data, where the pathological class samples are relatively scarce, resulting in insufficient recognition of minority class samples by the model, thus increasing the risk of missed diagnosis. In addition, CTG data is greatly affected by external environment and individual differences, often showing feature overlap and boundary ambiguity, making the model prone to misjudgment when dealing with "difficult samples", thereby affecting the timeliness of clinical intervention; at the same time, existing models have limitations in feature extraction and dynamic weighting, and it is difficult to fully exploit the potential information in CTG data, restricting the improvement of diagnostic performance.

[0003] Therefore, intelligent diagnosis based on CTG data has become an important direction in current fetal health research. In view of the above problems, it is particularly urgent to construct a fetal health assisted diagnosis system based on deep learning. Such a system can not only achieve rapid identification of the fetal health status, provide objective decision-making support for clinicians, thereby improving the accuracy of CTG data monitoring and the effectiveness of clinical intervention, but also help to identify high-risk fetuses as early as possible in the prenatal stage, prompting doctors to take intervention measures in advance, reducing the fetal mortality rate and improving the maternal and child health level.

[0004] Regarding the class imbalance problem of CTG data, scholars have proposed various optimization strategies, which can be mainly divided into two categories: data-level and algorithm-level methods. Among them, data-level methods include oversampling and undersampling. At the algorithm level, for class imbalance, there are mainly two types of methods based on Focal Loss and dynamic weighting loss. Although data-level oversampling and undersampling methods alleviate the class imbalance problem to a certain extent, oversampling may introduce redundant data, leading to model overfitting, while undersampling may cause information loss and affect the overall performance of the model. In addition, although methods such as Focal Loss at the algorithm level can enhance the attention to minority class samples, their static weight adjustment method lacks adaptability to data distribution and still relies on manual parameter tuning, making it difficult to achieve dynamic optimization in complex medical data.

[0005] In the prior art, Chinese Patent Document CN111696670A discloses "an intelligent interpretation method for prenatal fetal monitoring based on deep forest", in which the p-dimensional CTG clinical feature vectors that have been preprocessed and known in classification are scanned through three multi-granularity sliding windows, and after passing through two forest models and merging, three representation vectors of 2m(p - d1 + 1) dimensions, 2m(p - d2 + 1) dimensions, and 2m(p - d3 + 1) dimensions are obtained, and then input into four forest models in the cascade forest stage. The cascade forest uses the feature vectors processed by multi-granularity scanning as the input of the first layer, and obtains a 4m-dimensional category vector through four forest models, and then splices it with the original input feature vector to obtain a (4m + d1)-dimensional vector as the input feature of the next layer. However, this technical solution cannot dynamically adjust the misclassification weight, lacks adaptability to data distribution, and this technical solution merges both the "suspicious class" and the "abnormal class" into the "abnormal class", which will make it difficult to accurately classify the input data.

[0006] In summary, the prior art has technical problems such as classification deviation caused by CTG data class imbalance, low recognition rate of minority class samples, and high misdiagnosis rate. Summary of the Invention

[0007] The present invention solves the technical problems of classification deviation caused by CTG data class imbalance, low recognition rate of minority class samples, and high misdiagnosis rate in the prior art.

[0008] A fetal health classification method of the present invention includes the following steps: Step 1, obtain a fetal health data set and perform preprocessing to form a preprocessed fetal health data set; Step 2, construct a feature classification main model; Step 3, design an adaptive dynamic adjustment method for misclassification weight to optimize the feature classification main model; Step 4, based on the optimized feature classification main model, perform preliminary classification on the preprocessed fetal health data set to obtain correct classification results and misclassification results; Step 5, construct a feature classification secondary correction model, and based on the wrong sample extraction mechanism, classify the wrong samples corresponding to the misclassification results in Step 4 to obtain classification results; Step 6, the optimized feature classification main model and the feature classification secondary correction model form MAC-NET, combine the correct classification results in Step 4 and the classification results in Step 5, and output the final classification result.

[0009] Further, in the embodiment of the present invention, the preprocessing in Step 1 is specifically: Screen the key features of the fetal health dataset, and standardize the fetal health dataset based on the key features of the fetal health dataset to obtain the preprocessed fetal health dataset.

[0010] Further, in the embodiment of the present invention, the feature classification main model in step 2 includes a first data processing module and a first data classification module, specifically: The first data processing module processes the preprocessed fetal health data based on the MLP algorithm of two fully connected layers combined with the multi-head attention mechanism, and the processed fetal health data is subjected to feature classification through the first data classification module.

[0011] Further, in the embodiment of the present invention, the method for adaptively and dynamically adjusting the misclassification weight in step 3 is specifically: Use the preprocessed fetal health dataset to test the feature classification main model, exponentially amplify the misclassification rates of different categories in the test results respectively, and dynamically adjust the weights of the corresponding categories to obtain the method for adaptively and dynamically adjusting the misclassification weight.

[0012] Further, in the embodiment of the present invention, the feature classification secondary correction model in step 5 includes a second data processing module and a second data classification module, specifically: The second data processing module adjusts the weights of different categories through the method for adaptively and dynamically adjusting the misclassification weight, processes the error samples corresponding to the misclassification results output by the optimized feature classification main model based on the MLP algorithm of one fully connected layer combined with the multi-head attention mechanism, and classifies the processed error samples corresponding to the misclassification results through the second data classification module.

[0013] Further, in the embodiment of the present invention, the error sample extraction mechanism in step 5 is specifically: Index and label the preprocessed fetal health dataset, divide the index-labeled fetal health dataset into a training set and a test set, use the training set to iteratively train the optimized feature classification main model, save the best feature classification main model in each training, extract the error samples of the training set and the test set in the best feature classification main model saved each time, record the index labels of the error samples, remove duplicates from the index labels of the error samples, and screen the fetal health data processed by the MLP algorithm corresponding to the misclassification results output by the optimized feature classification main model to obtain the error samples corresponding to the misclassification results output by the optimized feature classification main model.

[0014] Further, in the embodiment of the present invention, the different categories include normal category, suspected category, and pathological category.

[0015] A fetal health classification system according to the present invention includes the following modules: A preprocessing module, which acquires a fetal health data set and performs preprocessing to form a preprocessed fetal health data set; A main model module, which constructs a main feature classification model; A main model optimization module, which designs an adaptive dynamic adjustment method for misclassification weights to optimize the main feature classification model; A preliminary classification module, which performs preliminary classification on the preprocessed fetal health data set based on the optimized main feature classification model to obtain correct classification results and misclassification results; A secondary classification module, which constructs a secondary feature classification correction model and classifies the misclassified samples corresponding to the misclassification results described in the preliminary classification module based on a misclassified sample extraction mechanism to obtain classification results; A combined classification module, where the optimized main feature classification model and the secondary feature classification correction model form a MAC-NET, and combines the correct classification results described in the preliminary classification module and the classification results described in the secondary classification module to output a final classification result.

[0016] An electronic device according to the present invention includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus; The memory is used to store a computer program; The processor, when executing the program stored on the memory, implements the fetal health classification method described in any one of the above.

[0017] A computer-readable storage medium according to the present invention stores a computer program therein, and when the computer program is executed by a processor, it implements the fetal health classification method described in any one of the above.

[0018] The present invention solves the technical problems of classification deviation caused by unbalanced CTG data categories in the prior art, low recognition rate of minority class samples, and high misdiagnosis rate. The specific beneficial effects include: In view of the above technical problems, the present invention obtains the fetal health dataset provided by UCI (University of California, Irvine), constructs a feature classification main model and a feature classification secondary correction model. The feature classification main model and the feature classification secondary correction model form MAC-NET (main and secondary correction network). Based on the error sample extraction mechanism, the feature classification secondary correction model re-classifies the error samples corresponding to the misclassification results output by the feature classification main model. Through the joint classification module of MAC-NET, the correct classification results output by the feature classification main model and the classification results output by the feature classification secondary correction model are combined to output the final classification result. MAC-NET solves the misdiagnosis situation where a single feature classification model may have classification errors. The error sample extraction mechanism avoids the problem that the test set error samples in the feature classification main model are assigned to the training set error samples, ensures that the extracted error samples all come from the misclassification results of the feature classification main model, and prevents interference with the overall model performance during the process of extracting error samples. MAAL (Adaptive Dynamic Adjustment of Misclassification Weight Method) is proposed to optimize the feature classification main model, solve the problem of class imbalance in the fetal health dataset, enhance the attention and recognition ability of MAC-NET to minority class samples, reduce the dominant influence of majority class samples on the loss function, improve the overall classification accuracy, reduce the risks of misdiagnosis and missed diagnosis, provide more reliable intelligent auxiliary decision-making for doctors, and reduce the diagnostic burden. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the following description of the embodiments in conjunction with the accompanying drawings, where: Figure 1 is the distribution situation of different categories described in Embodiment 1; Figure 2 is the flowchart of the error sample extraction mechanism described in Embodiment 1; Figure 3 is the schematic diagram of MAC-NET described in Embodiment 1. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] The following will clearly and completely describe various embodiments of the present invention in conjunction with the accompanying drawings. The embodiments described by referring to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as limiting the present invention.

[0021] Embodiment 1. A fetal health classification method described in this embodiment includes the following steps: Step 1, obtain the fetal health dataset and perform preprocessing to form the preprocessed fetal health dataset; Step 2, construct a feature classification main model; Step 3, design an adaptive dynamic error classification weight adjustment method to optimize the feature classification main model; Step 4, based on the optimized feature classification main model, preliminarily classify the preprocessed fetal health dataset to obtain correct classification results and misclassification results; Step 5, construct a feature classification secondary correction model, and based on the error sample extraction mechanism, classify the error samples corresponding to the misclassification results in Step 4 to obtain classification results; Step 6, the optimized feature classification main model and the feature classification secondary correction model form MAC-NET, combine the correct classification results in Step 4 and the classification results in Step 5, and output the final classification result.

[0022] In this embodiment, the preprocessing in Step 1 is specifically as follows: Screen the key features of the fetal health dataset, and standardize the fetal health dataset based on the key features of the fetal health dataset to obtain the preprocessed fetal health dataset.

[0023] In this embodiment, the feature classification main model in Step 2 includes a first data processing module and a first data classification module, specifically as follows: The first data processing module processes the preprocessed fetal health data based on the MLP (Multi-Layer Perceptron) algorithm with two fully connected layers combined with the multi-head attention mechanism, and the processed fetal health data undergoes feature classification through the first data classification module.

[0024] In this embodiment, the adaptive dynamic error classification weight adjustment method in Step 3 is specifically as follows: Use the preprocessed fetal health dataset to test the feature classification main model, exponentially amplify the misclassification rates of different categories in the test results, and dynamically adjust the weights of the corresponding categories to obtain the adaptive dynamic error classification weight adjustment method.

[0025] In this embodiment, the feature classification secondary correction model in Step 5 includes a second data processing module and a second data classification module, specifically as follows: The second data processing module adjusts the weights of different categories through the adaptive dynamic error classification weight adjustment method, processes the error samples corresponding to the misclassification results output by the optimized feature classification main model based on the MLP algorithm with one fully connected layer combined with the multi-head attention mechanism, and classifies the processed error samples corresponding to the misclassification results through the second data classification module.

[0026] In this embodiment, the error sample extraction mechanism in Step 5 is specifically as follows: Index and label the preprocessed fetal health dataset, divide the indexed and labeled fetal health dataset into a training set and a test set, iteratively train the optimized feature classification main model using the training set, save the best feature classification main model in each training, extract the error samples in the training set and test set of the best feature classification main model saved each time, record the index labels of the error samples, remove duplicate indexes from the index labels of the error samples, and screen the fetal health data processed by the MLP algorithm corresponding to the misclassification results output by the optimized feature classification main model to obtain the error samples corresponding to the misclassification results output by the optimized feature classification main model.

[0027] In this embodiment, the different categories include the normal category, the suspected category, and the pathological category.

[0028] The prior art has technical problems of classification bias caused by unbalanced CTG data categories, low recognition rate of minority class samples, and high misdiagnosis rate.

[0029] To solve the above technical problems, this embodiment provides a fetal health classification method. By applying MAC-NET to the problem of fetal health assisted diagnosis, the accuracy of fetal health classification is improved, and the risks of misdiagnosis and missed diagnosis are reduced. The method specifically includes the following steps: Step 1: Obtain a fetal health dataset and perform preprocessing to form a preprocessed fetal health dataset. The distribution of different categories in the fetal health dataset is as Figure 1 shown, and specifically includes the following steps; Step 11: Screen the key features of the fetal health dataset; To improve the classification performance of MAC-NET, in this embodiment, the mRMR (Minimum Redundancy Maximum Relevance) feature selection method is adopted in the preprocessing stage. The mRMR feature selection method screens features that have the maximum relevance and minimum redundancy with the target variable, which can effectively reduce the data dimension while retaining the information most relevant to the classification task to the greatest extent. Finally, this embodiment selects 8 key features to prepare for subsequent modeling and optimization. The 8 key features include Baseline value (the baseline value of fetal heart rate), Accelerations (the increase rate of fetal heart rate), Mean value of short-term variability (the average value of short-term variability), Abnormal short-term variability, Percentage of time with Abnormal long-term variability, Histogram mean, Histogram mode, and Histogram median.

[0030] Step 12, standardize the fetal health dataset based on the key features of the fetal health dataset to obtain the preprocessed fetal health dataset; The feature classification main model uses the StandarScaler method to standardize the fetal health dataset. Specifically, each feature value is transformed, and the formula is as follows: ; (1) In the formula, is the standardized value, is the mean of this feature, is the standard deviation of this feature. The purpose is to eliminate the influence of different feature dimensions on the model, make all features in the same order of magnitude, and make the calculation of attention weights more fair without bias.

[0031] Step 2, construct a feature classification main model. The feature classification main model includes a first data processing module and a first data classification module. The first data processing module processes the preprocessed fetal health data based on the MLP algorithm with two fully connected layers combined with the multi-head attention mechanism. The processed fetal health data undergoes feature classification through the first data classification module, which specifically includes the following steps: Step 21: The MLP algorithm uses two fully connected layers, consisting of two Relu (Rectified Linear Unit) layers and two Dropout (random inactivation) layers. The sizes of the two fully connected layers are set to (8, 64) and (64, 64) respectively, and the dropout_rate (dropout rate) of the two Dropout layers is 0.3. The data in the preprocessed fetal health dataset is first expanded from 8 dimensions to 64 dimensions, undergoes non-linear transformation through the Relu layer, and then a part of the neurons are discarded through the Dropout layer to reduce the dependence of the feature classification main model on specific features.

[0032] Step 22: In this embodiment, Multi-Head Attention is introduced into the feature classification main model to enhance the feature extraction ability and the overall performance of the feature classification main model. The multi-head attention mechanism is a technology widely used in deep learning, especially prominent in NLP (Natural Language Processing) and CV (Computer Vision) tasks. Its core idea is to capture the multi-level long-range dependence relationships inside the data by parallel computing multiple Self-Attention modules, thereby improving the expression ability and flexibility of the feature classification main model.

[0033] In the multi-head attention mechanism, the input vector is mapped into multiple groups of Query, Key, and Value matrices. Each group of matrices calculates the attention weights respectively to capture the feature relationships in different subspaces. The results of each group of attention are concatenated into the final output after linear transformation. The specific formula is: ; (2) Among them, the calculation formula for each attention head is: ; (3) The calculation of single-head attention is: ; (4) In the formula, is the query weight matrix of the th head, is the key weight matrix of the th head, is the value weight matrix of the th head, is the transpose of the key matrix, is the output projection matrix, is the dimension of the key, used to scale the dot product value to stabilize the gradient.

[0034] The advantage of the multi-head attention mechanism is that it can capture the correlations between features from different perspectives to more comprehensively represent the complex patterns of high-dimensional data. In this embodiment, the multi-head attention mechanism is combined with the MLP algorithm to calculate the multi-level correlations between features, focusing on local and global dependencies.

[0035] Step 23: The first data classification module uses a single fully connected layer to classify the fetal health data processed by the first data processing module, and uses the cross-entropy loss function commonly used in classification tasks to calculate the loss of the entire feature classification main model framework.

[0036] Step 3: Design an adaptive dynamic adjustment method for misclassification weights to optimize the feature classification main model, which specifically includes the following steps: Step 31: CrossEntropyLoss (cross-entropy loss function) is a loss function widely used in classification tasks. Its core idea is to measure the difference between the true class probability distribution and the classification probability distribution of the feature classification main model, and use this to guide the optimization direction of the feature classification main model. Its goal is to minimize the cross-entropy so that the classification probability distribution of the feature classification main model is as close as possible to the true class distribution. This method stems from the information entropy theory, and its core idea is to optimize the decision-making of the feature classification main model by maximizing the information gain. The mathematical expression of the cross-entropy loss function is as follows: ; (5) In the formula, is the OneHot (one-hot) encoded vector of the true class, is the total number of classes. When the sample belongs to the th class, , otherwise ; is the probability distribution vector of the model classification, is the sum over all classes.

[0037] Step 32: Weight design: In the cross-entropy loss function, all classes are given the same weight by the feature classification main model. However, in the case of unbalanced class distribution, this processing method may cause the majority class samples to play a dominant role and weaken the learning ability of the feature classification main model for the minority class samples, and thus the contribution of the minority class samples in the cross-entropy loss function is masked. To solve this problem, this embodiment designs an adaptive dynamic adjustment method for misclassification weights, which dynamically adjusts the misclassification weights of classes to balance the influence of majority class samples and minority class samples on the training of the feature classification main model. This method first calculates the misclassification rate of each class to measure the classification ability of the feature classification main model on different classes. The calculation expression of the misclassification rate is as follows: ; (6) Wherein, is the error rate of the category, is the total number of categories, is the sum of the misclassified numbers of all categories, is the misclassified number of the category, is the misclassified number of the category, is the misclassified number of the category sample.

[0038] However, since the misclassification rate is usually concentrated in the interval, its adjustment range is relatively limited, and it is difficult to effectively solve the class imbalance problem. Therefore, in this embodiment, the misclassification rate is exponentially amplified to enhance its influence on the minority class samples and make the weight adjustment more obvious. The improved weight calculation formula is: ; (7) Wherein, is the exponential function, is the weight of the category. This method can significantly increase the weight of the misclassified samples, thereby enhancing the model's attention to the minority class samples.

[0039] Step 33, weighted cross-entropy loss function: After completing the weight design, in this embodiment, based on the cross-entropy loss function, a weight factor is introduced to form a weighted cross-entropy loss function, so that the contributions of samples of different categories to the loss are adaptively adjusted. The specific formula is as follows: ; (8) Wherein, is the weight calculated according to the misclassification rate of each category, and other physical quantities have been introduced above. Compared with the cross-entropy loss function, the weighted cross-entropy loss function can effectively reduce the dominant role of the majority class samples in the loss, improve the model's learning ability for the minority class samples, and achieve the effect of adaptively dynamically adjusting the misclassification weight.

[0040] The method of adaptively dynamically adjusting the misclassification weight performs excellently in solving the class imbalance problem by combining the multi-head attention mechanism. It not only significantly improves the classification performance of the minority class samples, improves the classification accuracy of the minority class samples, and avoids over-adjustment of the majority class samples, but also enhances the robustness of the feature classification main model to data distribution shift and noise interference, providing a solid foundation for performance improvement in the class imbalance task. The performance of this improvement on different imbalanced datasets proves the efficiency and generalization ability of the model.

[0041] Step 34: After adding the method of adaptively dynamically adjusting the misclassification weight to the feature classification main model, the preprocessed fetal health dataset is divided into a training set and a test set. The test set accounts for 23% of the preprocessed fetal health dataset, and the training set accounts for 77% of the preprocessed fetal health dataset. Step 4: Based on the optimized feature classification main model, the preprocessed fetal health dataset is preliminarily classified to obtain correct classification results and misclassification results.

[0042] Steps 1-4 are the feature classification main model stage. The feature classification main model uses the MLP algorithm to mine the non-linear relationship between features. To further enhance the feature expression ability of the feature classification main model, the feature classification main model introduces a multi-head attention mechanism. By assigning different attention weights to features, the feature classification main model performs better on the minority class samples with class imbalance, improving the applicability to the class imbalance problem. And the feature classification main model is optimized by designing a method of adaptively dynamically adjusting the misclassification weight to cope with the class imbalance problem. Based on the above optimized feature classification main model, the optimal model obtained by training with the training set is imported into the joint classification module of MAC-NET.

[0043] Step 5: Construct a feature classification secondary correction model. Based on the misclassified sample extraction mechanism, the misclassified samples corresponding to the misclassification results in Step 4 are classified to obtain classification results, which specifically include the following steps: Step 51: Construct a feature classification secondary correction model. Although the optimized feature classification main model has achieved good performance in the scenario of unbalanced sample numbers, there are still some misjudgment phenomena in the recognition of complex and boundary samples. For this reason, this embodiment proposes a feature classification secondary correction model for re-learning and re-correcting the misclassified samples corresponding to the misclassification results of the optimized feature classification main model, further improving the classification ability of MAC-NET.

[0044] The secondary correction model of feature classification in this embodiment is a lightweight design based on the optimized main model of feature classification. The MLP algorithm consists of one fully connected layer, one Relu layer, and one Dropout layer: the size of the fully connected layer is set to (64, 32), and the size of dropout_rate in the Dropout layer is 0.5. The training set data and test set data of the secondary correction model of feature classification are first reduced from 64 dimensions to 32 dimensions of data, and then undergo a non-linear transformation through the Relu layer. Then, a part of the neurons are discarded through the Dropout layer to reduce the dependence of the secondary correction model of feature classification on specific features. Since there is usually a problem of class imbalance in the error samples, as shown in Table 1, the secondary correction model of feature classification and the optimized main model of feature classification adopt the same MAAL and multi-head attention mechanism. Ensure the learning ability of the secondary correction model of feature classification on minority class samples, and further improve the classification performance of the secondary correction model of feature classification on complex samples.

[0045] Finally, the optimized main model of feature classification is used to classify the training set and the test set respectively. The training set error samples corresponding to the misclassification results of the training set are used as the training set of the secondary correction model of feature classification, and the test set error samples corresponding to the misclassification results of the test set are used as the test set of the secondary correction model of feature classification. The data quantity distribution of different categories is shown in Table 1.

[0046] Table 1

[0047] Step 52, in order to prevent the test set error samples in the optimized main model of feature classification from being assigned to the training set error samples, this embodiment adopts an error sample extraction mechanism to index and label the preprocessed fetal health data set, divides the indexed and labeled fetal health data set into a training set and a test set, iteratively trains the optimized main model of feature classification using the training set, saves the best main model of feature classification in each training, extracts the training set and test set error samples in the best main model of feature classification saved each time, and records the index labels of the error samples. Remove duplicates from the index labels of the error samples, and screen the fetal health data processed by the MLP algorithm corresponding to the misclassification results output by the optimized main model of feature classification to obtain the error samples corresponding to the misclassification results output by the optimized main model of feature classification. As Figure 2 shown, the error sample extraction mechanism includes an error sample extraction strategy and an isolation verification strategy, specifically: (1) To prevent interference with the overall model performance during the extraction of incorrect samples, this embodiment designs a refined incorrect sample extraction strategy. First, index and label the fetal health dataset. During the process of dividing the preprocessed fetal health dataset into a training set and a test set, save the original line number index of the data. During the iterative training of the optimized feature classification main model, save the best-performing model each time. During the incorrect sample extraction process, traverse all the saved best models, extract the incorrect samples in the training set and test set of each best model, and record the incorrect index. According to the incorrect index, filter the fetal health data processed by the MLP algorithm in the optimized feature classification main model.

[0048] Through this strategy, it is ensured that all the extracted incorrect samples are derived from the misclassification results of the optimized feature classification main model, serving as the input for the feature classification secondary correction model, and it can avoid the incorrect samples in the test set of the optimized feature classification main model being classified into the incorrect samples in the training set. This not only enables the feature classification secondary correction model to further learn for samples that are difficult to identify but also lays a solid foundation for the lightweight design of the feature classification secondary correction model.

[0049] (2) Regarding the problem of data leakage protection, this embodiment introduces an isolation verification strategy to fundamentally eliminate the risk of data leakage. During the data extraction and division process, this isolation verification strategy adopts an independent index tracking strategy to de-duplicate the indexes of the extracted data, ensuring that there is no overlap between the training set and the test set, thereby avoiding the possibility of the test set being mixed into the training set.

[0050] Through the isolation verification strategy, the phenomenon of inflated accuracy and model overfitting caused by data leakage is effectively avoided. In addition, the isolation verification strategy is particularly important in medical application scenarios. By extracting and recording the fetal health data and classification labels processed by the MLP algorithm in the optimized feature classification main model, it can not only effectively protect patient privacy and prevent the abuse of sensitive information during the training process of the feature classification secondary correction model but also ensure the credibility and generalization ability of the diagnostic model in the real clinical environment.

[0051] Through the incorrect sample extraction mechanism, this embodiment strengthens the learning ability of MAC-NET for minority-class samples while effectively avoiding the misleading effects that may be brought by data leakage, ensuring the safety and reliability of MAC-NET in medical applications.

[0052] Step 5 is the stage of the secondary correction model for feature classification. First, extract the training set error samples of the optimized feature classification main model as the training set of the secondary correction model for feature classification. At the same time, extract the test set error samples of the optimized feature classification main model as the test set of the secondary correction model for feature classification. To avoid data leakage, this embodiment designs a strict isolation and verification strategy to ensure that there are no overlapping samples between the extracted training set error samples and test set error samples, thus avoiding the problem of overestimated performance or overfitting of the secondary correction model for feature classification. In addition, since there is usually a class imbalance problem in the error samples, as shown in Table 1, both the secondary correction model for feature classification and the optimized feature classification main model adopt the MAAL fusion multi-head attention mechanism to ensure improving the learning ability of MAC-NET on minority class samples and further enhancing the classification performance of MAC-NET on complex samples.

[0053] In step 6, the optimized feature classification main model and the secondary correction model for feature classification form MAC-NET. As Figure 3 shown, combine the correct classification results described in step 4 and the classification results described in step 5 to output the final classification result; Step 6 is the joint classification stage. MAC-NET imports the optimal models obtained by training the optimized feature classification main model and the secondary correction model for feature classification into the joint classification module. First, the optimized feature classification main model conducts a preliminary classification on the input data. For the error samples corresponding to the misclassification results output by the optimized feature classification main model, use them as inputs and pass them to the secondary correction model for feature classification for reclassification. Finally, combine the classification results of the secondary correction model for feature classification and the correct classification results of the optimized feature classification main model to output the final classification result. Through this joint strategy, MAC-NET has been significantly improved in terms of overall classification accuracy and robustness.

[0054] In summary, the MAC-NET proposed in this embodiment effectively alleviates the problem of class imbalance in CTG data through the synergistic effect of the optimized feature classification main model and the feature classification secondary correction model. To ensure the effectiveness and computational efficiency of MAC-NET, reasonable parameter configuration is carried out for MAC-NET, as shown in Table 2. Among them, the optimized feature classification main model adopts two layers of FC (fully connected layer) and two layers of Relu layer and combines the multi-head attention mechanism, and prevents overfitting through the Dropout layer; while the feature classification secondary correction model adopts a relatively lightweight single-layer structure to reduce computational overhead and at the same time ensure the further optimization of misclassified samples. This embodiment has significant advantages in alleviating data imbalance, improving the recognition ability of pathological classes and suspected classes, and reducing the risk of misdiagnosis and missed diagnosis. In addition, MAC-NET classifies in a way that combines coarse-grained and fine-grained: at the coarse-grained level, the dynamic weighting strategy effectively balances the learning ability between different classes; at the fine-grained level, the multi-head attention mechanism plays an important role in intra-class feature aggregation and key feature extraction. This method not only solves the problem of class imbalance, but also improves the overall classification performance of MAC-NET.

[0055] Table 2

[0056] To better illustrate a fetal health classification method described in this embodiment, it is described in detail through the following examples: Example 1. Ablation experiment; Table 3

[0057] The ablation experiment system of this embodiment deconstructs the contributions of each component to the model performance, as shown in Table 3. The MLP algorithm achieves an accuracy of 93.66% and an AUC value of 0.9766 without introducing any optimization strategies, verifying the ability of the deep learning network to capture the non-linear relationship of fetal health characteristics. When MAAL is embedded, the MLP algorithm realizes a comprehensive performance improvement without relying on data resampling, and the precision and recall increase synchronously by 0.93%, proving that the dynamic weight strategy effectively alleviates the class imbalance problem through error-sensitive learning. When the multi-head attention mechanism is introduced alone, the MLP algorithm has a more significant performance jump, the accuracy increases by 3.07 percentage points to reach 96.73%, and the AUC value is 0.9854, indicating that the selective focus of the multi-head attention mechanism on key monitoring features significantly enhances the model discriminability.

[0058] When MAAL works in tandem with the multi-head attention mechanism, the optimized main feature classification model exhibits a positive coupling effect among components: the F1_score increases by 3.73 percentage points compared to the baseline, and the standard deviation of the AUC fluctuation decreases from 0.0027 to 0.0015, verifying the multi-granularity optimization effectiveness of the dynamic weight fusion attention mechanism and also proving that the model is stable and reliable. Finally, the secondary correction model of feature classification drives MAC-NET to break through the performance bottleneck by directionally learning the misclassified samples of the main feature classification model, achieving an accuracy of 99.39% and a high AUC value of 0.9983. It is sufficient to show that MAC-NET has a significant effect on solving the problem of class imbalance and correcting misclassified samples.

[0059] Example 2. Comparative experiment; To verify the effectiveness of MAAL proposed in Embodiment 1 in dealing with the problem of class imbalance, in this embodiment, two baseline models, MLP and XGBoost (Extreme Gradient Boosting), are respectively used for comparative experiments with Focal Loss and SMOTE (Synthetic Minority Over-sampling Technique), and their classification performances on different classes are evaluated. The experimental results are shown in Table 4.

[0060] Focal Loss is a loss function designed specifically to address the problem of class imbalance. Its core is that on the basis of the standard cross-entropy loss, Focal Loss introduces a modulation factor , where is the classification probability of the correct class, is the modulation parameter. When the model has a high classification probability for a certain class, that is, for samples that are easy to classify, the modulation factor will reduce its weight, thereby reducing the contribution of these samples to the total loss; on the contrary, for difficult samples or misclassified samples, the loss weight will increase. Therefore, Focal Loss can effectively focus on difficult samples and improve the model's learning ability for minority classes. The formula of Focal Loss is as follows: ; (9) In the formula, is the balance factor, used to adjust the class weights, is the difficulty weighting factor.

[0061] SMOTE is a classic method for dealing with class imbalance, and its core idea is to artificially synthesize minority class samples through feature space interpolation. The specific implementation process is as follows: Neighborhood sampling: For each minority class sample , calculate its k-nearest neighbors (usually k = 5) in the feature space.

[0062] Linear interpolation: Randomly select a neighborhood sample , generate a new sample: ; (10) In the formula is a random interpolation coefficient is a new sample is from of k a neighbor randomly selected from the

[0063] Sample augmentation: Repeat the above process until the sample sizes of all categories are balanced.

[0064] Table 4

[0065] Experiments show that the MLP series of methods are significantly superior to the XGBoost series of models in dealing with imbalanced medical data. Among them, the XGBoost model performs poorly in the suspected class, with a recall rate of only 0.6912. Even after combining with the Focal Loss improvement, the suspected recall rate only increases slightly; while the optimized feature classification main model significantly increases the suspected recall rate to 0.88 through the multi-head attention mechanism and MAAL. Compared with the limitation of the Focal Loss relying on static weight adjustment, MAAL optimizes the weight allocation by dynamically perceiving the change of the sample error rate. In the pathological class task, the AUC after optimizing the MLP with the Focal Loss is 0.9914, while the optimized feature classification main model is improved to 0.9995. Although the AUC of the pathological class reaches 0.9921 after optimizing XGboost with SMOTE, its normal recall rate of 0.9605 is still significantly lower than the normal recall rate value of MAC-NET. Although the recall rate value of the suspected class of MAC-NET is slightly lower than that of XGboost optimized with SMOTE, the data generated by SMOTE may introduce feature noises that do not conform to the real medical distribution, affecting the reliability of clinical diagnosis.

[0066] MAC-NET realizes 100% accurate identification of the normal class and the pathological class on the test set through the feature classification secondary correction model: The optimized feature classification main model in the first stage uses the attention mechanism to strengthen the features of minority classes such as the pathological class, and its pathological recall rate reaches 1, that is, zero missed diagnosis can be achieved on the test set; The feature classification secondary correction model in the second stage targets the misclassified samples corresponding to the misclassification results output by the optimized feature classification main model for directional correction. MAC-NET realizes an AUC of 1 for all categories through the collaborative optimization of two-stage MAAL, and the recall rate values of the normal class and the suspected class are greatly improved. MAC-NET not only avoids noise interference, but also realizes the joint governance of local and global imbalances, providing an innovative solution with zero missed detection and high accuracy for the medical diagnosis scenario.

[0067] Example 3. Generalization experiment; To comprehensively evaluate the generalization ability of MAC-NET, in this embodiment, two publicly available multi-class imbalanced datasets are compared, and these datasets can be obtained from the Keel (Knowledge Extraction based on Evolutionary Learning) repository. To ensure the reliability of the experimental evaluation, in this embodiment, classes with a total sample number less than 10 are removed. The reason is that the experimental division method is 77% training set and 23% test set. If a certain class has less than 10 samples, there can be at most 2 test samples in the test set, which may lead to unstable evaluation results. The following is a brief description of the datasets used in this embodiment: The Balance dataset simulates a physical balance problem and contains a total of 625 samples. Each sample represents the weight and distance combination on the left and right sides of the balance. The goal is to predict the state of the balance, including tilting to the left, tilting to the right, or being balanced. It contains 4 continuous features: Left-Weight (left weight), Left-Distance (left distance), Right-Weight (right weight), and Right-Distance (right distance). The class labels of the data are divided into 3 types: L (tilting to the left), R (tilting to the right), and B (balanced), and the class distribution is 288:49:288. Due to the severe imbalance of the data, this dataset is often used to study multi-class imbalance problems and is an ideal choice for evaluating the performance of classifiers on imbalanced datasets.

[0068] The Pageblock dataset is derived from the analysis of document page blocks. The goal is to classify the content blocks in the page into different types such as text, title, picture, etc. The data contains 5473 samples and 10 continuous features, and the features mainly describe the geometric and positional characteristics of the page blocks, such as width, height, area, etc. The classes are divided into 5 types: 1 text, 2 title, 3 picture, 4 horizontal line, 5 digital object. Among them, the text class accounts for about 89%, and the data volume of the remaining classes is small, showing a significant imbalance problem. After removing classes with less than 10 categories, the data is left with 3 classes: text, title, and digital object. The class distribution is 492:33:12, and this dataset is widely used in the research of imbalanced classification tasks.

[0069] Table 5

[0070] To verify the applicability of the feature classification main model and MAC-NET proposed in Embodiment 1 in the imbalanced data scenario. In this embodiment, by comparing these two datasets with the fetal health dataset, and comparing with a variety of classical machine learning algorithms and MLP, the classical machine learning algorithms include decision tree, support vector machine, logistic regression, random forest, etc. The experimental results are shown in Table 5.

[0071] All three datasets have significant class imbalance problems: in the Balance dataset, the right-tilted class only accounts for 7.84%, in the Pageblock dataset, the digitized object class accounts for 0.22%, and in the Fetal-Health dataset, the pathological class only accounts for 8%. The optimized feature classification main model proposed in this embodiment still maintains high accuracy in such extremely imbalanced scenarios, with accuracies of 97.92%, 97.58%, and 97.34% on the three datasets respectively. Compared with DT, the accuracy in the Balance dataset is increased by 31.26 percentage points, verifying the effectiveness of the dynamic weighting mechanism in co-optimizing the dominant class and the tail class.

[0072] MAC-NET further breaks through the performance bottleneck, with overall accuracies of 99.39%, 99.31%, and 99.19% on the three imbalanced datasets respectively, all approaching perfect classification. Compared with single-stage models, MAC-NET further improves the accuracy of different datasets through hierarchical feature correction without relying on class prior information, significantly alleviating the interference of the imbalanced data distribution on the model decision boundary. The experimental results further prove that MAC-NET can adapt to complex scenarios with different degrees of imbalance and provide a reliable solution for multi-domain classification tasks.

[0073] Embodiment 2. A fetal health classification system described in this embodiment includes the following modules: A preprocessing module, which acquires a fetal health dataset and performs preprocessing to form a preprocessed fetal health dataset; A main model module, which constructs a feature classification main model; A main model optimization module, which designs an adaptive dynamic adjustment method for misclassification weights to optimize the feature classification main model; A preliminary classification module, which performs preliminary classification on the preprocessed fetal health dataset based on the optimized feature classification main model to obtain correct classification results and misclassification results; A secondary classification module, which constructs a feature classification secondary correction model and classifies the misclassified samples corresponding to the misclassification results described in the preliminary classification module based on the misclassified sample extraction mechanism to obtain classification results; A joint classification module, where the optimized feature classification main model and the feature classification secondary correction model form MAC-NET, and combines the correct classification results described in the preliminary classification module and the classification results described in the secondary classification module to output the final classification result.

[0074] Embodiment 3. An electronic device described in this embodiment includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; A memory for storing computer programs; A processor, when executing the programs stored on the memory, implements a fetal health classification method described in Embodiment 1.

[0075] Embodiment 4. The computer-readable storage medium described in this embodiment stores a computer program, and when the computer program is executed by a processor, it implements a fetal health classification method described in Embodiment 1.

[0076] The above has introduced in detail a fetal health classification method, system, device and storage medium proposed by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for classifying fetal health, characterized in that, It includes the following steps: Step 1: Obtain the fetal health dataset and perform preprocessing to form the preprocessed fetal health dataset; Step 2: Construct the main feature classification model; Step 3: Design an adaptive dynamic adjustment method for misclassification weights to optimize the main feature classification model; Step 4: Based on the optimized main feature classification model, conduct a preliminary classification on the preprocessed fetal health dataset to obtain the correct classification results and misclassification results; Step 5: Construct a secondary correction model for feature classification. Based on the misclassified sample extraction mechanism, classify the misclassified samples corresponding to the misclassification results in Step 4 to obtain the classification results; Step 6: The optimized main feature classification model and the secondary correction model for feature classification form MAC-NET. Combine the correct classification results in Step 4 and the classification results in Step 5 to output the final classification results.

2. The fetal health classification method according to claim 1, wherein, The preprocessing in Step 1 is specifically as follows: Screen the key features of the fetal health dataset, and perform standardization processing on the fetal health dataset based on the key features of the fetal health dataset to obtain the preprocessed fetal health dataset.

3. A method for classifying fetal health according to claim 1, characterized in that, The main feature classification model in Step 2 includes a first data processing module and a first data classification module, specifically: The first data processing module processes the preprocessed fetal health data based on the MLP algorithm of two fully connected layers combined with the multi-head attention mechanism. The processed fetal health data undergoes feature classification through the first data classification module.

4. A method for classifying fetal health according to claim 1, characterized in that, The adaptive dynamic adjustment method for misclassification weights in Step 3 is specifically: Use the preprocessed fetal health dataset to test the main feature classification model. Exponentially amplify the misclassification rates of different categories in the test results respectively, and dynamically adjust the weights of the corresponding categories to obtain the adaptive dynamic adjustment method for misclassification weights.

5. A method for classifying fetal health according to claim 1, characterized in that, The secondary correction model for feature classification in Step 5 includes a second data processing module and a second data classification module, specifically: The second data processing module adjusts the weights of different categories through the adaptive dynamic adjustment method for misclassification weights, processes the misclassified samples corresponding to the misclassification results output by the optimized main feature classification model based on the MLP algorithm of one fully connected layer combined with the multi-head attention mechanism, and classifies the misclassified samples corresponding to the processed misclassification results through the second data classification module.

6. A method for classifying fetal health according to claim 1, characterized in that, The misclassified sample extraction mechanism in Step 5 is specifically: Perform index annotation on the preprocessed fetal health dataset, divide the index-annotated fetal health dataset into a training set and a test set, use the training set to iteratively train the optimized main feature classification model, save the best main feature classification model in each training, extract the misclassified samples of the training set and the test set in the best main feature classification model saved each time, record the index annotation of the misclassified samples, perform index de-duplication on the index annotation of the misclassified samples, and screen the fetal health data processed by the MLP algorithm corresponding to the misclassification results output by the optimized main feature classification model to obtain the misclassified samples corresponding to the misclassification results output by the optimized main feature classification model.

7. A method for classifying fetal health according to claim 4 or 5, characterized in that, The different categories described above include the normal category, the suspected category, and the pathological category.

8. A fetal health classification system, characterized in that, It includes the following modules: A preprocessing module that acquires a fetal health data set and performs preprocessing to form a preprocessed fetal health data set; A main model module that constructs a main feature classification model; A main model optimization module that designs an adaptive dynamic adjustment method for misclassification weights to optimize the main feature classification model; A preliminary classification module that performs preliminary classification on the preprocessed fetal health data set based on the optimized main feature classification model to obtain correct classification results and misclassification results; A secondary classification module that constructs a secondary correction model for feature classification and classifies the misclassified samples corresponding to the misclassification results described in the preliminary classification module based on an error sample extraction mechanism to obtain classification results; A combined classification module, where the optimized main feature classification model and the secondary correction model for feature classification form a MAC-NET, and combines the correct classification results described in the preliminary classification module and the classification results described in the secondary classification module to output the final classification result.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store computer programs; The processor, when executing the programs stored on the memory, implements a fetal health classification method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements a fetal health classification method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Intelligent interpretation method for prenatal fetal monitoring based on deep forest

    CN111696670A

  • Method and device for automatic fetal heart interpretation

    CN113192629A

  • Multi-center fetal heart monitoring intelligent interpretation method based on maximum and minimum entropy semi-supervised field self-adaption

    CN115644927A

  • Fundus image segmentation model training method and device and glaucoma auxiliary diagnosis system

    CN116934747A

  • Binary collaborative data balance optimization method and system and storage medium

    CN117828356A

Cited By

  • Insomnia typing device

    CN121545768A