Fetal health classification method, system, device and storage medium

By constructing a MAC-NET model, combining adaptive dynamic adjustment of error classification weights and multi-head attention mechanisms, the classification process of fetal health data sets is optimized, and the problem of imbalance in CTG data categories is solved, and the accuracy and diagnostic efficiency of fetal health monitoring are improved.

CN120260931BActive Publication Date: 2025-08-19CHANGCHUN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510732473.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-08-19
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 rate are difficult to achieve accurate classification and diagnosis in fetal health monitoring.

Method used

The MAC-NET model is constructed, and the combination of the main feature classification model and the secondary correction model of feature classification is combined with the adaptive dynamic adjustment of the wrong classification weight method and the multi-head attention mechanism, the classification process of the fetal health data set is optimized, the weight is dynamically adjusted to enhance the recognition ability of a few types of samples, and re-learning and correction are carried out through the error sample extraction mechanism.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120260931B_ABST
    Figure CN120260931B_ABST
Patent Text Reader

Abstract

A fetal health classification method, system, device and storage medium belong to the field of fetal health auxiliary diagnosis technology, and solve the technical problems of classification bias caused by imbalance of CTG data categories, low recognition rate of minority class samples and high misdiagnosis rate in the existing technology. A fetal health data set is obtained and preprocessed; MAAL is used to optimize the main feature classification model, and the optimized main feature classification model is used to perform preliminary classification on the preprocessed fetal health data set to obtain correct classification results and incorrect classification results; a feature classification secondary correction model is constructed, and based on the error sample extraction mechanism, the error samples corresponding to the error classification results are classified to obtain classification results; the correct classification results and the classification results are combined to output the final classification results. The present invention is used to realize a fetal health classification method that improves the recognition ability of minority class samples while reducing the misdiagnosis and missed diagnosis rates.
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 auxiliary diagnosis, and in particular to a fetal health classification method, system, device and storage medium. Background Art

[0002] CTG (cardiotocography) is one of the most commonly used clinical methods for fetal health monitoring. By recording FHR (fetal heart rate) and uterine contraction (UC) signals, physicians can assess the fetal condition in utero, detect abnormalities early, and initiate necessary clinical interventions, thereby reducing the incidence of pregnancy complications. Physicians typically classify CTG data according to the International Federation of Gynecology and Obstetrics (FIGO) criteria into three categories: Normal, Suspect, and Pathological. However, in practice, CTG data suffers from significant class imbalance, with pathological samples being relatively rare. This leads to insufficient model recognition of minority samples, increasing the risk of missed diagnoses. Furthermore, CTG data is significantly influenced by the external environment and individual variability, often exhibiting overlapping features and blurred boundaries. This makes the model prone to misjudgment when handling "difficult" samples, thus compromising the timeliness of clinical intervention. Furthermore, existing models have limitations in feature extraction and dynamic weighting, making it difficult to fully exploit the potential information in CTG data, limiting improvements in diagnostic performance.

[0003] Therefore, intelligent diagnosis based on CTG data has become a key area of current fetal health research. To address these challenges, building a deep learning-based fetal health auxiliary diagnosis system is particularly urgent. Such a system not only enables rapid identification of fetal health status and provides objective decision support for clinicians, thereby improving the accuracy of CTG data monitoring and the effectiveness of clinical interventions, but also facilitates early identification of high-risk fetuses during the prenatal period, prompting doctors to take early intervention measures, reducing fetal mortality, and improving maternal and child health.

[0004] To address the problem of imbalanced CTG data categories, scholars have proposed a variety of 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, there are mainly two types of methods based on Focal Loss and dynamic weighted loss to address category imbalance. Although oversampling and undersampling methods at the data level have alleviated the category 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 focus on minority class samples, their static weight adjustment method lacks adaptability to data distribution and still relies on manual parameter adjustment, making it difficult to achieve dynamic optimization in complex medical data.

[0005] In the prior art, Chinese patent document CN111696670A discloses a "Deep Forest-Based Intelligent Interpretation Method for Prenatal Fetal Monitoring." This method scans a preprocessed, known-classified p-dimensional CTG clinical feature vector through three multi-granularity sliding windows. After passing it through two forest models, it merges the resulting representation vectors to obtain 2m(p-d1+1)-, 2m(p-d2+1)-, and 2m(p-d3+1)-dimensional representation vectors. These are then fed into four forest models in the cascade forest stage. The cascade forest uses the multi-granularity scanned feature vector as the input for the first layer. The four forest models generate a 4m-dimensional category vector, which is then concatenated with the original input feature vector to obtain a (4m+d1)-dimensional category vector as the input feature for the next layer. However, this technical solution cannot dynamically adjust the weight of misclassifications and lacks adaptability to data distribution. Furthermore, this solution lumps "suspicious" and "abnormal" categories into "abnormal" categories, making it difficult to accurately classify the input data.

[0006] In summary, the existing technology has technical problems such as classification bias caused by imbalanced CTG data categories, low recognition rate of minority samples and high misdiagnosis rate. Summary of the Invention

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

[0008] The fetal health classification method of the present invention comprises the following steps:

[0009] Step 1: obtaining a fetal health data set and performing preprocessing to form a preprocessed fetal health data set;

