Sleep staging model training method, sleep staging method and sleep staging equipment

By combining semi-supervised learning methods with both labeled and unlabeled data, and using a preheating model to generate pseudo-labeled data, the dependence of sleep staging models on large-scale labeled data is resolved, improving the accuracy and efficiency of the model and making it suitable for sleep monitoring in multiple scenarios.

CN120995111APending Publication Date: 2025-11-21BEIJING TSINGRAY TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511350675.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, the training of sleep staging models relies on manual data labeling by professional sleep technicians, which makes it difficult to obtain labeled data, resulting in a small proportion of training data and a greater waste of unlabeled data. Furthermore, the models are highly dependent on large-scale unlabeled data.

Method used

By acquiring both labeled and unlabeled data, a pre-trained model is used to generate pseudo-labeled data. This pseudo-labeled data is then combined with the labeled data to train the feature extraction and prediction modules. A semi-supervised learning method is employed, and a dynamic termination condition ensures that the model stops training in a stable state, thus reducing the reliance on large-scale labeled data.

Benefits of technology

It improves the accuracy of sleep staging models, reduces data labeling costs and manpower investment, enhances the model's ability to learn features from unlabeled data, avoids overfitting, and is suitable for sleep monitoring in multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995111A_ABST
    Figure CN120995111A_ABST
Patent Text Reader

Abstract

The invention provides a sleep staging model training method, a sleep staging method and sleep staging equipment. The method is applied to sleep data processing. The method comprises the following steps: acquiring true label data and label-free data; obtaining pseudo label data by using the true label data; training a feature extraction module by using the true label data and the pseudo label data to obtain an initial training feature extraction module; training the initial training feature extraction module and the prediction module by using the true label data; judging whether a preset termination condition is met based on a target feature extraction module and a target prediction module; if it is judged that the preset termination condition is not met, returning to execute the step of obtaining the initial training feature extraction module until the preset termination condition is met, and completing training of the sleep staging model. According to the method, the dependence on large-scale labeled data can be effectively reduced through self-learning and pseudo label generation under the guidance of real label data, the data labeling cost is reduced, and the model generalization performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of sleep data processing, in particular to a sleep staging model training method, a sleep staging method and equipment. BACKGROUND

[0002] Sleep health is an important indicator of life quality, and monitoring sleep status is of great significance for clinical diagnosis of sleep diseases, community / old-age home monitoring of the elderly, and personal work and rest adjustment.

[0003] The current mainstream sleep monitoring method takes polysomnography (PSG) as the gold standard, which synchronously collects multiple physiological signals such as electroencephalogram, electrocardiogram, electrooculogram, electromyogram, blood oxygen, and snoring sound, to provide comprehensive data support for fine division of sleep stages. At the same time, millimeter wave radar as a new human perception sensor is widely studied due to its non-contact, anti-interference, high precision and other characteristics. Millimeter wave radar can accurately capture human respiratory and body movement signals at night, and through signal processing algorithms, the sleep stage of the subject can be identified.

[0004] The existing sleep staging method according to the monitoring data mainly uses a neural network model to identify the data. However, in the supervised learning framework, the data available for guiding model training is highly dependent on professional sleep technicians manually labeling frame by frame. This manual labeling of data is time-consuming and labor-intensive, making it difficult to obtain labeled data, resulting in a small proportion of data available for training of the sleep staging model, and more unlabeled data being wasted. SUMMARY

[0005] Therefore, the present application provides a sleep staging model training method, comprising: obtaining true label data and unlabeled data, the true label data comprising physiological signals collected in a sleep state and sleep staging labels annotated by professional sleep technicians based on the physiological signals, and the unlabeled data comprising only physiological signals collected in a sleep state; preheating training a sleep staging model using the true label data to obtain a preheating model, the preheating model comprising a feature extraction module and a prediction module, the feature extraction module being configured to extract sleep features from the physiological signals, and the prediction module being configured to map the sleep features to sleep staging labels to complete sleep staging; performing sleep staging on the unlabeled data using the preheating model to obtain pseudo label data; training the feature extraction module using the true label data and the pseudo label data to obtain an initial training feature extraction module; training the initial training feature extraction module and the prediction module by using the true label data, to obtain a target feature extraction module and a target prediction module; determining whether a preset termination condition is met based on the target feature extraction module and the target prediction module; If it is determined that the preset termination condition is not met, returning to execute the step of training the feature extraction module by using the true label data and the pseudo label data to obtain an initial training feature extraction module until the preset termination condition is met, and completing training of the sleep staging model.

