A sleep staging recognition method, system, storage medium

By constructing a sleep stage identification model and training it using training and experience datasets, and combining a self-attention mechanism network and a multilayer perceptual neural network, the problems of long manual judgment and low machine judgment accuracy in polysomnography monitoring systems are solved, and fast and accurate sleep stage identification is achieved.

CN117137440BActive Publication Date: 2026-06-23GUANGDONG HOSPITAL OF TRADITIONAL CHINESE MEDICINE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG HOSPITAL OF TRADITIONAL CHINESE MEDICINE
Filing Date
2023-08-29
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing polysomnography systems require manual verification in sleep stage analysis, which is time-consuming and has low machine accuracy, lacking professional guidance from clinicians.

Method used

By constructing a sleep stage identification model, training the model using training datasets and experience datasets, and combining a self-attention mechanism network and a multilayer perceptual neural network, feature extraction and weighted calculation of sleep signals are performed, and the total sleep stage result is output.

Benefits of technology

It enables rapid and accurate output of sleep staging results, improves the accuracy of sleep staging identification, and reduces the time cost of manual judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117137440B_ABST
    Figure CN117137440B_ABST
Patent Text Reader

Abstract

The application provides a sleep staging recognition method, comprising the following steps: acquiring polysomnogram data, preprocessing the polysomnogram data to obtain sleep signals; constructing a sleep staging recognition model, training the sleep staging recognition model through a training data set and an experience data set; the training data set is an un-staged sleep signal, and the experience data set is a sleep signal that has completed sleep staging; collecting polysomnogram data, performing sleep staging on the polysomnogram data through the sleep staging recognition model, and obtaining a total sleep staging result. The application quickly and accurately outputs a sleep staging result, and solves the problems of long time consumption of artificial judgment and low accuracy of machine judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sleep monitoring technology, specifically to a sleep staging method, system, and storage medium. Background Technology

[0002] The polysomnography (PSG) system continuously and synchronously records more than 10 indicators, such as electroencephalogram (EEG) and respiration, throughout the night's sleep. All records are automatically analyzed by the instrument the next day, and then manually verified item by item to analyze the sleep data and obtain the user's sleep analysis results.

[0003] This process requires manual verification and analysis of each item, which is costly and time-consuming. To improve analysis efficiency, some researchers collect sleep computer and electrooculography (EOG) signals from subjects and use deep learning to stage sleep. However, this method relies heavily on raw data, has a single signal source, and lacks professional guidance from clinicians, resulting in low accuracy in sleep staging. Summary of the Invention

[0004] To address the aforementioned issues, embodiments of this application provide a sleep staging identification method, system, and storage medium that can quickly and accurately output total sleep staging results, solving the problems of time-consuming manual judgment and low accuracy of machine judgment.

[0005] Therefore, one aspect of this application provides a method for sleep stage identification, comprising the following steps:

[0006] Acquire polysomnography data, preprocess the polysomnography data, and obtain sleep signals;

[0007] A sleep staging identification model is constructed and trained using a training dataset and an experience dataset. The training dataset consists of unstaging sleep signals, and the experience dataset consists of sleep signals that have completed sleep staging.

[0008] Polysomnography data is collected, and the sleep staging identification model is used to segment the polysomnography data into sleep stages to obtain the total sleep staging result.

[0009] Optionally, in combination with any of the above aspects, in another implementation of this aspect, training the sleep stage recognition model using the training dataset and the experience dataset includes:

[0010] Based on the empirical dataset, the training dataset is identified, and preliminary sleep staging results are output.

[0011] The preliminary sleep staging results are weighted using a weighted algorithm to obtain the total sleep staging results.

[0012] Optionally, in combination with any of the above aspects, in another implementation of this aspect, the sleep stage identification model includes an experience transformation model, a self-attention mechanism network, and a multilayer perceptual neural network;

[0013] Based on the aforementioned empirical dataset, the training dataset is identified, and preliminary sleep staging results are output, including:

[0014] The training dataset is used by an empirical transformation model to convert sleep signals into feature data based on the empirical dataset.

[0015] The training dataset is input into the self-attention mechanism network, which outputs hidden vectors of different dimensions.