[0010] Step 2: Build the main feature classification model;

[0011] Step 3: Design an adaptive dynamic adjustment method for error classification weights to optimize the main feature classification model;

[0012] Step 4: Preliminary classification of the preprocessed fetal health data set is performed based on the optimized feature classification main model to obtain correct classification results and incorrect classification results;

[0013] Step 5: construct a feature classification secondary correction model, and classify the error samples corresponding to the error classification results described in step 4 based on the error sample extraction mechanism to obtain the classification results;

[0014] In step 6, the optimized feature classification main model and the feature classification secondary correction model form a MAC-NET, which combines the correct classification result described in step 4 with the classification result described in step 5 to output the final classification result.

[0015] Furthermore, in the embodiment of the present invention, the pre-processing in step 1 is specifically as follows:

[0016] The key features of the fetal health data set are screened, and the fetal health data set is standardized based on the key features of the fetal health data set to obtain a preprocessed fetal health data set.

[0017] Furthermore, in an 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:

[0018] 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 is feature classified by the first data classification module.

[0019] Furthermore, in an embodiment of the present invention, the method for adaptively and dynamically adjusting the error classification weight in step 3 is specifically as follows:

[0020] The preprocessed fetal health dataset was used to test the main feature classification model. The error classification rates of different categories in the test results were exponentially amplified, and the weights of the corresponding categories were dynamically adjusted to obtain an adaptive dynamic adjustment method for error classification weights.

[0021] Furthermore, in an 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:

[0022] The second data processing module adjusts the weights of different categories by adaptively and dynamically adjusting the error classification weights. The MLP algorithm based on a fully connected layer combined with the multi-head attention mechanism processes the error samples corresponding to the error classification results output by the optimized feature classification main model, and classifies the error samples corresponding to the processed error classification results through the second data classification module.

[0023] Furthermore, in the embodiment of the present invention, the error sample extraction mechanism in step 5 is specifically as follows:

[0024] The preprocessed fetal health data set is indexed and labeled, and the indexed and labeled fetal health data set is divided into a training set and a test set. The optimized feature classification main model is iteratively trained using the training set, and the best feature classification main model in each training is saved. The error samples of the training set and the test set in the best feature classification main model saved in each training are extracted, and the index labels of the error samples are recorded. The index labels of the error samples are de-indexed, and the fetal health data processed by the MLP algorithm corresponding to the error classification results output by the optimized feature classification main model are screened to obtain the error samples corresponding to the error classification results output by the optimized feature classification main model.

[0025] Furthermore, in an embodiment of the present invention, the different categories include normal category, suspected category and pathological category.

[0026] The fetal health classification system of the present invention includes the following modules:

[0027] A preprocessing module, which obtains a fetal health data set and performs preprocessing to form a preprocessed fetal health data set;

[0028] Main model module, builds the main feature classification model;

[0029] The main model optimization module designs an adaptive dynamic adjustment method for error classification weights to optimize the main feature classification model;

[0030] The preliminary classification module performs preliminary classification on the preprocessed fetal health data set based on the optimized feature classification main model to obtain correct classification results and incorrect classification results;

[0031] The secondary classification module builds a secondary correction model for feature classification and classifies the error samples corresponding to the error classification results described in the preliminary classification module based on the error sample extraction mechanism to obtain the classification results.

[0032] The joint classification module, the optimized feature classification main model and the feature classification secondary correction model form MAC-NET, which combines the correct classification results described by the preliminary classification module and the classification results described by the secondary classification module to output the final classification results.

[0033] An electronic device according to the present invention comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0034] Memory for storing computer programs;

[0035] The processor is configured to implement any of the above-mentioned fetal health classification methods when executing the program stored in the memory.

[0036] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, it implements any of the above-mentioned fetal health classification methods.

[0037] The present invention solves the existing technical problems of classification bias, low recognition rate of minority samples, and high misdiagnosis rate caused by imbalanced CTG data categories. Specific beneficial effects include:

[0038] In response to the above technical problems, the present invention obtains a fetal health data set provided by UCI (University of California, Irvine), constructs a feature classification main model and a feature classification secondary correction model, which together form a MAC-NET (main and secondary correction network). Based on the error sample extraction mechanism, the feature classification secondary correction model reclassifies the error samples corresponding to the error classification results output by the feature classification main model. 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 through the joint classification module of MAC-NET to output the final classification result. MAC-NET solves the classification error problem caused by a single feature classification model. Misdiagnosis can be prevented by the error sample extraction mechanism, which avoids the problem that the error samples in the test set of the main feature classification model are classified into the error samples in the training set, ensuring that the extracted error samples all come from the error classification results of the main feature classification model, and preventing interference with the overall model performance during the error sample extraction process; MAAL (adaptive dynamic adjustment of error classification weight method) is proposed to optimize the main feature classification model, solve the problem of category imbalance in the fetal health data set, enhance MAC-NET's attention and recognition ability for minority class samples, reduce the dominant influence of majority class samples on the loss function, improve the overall classification accuracy, reduce the risk of misdiagnosis and missed diagnosis, provide doctors with more reliable intelligent auxiliary decision-making, and reduce the diagnostic burden. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0040] Figure 1 The distribution of different categories described in Implementation Method 1;

