A sleep staging method, apparatus, storage medium, and electronic device

By automatically processing physiological signal images and extracting image and contextual features through a pre-trained analysis model, the problems of time-consuming, labor-intensive, and unreliable sleep staging methods in existing sleep staging methods are solved, and efficient and accurate sleep staging is achieved.

CN117322840BActive Publication Date: 2026-11-24SHANGHAI UNITED IMAGING INTELLIGENCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311198830.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2026-11-24
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

Existing sleep staging methods rely on manual operation, which is time-consuming, labor-intensive, and suffers from poor reliability and comparability.

Method used

A pre-trained analysis model, including an extraction subnet, a first output subnet, a context subnet, and a second output subnet, is used to automatically process physiological signal maps. By extracting image features and context features, sleep staging is achieved.

Benefits of technology

It achieves automated sleep staging, improving the accuracy and reliability of staging and solving the problems of inconsistency and continuity when staging is done manually.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117322840B_ABST
    Figure CN117322840B_ABST
Patent Text Reader

Abstract

This specification discloses a sleep staging method, apparatus, storage medium, and electronic device. When using this method, a physiological signal map of a target user during sleep is acquired; the physiological signal map is divided according to the image period to obtain segmented signal maps; each segmented signal map is input into a pre-trained analysis model; image features of each segmented signal map are extracted through an extraction subnetwork; for each segmented signal map, the image features of that segmented signal map are input into a first output subnetwork to obtain a pending sleep staging result for that segmented signal map; the image features of the segmented signal maps adjacent to that segmented signal map are input into a context subnetwork to obtain context features of that segmented signal map, which characterize the correlation between the segmented signal map and the segmented signal map; the context features and the pending sleep staging result are input into a second output subnetwork to obtain the final sleep staging result for that segmented signal map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of medical technology, and in particular to a sleep staging method, device, storage medium, and electronic device. Background Technology

[0002] During sleep, a user's sleep state changes cyclically. Within a sleep cycle, the user's state also changes according to certain patterns. At different times within a sleep cycle, the user is in different sleep states, and classifying these states is called sleep staging. In the medical field, sleep staging is a widely used auxiliary medical technique. By analyzing a user's sleep state and determining the distribution of each sleep stage, abnormalities can be effectively detected.

[0003] However, current sleep staging methods have certain limitations. Existing methods require manual processing and analysis of large amounts of sleep signal data, necessitating operation and analysis by highly experienced and trained technicians. This process is very time-consuming and cumbersome, requiring significant manpower and time investment, resulting in high costs. Furthermore, this process relies on the subjective judgment of technicians; different technicians may produce discrepancies in classifying and assessing sleep stages, reducing the reliability and comparability of sleep staging.

[0004] Therefore, how to reduce reliance on manual sleep staging and improve the accuracy of sleep staging is an urgent problem to be solved. Summary of the Invention

[0005] This specification provides a sleep staging method, apparatus, storage medium, and electronic device to at least partially solve the aforementioned problems existing in the prior art.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a method for sleep staging, including:

[0008] Obtain physiological signal maps of the target user during sleep;

[0009] The physiological signal map is divided according to the image period of the physiological signal map to obtain a segmented signal map;

[0010] Each segmented signal image is input into a pre-trained analysis model, which includes at least an extraction subnet, a first output subnet, a context subnet, and a second output subnet.

[0011] The image features of each segmented signal image are extracted using the extraction subnet;

[0012] For each segmented signal map, the image features of the segmented signal map are input into the first output subnet to obtain the undetermined sleep staging result of the segmented signal map;

[0013] The image features of the segmented signal map and the image features of the segmented signal map adjacent to the segmented signal map when dividing the physiological signal map are input into the context subnet to obtain the context features of the segmented signal map. The context features are used to characterize the association relationship between the segmented signal map adjacent to the segmented signal map and the segmented signal map when dividing it.

[0014] The context features and the sleep staging results to be determined are input into the second output subnet to obtain the final sleep staging result of the segmented signal map.

[0015] Optionally, the physiological signal map includes at least one of electroencephalography (EEG) and eye movement mapping.

[0016] Optionally, before dividing the physiological signal map according to the image period of the physiological signal map, the method further includes:

[0017] For each physiological signal map, remove signal values ​​in the physiological signal map that are interfered with by other physiological signals.

[0018] Optionally, the physiological signal graph is a waveform graph;