[0016] The feature data and latent vectors are concatenated to form input data. The multilayer perceptron uses the input data as input and outputs preliminary sleep staging results.

[0017] Alternatively, in conjunction with any of the above aspects, in another implementation of this aspect, the self-attention mechanism network takes the sleep signal as input and outputs latent vectors of different dimensions, specifically,

[0018] The self-attention mechanism network learns the representation of the sleep signal, inputs the representation of the sleep signal into CNN networks of different dimensions for learning, and outputs latent vectors of different dimensions and preset sizes.

[0019] Optionally, in conjunction with any of the above aspects, in another implementation of this aspect, the empirical conversion model converts sleep signals into feature data, including:

[0020] The sleep signal features are extracted, the features are normalized, and the normalized features are combined into a feature column to obtain feature data.

[0021] Extracting features from the sleep signal includes extracting mathematical transformation features, Hjorth parameters, power features of Theta, Alpha, Beta, and Gamma bands, permutation entropy, Higuchi fractal dimension, and / or Petrosian fractal dimension.

[0022] Optionally, in combination with any of the above aspects, in another implementation of this aspect, the preliminary sleep staging results are weighted using a weighted algorithm, specifically as follows:

[0023] Calculate the accuracy of the preliminary sleep stage results for each sleep signal, and determine the weight of the sleep signal based on the accuracy.

[0024] The preliminary sleep staging results were weighted using a weighting calculation formula.

[0025] The weight calculation formula is as follows:

[0026]

[0027] Where, h(x) t For the t-th group of results, Let ω be the predicted probability of the j-th result in the t-th result group. t The weight of the t-th group of results, max j The result that has the highest probability of taking the j-th result among all groups.

[0028] Optionally, in combination with any of the above aspects, in another implementation of this aspect, training the sleep stage recognition model using the training dataset and the experience dataset further includes:

[0029] Acquire polysomnography data, divide the polysomnography data into a training dataset and a validation dataset according to a preset ratio, verify the sleep staging identification model through the validation dataset, and adjust the sleep staging identification model based on the validation results.

[0030] Optionally, in conjunction with any of the above aspects, in another implementation of this aspect, the polysomnography data is preprocessed, including:

[0031] The polysomnography data are numbered, and the numbers and their corresponding original data paths are saved.

[0032] The polysomnography data is down-frequency and segmented to obtain a sleep signal in a preset frequency band.

[0033] Another aspect of this application provides a sleep recognition and analysis system, comprising:

[0034] The acquisition module acquires polysomnography data and preprocesses the polysomnography data to obtain preprocessed sleep signals.

[0035] The training module trains the sleep stage recognition model using a training dataset and an experience dataset; the training dataset consists of unstaged sleep signals, and the experience dataset consists of staged sleep signals.

[0036] The identification module acquires polysomnography data, performs sleep staging on the polysomnography data using the sleep staging identification model, and obtains the total sleep staging result.

[0037] In another aspect of this application, an apparatus is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a sleep staging identification method as described above.

[0038] Alternatively, in combination with any of the above aspects, in another implementation of this aspect

[0039] As described above, this application provides a method, system, and apparatus for sleep staging identification. It utilizes a polysomnography system to collect polysomnography data from patients, collects and processes clinical experience from medical experts, transforming it into a corresponding experience dataset. A sleep staging identification model is trained using this experience dataset and a training dataset. The model then identifies the polysomnography sleep data to obtain the overall sleep staging result. This method can better represent the clinical experience and knowledge of medical experts from the data characteristics, improving the accuracy of the overall sleep staging identification result. It quickly and accurately outputs sleep staging results, solving the problems of time-consuming manual judgment and low accuracy of machine judgment.

[0040] The above summary provides a simplified overview of some concepts, which will be further described in detail in the following specific embodiments. The above summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to help determine the scope of the claimed subject matter. The claimed subject matter is not limited to embodiments that address any or all the shortcomings pointed out in the background art. Attached Figure Description

[0041] The accompanying drawings, incorporated in and forming part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but rather to illustrate the concepts of this application to those skilled in the art by referring to specific embodiments.

[0042] Figure 1 This is a schematic flowchart of a sleep stage identification method provided in an embodiment of this application;