[0041] Figure 2 is a flow chart of the error sample extraction mechanism described in Implementation Method 1;

[0042] Figure 3 This is a schematic diagram of MAC-NET described in the first embodiment. DETAILED DESCRIPTION

[0043] The following will clearly and completely describe various embodiments of the present invention in conjunction with the accompanying drawings. The embodiments described with reference to the accompanying drawings are exemplary and intended to be used to explain the present invention, but should not be understood as limiting the present invention.

[0044] Implementation method 1. A fetal health classification method according to this implementation method comprises the following steps:

[0045] Step 1: obtaining a fetal health data set and performing preprocessing to form a preprocessed fetal health data set;

[0046] Step 2: Build the main feature classification model;

[0047] Step 3: Design an adaptive dynamic adjustment method for error classification weights to optimize the main feature classification model;

[0048] Step 4: Preliminary classification of the preprocessed fetal health data set is performed based on the optimized feature classification main model to obtain correct classification results and incorrect classification results;

[0049] Step 5: construct a feature classification secondary correction model, and classify the error samples corresponding to the error classification results described in step 4 based on the error sample extraction mechanism to obtain the classification results;

[0050] In step 6, the optimized feature classification main model and the feature classification secondary correction model form a MAC-NET, which combines the correct classification result described in step 4 with the classification result described in step 5 to output the final classification result.

[0051] In this embodiment, the pre-processing in step 1 is specifically as follows:

[0052] The key features of the fetal health data set are screened, and the fetal health data set is standardized based on the key features of the fetal health data set to obtain a preprocessed fetal health data set.

[0053] In this embodiment, the feature classification main model in step 2 includes a first data processing module and a first data classification module, specifically:

[0054] 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. The processed fetal health data is then feature-classified by the first data classification module.

[0055] In this embodiment, the adaptive dynamic adjustment method of the error classification weight in step 3 is specifically as follows:

[0056] The preprocessed fetal health dataset was used to test the main feature classification model. The error classification rates of different categories in the test results were exponentially amplified, and the weights of the corresponding categories were dynamically adjusted to obtain an adaptive dynamic adjustment method for error classification weights.

[0057] 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:

[0058] The second data processing module adjusts the weights of different categories by adaptively and dynamically adjusting the error classification weights. The MLP algorithm based on a fully connected layer combined with the multi-head attention mechanism processes the error samples corresponding to the error classification results output by the optimized feature classification main model, and classifies the error samples corresponding to the processed error classification results through the second data classification module.

[0059] In this embodiment, the error sample extraction mechanism in step 5 is specifically as follows:

[0060] The preprocessed fetal health data set is indexed and labeled, and the indexed and labeled fetal health data set is divided into a training set and a test set. The optimized feature classification main model is iteratively trained using the training set, and the best feature classification main model in each training is saved. The error samples of the training set and the test set in the best feature classification main model saved in each training are extracted, and the index labels of the error samples are recorded. The index labels of the error samples are de-indexed, and the fetal health data processed by the MLP algorithm corresponding to the error classification results output by the optimized feature classification main model are screened to obtain the error samples corresponding to the error classification results output by the optimized feature classification main model.

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

[0062] Existing technologies have technical problems such as classification bias caused by imbalanced CTG data categories, low recognition rate of minority samples, and high misdiagnosis rate.

[0063] To solve the above technical problems, this embodiment provides a fetal health classification method. By applying MAC-NET to the fetal health auxiliary diagnosis problem, the accuracy of fetal health classification is improved and the risk of misdiagnosis and missed diagnosis is reduced. Specifically, the method includes the following steps:

[0064] Step 1: Obtain the fetal health data set and perform preprocessing to form a preprocessed fetal health data set. The distribution of different categories in the fetal health data set is as follows: Figure 1 As shown, it specifically includes the following steps:

[0065] Step 11, screening key features of the fetal health dataset;

[0066] To improve the classification performance of MAC-NET, this implementation utilizes the mRMR (minimum redundancy maximum relevance) feature selection method during the preprocessing phase. By selecting features with the highest correlation and minimal redundancy with the target variable, the mRMR feature selection method effectively reduces data dimensionality while retaining the most relevant information for the classification task. Ultimately, this implementation selected eight key features for subsequent modeling and optimization. These eight features include baseline value (fetal heart rate), accelerations (fetal heart rate increase rate), mean value of short-term variability (mean value of short-term variability), abnormal short-term variability (abnormal short-term variability), percentage of time with abnormal long-term variability (percentage of time with abnormal long-term variability), histogram mean (histogram mean), histogram mode (histogram median), and histogram median (histogram mode).

[0067] Step 12, performing standardization processing on the fetal health data set based on the key features of the fetal health data set to obtain a preprocessed fetal health data set;

[0068] The main feature classification model uses the StandarScaler method to standardize the fetal health dataset. Specifically, the feature value of each Make the changes, the formula is as follows:

[0069] ; (1)

[0070] Where, is the standardized value, is the mean value of the feature, The standard deviation of the feature is used to eliminate the impact of different feature dimensions on the model, so that all features are at the same level, making the attention weight calculation fairer and less biased.