[0019] Before dividing the physiological signal map according to the image period of the physiological signal map, the method further includes:

[0020] For each physiological signal image, the coordinate axes of the physiological signal image are adjusted so that the pixel amplitude of the signal in the physiological signal image is within a preset range, and the size of the physiological signal image is set to a preset size.

[0021] Optionally, the physiological signal map is divided according to the image period of the physiological signal map to obtain a segmented signal map, specifically including:

[0022] The image period of the physiological signal map is determined as the division period;

[0023] The physiological signal map is divided according to the division period to obtain several segmented signal maps with a duration equal to the division period.

[0024] Optionally, the analysis model is pre-trained, specifically including:

[0025] Obtain physiological signal images of sample users during sleep;

[0026] The physiological signal map of the sample is divided according to the image period of the sample physiological signal map to obtain the sample segment signal map, and the labeled sleep stage result of each sample segment signal map is determined.

[0027] Input the segmented signal graphs of each sample into the analysis model to be trained;

[0028] The sample image features of each sample segment signal map are extracted through the extraction sub-network;

[0029] For each sample segment signal map, the sample image features of the sample segment signal map are input into the first output subnet to obtain the sample undetermined sleep stage result of the sample segment signal map;

[0030] When dividing the sample physiological signal map, the sample image features of the sample segment signal map are input into the context subnet, and the sample image features of the sample segment signal map adjacent to the sample segment signal map are input into the context subnet to obtain the sample context features of the sample segment signal map.

[0031] The sample context features and the sample undetermined sleep stage results are input into the second output subnet to obtain the final sleep stage result of the sample segmented signal map;

[0032] The analysis model is trained based on the difference between the final sleep staging results of the sample and the labeled sleep staging results.

[0033] Optionally, the analysis model is trained based on the difference between the final sleep staging results of the sample and the labeled sleep staging results, specifically including:

[0034] Based on the labeled sleep stage results of the segmented signal map of the sample, the training weights of the segmented signal map of the sample are determined;

[0035] The analysis model is trained based on the difference between the final sleep staging results of the sample and the labeled sleep staging results, as well as the training weights.

[0036] Optionally, the training weights of the segmented signal map are determined based on the labeled sleep staging results of the segmented signal map, specifically including:

[0037] Determine the target number of sample segment signal maps for which the labeled sleep staging results are used as the sample segment signal map;

[0038] The training weights of a sample segment signal map are determined based on the proportion of the target quantity in the total number of sample segment signal maps.

[0039] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described sleep staging method.

[0040] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described sleep staging method.

[0041] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0042] In this method, a physiological signal map of the target user during sleep is obtained; the physiological signal map is divided according to the image period of the physiological signal map to obtain segmented signal maps; each segmented signal map is input into a pre-trained analysis model, which includes at least an extraction subnet, a first output subnet, a context subnet, and a second output subnet; image features of each segmented signal map are extracted through the extraction subnet; for each segmented signal map, the image features of the segmented signal map are input into the first output subnet to obtain the undetermined sleep stage result of the segmented signal map; the image features of the segmented signal map and the image features of the segmented signal map adjacent to the segmented signal map when dividing the physiological signal map are input into the context subnet to obtain the context features of the segmented signal map, which are used to characterize the correlation between the segmented signal map adjacent to the segmented signal map and the segmented signal map; the context features and the undetermined sleep stage result are input into the second output subnet to obtain the final sleep stage result of the segmented signal map.

[0043] When using the sleep staging method provided in this manual to stage sleep for a target user, the physiological signal maps of the target user during sleep can be acquired and segmented to obtain segmented signal maps. Each segmented signal map is then input into a pre-trained analysis model. Image features of each segmented signal map are extracted using an extraction subnetwork, and these features are input into a first output subnetwork to obtain the desired sleep staging result. Context features of each segmented signal map are extracted using a context subnetwork, and the desired sleep staging result is adjusted based on these context features using a second output subnetwork to obtain the final sleep staging result. This method can automate sleep staging while ensuring accuracy and reliability, and it solves the problem of inconsistencies in manual sleep staging. Furthermore, it utilizes context dependencies to address potential continuity issues during staging, effectively improving the overall effectiveness of sleep staging. Attached Figure Description

[0044] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and their descriptions, serving to explain this specification and do not constitute an undue limitation thereof.

[0045] In the picture:

[0046] Figure 1 This is a flowchart illustrating a sleep staging method provided in this manual;