[0006] Optionally, the determining whether the preset termination condition is met based on the target feature extraction module and the target prediction module comprises: obtaining a training round of the target feature extraction module and the target prediction module; determining whether the preset termination condition is met based on the training round.

[0007] Optionally, the determining whether the preset termination condition is met based on the target feature extraction module and the target prediction module comprises: performing sleep staging on pseudo label data by using the target feature extraction module and the target prediction module to obtain updated pseudo label data; calculating a change rate of the updated pseudo label data and the pseudo label data before the current training round is updated; determining whether the preset termination condition is met based on the change rate.

[0008] Optionally, the determining whether the preset termination condition is met based on the target feature extraction module and the target prediction module comprises: when the training round reaches a preset training round period, performing sleep staging on pseudo label data by using the target feature extraction module and the target prediction module obtained in the current training round to obtain updated pseudo label data; calculating a change rate of the updated pseudo label data and the pseudo label data before the current training round is updated; determining whether the preset termination condition is met based on the change rate.

[0009] Optionally, the preset termination condition comprises: a number of times that the change rate is less than a change rate threshold continuously reaches a preset number of times; or the training round reaches a preset training round.

[0010] Optionally, the calculating the change rate of the updated pseudo label data and the pseudo label data before the current training round is updated comprises: Calculate the proportion of the length of the continuous time segment in which the sleep stage label changes in the updated pseudo-label data and the pseudo-label data before the update to the total length of time, to obtain the change rate.

[0011] The sleep stage model training method provided by the application further comprises: Obtain the target confidence of the sleep stage result corresponding to the pseudo-label data. Determine whether the target confidence is less than the confidence threshold based on the target confidence. If the target confidence is less than the confidence threshold, correct the target confidence to the preset confidence. Convert the corrected target confidence into a one-hot code form based on the maximum confidence principle to obtain the corrected pseudo-label data.

[0012] Optionally, the feature extraction module is trained based on the true label data and the pseudo-label data to obtain an initial trained feature extraction module, comprising: Calculate the weighted loss based on the true label data and the pseudo-label data. Train the feature extraction module based on the weighted loss to obtain an initial trained feature extraction module.

[0013] The second aspect of the application provides a sleep stage method based on a millimeter wave radar, comprising: Obtain radar sleep data of a target object, the radar sleep data comprising physiological signals in a sleep state collected by a millimeter wave radar device. Use the sleep stage model trained by any one of the sleep stage model training methods to perform sleep staging on the sleep data to obtain a sleep stage result.

[0014] The third aspect of the application provides a sleep stage model training device, comprising a processor and a memory connected to the processor, wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to make the processor execute the sleep stage model training method described above.

[0015] The fourth aspect of the application provides a sleep stage device based on a millimeter wave radar, comprising a processor and a memory connected to the processor, wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to make the processor execute the sleep stage method based on a millimeter wave radar described above.

[0016] The present application acquires true label data and unlabeled data through multi-scene data acquisition, enriches data diversity, lays a foundation for model learning of cross-scene general sleep features, and reduces dependence on single-scene labeled data. Secondly, the true label data is used for supervised pre-training, so that the feature extraction module quickly learns the core features of sleep data (such as respiratory rhythm and body movement pattern), the prediction module establishes a preliminary mapping relationship, provides high-quality initialization parameters for subsequent training, and improves the overall efficiency. Then, the preheating model is used to automatically label the unlabeled data to generate pseudo-label data, convert the implicit sleep stage features into supplementary supervision signals, expand the training data size, and alleviate the problem of insufficient labeled data. Subsequently, the parameters of the prediction module are frozen in the module training, and the feature extraction module is trained using mixed data, and then the parameters of the prediction module are unfrozen, and the two modules are jointly trained, which not only protects the parameters of the prediction module from early pseudo-label noise interference, but also optimizes the feature extraction and prediction modules, and enhances the feature learning ability and classification performance of the model on unlabeled data. Finally, through dynamic termination condition judgment and iterative optimization, the model is stopped training in a stable state to avoid overfitting. Through semi-supervised learning combining unlabeled data and part of labeled data, the sleep staging model can effectively reduce the dependence on large-scale labeled data and reduce the cost and manpower of data labeling. At the same time, the sleep staging model can still stably extract key sleep features when facing massive unlabeled data, thereby improving the accuracy of sleep staging. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the specific embodiments or prior art of the present application, the drawings needed in the specific embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0018] Figure 1 Flow chart of sleep staging model training in embodiments of the present application; Figure 2 Structure diagram of the sleep staging model in embodiments of the present application. DETAILED DESCRIPTION