[0071] Step 2: Construct a main feature classification model. The main feature classification 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 a multi-head attention mechanism. The processed fetal health data is subjected to feature classification by the first data classification module. Specifically, the following steps are included:

[0072] In step 21, the MLP algorithm uses two fully connected layers, consisting of two Relu (rectified linear unit) layers and two Dropout (random dropout) layers. The sizes of the two fully connected layers are set to (8, 64) and (64, 64), respectively, and the dropout rate of the two Dropout layers is set to 0.3. The preprocessed data in the fetal health dataset is first expanded from 8 dimensions to 64 dimensions, nonlinearly transformed by the Relu layers, and then partially discarded by the Dropout layers to reduce the main feature classification model's reliance on specific features.

[0073] In step 22, this embodiment introduces a multi-head attention mechanism into the main feature classification model to enhance feature extraction capabilities and the overall performance of the main feature classification model. The multi-head attention mechanism is a widely used technique in deep learning, particularly in natural language processing (NLP) and computer vision (CV) tasks. Its core concept is to capture multi-level, long-range dependencies within the data by computing multiple self-attention modules in parallel, thereby improving the expressiveness and flexibility of the main feature classification model.

[0074] In the multi-head attention mechanism, the input vector is mapped into multiple sets of query, key, and value matrices. Each set of matrices calculates attention weights separately to capture feature relationships in different subspaces. The results of each set of attention are linearly transformed and then concatenated into the final output. The specific formula is:

[0075] ; (2)

[0076] Among them, the calculation formula for each attention head is:

[0077] ; (3)

[0078] The calculation of single-head attention is:

[0079] ; (4)

[0080] Where, For the The query weight matrix of each head, For the The key weight matrix of each head, For the The value weight matrix of each head, is the transpose of the key matrix, is the output projection matrix, The dimension of the key, used to scale the dot product value to stabilize the gradient.

[0081] The advantage of the multi-head attention mechanism is that it can capture correlations between features from different perspectives to more comprehensively characterize complex patterns in high-dimensional data. This implementation combines the multi-head attention mechanism with the MLP algorithm to calculate multi-level correlations between features, focusing on local and global dependencies.

[0082] In step 23, the first data classification module uses a 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.

[0083] Step 3: Design an adaptive dynamic adjustment method for error classification weights to optimize the feature classification main model, which specifically includes the following steps:

[0084] 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 category probability distribution and the classification probability distribution of the main feature classification model, and use this to guide the optimization direction of the main feature classification model. Its goal is to minimize cross entropy so that the classification probability distribution of the main feature classification model is as close as possible to the true category distribution. This method is derived from information entropy theory, and its core idea is to optimize the decision of the main feature classification model by maximizing information gain. The mathematical expression of the cross entropy loss function is as follows:

[0085] ; (5)

[0086] Where, is the OneHot encoding vector of the true category, is the total number of categories, when the sample belongs to Class time, ,otherwise ; is the probability distribution vector of the model classification, is the sum over all categories.

[0087] Step 32, weight design: In the cross entropy loss function, all categories are given the same weight by the feature classification main model. However, in the case of an unbalanced category distribution, this processing method may cause the majority class samples to play a dominant role, weakening the learning ability of the feature classification main model for the minority class samples, thereby masking the contribution of the minority class samples in the cross entropy loss function. In order to solve this problem, this embodiment designs an adaptive dynamic adjustment method for misclassification weights, which dynamically adjusts the misclassification weights of categories to balance the influence of majority class samples and minority class samples on the training of the feature classification main model. The method first calculates the misclassification rate of each category to measure the classification ability of the feature classification main model on different categories. The calculation expression of the misclassification rate is as follows:

[0088] ; (6)

[0089] Where, For the The error rate of the class, is the total number of categories, is the sum of the number of misclassifications for all categories, For the The number of misclassifications of the class, For the The number of misclassifications of the class, For the Class samples.

[0090] However, since the misclassification rate is usually concentrated in The adjustment range is relatively limited within the interval, making it difficult to effectively solve the problem of class imbalance. Therefore, this implementation method exponentially amplifies the misclassification rate to enhance its influence on minority class samples and make the weight adjustment more obvious. The improved weight calculation formula is:

[0091] ; (7)

[0092] Where, is an exponential function, For the This method can significantly increase the weight of the wrong category samples, thereby strengthening the model's attention to the minority class samples.

[0093] Step 33, weighted cross entropy loss function: After completing the weight design, this embodiment introduces the weight factor based on the cross entropy loss function , forming a weighted cross entropy loss function, which makes the contribution of different categories of samples to the loss adaptively adjusted. The specific formula is as follows:

[0094] ; (8)

[0095] Where, The weights are calculated based on the misclassification rate for each class. The other physical quantities are described above. Compared to the cross-entropy loss function, the weighted cross-entropy loss function effectively reduces the dominant influence of majority class samples on the loss, improves the model's ability to learn from minority class samples, and achieves the effect of adaptively and dynamically adjusting misclassification weights.

[0096] The adaptive dynamic adjustment of misclassification weights, combined with a multi-head attention mechanism, excels in addressing class imbalance. This not only significantly improves classification performance for minority class samples, improving classification accuracy and avoiding over-adjustment for majority class samples, but also enhances the robustness of the main feature classification model to data distribution shifts and noise interference, providing a solid foundation for performance improvement in class imbalance tasks. This improvement demonstrates the model's efficiency and generalization capabilities across diverse imbalanced datasets.