[0047] Figure 2 This is a schematic diagram of one model structure of the analytical model used in this method;

[0048] Figure 3 This is a schematic diagram of a sleep staging device provided in this specification;

[0049] Figure 4 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0051] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0052] Figure 1 This is a flowchart illustrating a sleep staging method provided in this specification, including the following steps:

[0053] S100: Acquire physiological signal maps of the target user during sleep.

[0054] In this specification, the executing entity used to implement the sleep staging method can refer to a designated device such as a server set up on the business platform. For ease of description, this specification will only use the server as the executing entity as an example to illustrate one sleep staging method provided in this specification.

[0055] Sleep staging refers to the division of the human sleep process into stages. A single sleep cycle may contain several sleep cycles, each lasting approximately 90 minutes. Typically, each sleep cycle includes non-rapid eye movement (NREM) sleep and rapid eye movement (REM) sleep. NREM sleep is further divided into stages I, II, III, and IV. The duration of each stage within each sleep cycle varies depending on sleep depth.

[0056] The sleep staging method provided in this manual is mainly used to segment a user's sleep based on information obtained during sleep. Therefore, when implementing this method, the physiological signal map of the target user during sleep can be obtained first in this step. The physiological signal map may include at least one of electroencephalogram (EEG) and eye movement imaging; the physiological signal map can be obtained through various methods, such as polysomnography, and this manual does not impose specific limitations on this method.

[0057] S102: Divide the physiological signal map according to the image period of the physiological signal map to obtain a segmented signal map.

[0058] In this step, the physiological signal map obtained in step S100 can be divided into segmented signal maps. Since a complete physiological signal map continuously represents all the physiological information of the target user throughout the entire sleep period, and a complete sleep period contains several different stages, the complete physiological signal map cannot be directly analyzed and needs to be divided.

[0059] It is also necessary to consider that, since the sleep stages represented by each part of the physiological signal graph are unknown before the analysis, and the duration of each sleep stage is also unknown, when dividing the physiological signal graph, it is best to make the duration of each segment short, so as to ensure that the physiological signal information in each segment belongs to the same sleep stage as much as possible.

[0060] Based on the above idea, this method divides the physiological signal image according to its image period to obtain segmented signal images. Specifically, the image period of the physiological signal image can be determined as the division period; the physiological signal image is divided according to the division period to obtain several segmented signal images with a duration equal to the division period. The duration of each segmented signal image obtained after division can be the image period of the physiological signal image; in other words, each signal image contains a physiological signal image of one image period. The image period of the physiological signal image is determined by the acquisition frequency during image acquisition, and the acquisition frequency can be set according to requirements.

[0061] Of course, the division method used in this specification is only one of many optional division methods. Other methods can also be used, such as directly setting a specified duration so that the duration of each segment signal diagram is the specified duration. This specification does not impose specific restrictions on this.

[0062] Additionally, since the physiological signal images acquired each time may have inconsistent formats and varying quality, some preprocessing can be performed before segmenting the physiological signal images. For example, noise reduction processing can be performed on the physiological signal images before segmentation. Specifically, for each physiological signal image, signal values ​​that are interfered with by other physiological signals can be removed.

[0063] During the acquisition of physiological signal images, noise interference from white noise or other sources may occur, causing errors in the signal values ​​within the images. To ensure the accuracy of subsequent analysis, signal values ​​affected by interference from other physiological signals can be removed from the physiological signal images before processing, reducing the impact of interference on subsequent analysis.

[0064] In addition to denoising the physiological signal maps, standardization can also be performed. Typically, physiological signal maps are represented as waveforms. Since the signal values ​​of physiological signal maps at different sleep stages may vary, and the numerical ranges of signals in different physiological signal maps may also differ, it may lead to situations where different physiological signal maps cannot be displayed together. Therefore, a certain degree of standardization is required for the physiological signal maps. Specifically, for each physiological signal map, the coordinate axes can be adjusted so that the pixel amplitude of the signal in the physiological signal map is within a preset range, and the size of the physiological signal map is set to a preset size.

[0065] By adjusting the position and size of the coordinate axes of a physiological signal image, the pixel amplitude of the signal value and the position of the signal in the image can be changed. At the same time, during the adjustment process, the size of each physiological signal image can be adjusted to a preset size, thereby obtaining physiological signal images with distinct amplitude features.