[0019] The technical solutions of the present application will be described in detail below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0020] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0021] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication between two elements, it can be wireless connection, or it can be wired connection. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0022] In addition, the technical features involved in the different embodiments of the application described below can be combined with each other as long as there is no conflict between them.

[0023] As Figure 1 shown, the embodiment of the present application provides a sleep staging model training method, which is executed by a computer or a server and the like electronic device, and specifically includes: S1, acquiring true label data and unlabeled data, the true label data including physiological signals collected in a sleep state and sleep staging labels labeled by professional sleep technicians based on the physiological signals, and the unlabeled data only including physiological signals collected in a sleep state.

[0024] The present embodiment can perform sleep monitoring on subjects to obtain training data in different scenarios. In one scenario, only millimeter wave radar is used to collect physiological signals of subjects throughout the night. The millimeter wave radar is placed at a height of 1m from the head of the bed. The collected echo signals are preprocessed to obtain a one-dimensional range image and a respiratory energy spectrum The one-dimensional range image describes the distance measurement of the subject's chest / abdomen fluctuation (reflecting the periodic changes of physiological activities such as respiration, heartbeat, etc.) corresponding to the nth sampling point in continuous time t, and the respiratory energy spectrum The energy intensity of the nth frequency component in the respiratory signal within the tth time window (reflecting the distribution and change of the respiratory frequency) is described, and these radar spectrograms constitute unlabeled data; another scenario uses PSG equipment and millimeter wave radar to collect physiological signals of a subject overnight, pre-processes the collected millimeter wave radar physiological signals to obtain unlabeled data, and manually annotates the sleep stages of the physiological signals collected by the PSG equipment by a professional sleep technician, and these physiological signals and corresponding sleep staging labels constitute true labeled data, and the sleep staging labels can be divided into wakefulness period (Wake), rapid eye movement sleep period (REM), non-rapid eye movement sleep 1 period (N1), non-rapid eye movement sleep 2 period (N2), and non-rapid eye movement sleep 3 period (N3).

[0025] S2, pre-training the sleep staging model using true labeled data to obtain a pre-trained model, the pre-trained model including a feature extraction module and a prediction module, the feature extraction module being configured to extract sleep features from the physiological signals, and the prediction module being configured to map the sleep features to sleep staging labels to complete sleep staging.

[0026] As shown in Figure 2 The sleep staging model includes a feature extraction module and a prediction module, wherein the feature extraction module can adopt any network structure including a front-end convolutional neural network (CNN) and its input side (front-end) and output side (back-end) network layers, and the prediction module can adopt any network structure including a back-end fully connected layer (FC) and its front and back network layers (such as a network back-end structure), as well as a recurrent neural network (RNN) and a long short-term memory neural network (LSTM). The sleep staging model is first pre-trained using true labeled data, i.e., the feature extraction module and the prediction module in the model are trained, until the pre-training round reaches a preset round T1, i.e., the pre-training is completed, and the feature extraction module and the prediction module in the pre-trained model are obtained. During the pre-training process, when the training round does not reach the preset round T1, the model is in an initial learning stage, and its feature extraction and classification ability has not yet fully converged, and the confidence of the pseudo-label generated at this time is low. When the pre-training round reaches the preset round T1, the model has the ability to accurately judge, and at this time the pre-training ends, and the pre-trained model is used to process the unlabeled data to obtain pseudo-label data. The prediction result with high confidence output by the model is used as a pseudo-label, which can help the model to further learn data features from the unlabeled data, thereby enhancing the generalization performance of the model and the sleep staging accuracy. The preset round T1 is usually set according to experience, and is generally selected to be 0.3-0.4 times the total training round.