[0097] Step 34: After the adaptive dynamic adjustment error classification weight method is added to the feature classification main model, the preprocessed fetal health data set is divided into a training set and a test set. The test set accounts for 23% of the preprocessed fetal health data set, and the training set accounts for 77% of the preprocessed fetal health data set.

[0098] Step 4: Perform preliminary classification on the preprocessed fetal health data set based on the optimized feature classification main model to obtain correct classification results and incorrect classification results.

[0099] Steps 1-4 are the feature classification main model stage. The feature classification main model uses the MLP algorithm to mine the nonlinear relationship between features. In order to further enhance the feature classification main model's ability to express features, 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 minority class samples with imbalanced categories, improving its applicability to the category imbalance problem. The feature classification main model is optimized by designing an adaptive dynamic adjustment method for error classification weights to deal with the category imbalance problem. Based on the above-mentioned optimized feature classification main model, the optimal model obtained through training with the training set is imported into the joint classification module of MAC-NET.

[0100] Step 5: Construct a feature classification secondary correction model. Based on the error sample extraction mechanism, classify the error samples corresponding to the error classification results described in step 4 to obtain the classification results. Specifically, the following steps are included:

[0101] Step 51, constructing a feature classification secondary correction model;

[0102] Although the optimized feature classification main model achieves good performance in scenarios with an imbalanced sample size, some misclassifications still occur in the recognition of complex and boundary samples. Therefore, this implementation proposes a feature classification secondary correction model to relearn and recorrect erroneous samples corresponding to misclassification results of the optimized feature classification main model, further improving the classification capability of MAC-NET.

[0103] The feature classification secondary correction model of this embodiment is a lightweight design based on the optimized feature classification main model. 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 dropout_rate of the Dropout layer is 0.5. The training set data and test set data of the feature classification secondary correction model are first reduced from 64 dimensions to 32 dimensions, and then a nonlinear transformation is performed through the Relu layer. Then, a part of the neurons are discarded through the Dropout layer to reduce the dependence of the feature classification secondary correction model on specific features. Since there is usually a class imbalance problem in the error samples, as shown in Table 1, the feature classification secondary correction model and the optimized feature classification main model use the same MAAL and multi-head attention mechanism. Ensure the learning ability of the feature classification secondary correction model on minority class samples, and further improve the classification performance of the feature classification secondary correction model on complex samples.

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

[0105] Table 1

[0106]

[0107] Step 52: In order to prevent the error samples of the test set in the optimized feature classification main model from being classified into the error samples of the training set, this embodiment adopts an error sample extraction mechanism, indexes and labels the pre-processed fetal health data set, divides the indexed and labeled fetal health data set into a training set and a test set, uses the training set to iteratively train the optimized feature classification main model, saves the best feature classification main model in each training, extracts the error samples of the training set and the test set in the best feature classification main model saved in each training, records the index labels of the error samples, de-indexes the index labels of the error samples, and screens the fetal health data processed by the MLP algorithm corresponding to the error classification results output by the optimized feature classification main model to obtain the error samples corresponding to the error classification results output by the optimized feature classification main model. Figure 2 As shown in Figure 2, the error sample extraction mechanism includes the error sample extraction strategy and the isolated verification strategy, specifically:

[0108] (1) In order to prevent the overall model performance from being disturbed during the extraction of error samples, this embodiment designs a refined error sample extraction strategy. First, the fetal health data set is indexed and labeled. The original row number index of the data is saved during the process of dividing the preprocessed fetal health data set into the training set and the test set. During the iterative training of the optimized feature classification main model, the best performing model is saved each time. During the error sample extraction process, all the saved best models are traversed, and the error samples in the training set and the test set of each best model are extracted. The error index is recorded, and the fetal health data processed by the MLP algorithm in the optimized feature classification main model is screened according to the error index.

[0109] This strategy ensures that all extracted error samples originate from the misclassification results of the optimized primary feature classification model, serving as input to the secondary feature classification correction model. It also prevents error samples in the test set from being assigned to the training set. This not only enables the secondary feature classification correction model to further learn from difficult-to-identify samples, but also lays a solid foundation for its lightweight design.

[0110] (2) To address the issue of data leakage prevention, this implementation introduces an isolation verification strategy to fundamentally eliminate the risk of data leakage. During the data extraction and partitioning process, this isolation verification strategy uses an independent index tracking strategy to deduplicate the extracted data and ensure that the training set and the test set do not overlap, thereby avoiding the possibility of the test set being mixed into the training set.

[0111] The isolated verification strategy effectively avoids inflated accuracy and model overfitting caused by data leaks. Furthermore, the isolated verification strategy is particularly important in medical applications. By extracting fetal health data and classification labels processed by the MLP algorithm from the optimized feature classification primary model, it not only effectively protects patient privacy and prevents the misuse of sensitive information during the training of the feature classification secondary correction model, but also ensures the credibility and generalization ability of the diagnostic model in real clinical settings.