[0066] S104: Input the segmented signal graphs into a pre-trained analysis model, wherein the analysis model includes at least an extraction subnet, a first output subnet, a context subnet, and a second output subnet.

[0067] In this step, the segmented signal maps obtained in step S102 can be input into the pre-trained analysis model. In the sleep staging method provided in this specification, the analysis model is used to analyze the input segmented signal maps to obtain the final sleep staging result. The sleep staging result is used to characterize the sleep stage corresponding to the segmented signal map.

[0068] Figure 2 This is a schematic diagram of one model structure used in the analysis model employed in this method. For example... Figure 2 As shown, the analysis model may include at least an extraction subnet, a first output subnet, a context subnet, and a second output subnet. After the segmented signal graph is input into the analysis model, it will be processed by the above subnets in sequence, and finally the sleep staging result output by the analysis model will be obtained.

[0069] S106: Extract the image features of each segmented signal map through the extraction subnet.

[0070] After inputting the segmented signal images into the analysis model, the model first extracts image features from each segmented signal image through an extraction subnet. This extraction subnet can employ various structures, including but not limited to ResNet and Vit, and this specification does not impose specific limitations on it. Different image features can reflect key characteristics of different sleep stages, and the extraction subnet can directly extract features of different amplitudes and scales from the segmented signal images to better capture sleep stage information.

[0071] S108: For each segmented signal map, input the image features of the segmented signal map into the first output subnet to obtain the undetermined sleep staging result of the segmented signal map.

[0072] After obtaining the image features of each segmented signal image, this step involves first inputting the image features into the first output subnet, and then obtaining the undetermined sleep stage result output by the first output subnet. Through training the analysis model, the first output subnet can learn and store the feature distribution information of different sleep stages. Thus, based on the image features of each segmented signal image, the sleep stage corresponding to that segmented signal image can be preliminarily determined, which is the undetermined sleep stage result.

[0073] S110: Input the image features of the segmented signal map and the image features of the segmented signal map adjacent to the segmented signal map when dividing the physiological signal map into the context subnet to obtain the context features of the segmented signal map. The context features are used to characterize the correlation between the segmented signal map adjacent to the segmented signal map and the segmented signal map when dividing.

[0074] One point to consider in this method is the limitation of neural network models in terms of classification continuity and consistency. Since neural network models typically classify based only on extracted features, in some cases, the resulting sleep staging results may be discontinuous. Specifically, in this approach, for example, given three temporally continuous segmented signal maps X, Y, and Z, the analysis model might assign segmented signal maps X and Z to sleep stage A, while segmented signal map Y might be assigned to sleep stage B—a situation that would not occur during sleep. Therefore, a solution is needed to address this potential problem.

[0075] In this method, contextual features are used to address this problem. In this step, for each segmented signal map, the image features of that segmented signal map and the image features of the segmented signal map adjacent to it during the segmentation are input into the context subnet to obtain the contextual features of that segmented signal map output by the upper and lower subnets. The segmented signal map adjacent to the segmented signal map during the segmentation can be one that is temporally continuous with the segmented signal map and is located at the preceding or following position in the segmentation of the physiological signal map.

[0076] The contextual features of a segmented signal map are used to characterize the correlation between the segmented signal map and the segmented signal map when it is segmented. By analyzing the correlation between consecutive segmented signal maps, it is possible to effectively determine whether there is a segmentation error in the segmented signal map.

[0077] Regarding the method for determining context features, this specification provides a specific embodiment for reference. Specifically, the network structure of the context subnet can adopt a temporal network. For any segmented signal map, the image features of the previous segmented signal map, the current segmented signal map, and the next segmented signal map can be input into the temporal network in a fixed order. The attention mechanism in the temporal network is used to fuse the image features of the adjacent segmented signal maps and the current segmented signal map in the context subnet to obtain the context features. Thus, the determined context features can characterize the temporal and feature-related association between the current segmented signal map and its adjacent segmented signal maps, and can be used to determine whether the segmentation of the current segmented signal map is incorrect.

[0078] For any segmented signal map, during the segmentation process, adjacent segmented signal maps can include both the preceding and following segmented signal maps. Additionally, for the segmented signal map that is first in the sequence (i.e., the start of the physiological signal map in terms of time), there is no preceding segmented signal map in terms of time; conversely, for the segmented signal map that is last in the sequence (i.e., the end of the physiological signal map in terms of time), there is no following segmented signal map in terms of time.