[0027] S3, using the pre-trained model to perform sleep staging on the unlabeled data to obtain pseudo-label data.

[0028] The pre-trained preheating model (which has learned the feature representation and stage mapping relationship of sleep data through true label data) is used to automatically sleep stage the unlabeled data to generate pseudo-label data such as Figure 2 The process converts the sleep stage features (such as respiratory rhythm, body movement pattern, etc.) implied in the unlabeled data into sleep stage labels predicted by the model through the preheating model, providing additional supervision signals for subsequent training.

[0029] S4, using true label data and pseudo-label data to train the feature extraction module to obtain an initial training feature extraction module.

[0030] After obtaining the pseudo-label data, the preheating model can be formally trained, referring to Figure 2 training mode one in the , first mix the true label data and the pseudo-label data, and freeze the prediction module parameters, only train the feature extraction module, input the mixed data to the feature extraction module, extract the features through the feature extraction module, output the prediction results through the prediction module (the parameters are frozen at this time, only as a fixed mapping), then after this round of training is completed, step S5 is entered.

[0031] S5, using true label data to train the initial training feature extraction module and the prediction module to obtain a target feature extraction module and a target prediction module.

[0032] After obtaining the trained initial training feature extraction module through step S4, referring to Figure 2 training mode two in the , unfreeze the prediction module parameters, and use only the true label data to train the initial training feature extraction module and the prediction module at the same time, then after this round of training is completed, step S6 is entered.

[0033] S6, determining whether the target feature extraction module and the target prediction module meet the preset termination condition.

[0034] After one round of steps S4-S5, it is determined whether the target feature extraction module and the target prediction module obtained in this round meet the preset termination condition, if it is determined that the preset termination condition is not met, the step of training the feature extraction module based on the true label data and the pseudo-label data to obtain the initial training feature extraction module is returned to execute, until the preset termination condition is met, and the training of the sleep staging model is completed. If it is determined that the preset termination condition is met, step S7 is executed.

[0035] S7, stopping training, completing the training of the sleep staging model, This embodiment is when the target feature extraction module and the target prediction module in this round do not meet the preset termination condition, it is necessary to return to steps S4-S6 for retraining until the target feature extraction module and the target prediction module obtained in a training round meet the preset termination condition, and the training of the sleep staging model is completed.

[0036] The embodiment obtains true labels and unlabeled data through multi-scene data acquisition, enriches data diversity, lays a foundation for model learning of cross-scene general sleep features, and reduces dependence on single-scene labeled data. Secondly, supervised pre-training is performed on true label data, so that the feature extraction module quickly learns the core features of sleep data (such as respiratory rhythm and body movement pattern), the prediction module establishes a preliminary mapping relationship, provides high-quality initialization parameters for subsequent training, and improves overall efficiency. Then, the preheating model is used to automatically label the unlabeled data to generate pseudo-label data, convert the implicit sleep stage features into supplementary supervision signals, expand the training data size, and alleviate the problem of insufficient labeled data. Subsequently, the parameters of the prediction module are frozen in the module training, and the feature extraction module is trained using mixed data, and then the parameters of the prediction module are unfrozen, and the two modules are jointly trained, which not only protects the parameters of the prediction module from early pseudo-label noise interference, but also optimizes the feature extraction and prediction modules, enhances the feature learning ability and classification performance of the model on unlabeled data. Finally, through dynamic termination condition judgment and iterative optimization, the model is stopped in a stable state to avoid overfitting. Through semi-supervised learning combining unlabeled data and part of the labeled data, the sleep staging model can effectively reduce the dependence on large-scale labeled data and reduce the cost and manpower of data labeling. At the same time, the sleep staging model can still stably extract key sleep features when facing massive unlabeled data, thereby improving the accuracy of sleep staging.

[0037] In some optional embodiments of the present embodiment, step S6 comprises the following three ways of judging whether the target feature extraction module and the target prediction module meet the preset termination condition: The first way is: S61a, obtaining the training rounds of the target feature extraction module and the target prediction module.

[0038] The total training rounds of the target feature extraction module and the target prediction module are counted, that is, the total iteration times of completing steps S4-S5.

[0039] S62a, judging whether the preset termination condition is met based on the training rounds.