[0112] Through the error sample extraction mechanism, this implementation method not only enhances MAC-NET's learning ability for minority samples, but also effectively avoids the misleading effects of data leakage, ensuring the security and reliability of MAC-NET in medical applications.

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

[0114] Step 6: The optimized feature classification main model and feature classification secondary correction model form MAC-NET, as shown in Figure 3 As shown, the correct classification result described in step 4 and the classification result described in step 5 are combined to output the final classification result;

[0115] Step 6 is the joint classification phase. MAC-NET imports the optimal model, obtained by training the optimized feature classification main model and the secondary feature classification correction model, into the joint classification module. First, the optimized feature classification main model performs a preliminary classification of the input data. For erroneous samples corresponding to the misclassified results output by the optimized feature classification main model, these are passed as input to the secondary feature classification correction model for reclassification. Finally, the classification results of the secondary feature classification correction model are combined with the correct classification results of the optimized feature classification main model to output the final classification result. Through this joint strategy, MAC-NET has significantly improved both overall classification accuracy and robustness.

[0116] In summary, the MAC-NET proposed in this embodiment effectively mitigates the class imbalance problem in CTG data by leveraging the synergistic effect of an optimized main feature classification model and a secondary feature classification correction model. To ensure the effectiveness and computational efficiency of MAC-NET, this embodiment employs appropriate parameter configurations for MAC-NET, as shown in Table 2. The optimized main feature classification model utilizes two fully connected (FC) layers and two Relu layers, combined with a multi-head attention mechanism and a dropout layer to prevent overfitting. The secondary feature classification correction model utilizes a lightweight single-layer structure to reduce computational overhead while further optimizing misclassified samples. This embodiment offers significant advantages in alleviating data imbalance, improving the ability to distinguish between pathological and suspected classes, and reducing the risk of misdiagnosis and missed diagnosis. Furthermore, MAC-NET employs a combined coarse-grained and fine-grained classification approach. At the coarse-grained level, a dynamic weighting strategy effectively balances the learning capabilities of different classes. At the fine-grained level, a multi-head attention mechanism plays a crucial role in intra-class feature aggregation and key feature extraction. This method not only solves the category imbalance problem, but also improves the overall classification performance of MAC-NET.

[0117] Table 2

[0118]

[0119] In order to better illustrate the fetal health classification method described in this embodiment, the following examples are described in detail:

[0120] Example 1. Ablation experiment;

[0121] Table 3

[0122]

[0123] The ablation experiment system of this embodiment deconstructs the contribution of each component to the model performance, as shown in Table 3. The MLP algorithm achieved an accuracy of 93.66% and an AUC value of 0.9766 without introducing any optimization strategy, verifying the ability of the deep learning network to capture the nonlinear relationship of fetal health characteristics. When embedded with MAAL, the MLP algorithm achieved comprehensive performance improvement without relying on data resampling, with the precision and recall rates increasing by 0.93% simultaneously, proving that the dynamic weight strategy effectively alleviated the category imbalance problem through error-sensitive learning. When the multi-head attention mechanism was introduced alone, the MLP algorithm produced a more significant performance leap, with the accuracy increased by 3.07 percentage points to 96.73%, and the AUC value was 0.9854, indicating that the multi-head attention mechanism's selective focus on key monitoring features significantly enhanced the model's discriminability.

[0124] When MAAL and the multi-head attention mechanism work together, the optimized main feature classification model demonstrates a positive coupling effect between its components: the F1 score improves by 3.73 percentage points compared to the baseline, and the standard deviation of the AUC fluctuation decreases from 0.0027 to 0.0015. This validates the effectiveness of the multi-granularity optimization of the dynamic weight fusion attention mechanism and demonstrates the stability and reliability of the model. Finally, the secondary feature classification correction model, through targeted learning of erroneous samples from the main feature classification model, drives MAC-NET to break through performance bottlenecks, achieving 99.39% accuracy and a high AUC of 0.9983. This demonstrates the significant effectiveness of MAC-NET in addressing class imbalance and correcting erroneous samples.

[0125] Example 2. Comparative test;

[0126] To verify the effectiveness of MAAL proposed in Implementation 1 in dealing with the class imbalance problem, this example conducts comparative experiments on two baseline models, MLP and XGBoost (Extreme Gradient Boosting), using Focal Loss and SMOTE (Synthetic Minority Oversampling Technique), respectively, and evaluates their classification performance on different categories. The experimental results are shown in Table 4.

[0127] Focal Loss is a loss function designed to solve the problem of class imbalance. Its core is based on the standard cross entropy loss, and Focal Loss introduces a regulation factor ,in, is the classification probability of the correct category, is a tuning parameter. When the model has a high probability of classifying a certain category, that is, when it classifies samples that are easy to classify, the tuning 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 for Focal Loss is as follows:

[0128] ; (9)

[0129] Where, is the balancing factor used to adjust the category weights, is the difficulty weighting factor.

[0130] SMOTE is a classic method for dealing with class imbalance. Its core idea is to artificially synthesize minority class samples through feature space interpolation. The specific implementation process is as follows:

[0131] Neighborhood sampling: for each minority class sample , calculate its k nearest neighbors in the feature space (usually k=5).

[0132] Linear interpolation: randomly select neighborhood samples , generate new samples:

[0133] ; (10)