[0079] However, it's important to consider that the input format for the context subnet is fixed. Each input consists of image features from three segmented signal maps: the segmented signal map itself, the preceding segmented signal map, and the following segmented signal map. Therefore, for the segmented signal maps that are first and last in the input sequence, the missing input needs to be supplemented when determining their context features. In this method, the image features of the segmented signal map itself are used to supplement the missing image feature input when determining the context features of the segmented signal map. Specifically, when determining the context features of a general segmented signal graph, the input of the context subnet is the image features of the previous segmented signal graph, the image features of the current segmented signal graph, and the image features of the next segmented signal graph. When determining the image features of the first segmented signal graph, the input of the context subnet is the image features of the current segmented signal graph, the image features of the current segmented signal graph, and the image features of the next segmented signal graph. When determining the image features of the last segmented signal graph, the input of the context subnet is the image features of the previous segmented signal graph, the image features of the current segmented signal graph, and the image features of the current segmented signal graph.

[0080] S112: Input the context features and the sleep staging results to be determined into the second output subnet to obtain the final sleep staging results of the segmented signal map.

[0081] After obtaining the pending sleep stage results determined in step S108 and the context features determined in step S110, the final sleep stage result of the segmented signal map can be determined in this step through the second output subnet. By analyzing the context features, the relationship and differences between a segmented signal map and other segmented signal maps, such as the preceding and succeeding segmented signal maps that are temporally continuous with it, can be analyzed. Based on this, the pending sleep stage result of the segmented signal map can be corrected to obtain the final sleep stage result.

[0082] The above process describes how to determine the staged results of a segmented signal graph in the analysis model. In practical applications, the analysis model can determine the final sleep staged results for each segmented signal graph in the same way. Finally, by combining the final sleep staged results of each segmented signal graph, the sleep staged results of the entire physiological signal graph can be obtained, which is the sleep staged results of the target user during sleep.

[0083] When using the sleep staging method provided in this manual to stage sleep for a target user, the physiological signal maps of the target user during sleep can be acquired and segmented to obtain segmented signal maps. Each segmented signal map is then input into a pre-trained analysis model. Image features of each segmented signal map are extracted using an extraction subnetwork, and these features are input into a first output subnetwork to obtain the desired sleep staging result. Context features of each segmented signal map are extracted using a context subnetwork, and the desired sleep staging result is adjusted based on these context features using a second output subnetwork to obtain the final sleep staging result. This method can automate sleep staging while ensuring accuracy and reliability, and it solves the problem of inconsistencies in manual sleep staging. Furthermore, it utilizes context dependencies to address potential continuity issues during staging, effectively improving the overall effectiveness of sleep staging.

[0084] Additionally, the analytical model used in the sleep staging method provided in this specification can be pre-trained. Specifically, the process involves acquiring sample physiological signal maps of users during sleep; dividing the sample physiological signal maps into segments based on their image periods to obtain segmented signal maps, and determining the labeled sleep stage result for each segmented signal map; inputting each segmented signal map into the analysis model to be trained; extracting sample image features from each segmented signal map using the extraction subnetwork; inputting the sample image features of each segmented signal map into the first output subnetwork to obtain the undetermined sleep stage result for that segmented signal map; inputting the sample image features of the segmented signal map and the sample image features of the segmented signal maps adjacent to the segmented signal map during the division of the sample physiological signal map into the context subnetwork to obtain the sample context features of the segmented signal map; inputting the sample context features and the undetermined sleep stage result into the second output subnetwork to obtain the final sleep stage result for the segmented signal map; and training the analysis model based on the difference between the final sleep stage result and the labeled sleep stage result.

[0085] When training the analysis model, historical physiological signal maps of completed sleep stages from historical data can be used as training samples, and the determined sleep stage results can be used as annotations to train the analysis model. During training, the difference between the final sleep stage results obtained by the analysis model and the labeled stage results can be used to determine whether the model has completed training. For example, training can be considered complete when the difference reaches its minimum, or when the analysis model converges. This manual does not impose specific restrictions on this.

[0086] Furthermore, since the number of sample segment signal maps at different sleep stages varies considerably during training, different training weights can be assigned to different sample segment signal maps to avoid training failures or poor results due to imbalanced training samples. Specifically, for each sample segment signal map, the training weight is determined based on the labeled sleep stage result of that sample segment signal map; the analysis model is then trained based on the difference between the final sleep stage result of the sample and the labeled sleep stage result, as well as the training weights.