[0040] According to the training rounds, it is judged whether the current training meets the preset termination condition. If the preset termination condition is met, the training is stopped, and the target sleep staging model is obtained. If the preset termination condition is not met, it is necessary to return to steps S4-S5 for retraining until the training rounds meet the preset termination condition, that is, the training of the sleep staging model is completed.

[0041] The embodiment is directed to the one-time labeling of the unlabeled data by using the preheating model in step S3, and the pseudo-label data is not updated with the training round, so that the training process only needs to be controlled according to the training round. The stability and controllability of the training process are effectively ensured, and the complexity caused by frequent updating of the pseudo-label is avoided.

[0042] The second way is: S61b, sleep staging of the pseudo-label data by using the target feature extraction module and the target prediction module to obtain updated pseudo-label data.

[0043] The embodiment needs to update the pseudo-label data iteratively, and after each training round, the pseudo-label data needs to be updated by using the obtained target feature extraction module and target prediction module to obtain updated pseudo-label data.

[0044] S62b, calculating the change rate of the updated pseudo-label data and the pseudo-label data before the current training round is updated.

[0045] The change rate of the updated pseudo-label data and the pseudo-label data before the current training round is updated needs to be calculated, for example, the stability of the pseudo-label is measured by using quantitative indicators such as label category consistency ratio and label distribution similarity.

[0046] S63b, judging whether the change rate meets the preset termination condition.

[0047] The embodiment updates the pseudo-label data after each training round, can timely reflect the current feature learning ability of the model, avoids the training deviation caused by the initial pseudo-label noise or data distribution change, takes the pseudo-label change rate as the termination basis, ensures that the training is stopped when the pseudo-label quality tends to be optimal, avoids invalid overtraining, and saves training resources.

[0048] The third way is: S61c, when the training round reaches the preset training round period, the pseudo-label data is sleep staged by using the target feature extraction module and the target prediction module obtained in the current training round to obtain updated pseudo-label data.

[0049] The embodiment needs to update the pseudo-label data periodically, and the pseudo-label data can be updated once when the training round reaches the preset training round period.

[0050] S62c, calculating the change rate of the updated pseudo-label data and the pseudo-label data before the current training round is updated.

[0051] After each update of the pseudo-label data, the change rate of the updated pseudo-label data and the pseudo-label data before the update needs to be calculated.

[0052] S63c, judging whether the change rate meets the preset termination condition.

[0053] The embodiment avoids the long-term influence of initial pseudo-label noise or data distribution deviation on the model by fixed-period pseudo-label updating, ensures that the model can gradually absorb more accurate pseudo-label information, reduces unnecessary repeated calculation compared with pseudo-label updating in each round, reduces the consumption of computing resources in the training process, and avoids the introduction of new noise interference caused by frequent updating; the change rate is directly quantified as the termination basis, which avoids overfitting of the sleep staging model and saves training resources.

[0054] In some optional embodiments of the embodiment, the preset termination condition in step S6 includes: the number of times that the change rate is less than the change rate threshold continuously reaches a preset number of times; or the training round reaches a preset training round.

[0055] For step S62a in the embodiment, the training round can be controlled by judging whether the training round reaches a preset training round. Since the pseudo-label data is not updated in this step, the training is only controlled by the training round. For example, the preset training round is 200. If the training round reaches 200, the training is stopped.

[0056] For step S63b or step S63c in the embodiment, the training can be controlled by judging whether the number of times that the change rate is less than the change rate threshold continuously reaches a preset number of times. For example, the preset number of times is 5. If the change rate is less than the change rate threshold for 5 times continuously, the training is stopped.

[0057] In addition, step S63b or step S63c is also applicable to controlling the training by the training round. That is, if the training round of step S63b or step S63c has reached 200, but the change rate is still higher than the change rate threshold, the training is terminated in advance.

[0058] The embodiment sets the preset termination condition by combining the training round threshold and the number of times that the change rate continuously meets the standard, which ensures the controllability and timeliness of the training process by the round control, avoids infinite iteration, captures the stable learning state of the model to the pseudo-label by the change rate continuously meeting the standard, and prevents invalid extension of the training caused by data fluctuations or early noise. The two termination conditions not only avoid the problem of early termination of the model due to insufficient training, but also eliminate the waste of resources caused by overtraining, finally realize the efficiency and robustness of the training process, and ensure the reliability of the model performance.