[0134] Where, is the random interpolation coefficient, For new samples, For of k A randomly selected neighbor among the nearest neighbors.

[0135] Sample expansion: Repeat the above process until the sample size of each category is balanced.

[0136] Table 4

[0137]

[0138] Experiments show that the MLP family of methods significantly outperforms the XGBoost family of models in handling imbalanced medical data. The XGBoost model performs poorly in the suspected class, with a recall rate of only 0.6912. Even after combining it with Focal Loss, the suspected recall rate only improves slightly. The optimized main feature classification model, using a multi-head attention mechanism and MAAL, significantly improves the suspected recall rate to 0.88. Compared to the limitations of Focal Loss, which relies on static weight adjustment, MAAL optimizes weight distribution by dynamically sensing changes in sample error rates. In pathology tasks, the AUC after optimizing the MLP with Focal Loss is 0.9914, while the optimized main feature classification model achieves an AUC of 0.9995. Although the AUC for the pathology class reached 0.9921 after optimizing XGboost using SMOTE, its normal recall rate of 0.9605 was still significantly lower than the normal recall rate of MAC-NET. Although the recall rate of the suspected class of MAC-NET was slightly lower than that of XGboost optimized using SMOTE, the data generated by SMOTE may introduce characteristic noise that does not match the actual medical distribution, affecting the reliability of clinical diagnosis.

[0139] MAC-NET achieves 100% accurate identification of normal and pathological classes on the test set through a two-stage feature classification correction model. The optimized feature classification main model in the first stage utilizes an attention mechanism to enhance features of minority classes, such as pathology, achieving a pathology recall rate of 1, meaning zero missed diagnoses on the test set. The second-stage feature classification two-stage correction model performs targeted corrections on erroneous samples corresponding to misclassified results output by the optimized feature classification main model. MAC-NET achieves an AUC of 1 for all categories through two-stage MAAL collaborative optimization, significantly improving the recall rates of normal and suspected classes. MAC-NET not only avoids noise interference but also achieves joint management of local and global imbalances, providing an innovative solution with zero missed detection and high accuracy for medical diagnosis scenarios.

[0140] Example 3. Generalization experiment;

[0141] To comprehensively evaluate the generalization capabilities of MAC-NET, this example compares two publicly available multi-class imbalanced datasets, which can be obtained from the Keel (Knowledge Extraction Based on Evolutionary Learning) repository. To ensure the reliability of the experimental evaluation, this example deletes categories with fewer than 10 samples. This is because the experiment uses a 77% training set and 23% test set partitioning method. If a class has fewer than 10 samples, there can only be a maximum of 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 example:

[0142] The Balance dataset simulates a physical balance problem and contains 625 examples. Each example represents a combination of weight and distance between the left and right sides of the balance. The goal is to predict the balance's state, including left-leaning, right-leaning, or balanced. It contains four continuous features: Left-Weight, Left-Distance, Right-Weight, and Right-Distance. The data has three class labels: L (left-leaning), R (right-leaning), and B (balanced), with a class distribution of 288:49:288. Due to its severe data imbalance, this dataset is often used to study multi-class imbalanced classification problems and is ideal for evaluating classifier performance on imbalanced datasets.

[0143] The Pageblock dataset is derived from an analysis of document page blocks. Its goal is to classify content blocks within a page into different types, such as text, title, and image. The data contains 5,473 samples and 10 continuous features. The features primarily describe the geometric and positional characteristics of page blocks, such as width, height, and area. The categories are categorized into five types: 1. Text, 2. Title, 3. Image, 4. Horizontal Line, and 5. Digital Object. The text category accounts for approximately 89%, while the remaining categories are relatively small and exhibit significant imbalance. By removing categories with fewer than 10, only three categories remain: text, title, and digital object. The category distribution is 492:33:12. This dataset is widely used in the study of imbalanced classification tasks.

[0144] Table 5

[0145]

[0146] To verify the applicability of the feature classification main model and MAC-NET proposed in Implementation 1 in imbalanced data scenarios, this example compares these two datasets with the fetal health dataset and with a variety of typical machine learning algorithms and MLP, including decision trees, support learning machines, logistic regression, and random forests. The experimental results are shown in Table 5.

[0147] All three datasets have significant class balance issues: the right-leaning class accounts for only 7.84% of the Balance dataset, the digital object class accounts for 0.22% of the Pageblock dataset, and the pathology class accounts for only 8% of the Fetal-Health dataset. The optimized feature classification main model proposed in this embodiment still maintains high precision in such extremely unbalanced scenarios, with accuracy rates of 97.92%, 97.58%, and 97.34% in the three datasets, respectively. Compared with DT, the accuracy rate in the Balance dataset increased by 31.26 percentage points, verifying the effectiveness of the dynamic weighting mechanism for the collaborative optimization of the leading and tail classes.

[0148] MAC-NET further breaks through performance bottlenecks, achieving overall accuracy of 99.39%, 99.31%, and 99.19% on three imbalanced datasets, respectively, all nearing perfect classification. Compared to single-stage models, MAC-NET further improves accuracy across different datasets through hierarchical feature modification, without relying on prior class information. This significantly mitigates the impact of imbalanced data distribution on the model's decision boundary. These experimental results further demonstrate that MAC-NET can adapt to complex scenarios with varying degrees of imbalance, providing a reliable solution for multi-domain classification tasks.