[0087] The training weights of the sample segment signal maps can be determined by the number of sample segment signal maps belonging to different sleep stages. Specifically, a target number of sample segment signal maps whose sleep staging results are labeled as sleep staging results can be determined; the training weights of the sample segment signal maps are determined based on the proportion of the target number in the total number of sample segment signal maps.

[0088] Generally, the training weights of a sample staged signal map are negatively correlated with the number of targets in the sample staged signal maps under the labeled staged results. The more targets a sample segmented signal map belongs to a labeled staged result, the lower the training weights of the sample segmented signal maps under that labeled staged result.

[0089] The above describes one or more methods for implementing sleep staging in this manual. Based on the same idea, this manual also provides corresponding sleep staging devices, such as... Figure 3 As shown.

[0090] Figure 3 A schematic diagram of a sleep staging device provided in this specification includes:

[0091] The acquisition module 200 is used to acquire the physiological signal map of the target user during sleep;

[0092] The segmentation module 202 is used to segment the physiological signal image according to the image period of the physiological signal image to obtain a segmented signal image;

[0093] The input module 204 is used to input the segmented signal graphs into a pre-trained analysis model, the analysis model including at least an extraction subnet, a first output subnet, a context subnet, and a second output subnet;

[0094] Extraction module 206 is used to extract image features of each segmented signal image through the extraction subnet;

[0095] The first output module 208 is used to input the image features of each segmented signal map into the first output subnet to obtain the undetermined sleep staging result of the segmented signal map.

[0096] The association module 210 is used to input the image features of the segmented signal map and the image features of the segmented signal map adjacent to the segmented signal map when dividing the physiological signal map into the context subnet to obtain the context features of the segmented signal map. The context features are used to characterize the association relationship between the segmented signal map adjacent to the segmented signal map and the segmented signal map when dividing.

[0097] The second output module 212 is used to input the context features and the sleep staging results to be determined into the second output subnet to obtain the final sleep staging results of the segmented signal map.

[0098] Optionally, the physiological signal map includes at least one of electroencephalography (EEG) and eye movement mapping.

[0099] Optionally, the device further includes a noise reduction module 214, specifically used to remove signal values ​​of physiological signals contained in each physiological signal map that are interfered with by other physiological signals.

[0100] Optionally, the physiological signal graph is a waveform graph;

[0101] The device also includes a standardization module 216, which is specifically used to adjust the coordinate axis of each physiological signal image so that the pixel amplitude of the signal in the physiological signal image is within a preset range and the size of the physiological signal image is a preset size.

[0102] Optionally, the segmentation module 202 is specifically used to determine the image period of the physiological signal image as the segmentation period; and to segment the physiological signal image according to the segmentation period to obtain a number of segmented signal images with a duration of the segmentation period.

[0103] Optionally, the device further includes a training module 218, specifically used to acquire sample physiological signal maps of sample users during sleep; divide the sample physiological signal maps according to the image period of the sample physiological signal maps to obtain sample segment signal maps, and determine the labeled sleep stage result of each sample segment signal map; input each sample segment signal map into the analysis model to be trained; extract the sample image features of each sample segment signal map through the extraction subnetwork; for each sample segment signal map, input the sample image features of the sample segment signal map into the first output subnetwork to obtain the sample segment signal map. The sample undetermined sleep stage result of the sample image is obtained; the sample image features of the segmented signal image of the sample and the sample image features of the segmented signal images adjacent to the sample segmented signal image when dividing the physiological signal image of the sample are input into the context subnetwork to obtain the sample context features of the sample segmented signal image; the sample context features and the undetermined sleep stage result of the sample are input into the second output subnetwork to obtain the final sleep stage result of the sample segmented signal image; the analysis model is trained based on the difference between the final sleep stage result of the sample and the labeled sleep stage result.

[0104] Optionally, the training module 218 is specifically used to determine the training weights of the sample segmented signal map based on the labeled sleep staging results of the sample segmented signal map; and to train the analysis model based on the difference between the final sleep staging results of the sample and the labeled sleep staging results, as well as the training weights.

[0105] Optionally, the training module 218 is specifically used to determine the target number of sample segment signal maps whose sleep staging results are labeled as the sample segment signal map; and to determine the training weight of the sample segment signal map based on the proportion of the target number in the total number of sample segment signal maps.

[0106] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 This provides a method for sleep staging.