[0059] In some optional embodiments of the embodiment, the change rate of the updated pseudo-label data and the pseudo-label data before the current training round is updated in steps S62b and S62c, specifically including: The proportion of the length of the continuous time segment with the sleep stage label change in the total length of time is calculated to obtain a change rate.

[0060] The updated pseudo-label data is specifically compared with the updated pseudo-label data point by point in time sequence, and the difference positions of the sleep stage labels (such as Wake, REM, N1, N2 and N3) are identified. If the sleep stage labels of the time segment are different, the length of the time segment is recorded. Finally, the lengths of all the time segments with different sleep stage labels are accumulated to obtain the length of the continuous time segment, and the total length of time of the whole sleep data is recorded.

[0061] Exemplarily, the change rate is calculated in the following manner: , wherein, represents the change rate, represents the length of the continuous time segment with the sleep stage label change, represents the total length of time.

[0062] The embodiment quantifies the stability of the pseudo-label by calculating the proportion of the continuous time segment with the sleep stage label change, directly reflects the feature learning effect of the model on the unlabeled data, and determines whether the training is terminated through the change rate to effectively avoid accidental fluctuations, so as to ensure that the sleep stage model stops training when the quality of the pseudo-label is stable, avoid underfitting caused by premature termination, prevent resource waste caused by late termination, and finally improve the accuracy and reliability of the sleep stage model.

[0063] In some optional embodiments of the embodiment, after the sleep stage of the unlabeled data is performed by the preheating model in step S3 to obtain the pseudo-label data, the method further includes: Step 1: obtaining the target confidence of the sleep stage result corresponding to the pseudo-label data.

[0064] The pseudo-label data output by the preheating model is a 5-dimensional vector, for example, [0.1, 0.3, 0.05, 0.05, 0.5], wherein each dimension corresponds to the confidence (probability value) of the sample belonging to the five sleep stage categories. The preheating model determines the sleep stage label corresponding to the sample by selecting the dimension with the maximum confidence (probability value) in the vector. For example, if the maximum confidence value in the vector is 0.5, and the corresponding dimension is Wake, the sleep stage result of the sample is determined as Wake.

[0065] Step two, based on the target confidence, determine whether it is less than the confidence threshold. If the target confidence is less than the confidence threshold, execute step three.

[0066] To avoid the sleep staging result from being overly biased towards a particular sleep class, the confidence of the sleep staging result needs to be corrected: first, determine whether the confidence of the sleep staging result is lower than the preset confidence threshold. Taking the wake period (Wake) as an example, for the wake period (Wake) that is prone to be over-predicted by the model, the minimum confidence threshold (such as 0.75) can be set to increase the prediction threshold, that is, to determine whether the confidence of the label is lower than the threshold, and to correct the confidence that is lower than the threshold, so as to constrain the prediction tendency of the model.

[0067] Step three, correct the target confidence to the preset confidence.

[0068] When the confidence of the pseudo-label data corresponding to the sleep staging result (such as the wake period Wake) is lower than the preset threshold (for example, 0.75), the correction mechanism is triggered to adjust its confidence to the preset reference value (such as the average confidence or a reasonably set intermediate value), so as to suppress the over-prediction tendency of the model for the label and avoid systematic bias in the staging result.

[0069] Step four, based on the maximum confidence principle, convert the corrected target confidence into a one-hot code form to obtain the corrected pseudo-label data.

[0070] Whether it is a sleep staging model or a preheating model, the original numerical result output is [0.1, 0.3, 0.05, 0.05, 0.5]. In actual application, the real label annotated by professional sleep technicians is usually represented in one-hot code form. Taking the wake period (Wake) as an example, assuming that the wake period (Wake) corresponds to the 5th position, it is represented as [0, 0, 0, 0, 1]. To ensure the consistency of the label format during the model training stage, regardless of the form of the confidence vector output by the sleep staging model or the preheating model (such as [0.1, 0.3, 0.05, 0.05, 0.5]), the corrected confidence vector needs to be converted into one-hot code according to the position corresponding to the maximum confidence. For example, if the pseudo-label data output by the preheating model is corrected to [0.1, 0, 0.05, 0.05, 0.8] after correction, its corresponding one-hot code is [0, 0, 0, 0, 1], which ensures the compatibility of the pseudo-label data and the professional annotated label format, effectively guiding the sleep staging model training.