[0043] Figure 2 A flowchart illustrating step S1 provided in an embodiment of this application;

[0044] Figure 3 This is a flowchart illustrating step S2 provided in an embodiment of this application;

[0045] Figure 4 This is a schematic diagram of the sleep staging identification model provided in the embodiments of this application;

[0046] Figure 5 This is a schematic diagram of a self-attention network provided in an embodiment of this application;

[0047] Figure 6 This is a schematic diagram of a sleep staging identification system provided in an embodiment of this application. Detailed Implementation

[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0049] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0050] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word “if” as used herein may be interpreted as “when…” or “in response to determination”. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” and “including” indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or,” “and / or,” “including at least one of the following,” etc., used in this application may be interpreted as inclusive, or mean any one or any combination thereof. An exception to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0051] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0052] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when”, “when”, “in response to determination”, or “in response to detection”. Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination”, “in response to determination”, “when detection (of the stated condition or event)”, or “in response to detection (of the stated condition or event)”.

[0053] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0054] Please see Figure 1 This application provides a sleep staging identification method, system, and storage medium that can quickly and accurately output sleep staging results, solving the problems of long manual judgment time and low machine judgment accuracy.

[0055] Specifically, this method includes the following steps:

[0056] Step S1: Obtain polysomnography data and preprocess the polysomnography data to obtain sleep signals.

[0057] After a polysomnography system collects polysomnography data from a user, the data needs to be preprocessed. For example... Figure 2 As shown, the preprocessing includes:

[0058] Step S11: Number the polysomnography data and save the numbers and their corresponding original data paths. Numbering the polysomnography data is necessary because the original polysomnography data is massive and facilitates identification and statistics. After numbering, the original polysomnography data is stored in the distributed storage system Hadoop's HDFS, and the numbers and their corresponding original data paths are stored in a Hive database for subsequent retrieval or tracing. Database types are shown in Table 1.

[0059] Table 1. Data storage instructions for polysomnography.

[0060]

[0061] Step S12: The polysomnography data is down-frequency and segmented to obtain sleep signals in a preset frequency band. Since the polysomnography data collected in the polysomnography monitoring system is acquired from multiple different devices with varying frequencies, the frequency of all data is unified to facilitate analysis and judgment. However, excessively high frequencies would result in a large data volume, increasing analysis and calculation time; therefore, the polysomnography data is appropriately down-frequency. Generally, it is down-frequencyd to 100 Hz for easier processing.

[0062] Simultaneously, based on existing polysomnography (PSG) standards, the polysomnography data is segmented into multiple fragments. Generally, each hour-long data set is divided into multiple 30-second segments; if the last batch of data is less than 30 seconds, it is discarded. Each 100 Hz, 30-second data point constitutes a sleep signal, such as E1-A2, E2-A2, F3-A2, C3-A2, and O1-A2. Here, E represents the electrooculogram (EOG) signal, with 1 for the left side and 2 for the right; M represents the mastoid process behind the ear, serving as the reference electrode for the monitoring leads; F represents the frontal EEG signal; C represents the central EEG signal; and O represents the occipital EEG signal. The naming of sleep signals is derived from the EEG 10-20 naming convention and the AASM guidelines, representing the current mainstream naming scheme.

[0063] Step S2: Construct a sleep staging identification model by training the sleep staging identification model using the training dataset and the experience dataset; wherein, the training dataset consists of unstaging sleep signals, and the experience dataset consists of staging sleep signals.

[0064] In this application, based on the experience of sleep specialists, preprocessed sleep signals are staged to obtain sleep staging results, which constitute an experience dataset. The clinical experience of medical experts is collected, processed, and transformed into a corresponding experience dataset, thereby better representing the clinical experience knowledge of medical experts from the data features and improving the accuracy of the model. Unstaging sleep signals constitute the training dataset. The sleep staging recognition model is trained using the experience dataset and the training dataset. Figure 3 As shown, the training process includes:

[0065] Step S21: Identify the training dataset based on the empirical dataset and output preliminary sleep staging results;

[0066] Specifically, such as Figure 4As shown, the sleep staging identification model includes an experience transformation model, a self-attention mechanism network, and a multilayer perceptron neural network. Based on the experience dataset, it identifies the training dataset and outputs preliminary sleep staging results, including:

[0067] Step S211: The training dataset is transformed into feature data by an experience conversion model based on the experience dataset. An experience dataset and an experience conversion model are constructed by combining expert diagnostic experience. The experience conversion model transforms sleep signals into feature data, including: extracting features from the sleep signals, normalizing the features, and combining the features into feature columns to obtain feature data. The extraction of features from the sleep signals includes extracting mathematical transformation features, Hjorth parameters, power features of Theta, Alpha, Beta, and Gamma bands, permutation entropy, Higuchi fractal dimension, and / or Petrosian fractal dimension. The extracted feature data is shown in Table 2.

[0068] Table 2 Feature Description

[0069]

[0070]

[0071] Furthermore, suppose the dataset for each 30-second interval is X = (x1, x2, ..., x...). n Based on the above indicators, the feature extraction can be summarized as follows:

[0072]

[0073] Activity, mobility, and complexity of the Hjorth parameter:

[0074]

[0075]

[0076]

[0077] Where σ represents the standard deviation of the time series x.

[0078] The formula for calculating permutation entropy is:

[0079]

[0080] Where N is a time series, sampled at intervals k, with the starting point m = (1,2,…,k).

[0081] The formula for calculating the Petrosian fractal dimension is:

[0082]

[0083] Where N is the time series length of the interval, and θ refers to Delta.

[0084] The extracted features are combined into a new feature column f, which constitutes the feature data.

[0085] Step S212: Input the training dataset into the self-attention mechanism network and output latent vectors of different dimensions;

[0086] like Figure 5 As shown, the representation of the training dataset is learned through a self-attention mechanism network. This representation is then placed into three different CNN networks to ensure that the polysomnography data is fully learned and output three latent vectors of different dimensions and preset sizes, namely [80×128×16, 80×128×11, 80×128×8].

[0087] Step S213: The feature data and latent vectors are concatenated to form input data. The multilayer perceptron uses the input data as input and outputs preliminary sleep staging results.

[0088] The feature data obtained in step S211 and the three latent vectors of different dimensions obtained in step S212 are concatenated sequentially according to their numbers to form the input data. The multilayer perceptron uses the input data as input and outputs preliminary sleep staging results.

[0089] Step S22: The preliminary sleep staging results are weighted using a weighted algorithm to obtain the total sleep staging results.

[0090] Specifically, this step includes:

[0091] Step S221: Calculate the accuracy of the preliminary sleep stage results for each sleep signal, and determine the weight of the sleep signal based on the accuracy.

[0092] For example, if the correct staging result of a sleep signal is 0101, the result of the first sleep signal is 0100, with an accuracy of 75%; the result of the second sleep signal is 0000, with an accuracy of 50%; and the result of the third sleep signal is 0101, with an accuracy of 100%. Based on these accuracy rates, the weight of the first sleep signal is [1,1,1,0.75], the weight of the second sleep signal is [1,0.5,1,0.5], and the weight of the third sleep signal is [1,1,1,1].

[0093] Step S222: Perform a weighted calculation on the preliminary sleep staging results using a weighted calculation formula.

[0094] The weight of the t-th group of results, max j The result that has the highest probability of taking the j-th result among all groups.

[0095] Each sleep signal yields a preliminary sleep stage result. By weighting different sleep signals and their preliminary sleep stage results using the method described above, the accuracy of this method can be improved, thus avoiding the influence of inaccurate preliminary sleep stage results on the overall sleep stage result.

[0096] Furthermore, training the sleep stage recognition model using the training dataset and the experience dataset also includes:

[0097] Step S23: Obtain polysomnography data, divide the polysomnography data into a training dataset and a validation dataset according to a preset ratio, validate the sleep staging recognition model through the validation dataset, and adjust the sleep staging recognition model according to the validation results.

[0098] After obtaining the sleep staging recognition model through the above method, the polysomnography data is divided into a training dataset and a validation dataset in a 7:3 ratio. The sleep staging recognition model is then validated using the validation dataset. The accuracy of the total sleep staging results obtained from the validation dataset is calculated. If the accuracy is lower than a preset value, the sleep staging recognition model is adjusted until the accuracy of the sleep staging recognition model is higher than the preset value. In this application, the preset accuracy value is 80%, thereby improving the recognition accuracy of the model.