[0107] This instruction manual also provides Figure 4 One of the corresponding Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1The sleep staging method described above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0108] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0109] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0110] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0111] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0112] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0113] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0117] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0118] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0119] It should also be noted that 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 limitation, 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 said element.

[0120] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0121] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0122] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0123] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for sleep staging, characterized in that, include: Obtain physiological signal maps of the target user during sleep; The physiological signal map is divided according to the image period of the physiological signal map to obtain a segmented signal map; Each segmented signal image is input into a pre-trained analysis model, which includes at least an extraction subnet, a first output subnet, a context subnet, and a second output subnet. The image features of each segmented signal image are extracted using the extraction subnet; For each segmented signal diagram, The image features of the segmented signal map are input into the first output subnet to obtain the undetermined sleep staging result of the segmented signal map; The image features of the segmented signal map and the image features of the segmented signal map adjacent to the segmented signal map when dividing the physiological signal map are input into the context subnet to obtain the context features of the segmented signal map. The context features are used to characterize the association relationship between the segmented signal map adjacent to the segmented signal map and the segmented signal map when dividing it. The context features and the undetermined sleep stage results are input into the second output subnet, so that the undetermined sleep stage results are corrected by the second output subnet according to the context features, and the final sleep stage result of the segmented signal map is obtained. as well as The final sleep staging results of each segmented signal map are combined to obtain the sleep staging results of the physiological signal map.

2. The method as described in claim 1, characterized in that, The physiological signal graph includes at least one of electroencephalogram (EEG) and eye movement graph.

3. The method as described in claim 1, characterized in that, Before dividing the physiological signal map according to the image period of the physiological signal map, the method further includes: For each physiological signal map, remove signal values ​​in the physiological signal map that are interfered with by other physiological signals.

4. The method as described in claim 1, characterized in that, The physiological signal diagram is a waveform diagram; Before dividing the physiological signal map according to the image period of the physiological signal map, the method further includes: For each physiological signal image, the coordinate axes of the physiological signal image are adjusted so that the pixel amplitude of the signal in the physiological signal image is within a preset range, and the size of the physiological signal image is set to a preset size.

5. The method as described in claim 1, characterized in that, The physiological signal map is divided according to the image period to obtain a segmented signal map, specifically including: The image period of the physiological signal map is determined as the division period; The physiological signal map is divided according to the division period to obtain several segmented signal maps with a duration equal to the division period.

6. The method as described in claim 1, characterized in that, Pre-training the analysis model specifically includes: Obtain physiological signal images of sample users during sleep; The physiological signal map of the sample is divided according to the image period of the sample physiological signal map to obtain the sample segment signal map, and the labeled sleep stage result of each sample segment signal map is determined. Input the segmented signal graphs of each sample into the analysis model to be trained; The sample image features of each sample segment signal map are extracted through the extraction sub-network; For each sample segmented signal graph, The sample image features of the segmented signal map are input into the first output subnet to obtain the undetermined sleep stage result of the segmented signal map. The sample image features of the sample segment signal map and the sample image features of the sample segment signal map adjacent to the sample segment signal map when dividing the sample physiological signal map are input into the context subnet to obtain the sample context features of the sample segment signal map. The sample context features and the sample undetermined sleep stage results are input into the second output subnet to obtain the final sleep stage result of the sample segmented signal map; The analysis model is trained based on the difference between the final sleep stage results of the sample segmented signal maps and the labeled sleep stage results.

7. The method as described in claim 6, characterized in that, The analysis model is trained based on the difference between the final sleep stage results of each sample segment signal map and the labeled sleep stage results, specifically including: For each sample segment signal map, the training weights of the sample segment signal map are determined based on the labeled sleep stage results of the sample segment signal map. The analysis model is trained based on the difference between the final sleep stage results of each sample segment signal map and the labeled sleep stage results, as well as the training weights.

8. The method as described in claim 7, characterized in that, Based on the labeled sleep stage results of the segmented signal map of this sample, the training weights of the segmented signal map of this sample are determined, specifically including: Determine the target number of sample segment signal maps in which the sleep staging result is marked as the sleep staging result in the sample segment signal map; The training weight of a sample segment signal map is determined based on the proportion of the target quantity in the total number of each sample segment signal map.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 8.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Multi-head attention mechanism sleep staging method based on time-frequency double-flow enhancement

    CN115399735A

  • KR20220074069A