[0071] The embodiment judges whether the confidence of the pseudo label result is less than a preset threshold value, and corrects the confidence less than the preset threshold value, effectively avoiding the label bias problem caused by the confidence deviation of the model; meanwhile, the corrected confidence vector is converted into a one-hot code form consistent with the professional annotation, ensuring that the pseudo label format is compatible with the label in the training phase. This process not only improves the reliability and consistency of the pseudo label, but also reduces the interference of abnormal confidence on model training, and finally enhances the discrimination ability of the model for real sleep staging.

[0072] In some optional embodiments of the embodiment, the feature extraction module is trained based on the true label data and the pseudo label data in step S4 to obtain an initial trained feature extraction module, specifically including: S41, calculating a weighted loss based on the true label data and the pseudo label data.

[0073] S42, training the feature extraction module based on the weighted loss to obtain the initial trained feature extraction module.

[0074] The embodiment is to constrain the feature extraction module training in the module-by-module training of each training round, and the training is constrained by calculating the weighted loss.

[0075] For example, the weighted loss is calculated in the following manner: , wherein, represents the weighted loss, represents the loss (such as cross-entropy loss) of the feature extraction module on the true label data, represents the loss (such as cross-entropy loss) of the feature extraction module on the pseudo label data, is a weighted coefficient gradually increasing with the training round, used to adjust the weight ratio of the true label loss and the pseudo label loss in the total loss.

[0076] For example, the weighted coefficient is calculated in the following manner: , wherein, t is the current training round, , T1 and T2 represent preset training rounds.

[0077] The embodiment, through the cooperative constraint of true label strong supervision and pseudo label weak supervision, not only ensures that the feature extraction module fully learns the core features of the real annotation data, but also promotes the model to mine the sleep stage distribution rules implied in the unlabeled data. By adjusting the weighted coefficient to dynamically balance the contribution of the two types of data, the generalization ability and capture accuracy of the feature extraction module are effectively improved.

[0078] The embodiment of the present application also provides a sleep staging method based on a millimeter wave radar, which is executed by an electronic device such as a computer or a server, and specifically comprises the following steps. Obtaining radar sleep data of a target object, wherein the radar sleep data comprises physiological signals in a sleep state collected by a millimeter wave radar device.

[0079] The physiological signals of the target object throughout the night are collected by the millimeter wave radar (such as one-dimensional range images, respiratory energy spectra, etc.), and these data reflect the sleep-related physiological activities such as respiration, heartbeat, etc. of the target object.

[0080] The sleep staging model trained by any one of the sleep staging model training methods is used to perform sleep staging on the sleep data, and a sleep staging result is obtained.

[0081] The sleep staging model trained is used to automatically analyze the radar sleep data, and a sleep staging result is output, such as a wake period (Wake), a rapid eye movement sleep period (REM), a non-rapid eye movement sleep 1 period (N1), a non-rapid eye movement sleep 2 period (N2), and a non-rapid eye movement sleep 3 period (N3).

[0082] In the embodiment, the sleep staging model trained by the true label data and the unlabeled data is used to perform sleep staging on the millimeter wave radar data, the recognition ability of unlabeled data is realized, the cost and manpower investment of data labeling are reduced, and the sleep staging is suitable for different collection scenes and collection modes.

[0083] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0084] The present application is described with reference to flowcharts and / or block diagrams according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in the flowcharts and / or block diagrams Figure 1 one flow or multiple flows and / or blocks

[0085] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flow or blocks and / or blocks Figure 1 one or more flow or blocks and / or blocks

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that are executed on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flow or blocks and / or blocks Figure 1 one or more flow or blocks and / or blocks

[0087] Obviously, the above-described embodiments are only examples and are not intended to limit the present application. Based on the above description, one of ordinary skill in the art can make other variations and changes of different forms. It is not necessary or possible to enumerate all the embodiments. The obvious variations and changes derived therefrom are still within the scope of the present application.

Claims

