Training method of child sleep staging model and child sleep staging method and device
By using pre-training and domain adaptation technology of convolutional neural networks in children's sleep staging models, the problem of poor adaptability between different children is solved, and the generalization ability and accuracy of the model are improved.
Patent Information
- Application Number
- CN202510247760.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing childhood sleep staging models have poor adaptability among different children, resulting in poor performance of the model and inability to effectively adapt to the diversity and differences of children's physiological parameters.
The convolutional neural network is used for pre-training, and the domain adaptive network model is constructed based on the pre-trained network and the domain calibration layer. By using the second child sleep data training set and test set, the domain adaptive network model is optimized to reduce the distribution difference between the training set and the test set.
This improves the performance of the model on the test set, alleviates the differences in children's EEG signals, enables the model to better adapt to the physiological characteristics of different children, and improves the generalization ability and accuracy of the model.
Smart Images

Figure CN119761425A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electroencephalogram sleep staging, and in particular to a training method for a children's sleep staging model, a children's sleep staging method and a device. Background Art
[0002] In recent years, the issue of children's sleep quality has received increasing attention, and accurate assessment of children's sleep stages is crucial to understanding and improving children's sleep quality.
[0003] However, in current related research, the children's sleep staging model mainly relies on artificial feature extraction and traditional machine learning methods. The children's sleep staging model is established from the perspective of artificial features and machine learning. However, due to the wide differences in physiological parameter signals among children, the model has poor adaptability among different children, resulting in poor performance of the model. The core of this problem lies in the diversity and differences of children's physiological parameters, which often reduce the performance of the model and affect its effectiveness and reliability in practical applications. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a training method for a children's sleep staging model, a children's sleep staging method and a device.
[0005] According to a first aspect of the present disclosure, a method for training a children's sleep staging model is provided, comprising: Pre-training a convolutional neural network using the first child sleep data training set to optimize network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; Building a domain adaptation network model based on the pre-trained network and the domain calibration layer; The domain adaptive network model is trained using a second children's sleep data training set and a children's sleep data test set to optimize the network parameters of the domain adaptive network model, and a trained domain adaptive network model is obtained, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates the loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set; A children's sleep staging model is constructed based on the feature extraction module and classification module of the trained domain adaptive network model.
[0006] According to a second aspect of the present disclosure, a child sleep staging method based on a child sleep staging model is provided. The child sleep staging model is obtained by training the child sleep staging model training method as described in the first aspect. The child sleep staging method comprises: Acquire the sleep EEG data of children to be identified; Inputting the child's sleep EEG data into the child's sleep staging model to perform sleep staging prediction, and obtaining a target category probability distribution output by the child's sleep staging model; Based on the target category probability distribution, a sleep staging result corresponding to the child's sleep EEG data is determined.
[0007] According to a third aspect of the present disclosure, a training device for a children's sleep stage model is provided, comprising: A pre-training module, used to pre-train a convolutional neural network using the first child sleep data training set to optimize network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; A first building module, configured to build a domain adaptation network model based on the pre-trained network and the domain calibration layer; a domain adaptation module, configured to train the domain adaptation network model using a second children's sleep data training set and a children's sleep data test set to optimize the network parameters of the domain adaptation network model, and obtain a trained domain adaptation network model, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates a loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set; The second construction module is used to construct a children's sleep staging model based on the feature extraction module and the classification module of the trained domain adaptive network model.
[0008] According to a fourth aspect of the present disclosure, a child sleep staging device based on a child sleep staging model is provided, wherein the child sleep staging model is obtained by training the child sleep staging model training method according to the first aspect, and the child sleep staging device comprises: A data acquisition module, used to acquire the sleep EEG data of the child to be identified; A prediction module, used for inputting the child's sleep EEG data into the child's sleep staging model to perform sleep staging prediction, and obtaining a target category probability distribution output by the child's sleep staging model; A result determination module is used to determine the sleep staging result corresponding to the child's sleep EEG data based on the target category probability distribution.
[0009] According to a fifth aspect of the present disclosure, there is provided an electronic device, including: Processor; and Memory for storing programs, In which, the program includes instructions, which, when executed by the processor, cause the processor to execute the training method of the child sleep staging model according to the first aspect described above, or to execute the child sleep staging method based on the child sleep staging model according to the second aspect described above.
[0010] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the training method of the children's sleep staging model according to the first aspect, or to execute the children's sleep staging method based on the children's sleep staging model according to the second aspect.
[0011] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the training method of the child sleep staging model according to the first aspect, or executes the child sleep staging method based on the child sleep staging model according to the second aspect.
[0012] One or more technical solutions provided in the embodiments of the present disclosure use a first children's sleep data training set to pre-train a convolutional neural network to optimize the network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; a domain adaptive network model is constructed based on the pre-trained network and a domain calibration layer; the domain adaptive network model is trained using a second children's sleep data training set and a children's sleep data test set to optimize the network parameters of the domain adaptive network model to obtain a trained domain adaptive network model, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates the loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set; a children's sleep staging model is constructed based on the feature extraction module and the classification module of the trained domain adaptive network model, and the obtained children's sleep staging model is used to predict the sleep staging of children's sleep EEG data. By adopting the scheme disclosed in the present invention, after pre-training to obtain a pre-trained network, a domain calibration layer is added to construct an adaptive network model, and the adaptive network model is trained using a children's sleep data training set and a children's sleep data test set to optimize the network parameters of the model, reduce the distribution difference between the training set domain and the test set, confuse the domain distribution of the training set and the test set through domain adaptation, improve the performance of the model on the test set, and effectively alleviate the differences in children's EEG signals, so that the model can better adapt to the physiological characteristics of different children, improve the generalization ability and accuracy of the model in practical applications, and provide personalized sleep analysis and suggestions. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of a method for training a sleep staging model for children provided by an exemplary embodiment of the present disclosure; Figure 2 A schematic diagram of the model structure of a convolutional neural network according to an exemplary embodiment of the present disclosure is shown; Figure 3 A flowchart of a method for training a sleep staging model for children provided by another exemplary embodiment of the present disclosure; Figure 4 A schematic diagram showing the structure of a domain adaptive network model according to an exemplary embodiment of the present disclosure is shown; Figure 5 A schematic flow chart of a method for children's sleep staging based on a children's sleep staging model provided by an exemplary embodiment of the present disclosure; Figure 6A schematic diagram of the structure of a training device for a children's sleep stage model provided by an embodiment of the present disclosure; Figure 7 A schematic diagram of the structure of a children's sleep staging device based on a children's sleep staging model provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0014] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0015] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0016] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0017] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0019] One of the core technical points of the children's sleep staging model is to build a children's sleep staging algorithm based on artificial feature extraction and machine learning technology. Currently, most of the research is based on machine learning, deep learning and other methods. A single data set is used to establish a machine learning or deep learning model to achieve sleep staging. Artificial features are extracted from the time domain, frequency domain and nonlinear features, and then genetic algorithms are used to achieve feature selection. Finally, integrated learning is achieved by integrating multiple single classifier models.
[0020] However, due to the significant differences in physiological parameter signals between different children, this difference makes it difficult for the model to adapt to the characteristics of different children, which in turn leads to reduced prediction accuracy of the model on new children. In addition, there may be data imbalance in the sample size of different sleep stages during children's sleep, which leads to learning biases in the model at certain stages and reduces the accuracy of the overall staging. In addition, due to the lack of adaptability of existing models between different children, the model generalization ability is poor, especially when facing unseen children or physiological signals, the performance may be unsatisfactory. Therefore, the existing technology has the defects of poor model generalization and inaccurate prediction results, and the model performance is poor.
[0021] In response to the above problems, the present disclosure provides a training scheme for a children's sleep staging model, aiming to effectively alleviate the model performance bottleneck caused by individual differences. This scheme uses the children's sleep data training set and test set to perform domain adaptive training on the domain adaptive network model, which can make targeted adjustments to the model, alleviate the individual differences in children's EEG signals, make it better adapt to the physiological characteristics of different children, and improve the generalization ability and accuracy of the model in practical applications. In addition, this scheme can eliminate the impact of category imbalance through data enhancement and multi-classification focal loss, thereby further improving the accuracy of the automatic sleep staging algorithm for children based on single-channel EEG, making it more accurate and reliable when evaluating children's sleep quality. In the performance comparison with similar products, the children's sleep staging model trained using the scheme disclosed in this disclosure performs better than most existing solutions. Therefore, products introducing this scheme can stand out in the market competition and attract more users and application scenarios.
[0022] The following describes the training method of the children's sleep staging model, the children's sleep staging method and the device provided by the present disclosure with reference to the accompanying drawings.
[0023] Figure 1 A flowchart of a method for training a sleep staging model for children provided in an exemplary embodiment of the present disclosure is provided. The method can be performed by a training device for a sleep staging model for children provided in an embodiment of the present disclosure. The device can be implemented in software and / or hardware and can be integrated in any electronic device with processing capabilities, such as a computer.
[0024] like Figure 1 As shown, the training method of the children's sleep stage model may include the following steps: Step 101, pre-training a convolutional neural network using a first children's sleep data training set to optimize network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module.
[0025] Among them, the first children's sleep data training set includes multiple training data, each of which is single-channel children's sleep EEG data. Single channel means using a single electrode to record EEG signals.
[0026] Children's sleep staging involves multiple sleep stages, namely wakefulness (Wake, W), non-rapid eye movement (NREM) and rapid eye movement (REM), among which NREM is divided into N1, N2 and N3 stages according to the degree of sleep from light to deep. There may be significant differences in the sample size of different stages, which in turn affects the effect of model training. Therefore, in an optional implementation of the present disclosure, the existing sample EEG data of children can be enhanced to enrich the number of training samples and ensure the accuracy of training samples, thereby improving the training effect of convolutional neural networks. According to the characteristics of EEG signals, the present disclosure provides four data enhancement methods, namely: (1) Segment overlap: Existing EEG data are usually divided into 30-second epochs. However, such a division is not strictly accurate. Therefore, the present disclosure proposes a segment overlap method, which is based on the previous epoch (denoted as x). i-1 A starting point p is randomly selected between the 2 / 3 and 4 / 5 positions of the time interval, and the following 30 seconds are used as the amplified data. The labels of the amplified data are assigned as and x i Same label.
[0027] (2) Segment Recombination: The recombinant method uses the consistency of linear interpolation between samples and labels to provide smoother uncertainty estimates, reduce the impact of mislabeled samples, and even achieve the best generalization performance in image classification and speech recognition tasks. Assume that the EEG signal x i and x j is a randomly sampled segment from the training dataset, and its corresponding label is y i and j , the generated amplified sample is: , where the value of λ can be set according to actual needs, for example, setting λ to 0.25.
[0028] (3) Random cropping: Randomly mask the 1-6 second segments of the original EEG signal to zero to simulate the situation where the wire falls off the skin. Masking behavior injects noise into the original EEG signal, which can prevent the model from being biased towards local patterns, making the model more robust.
[0029] (4) Horizontal flip: Flip the signal left and right. This operation only changes the signal on the time axis, while the spectrum diagram remains good. It is simple to implement and suitable for sleep stage tasks.
[0030] In this embodiment, at least one of the above four data enhancement methods can be used to enhance the existing small amount of children's sleep EEG data, enrich the amount of children's sleep EEG data, and construct a first children's sleep data training set for training the convolutional neural network. The convolutional neural network includes a feature extraction module and a classification module, the feature extraction module is used to extract the features of the input children's sleep EEG data, and the classification module is used to predict the category probability distribution of the children's sleep partition according to the features.
[0031] As an example, the model structure of a convolutional neural network is as follows Figure 2 As shown. Figure 2 It can be seen that the convolutional neural network includes five convolutional modules, a bidirectional gated recurrent unit (Bi-GRU) layer and a fully connected layer. Among them, each convolutional module contains two convolutional layers (denoted as conv1 and conv2) and a maximum pooling layer. The purpose of maximum pooling is to reduce the size of the feature map and control overfitting. A linear ReLU activation function is used after each convolutional layer. Compared with the ReLU activation function, the linear ReLU activation function can retain the negative axis information. Each convolutional layer has 12 convolution kernels with a scale of 5 and a sliding step (denoted as stride) of 1. Subsequently, in order to solve the time series information, the spatial features extracted by the convolution module are sent to the Bi-GRU layer to obtain the temporal features. Five convolutional modules and Bi-GRU constitute a feature extraction module. Finally, the feature map is flattened and sent to the fully connected layer, and the category probability distribution is output through the softmax function.
[0032] In this embodiment, the convolutional neural network is trained using the acquired first child sleep data training set. During the training process, the network parameters (including weights and offsets) of the feature extraction module and the classification module of the convolutional neural network are continuously optimized until a preset number of iterations is reached or until the convolutional neural network converges, the training is completed, and a trained pre-trained network is obtained.
[0033] Classes with too few samples are difficult to learn and have low contributions to the model, which can easily lead to a decrease in the classification accuracy of the model. In order to balance the contributions of different classes to the model, in an optional embodiment of the present disclosure, a multi-classification focal loss function is used as the loss function of the convolutional neural network for supervised training, wherein the expression of the multi-classification focal loss function is as follows: ; in, q ( x )and p ( x ) represent input x The true distribution and predicted distribution of n is the batch size (threshold of iteration number for iterative training), C is the number of categories. In this example, C Indicates the number of sleep stages for children, with a value of 5. α i Equivalent to i The weight of the class is based on i The corresponding weight is set based on the proportion of the number of samples in the first children's sleep data training set. The lower the proportion, the higher the weight. γ is an exponential factor used to control the degree of adjustment of the weights of difficult and easy samples.
[0034] Since the training of the convolutional neural network in this step is only a pre-training stage, rather than the final training to obtain a model for predicting children's sleep stages, the number of training rounds can be reduced to improve the efficiency of model training.
[0035] In this embodiment, the problem of data category imbalance is significantly eliminated through data enhancement and multi-classification focal loss, thereby improving the accuracy of sleep staging, making it more accurate and reliable in assessing children's sleep quality.
[0036] Step 102: construct a domain adaptation network model based on the pre-trained network and the domain calibration layer.
[0037] In this embodiment, after the pre-trained network is obtained through training, a domain adaptive network model can be constructed based on the pre-trained network and the domain calibration layer. The domain calibration layer is used to confuse the domain distribution between the training set and the test set, and to reduce the difference between the source domain (i.e., the training set) and the target domain (i.e., the test set) through domain adaptation, thereby improving the performance of the model on the target domain.
[0038] Step 103, using the second children's sleep data training set and the children's sleep data test set to train the domain adaptive network model to optimize the network parameters of the domain adaptive network model, to obtain the trained domain adaptive network model, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates the loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set.
[0039] Among them, the second children's sleep data training set includes multiple training data, each of which is single-channel children's sleep EEG data. The existing small amount of children's sleep EEG data can be enhanced by at least one of the four aforementioned data enhancement methods, and the second children's sleep data training set is constructed. In order to improve the effect of the final children's sleep staging model, the second children's sleep data training set is not exactly the same as the training data in the first children's sleep data training set, but the second children's sleep data training set and the first children's sleep data training set are usually labeled. The test data in the children's sleep data test set may differ from the training data in the training set in feature distribution, and usually has no labels or very few labels. The different feature distributions of sleep data may be due to different data sources, environmental changes, etc.
[0040] In this embodiment, after the domain adaptive network model is constructed, the second children's sleep data training set and the children's sleep data test set can be used to train the domain adaptive network model, and the loss of the domain calibration layer is reduced during the iterative training process. The weights of the feature extraction module and the classification module of the pre-trained network are used as the initial values, and the network parameters of the domain adaptive network model, including the network parameters of the feature extraction module, the classification module and the domain calibration layer, are continuously optimized and updated, thereby reducing the distribution difference between the second sleep data children's sleep data training set and the sleep data children's sleep data test set. Iterative training is continuously performed until the number of iterative training reaches the iteration number threshold or the domain adaptive network model converges, and the trained domain adaptive network model is obtained.
[0041] Among them, during training, the feature extraction module extracts training data features from the training data in the second children's sleep data training set, and extracts test data features from the test data in the children's sleep data test set. The classification module predicts the category probability distribution corresponding to the training data based on the training data features. When calculating the loss of the model, two different loss functions can be used to calculate the loss values respectively. One loss function calculates the loss value based on the category probability distribution output by the classification module and the corresponding true distribution, and the other loss function calculates the loss value based on the training data features and the test data features. The sum of the two loss values can be calculated to minimize the sum to update the network parameters of the domain adaptive network model.
[0042] Due to the different feature distributions of the training set and the test set, the pre-trained network is not effective in directly acting on the test set to predict the sleep stages of children. To address this problem, the present disclosure combines the pre-trained feature extraction module, classification module, and newly added domain calibration layer to confuse the domain distribution of the training set and the test set, thereby improving the performance of the model on the test set. With continuous iterative training, the model's ability to learn the features of the test set deepens, and the features change from coarse-grained to fine-grained, that is, gradually extracting "proprietary" features related to the task, so that the model performs better on the test set, and a better children's sleep stage model can be obtained with fewer training samples.
[0043] Step 104 , constructing a children's sleep staging model based on the feature extraction module and classification module of the trained domain adaptive network model.
[0044] In this embodiment, after obtaining the trained domain adaptive network model, the feature extraction module and the classification module of the domain adaptive network model can be taken out, and the children's sleep stage model can be constructed using these two modules. It can be understood that the children's sleep stage model has the same model structure as the convolutional neural network.
[0045] In an optional embodiment of the present disclosure, after obtaining the trained domain adaptive network model, the feature extraction module and the classification module can be taken out from the trained domain adaptive network model, and the parameters of the two can be frozen for testing to predict the sleep phases of children (i.e., different stages of the sleep process) to test the training effect of the model. If the accuracy of the prediction results of the model meets the expectations, the feature extraction module and the classification module are used to construct a children's sleep staging model.
[0046] The training method of the child sleep staging model of the embodiment of the present disclosure is to pre-train a convolutional neural network using a first child sleep data training set to optimize the network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; a domain adaptive network model is constructed based on the pre-trained network and a domain calibration layer; the domain adaptive network model is trained using a second child sleep data training set and a child sleep data test set to optimize the network parameters of the domain adaptive network model to obtain a trained domain adaptive network model, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second child sleep data training set, and the domain calibration layer calculates the loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the child sleep data test set; a child sleep staging model is constructed based on the feature extraction module and the classification module of the trained domain adaptive network model, and the obtained child sleep staging model is used to predict the sleep staging of the child sleep EEG data. By adopting the scheme disclosed in the present invention, after pre-training to obtain a pre-trained network, a domain calibration layer is added to construct an adaptive network model, and the adaptive network model is trained using a children's sleep data training set and a children's sleep data test set to optimize the network parameters of the model, reduce the distribution difference between the training set domain and the test set, confuse the domain distribution of the training set and the test set through domain adaptation, improve the performance of the model on the test set, and effectively alleviate the differences in children's EEG signals, so that the model can better adapt to the physiological characteristics of different children, improve the generalization ability and accuracy of the model in practical applications, and provide personalized sleep analysis and suggestions.
[0047] In an optional embodiment of the present disclosure, Figure 3 As shown, based on the above embodiment, step 103 may include the following sub-steps: Step 201 : input the training data in the second children's sleep data training set and the test data in the children's sleep data test set into a feature extraction module for feature extraction, to obtain training data features corresponding to the training data and test data features corresponding to the test data.
[0048] In this embodiment, when the domain calibration layer is introduced for training, the training data in the second children's sleep data training set and the test data in the children's sleep data test set need to be simultaneously input into the feature extraction module, and the feature extraction module performs feature extraction on the training data to obtain corresponding training data features, and performs feature extraction on the test data to obtain corresponding test data features.
[0049] Step 202: Input the training data features into the classification module for category prediction to obtain the category probability distribution corresponding to the training data, and perform loss calculation based on the category probability distribution and the target category distribution corresponding to the training data to obtain a first loss value.
[0050] In this embodiment, for the training data features output by the feature extraction module, the training data features are input into the classification module for category prediction, and the classification module outputs the category probability distribution (predicted distribution) predicted based on the training data features, that is, the category probability distribution corresponding to the training data input in this round of training is obtained. Then, the loss calculation can be performed based on the category probability distribution corresponding to the training data input in this round and its target category distribution (true distribution) to obtain the corresponding loss value (for ease of description and distinction, referred to as the first loss value).
[0051] In an optional embodiment of the present disclosure, in the domain adaptive learning of the convolutional neural network (i.e., the feature extraction module and the classification module), the loss function of the classification module adopts a multi-classification focal loss function for supervised training. That is, the first loss value is calculated by the multi-classification focal loss function, and the calculation formula is expressed as follows: ; in, q ( x ) represents the target category distribution corresponding to the training data in the second sleep data children's sleep data training set, p ( x ) represents the probability distribution of the category output by the classification module based on the training data features corresponding to the training data. n represents the iteration number threshold, C Indicates the total number of sleep stages, α i Indicates i The weight of the sleep stage class, γ is the exponential factor.
[0052] That is to say, in this embodiment, the loss function used by the convolutional neural network in the domain adaptation stage is the same as the loss function used by the convolutional neural network in the pre-training stage, except that there are differences in the training samples used during training.
[0053] Step 203: Input the training data features and the test data features into the domain calibration layer to perform loss calculation to obtain a second loss value.
[0054] In this embodiment, the training data features and the test data features output by the feature extraction module are input into the domain calibration layer for loss calculation to obtain corresponding loss values (referred to as second loss values for ease of description and distinction).
[0055] In an optional implementation of the present disclosure, the second loss value is calculated by a maximum mean difference (MMD) loss function, and the calculation formula is expressed as follows: ; Where F represents the Gaussian kernel function, T s represents the training data features, T t Represents the test data characteristics.
[0056] The purpose of domain adaptation is to apply the knowledge learned in the source domain (i.e., the training set) to a different but related target domain (i.e., the test set). In order to reduce the impact of domain shift, the scheme disclosed in this paper transforms the original feature space into a new feature space through a mapping function φ(∙) and an alignment domain difference operation, so that D s ≈D t Essentially, a mapping function needs to be found to minimize the distance between the transformed source domain and the transformed target domain. Therefore, the scheme disclosed herein uses the maximum mean difference (MMD) to measure the difference in data distribution between the two domains.
[0057] Assume that Z is a metric space of non-empty sets and F is the mapping function f The set includes: Z→R, X s ~ u and X t ~ v Then, the distribution u and distribution v The MMD calculation formula between is: .
[0058] Reproducing kernel Hilbert Space (RKHS) H is an infinite-dimensional space. Its reproducibility is mainly reflected in the existence of a reproducing kernel k∈H such that f ∈H can be written as follows: ; In the above formula, Represents the function F in the regenerated Hilbert space H for the input x The value of f It is a mapping function from set Z (usually the input data space) to R, belonging to the function set F; x is a point in the input space Z (input sample), xIt can be a feature vector or other forms of data (such as images, time series, etc.). middle, is the kernel function k ( x , x i ) parameter, indicating the center point of the kernel function; a i is the kernel function k ( x , x i ) is the linear weight of .
[0059] If F belongs to H, then, u The average distribution of μ u It can be written as: .
[0060] For all f ∈H, we have: .
[0061] Assume that φ(∙) is used to represent the x→H mapping, μ u represent E u [φ(x s )], μ v represent E v [φ(x t )]. Then, MMD can be rewritten as follows: ; in, μ u and μ v is an unbiased estimate of the mean. Therefore, MMD is transformed into: .
[0062] because f ( x ) is mapped to Hilbert space, which is infinite-dimensional, so MMD cannot be directly calculated in practical applications. Therefore, MMD will use the square form to simplify and express the kernel function. By calculating the kernel function, the mapping function can be solved f ( x ) to obtain the final goal, which is calculated as follows: ; in, .
[0063] The kernel function may be a linear kernel, a Gaussian kernel, a Laplace kernel, etc. Since the Gaussian kernel has been proven to have excellent performance in the MMD metric, the present embodiment selects the Gaussian kernel as the kernel function of the MMD: .
[0064] In this embodiment, the output of the MMD is used as the loss of the domain calibration layer for optimization, and the second loss value is obtained based on the MMD calculation using the Gaussian kernel function.
[0065] Step 204 , freeze the network parameters of the domain calibration layer, and update the network parameters of the feature extraction module and the classification module with minimizing the total loss value as the optimization target, wherein the total loss value is determined based on the first loss value and the second loss value.
[0066] For example, the total loss value can be expressed as follows: ; in, Represents the first loss value obtained in this calculation, Represents the second loss value obtained in this calculation, ꞵ Indicates the weight of the second loss value in the total loss value, which can be set according to actual needs.
[0067] It can be understood that, in this embodiment, freezing the network parameters of the domain calibration layer means that when minimizing the total loss value is the optimization goal, only the network parameters of the feature extraction module and the classification module are adjusted, and the network parameters of the domain calibration layer are not adjusted.
[0068] Step 205 , freeze the network parameters of the feature extraction module and the classification module, take minimizing the second loss value as the optimization target, and update the network parameters of the domain calibration layer.
[0069] In this embodiment, the training process of the domain adaptation stage is carried out in the form of cross-iteration, which is mainly divided into two steps. The first step is to freeze the network parameters of the domain calibration layer, and only minimize the total loss value as the optimization target, and update the network parameters of the feature extraction module and the classification module; the second step is to freeze the network parameters of the feature extraction module and the classification module, and only minimize the second loss value as the optimization target, and update the network parameters of the domain calibration layer. It can be understood that in this embodiment, freezing the network parameters of the feature extraction module and the classification module means that when minimizing the second loss value is used as the optimization target, only the network parameters of the domain calibration layer are adjusted, and the network parameters of the feature extraction module and the classification module are not adjusted.
[0070] That is, in this embodiment, during the training process of the domain adaptation stage, each round of iterative training includes two steps, one step is to freeze the network parameters of the domain calibration layer, and update the network parameters of the classification module and the feature extraction module by minimizing the total loss value, and the other step is to freeze the network parameters of the classification module and the feature extraction module, and update the network parameters of the domain calibration layer by minimizing the second loss value. The network parameters of the model continue to be updated on the next batch (i.e., the next round of training) of data in the above cross-iteration manner.
[0071] In an optional embodiment of the present disclosure, the feature extraction module includes multiple convolution modules and a bidirectional gated recurrent unit, so that when updating the network parameters of the feature extraction module and the classification module, the network parameters of the target convolution module among the multiple convolution modules can be updated, and the network parameters of the classification module can be updated, wherein the target convolution module refers to a preset number of convolution modules that are closest to the bidirectional gated recurrent unit among the multiple convolution modules, and the number of the target convolution modules is less than the number of the multiple convolution modules. Figure 2 Taking the convolutional neural network shown in FIG. 1 as an example, the feature extraction module includes 5 convolutional modules, and the last two convolutional modules can be selected as target convolutional modules to adjust the network parameters during the training process. Therefore, by selecting only some of the convolutional modules in the multiple convolutional modules for fine-tuning during the training process, the number of network parameters that need to be adjusted can be reduced while adapting to the target domain, further improving the efficiency of model training.
[0072] Step 206, when the number of iterative training does not reach the preset iteration number threshold, new training data and new test data are obtained to continue training and update network parameters until the number of iterative training reaches the iteration number threshold, the training is completed, and the trained domain adaptive network model is obtained.
[0073] The iteration number threshold can be set according to actual needs, and the iteration number threshold is related to the total number of samples and the number of samples included in each batch.
[0074] In this embodiment, when the number of iterative training does not reach the preset iteration number threshold, new training data and new test data are continuously obtained for a new round of cross-iterative training, and the network parameters of the corresponding modules are updated. According to the above process, multiple iterative trainings are performed until the number of iterative trainings reaches the iteration number threshold, the training is completed, and a trained domain adaptive network model is obtained.
[0075] Figure 4 A schematic diagram of the structure of a domain adaptive network model of an exemplary embodiment of the present disclosure is shown. Figure 4As shown in Figure 1, the domain adaptation network model includes a feature extractor (i.e., feature extraction module), a classifier (i.e., classification module), and a domain calibration layer. In each round of iterative training, the data in the training set and the test set are simultaneously input into the feature extractor for feature extraction to obtain the corresponding training data features and test data features. The classifier predicts the category based on the training data features, and calculates the first loss value (denoted as ) based on the output prediction distribution and the true distribution corresponding to the training data. L focal ), the domain calibration layer calculates the second loss value (denoted as ) according to the training data characteristics and the test data characteristics. L d ), the total loss value of the model is , the network parameters of the feature extractor and the classifier are updated according to the total loss value, and the network parameters of the domain calibration layer are updated according to the second loss value.
[0076] The training method of the children's sleep staging model of the embodiment of the present disclosure, in the domain adaptation stage, freezes the network parameters of the domain calibration layer respectively during the training process, updates the network parameters of the feature extraction module and the classification module with the minimization of the total loss value as the optimization target, and freezes the network parameters of the feature extraction module and the classification module, updates the network parameters of the domain calibration layer with the minimization of the second loss value as the optimization target, and continuously cross-iterates the training on the training set and the test set, thereby reducing the difference between the source domain and the target domain, enabling the model to have better generalization ability in different domains, thereby effectively alleviating the differences in children's physiological signals.
[0077] Figure 5 A flowchart of a child sleep staging method based on a child sleep staging model provided for an exemplary embodiment of the present disclosure is provided. The method can be performed by a child sleep staging device based on a child sleep staging model provided for an embodiment of the present disclosure. The device can be implemented in software and / or hardware and can be integrated in any electronic device with processing capabilities, such as a computer.
[0078] like Figure 5 As shown, the children's sleep staging method based on the children's sleep staging model may include the following steps: Step 301, obtaining sleep EEG data of a child to be identified.
[0079] The children's sleep EEG data is a single-channel children's EEG signal. For example, a polysomnography device can be used to collect children's sleep signals.
[0080] Step 302: Input the children's sleep EEG data into the children's sleep staging model to perform sleep staging prediction, and obtain the target category probability distribution output by the children's sleep staging model.
[0081] The children's sleep staging model is obtained by training using the training method for the children's sleep staging model described in the aforementioned embodiment.
[0082] In this embodiment, the child sleep EEG data to be processed is input into the trained child sleep staging model, and the child sleep staging module predicts the sleep staging of the child sleep EEG data, and obtains the target category probability distribution output by the child sleep staging model. Among them, the target category probability distribution includes the probability of the child sleep EEG data being identified as each sleep stage, and the higher the probability, the higher the confidence that the child sleep EEG data belongs to the sleep stage.
[0083] Step 303: Determine the sleep staging result corresponding to the children's sleep EEG data based on the target category probability distribution.
[0084] In this embodiment, after obtaining the target category probability distribution output by the children's sleep staging model, the sleep staging result corresponding to the children's sleep EEG data can be determined according to the target category probability distribution.
[0085] Exemplarily, the sleep stage corresponding to the category with the highest probability in the target category probability distribution may be determined as the sleep stage result corresponding to the children's sleep EEG data.
[0086] The children's sleep staging method based on the children's sleep staging model of the disclosed embodiment obtains the children's sleep EEG data to be identified, inputs the children's sleep EEG data into the children's sleep staging model to predict the sleep staging, and obtains the target category probability distribution output by the children's sleep staging model, and determines the sleep staging result corresponding to the children's sleep EEG data based on the target category probability distribution. Since the adopted children's sleep staging model is trained by the training method of the children's sleep staging model provided in the aforementioned embodiment, it can better adapt to the physiological characteristics of different children. Therefore, this model is used to predict the sleep stage corresponding to the children's sleep EEG data, thereby ensuring the accuracy of the children's sleep staging results.
[0087] In order to implement the above embodiments, the present disclosure also provides a training device for a children's sleep stage model.
[0088] Figure 6 This is a schematic diagram of the structure of a training device for a children's sleep stage model provided in an embodiment of the present disclosure. The device can be implemented using software and / or hardware and can be integrated on any electronic device with processing capabilities, such as a computer.
[0089] like Figure 6 As shown, the training device 40 for the children's sleep stage model provided by the embodiment of the present disclosure may include: a pre-training module 410, a first construction module 420, a domain adaptation module 430 and a second construction module 440. Among them, A pre-training module 410 is used to pre-train a convolutional neural network using the first child sleep data training set to optimize network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; A first construction module 420 is used to construct a domain adaptation network model based on the pre-trained network and the domain calibration layer; A domain adaptation module 430 is used to train the domain adaptation network model using the second children's sleep data training set and the children's sleep data test set to optimize the network parameters of the domain adaptation network model, and obtain a trained domain adaptation network model, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates the loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set; The second construction module 440 is used to construct a children's sleep stage model based on the feature extraction module and the classification module of the trained domain adaptive network model.
[0090] Optionally, the domain adaptation module 430 includes: A feature extraction unit, used to input the training data in the second child sleep data training set and the test data in the child sleep data test set into the feature extraction module for feature extraction, so as to obtain training data features corresponding to the training data and test data features corresponding to the test data; A first calculation unit is used to input the training data features into the classification module for category prediction to obtain the category probability distribution corresponding to the training data, and perform loss calculation based on the category probability distribution and the target category distribution corresponding to the training data to obtain a first loss value; A second calculation unit is used to input the training data features and the test data features into the domain calibration layer to perform loss calculation to obtain a second loss value; A first adjustment unit is used to freeze the network parameters of the domain calibration layer, and to update the network parameters of the feature extraction module and the classification module with minimizing the total loss value as an optimization target, wherein the total loss value is determined based on the first loss value and the second loss value; A second adjustment unit is used to freeze the network parameters of the feature extraction module and the classification module, and to update the network parameters of the domain calibration layer by minimizing the second loss value as an optimization target; The iteration unit is used to obtain new training data and new test data to continue training and update network parameters when the number of iterative training does not reach a preset iteration number threshold, until the number of iterative training reaches the iteration number threshold, the training is completed, and the trained domain adaptive network model is obtained.
[0091] Further optionally, the feature extraction module includes multiple convolution modules and a bidirectional gated recurrent unit; the first adjustment unit is also used to: update the network parameters of a target convolution module among the multiple convolution modules, and update the network parameters of the classification module, wherein the target convolution module refers to a preset number of convolution modules among the multiple convolution modules that are closest to the bidirectional gated recurrent unit, and the number of target convolution modules is less than the number of the multiple convolution modules.
[0092] Optionally, the first computing unit is further configured to: The first loss value is calculated by the multi-classification focal loss function, and the calculation formula is as follows: ; in, q ( x ) represents the target category distribution corresponding to the training data in the second children’s sleep data training set, p ( x ) represents the probability distribution of the category output by the classification module based on the training data features corresponding to the training data. n represents the iteration number threshold, C Indicates the total number of sleep stages, α i Indicates i The weight of the sleep stage class, γ is the exponential factor.
[0093] Optionally, the second computing unit is further configured to: The second loss value is calculated by the maximum mean difference MMD loss function, and the calculation formula is as follows: ; Where F represents the Gaussian kernel function, T s represents the training data features, T t Represents the test data characteristics.
[0094] The training device for the child sleep stage model applied to an electronic device provided in the embodiments of the present disclosure can execute any training method for the child sleep stage model applicable to an electronic device provided in the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not fully described in the embodiments of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.
[0095] In order to implement the above embodiments, the present disclosure also provides a children's sleep staging device based on the children's sleep staging model.
[0096] Figure 7This is a schematic diagram of the structure of a child sleep staging device based on a child sleep staging model provided in one embodiment of the present disclosure. The device can be implemented using software and / or hardware and can be integrated into any electronic device with processing capabilities, such as a computer. The child sleep staging model is obtained by training using the child sleep staging model training method described in the above embodiment.
[0097] like Figure 7 As shown, the child sleep staging device 50 based on the child sleep staging model provided by the embodiment of the present disclosure may include: a data acquisition module 510, a prediction module 520 and a result determination module 530. Among them, The data acquisition module 510 is used to acquire the sleep EEG data of the child to be identified; Prediction module 520, used for inputting children's sleep EEG data into children's sleep staging model to predict sleep staging, and obtaining target category probability distribution output by children's sleep staging model; The result determination module 530 is used to determine the sleep staging result corresponding to the children's sleep EEG data based on the target category probability distribution.
[0098] The training device for the child sleep stage model applied to an electronic device provided in the embodiments of the present disclosure can execute any training method for the child sleep stage model applicable to an electronic device provided in the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not fully described in the embodiments of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.
[0099] An exemplary embodiment of the present disclosure also provides an electronic device, comprising: a processor; and a memory for storing a program, wherein the program comprises instructions, which, when executed by the processor, cause the processor to execute a training method for a child sleep staging model as described in any of the foregoing embodiments of the present disclosure, or to execute a child sleep staging method based on a child sleep staging model as described in any of the foregoing embodiments of the present disclosure.
[0100] An exemplary embodiment of the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions, when executed by a processor of a computer, are used to cause the computer to execute a training method for a child sleep staging model as described in any of the foregoing embodiments of the present disclosure, or to execute a child sleep staging method based on a child sleep staging model as described in any of the foregoing embodiments of the present disclosure.
[0101] An exemplary embodiment of the present disclosure also provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the training method for the child sleep staging model as described in any of the foregoing embodiments of the present disclosure, or to execute the child sleep staging method based on the child sleep staging model as described in any of the foregoing embodiments of the present disclosure.
[0102] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0103] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0104] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0105] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0106] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0107] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A method for training a children's sleep stage model, characterized in that: The method comprises: Pre-training a convolutional neural network using the first child sleep data training set to optimize network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; Building a domain adaptation network model based on the pre-trained network and the domain calibration layer; The domain adaptive network model is trained using a second children's sleep data training set and a children's sleep data test set to optimize the network parameters of the domain adaptive network model, and a trained domain adaptive network model is obtained, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates the loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set; A children's sleep staging model is constructed based on the feature extraction module and classification module of the trained domain adaptive network model.
2. The method for training a sleep stage model for children according to claim 1, characterized in that: The method of training the domain adaptive network model using the second children's sleep data training set and the children's sleep data test set to optimize the model parameters of the domain adaptive network model to obtain the trained domain adaptive network model includes: Inputting the training data in the second children's sleep data training set and the test data in the children's sleep data test set into the feature extraction module for feature extraction, respectively, to obtain training data features corresponding to the training data and test data features corresponding to the test data; Inputting the training data features into the classification module for category prediction to obtain a category probability distribution corresponding to the training data, and performing loss calculation based on the category probability distribution and the target category distribution corresponding to the training data to obtain a first loss value; Inputting the training data features and the test data features into the domain calibration layer to perform loss calculation to obtain a second loss value; Freeze the network parameters of the domain calibration layer, and update the network parameters of the feature extraction module and the classification module with minimizing the total loss value as an optimization goal, wherein the total loss value is determined based on the first loss value and the second loss value; Freezing the network parameters of the feature extraction module and the classification module, and updating the network parameters of the domain calibration layer with minimizing the second loss value as an optimization target; When the number of iterative training does not reach the preset iteration number threshold, new training data and new test data are obtained to continue training and update network parameters until the number of iterative training reaches the iteration number threshold, the training is completed, and the trained domain adaptive network model is obtained.
3. The method for training a sleep stage model for children according to claim 2, characterized in that: The feature extraction module includes a plurality of convolution modules and a bidirectional gated recurrent unit; The updating of the network parameters of the feature extraction module and the classification module comprises: Update the network parameters of the target convolution module among the multiple convolution modules, and update the network parameters of the classification module, wherein the target convolution module refers to a preset number of convolution modules among the multiple convolution modules that are closest to the bidirectional gated recurrent unit, and the number of the target convolution modules is less than the number of the multiple convolution modules.
4. The method for training a sleep stage model for children according to claim 2, wherein: The first loss value is calculated by a multi-classification focal loss function, and the calculation formula is as follows: ; in, q ( x ) represents the target category distribution corresponding to the training data in the second children's sleep data training set, p ( x ) represents the category probability distribution output by the classification module based on the training data feature prediction corresponding to the training data, n represents the iteration number threshold, C Indicates the total number of categories of sleep stages, α i Indicates i The weight of the sleep stage class, γ is the exponential factor.
5. The method for training a sleep stage model for children according to claim 2, wherein: The second loss value is calculated by the maximum mean difference MMD loss function, and the calculation formula is as follows: ; Where F represents the Gaussian kernel function, T s represents the training data features, T t Represents the test data characteristics.
6. A method for children's sleep staging based on a children's sleep staging model, characterized in that: The child sleep staging model is obtained by training the child sleep staging model training method according to any one of claims 1 to 5, and the child sleep staging method comprises: Acquire the sleep EEG data of children to be identified; Inputting the child's sleep EEG data into the child's sleep staging model to perform sleep staging prediction, and obtaining a target category probability distribution output by the child's sleep staging model; Based on the target category probability distribution, a sleep staging result corresponding to the child's sleep EEG data is determined.
7. A training device for a children's sleep stage model, characterized in that: The device comprises: A pre-training module, used to pre-train a convolutional neural network using the first child sleep data training set to optimize network parameters of the convolutional neural network to obtain a pre-trained network, wherein the convolutional neural network includes a feature extraction module and a classification module; A first building module, configured to build a domain adaptation network model based on the pre-trained network and the domain calibration layer; a domain adaptation module, configured to train the domain adaptation network model using a second children's sleep data training set and a children's sleep data test set to optimize the network parameters of the domain adaptation network model, and obtain a trained domain adaptation network model, wherein the classification module predicts the category probability distribution corresponding to the training data based on the training data features extracted by the feature extraction module from the training data in the second children's sleep data training set, and the domain calibration layer calculates a loss value based on the training data features and the test data features extracted by the feature extraction module from the test data in the children's sleep data test set; The second construction module is used to construct a children's sleep staging model based on the feature extraction module and the classification module of the trained domain adaptive network model.
8. A child sleep staging device based on a child sleep staging model, characterized in that: The child sleep staging model is obtained by training the child sleep staging model training method according to any one of claims 1 to 5, and the child sleep staging device comprises: A data acquisition module, used to acquire the sleep EEG data of the child to be identified; A prediction module, used for inputting the child's sleep EEG data into the child's sleep staging model to perform sleep staging prediction, and obtaining a target category probability distribution output by the child's sleep staging model; A result determination module is used to determine the sleep staging result corresponding to the child's sleep EEG data based on the target category probability distribution.
9. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, Wherein, the program includes instructions, which, when executed by the processor, cause the processor to execute the training method for the child sleep staging model according to any one of claims 1-5, or to execute the child sleep staging method based on the child sleep staging model according to claim 6.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the training method of the child sleep staging model according to any one of claims 1 to 5, or to execute the child sleep staging method based on the child sleep staging model according to claim 6.
Citation Information
Patent Citations
Sleep staging method and device
CN113951821A
Electrocardio classification method and electrocardio classification model training method based on domain self-adaption
CN114091530A
Sleep staging method and system, computer readable storage medium and electronic equipment
CN114983343A
Method and device for monitoring sleep staging
CN115153429A
Method for training sleep stage classification model
CN116304882A