[0149] Embodiment 2. A fetal health classification system according to this embodiment includes the following modules:

[0150] A preprocessing module, which obtains a fetal health data set and performs preprocessing to form a preprocessed fetal health data set;

[0151] Main model module, builds the main feature classification model;

[0152] The main model optimization module designs an adaptive dynamic adjustment method for error classification weights to optimize the main feature classification model;

[0153] The preliminary classification module performs preliminary classification on the preprocessed fetal health data set based on the optimized feature classification main model to obtain correct classification results and incorrect classification results;

[0154] The secondary classification module builds a secondary correction model for feature classification and classifies the error samples corresponding to the error classification results described in the preliminary classification module based on the error sample extraction mechanism to obtain the classification results.

[0155] The joint classification module, the optimized feature classification main model and the feature classification secondary correction model form MAC-NET, which combines the correct classification results described by the preliminary classification module and the classification results described by the secondary classification module to output the final classification results.

[0156] Implementation three. An electronic device described in this implementation includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0157] Memory for storing computer programs;

[0158] The processor is configured to implement the fetal health classification method described in the first embodiment when executing the program stored in the memory.

[0159] 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 the fetal health classification method described in embodiment 1.

[0160] The above is a detailed introduction to the fetal health classification method, system, device and storage medium proposed in the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A fetal health classification method, characterized in that: The following steps are involved: Step 1: obtaining a fetal health data set and performing preprocessing to form a preprocessed fetal health data set; Step 2: Build the main feature classification model; Step 3: Design an adaptive dynamic adjustment method for error classification weights to optimize the main feature classification model; Step 4: Preliminary classification of the preprocessed fetal health data set is performed based on the optimized feature classification main model to obtain correct classification results and incorrect classification results; Step 5: construct a feature classification secondary correction model, and classify the error samples corresponding to the error classification results described in step 4 based on the error sample extraction mechanism to obtain the classification results; The error sample extraction mechanism is specifically as follows: The preprocessed fetal health data set is indexed and labeled, and the indexed and labeled fetal health data set is divided into a training set and a test set. The optimized feature classification main model is iteratively trained using the training set, and the best feature classification main model in each training is saved. The error samples of the training set and the test set in the best feature classification main model saved in each training are extracted, and the index labels of the error samples are recorded. The index labels of the error samples are de-indexed, and the fetal health data processed by the MLP algorithm corresponding to the error classification results output by the optimized feature classification main model are screened to obtain the error samples corresponding to the error classification results output by the optimized feature classification main model; In step 6, the optimized feature classification main model and the feature classification secondary correction model form a MAC-NET, which combines the correct classification result described in step 4 with the classification result described in step 5 to output the final classification result.

2. A fetal health classification method according to claim 1, characterized in that: The pre-processing in step 1 is specifically as follows: The key features of the fetal health data set are screened, and the fetal health data set is standardized based on the key features of the fetal health data set to obtain a preprocessed fetal health data set.

3. A fetal health classification method according to claim 1, characterized in that: 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 with two fully connected layers combined with the multi-head attention mechanism. The processed fetal health data is feature classified by the first data classification module.

4. A fetal health classification method according to claim 1, characterized in that: The adaptive dynamic adjustment method for error classification weights in step 3 is specifically as follows: The preprocessed fetal health dataset was used to test the main feature classification model. The error classification rates of different categories in the test results were exponentially amplified, and the weights of the corresponding categories were dynamically adjusted to obtain an adaptive dynamic adjustment method for error classification weights.

5. A fetal health classification method according to claim 1, characterized in that: 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 by adaptively and dynamically adjusting the error classification weights. The MLP algorithm based on a fully connected layer combined with the multi-head attention mechanism processes the error samples corresponding to the error classification results output by the optimized feature classification main model, and classifies the error samples corresponding to the processed error classification results through the second data classification module.

6. A fetal health classification method according to claim 4 or 5, characterized in that: The different categories include normal, suspected and pathological.

7. A fetal health classification system, characterized in that: Includes the following modules: A preprocessing module, which obtains a fetal health data set and performs preprocessing to form a preprocessed fetal health data set; Main model module, builds the main feature classification model; The main model optimization module designs an adaptive dynamic adjustment method for error classification weights to optimize the main feature classification model; The preliminary classification module performs preliminary classification on the preprocessed fetal health data set based on the optimized feature classification main model to obtain correct classification results and incorrect classification results; The secondary classification module builds a secondary correction model for feature classification and classifies the error samples corresponding to the error classification results described in the preliminary classification module based on the error sample extraction mechanism to obtain the classification results. The joint classification module, the optimized feature classification main model and the feature classification secondary correction model form MAC-NET, which combines the correct classification results described by the preliminary classification module and the classification results described by the secondary classification module to output the final classification results.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; The processor is configured to implement a fetal health classification method according to any one of claims 1 to 6 when executing a program stored in the memory.

9. 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 a processor, the fetal health classification method according to any one of claims 1 to 6 is implemented.

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

  • Data set classification method and system based on unbalanced incremental learning

    CN119669862A