[0099] Furthermore, adjusting the sleep staging identification model includes adjusting the experience transformation model and / or adjusting the self-attention mechanism network parameters. Adjustments can be made to the experience transformation model if the staging results are derived from the experience dataset obtained by sleep specialists, or if the extracted features have low importance, or even if the feature causes significant bias in the initial sleep staging results. The experience transformation model is adjusted by adding or deleting a specific feature extracted from the sleep signal. The self-attention mechanism network parameters include the input feature batch size, i.e., the number of sleep signals in each batch; in this implementation, 20 attention heads are selected, and the number of attention heads in this application is 2.

[0100] Step S3: Collect polysomnography data and perform sleep staging on the polysomnography data using the sleep staging identification model.

[0101] After collecting the latest polysomnography data, the sleep analysis and recognition model trained above is used to obtain the total sleep stage results. The total sleep stage results are the probabilities of the wakefulness stage (W stage), light sleep stage (N1 stage), light sleep stage (N2 stage), and deep sleep stage (N3 stage) in that order. The stage with the highest probability is the stage result of that sleep signal. For example, if the total sleep stage result of the sleep signal output is [0.1, 0.6, 0.1, 0.1, 0.1], then the sleep signal corresponds to the light sleep stage (N1 stage).

[0102] This method utilizes a polysomnography (PSG) system to collect polysomnography data from patients. Sleep stages are then labeled by sleep specialists as an empirical dataset. Based on the experts' experience, an empirical transformation model is constructed to convert the PSG indicator signals into numerical features. These numerical features, along with the PSG data, are input into a deep learning algorithm to obtain multiple results. These results are then weighted and calculated, and the final output is a total sleep stage result. The sleep stage recognition model is then adjusted based on this total sleep stage result, forming a self-learning closed loop. When new PSG data is collected from patients, this method can quickly and accurately output sleep stage results, thus solving the problem of time-consuming manual PSG interpretation.

[0103] Based on the same inventive idea, such as Figure 6 As shown, this application also provides a sleep stage identification system, including:

[0104] The acquisition module acquires polysomnography data and preprocesses the polysomnography data to obtain preprocessed sleep signals.

[0105] The training module trains a sleep staging model based on the sleep signals, identifies the sleep signals through the sleep staging model, and outputs preliminary sleep staging results; the preliminary sleep staging results are weighted and calculated using a weighted algorithm to obtain the total sleep staging results.

[0106] The identification module acquires polysomnography data and obtains the total sleep stage result through a sleep stage model.

[0107] Based on the same inventive concept, this application also provides an apparatus, which may include: a memory storing executable program code;

[0108] A processor coupled to memory;

[0109] A transceiver used to communicate with other devices or communication networks and to receive or send network messages;

[0110] A bus used to connect memory, processor, and transceiver for internal communication.

[0111] The transceiver receives messages transmitted over the network and passes them to the processor via the bus. The processor then calls the executable program code stored in the memory via the bus to process the messages and passes the processing results back to the transceiver via the bus for transmission, thereby implementing the method provided in this application embodiment.

[0112] This application also provides a non-transitory machine-readable storage medium storing an executable program. When the executable program is run by a processor, the processor performs the processing method provided in the above embodiments. A memory storing executable program code is also provided.

[0113] A processor coupled to memory;

[0114] The processor calls the executable program code stored in memory to execute a sleep staging identification method as described.

[0115] This invention discloses a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to execute a described sleep staging identification method.

[0116] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute a described sleep staging identification method.

[0117] The embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0118] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0119] Finally, it should be noted that the embodiments disclosed in this invention are merely preferred embodiments of the invention and are only used to illustrate the technical solutions of the invention, not to limit it. Although the invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this invention.

Claims