1. A method for training a sleep staging model, characterized in that, include: Acquire true-label data and unlabeled data. The true-label data includes physiological signals collected during sleep and sleep stage labels marked by professional sleep technicians based on the physiological signals. The unlabeled data only includes physiological signals collected during sleep. The sleep staging model is pre-trained using the true labeled data to obtain a pre-trained model. The pre-trained model includes a feature extraction module and a prediction module. The feature extraction module is used to extract sleep features from the physiological signals, and the prediction module is used to map the sleep features to sleep staging labels to complete sleep staging. The preheating model is used to stage sleep phases in unlabeled data to obtain pseudo-labeled data; The feature extraction module is trained using the real label data and the pseudo label data to obtain an initial trained feature extraction module; The initial training feature extraction module and the prediction module are trained using the real label data to obtain the target feature extraction module and the target prediction module; Based on the target feature extraction module and the target prediction module, it is determined whether the preset termination condition is met; If the preset termination condition is not met, the process returns to the step of training the feature extraction module using the real label data and the pseudo label data to obtain the initial training feature extraction module until the preset termination condition is met, thus completing the training of the sleep staging model.

2. The method according to claim 1, characterized in that, The step of determining whether a preset termination condition is met based on the target feature extraction module and the target prediction module includes: The training rounds of the target feature extraction module and the target prediction module are obtained; Based on the training rounds, determine whether the preset termination condition is met.

3. The method according to claim 2, characterized in that, The step of determining whether a preset termination condition is met based on the target feature extraction module and the target prediction module includes: The target feature extraction module and the target prediction module are used to perform sleep phases on the pseudo-label data to obtain updated pseudo-label data; Calculate the rate of change between the updated pseudo-label data and the pseudo-label data before the update in the current training round; Based on the rate of change, determine whether the preset termination condition is met.

4. The method according to claim 3, characterized in that, The step of determining whether a preset termination condition is met based on the target feature extraction module and the target prediction module includes: When the training rounds reach the preset training round period, the target feature extraction module and the target prediction module obtained in the current training round are used to perform sleep phases on the pseudo-label data to obtain updated pseudo-label data; Calculate the rate of change between the updated pseudo-label data and the pseudo-label data before the update in the current training round; Based on the rate of change, determine whether the preset termination condition is met.

5. The method according to claim 4, characterized in that, The preset termination conditions include: The number of times the rate of change is continuously less than the rate of change threshold reaches a preset number; or... The training rounds have reached the preset number of training rounds.

6. The method according to claim 4, characterized in that, The calculation of the rate of change between the updated pseudo-label data and the pseudo-label data before the update in the current training round includes: The change rate is obtained by calculating the proportion of the length of continuous time segments in the updated pseudo-label data and the pseudo-label data before the update to the total length of time.

7. The method according to claim 1, characterized in that, Also includes: Obtain the target confidence level of the sleep staging results corresponding to the pseudo-label data; Based on the target confidence level, determine whether it is less than the confidence threshold; If the target confidence level is less than the confidence threshold, the target confidence level is adjusted to the preset confidence level. Based on the principle of maximizing confidence, the corrected target confidence is transformed into a one-hot code form to obtain the corrected pseudo-label data.

8. The method according to claim 1, characterized in that, The step of training the feature extraction module based on the true label data and the pseudo label data to obtain an initial trained feature extraction module includes: Calculate the weighted loss based on the true label data and the pseudo label data; The feature extraction module is trained based on the weighted loss to obtain an initial trained feature extraction module.

9. A sleep staging method based on millimeter-wave radar, characterized in that, include: Acquire radar sleep data of the target object, wherein the radar sleep data includes physiological signals during sleep collected by millimeter-wave radar equipment; The sleep staging model trained using any of the sleep staging model training methods described herein is used to stage the sleep data to obtain sleep staging results.

10. A sleep staging model training device, characterized in that, include: A processor and a memory connected to the processor; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to cause the processor to perform the sleep staging model training method as described in any one of claims 1-8.

11. A sleep staging device based on millimeter-wave radar, characterized in that, include: A processor and a memory connected to the processor; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to cause the processor to perform the sleep staging method based on millimeter-wave radar as described in claim 9.

Citation Information

Patent Citations

  • Single-channel electroencephalogram sleep staging method based on semi-supervised learning

    CN114841219A