1. A sleep staging method, comprising: The method comprises the following steps: obtaining polysomnogram data, preprocessing the polysomnogram data to obtain sleep signals; constructing a sleep staging recognition model, and training the sleep staging recognition model through a training data set and an experience data set; the training data set is an un-staged sleep signal, and the experience data set is a sleep signal that has completed sleep staging; training the sleep staging recognition model through the training data set and the experience data set, comprising: identifying the training data set according to the experience data set, and outputting a sleep staging preliminary result; performing weighted calculation on the sleep staging preliminary result through a weighting algorithm to obtain a total sleep staging result; the sleep staging recognition model comprises an experience conversion model, a self-attention mechanism network, and a multi-layer perception neural network; the sleep staging preliminary result is outputted by identifying the training data set according to the experience data set, comprising: the training data set is converted into feature data by the experience conversion model according to the experience data set; the training data set is inputted into the self-attention mechanism network to output hidden vectors of different dimensions; the feature data and the hidden vectors are spliced to form input data, and the multi-layer perception neural network takes the input data as input to output the sleep staging preliminary result; collecting polysomnogram data, and performing sleep staging on the polysomnogram data through the sleep staging recognition model to obtain a total sleep staging result.

2. The sleep staging method of claim 1, wherein: the self-attention mechanism network takes the sleep signal as input to output hidden vectors of different dimensions, specifically, the self-attention mechanism network learns the representation of the sleep signal, inputs the representation of the sleep signal into a CNN network of different dimensions to learn, and outputs hidden vectors of different dimensions and a preset size.

3. The sleep staging method of claim 2, wherein: the experience conversion model converts the sleep signal into feature data, comprising: extracting features of the sleep signal, normalizing the features, combining the normalized features into a feature column to obtain feature data; extracting features of the sleep signal comprises extracting mathematical transformation features, Hjorth parameters, power features of Theta, Alpha, Beta, and Gamma wave bands, permutation entropy, higuchi fractal dimension, and / or Petrosian fractal dimension.

4. The sleep staging method of claim 1, wherein: the sleep staging preliminary result is weighted calculated through a weighting algorithm, specifically, calculating the accuracy of the sleep staging preliminary result of each sleep signal, and determining the weight of the sleep signal according to the accuracy; the sleep staging preliminary result is weighted calculated through a weight calculation formula; the weight calculation formula is: wherein, is the th result in the th group of results, is the predicted probability of the th result in the th group of results, is the weight of the th group of results, is the result with the highest probability in all groups.

5. A sleep staging method as claimed in any one of claims 2 to 4, characterized by: the sleep staging recognition model is trained through the training data set and the experience data set, further comprising: obtaining polysomnogram data, dividing the polysomnogram data into a training data set and a verification data set according to a preset proportion, verifying the sleep staging recognition model through the verification data set, and adjusting the sleep staging recognition model according to a verification result.

6. The sleep staging method of claim 1, wherein: the polysomnogram data is preprocessed, comprising: numbering the polysomnogram data, saving the number and the original data path corresponding to the number; The polysomnography data is down-frequency and segmented to obtain a sleep signal in a preset frequency band.

7. A sleep staging recognition system characterized by: include: The acquisition module acquires polysomnography data and preprocesses the polysomnography data to obtain preprocessed sleep signals. The training module trains a sleep stage recognition model using a training dataset and an experience dataset; the training dataset consists of unstaged sleep signals, and the experience dataset consists of staged sleep signals. Training the sleep staging recognition model using the training dataset and the experience dataset includes: recognizing the training dataset based on the experience dataset and outputting preliminary sleep staging results; and performing a weighted calculation on the preliminary sleep staging results using a weighted algorithm to obtain a total sleep staging result. The sleep staging identification model includes an experience transformation model, a self-attention mechanism network, and a multilayer perceptron neural network. The step of identifying the training dataset based on the experience dataset and outputting preliminary sleep staging results includes: the training dataset is processed by the experience transformation model to convert sleep signals into feature data; the training dataset is input to the self-attention mechanism network, which outputs latent vectors of different dimensions; the feature data and latent vectors are concatenated to form input data; and the multilayer perceptron neural network uses the input data as input to output preliminary sleep staging results. The identification module acquires polysomnography data, performs sleep staging on the polysomnography data using the sleep staging identification model, and obtains the total sleep staging result.

8. A sleep staging recognition apparatus characterized by comprising: include: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements a sleep staging identification method as described in any one of claims 1 to 6.