A personalized sleep staging optimization method and apparatus
By constructing a personalized state transition probability matrix and a directed graph, and combining user multimodal physiological information and behavioral operations, the sleep staging results are optimized, solving the problem of insufficient reflection of personalized and dynamically changing sleep characteristics in existing technologies, and achieving the accuracy and rationality of sleep staging results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG QISHENG DATA SERVICE CO LTD
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-17
AI Technical Summary
Existing sleep staging optimization methods based on non-contact signals lack personalized prior modeling, cannot accurately reflect individualized and dynamically changing sleep characteristics, and fail to effectively utilize user behavior events for correction, resulting in unreasonable sleep staging results.
By constructing a personalized state transition probability matrix and directed graph based on users' multimodal physiological information and behavioral operations, the sleep staging results are optimized to ensure accuracy and rationality during periods of significant user activity.
It achieves accurate sleep staging during periods of significant user activity, accurately reflects individualized and dynamically changing sleep characteristics, and optimizes the rationality and smoothness of sleep staging results.
Smart Images

Figure CN121337284B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification belong to the field of sleep monitoring technology, and specifically relate to a personalized sleep staging optimization method and device. Background Technology
[0002] With the development of smart beds and health monitoring technology, non-contact sensors (such as piezoelectric films and fiber optic sensors) are now widely used in the field of sleep monitoring. These sensors can continuously monitor physiological information such as heart rate, respiratory rate, and body movement without disturbing the user's sleep, thus achieving non-invasive sleep assessment.
[0003] Existing sleep staging optimization methods based on non-contact signals often directly use the state transition probability matrix based on the population to optimize unreasonable sleep state transitions. This has problems such as ignoring the differences in sleep structure and state transition patterns among different individuals, and it cannot effectively and reasonably correct the sleep staging results, which makes it difficult for the sleep staging results to accurately reflect individual sleep characteristics. Summary of the Invention
[0004] The embodiments of this disclosure propose a personalized sleep staging optimization method and apparatus.
[0005] In a first aspect of this disclosure, a personalized sleep staging optimization method is provided. The method includes determining an initial sleep staging result based on the user's multimodal physiological information. The method further includes revising the initial sleep staging result based on the user's behavioral actions to obtain a revised sleep staging result. The method also includes constructing a state transition frequency matrix based on the sleep staging dataset, and determining a personalized state transition probability matrix based on the state transition frequency matrix and the revised sleep staging result. Furthermore, the method includes constructing a directed graph based on the personalized state transition probability matrix, and optimizing the revised sleep staging result based on the directed graph to obtain an optimized sleep staging result.
[0006] In a second aspect of this disclosure, a personalized sleep staging optimization device is provided. The device includes a result generation module configured to determine an initial sleep staging result based on a user's multimodal physiological information. The device also includes a correction processing module configured to correct the initial sleep staging result based on the user's behavioral operations, obtaining a corrected sleep staging result. The device further includes a matrix construction module configured to construct a state transition frequency matrix based on a sleep staging dataset, and to determine a personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging result. Furthermore, the device includes a result optimization module configured to construct a directed graph based on the personalized state transition probability matrix, and to optimize the corrected sleep staging result based on the directed graph, obtaining an optimized sleep staging result.
[0007] In a third aspect of this disclosure, a computer program product is provided, comprising a computer program that is executed by a processor to implement the method according to the first aspect.
[0008] In a fourth aspect of this disclosure, a machine-readable storage medium is provided. The machine-readable storage medium stores machine-executable instructions, which are executed by a processor to implement the method provided according to a first aspect of this disclosure.
[0009] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0011] Figure 1 A schematic diagram of an example environment in which some embodiments of this disclosure may be implemented is shown;
[0012] Figure 2 A flowchart illustrating a personalized sleep staging optimization method according to some embodiments of this disclosure is shown;
[0013] Figure 3 A schematic diagram of a personalized state transition probability matrix is shown, representing some embodiments of this disclosure.
[0014] Figure 4 A block diagram of a personalized sleep staging optimization device according to some embodiments of the present disclosure is shown;
[0015] Figure 5 A block diagram of an electronic device that can implement several embodiments of the present disclosure is shown. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0017] The terms “comprising” and “having”, and any variations thereof, in this specification, claims, and the foregoing drawings are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. Depending on the context, the word “if” as it applies herein may be interpreted as “when”, “when”, “in response to determination”, or “in response to detection”.
[0018] As mentioned above, existing sleep staging optimization methods based on non-contact signals lack personalized prior modeling. They often directly use the state transition probability matrix based on the population to optimize unreasonable sleep state transitions. This approach ignores the differences in sleep structure and state transition patterns among different individuals and fails to consider that the sleep structure of the same individual at different times will dynamically evolve with changes in individual development, lifestyle, or health status. Consequently, the sleep staging results cannot accurately reflect individualized and dynamically changing sleep characteristics.
[0019] Furthermore, the user behavior events detected by smart beds, such as getting out of bed, getting up at night, and operating electric functions, can effectively reflect the user's sleep state. However, existing sleep staging optimization algorithms fail to utilize and integrate these user behavior events, thus failing to effectively correct the sleep staging results. In addition, existing sleep staging optimization algorithms lack the ability to reason about reasonable transitions, which may result in unreasonable state transitions that contradict physiological phenomena. This makes it difficult to make reasonable reasoning-based corrections to transitions with abnormal jumps, further leading to sleep staging results that fail to accurately reflect individualized and dynamically changing sleep characteristics.
[0020] To address this, embodiments of this disclosure propose a personalized sleep staging optimization method. The method includes determining an initial sleep staging result based on the user's multimodal physiological information. The method further includes revising the initial sleep staging result based on the user's behavioral actions to obtain a revised sleep staging result. The method also includes constructing a state transition frequency matrix based on the sleep staging dataset, and determining a personalized state transition probability matrix based on the state transition frequency matrix and the revised sleep staging result. Furthermore, the method includes constructing a directed graph based on the personalized state transition probability matrix, and optimizing the revised sleep staging result based on the directed graph to obtain an optimized sleep staging result.
[0021] In this way, the initial sleep staging results can be corrected based on user behavior to ensure the accuracy of sleep staging during periods of significant user activity. In addition, a personalized state transition probability matrix that accurately reflects individual sleep structure characteristics can be determined based on the state transition frequency matrix and the corrected sleep staging results. This matrix can then be combined with the constructed directed graph to optimize the corrected sleep staging results, thereby effectively ensuring the rationality and smoothness of the optimized sleep staging results and accurately reflecting individualized and dynamically changing sleep characteristics.
[0022] Figure 1 Schematic diagrams are shown illustrating example environments in which some embodiments of this disclosure can be implemented. For example... Figure 1 As shown, the example environment 100 may include a smart bed 101, which is used to continuously collect multimodal physiological information of a user during sleep using built-in non-contact sensors (such as piezoelectric film sensors and fiber optic sensors). Here, the multimodal physiological information may include at least the user's heart rate, respiratory rate, body movement, and snoring information. It is understood that, in addition to collecting the user's multimodal information, the smart bed 101 can also record the user's behavioral operations throughout the sleep stage. These behavioral operations may include the user's actions of getting out of bed, getting up at night, or selecting a motorized function. The user's actions of getting out of bed may be recorded with corresponding start and end times, the user's actions of getting up at night may be recorded with corresponding start and end times, and the user's selected motorized function operations may be recorded with corresponding function type and start time (and may also include end time).
[0023] Example environment 100 may further include processing terminal 102, which establishes a communication connection with smart bed 101 to acquire multimodal physiological information of the user collected by smart bed 101, and generates corresponding initial sleep staging results based on the user's multimodal physiological information. Here, processing terminal 102 may perform preprocessing and feature extraction processing on the user's multimodal physiological information in sequence, and input the feature extraction results into a deep learning model to obtain the initial sleep staging results through model prediction. It can be understood that the initial sleep staging results may include multiple sleep periods arranged in chronological order and the sleep state corresponding to each sleep period. The sleep state may be a waking state, a deep sleep state, a light sleep state, or a rapid eye movement sleep state (i.e., REM sleep), and any two adjacent sleep periods are two consecutive sleep periods.
[0024] Furthermore, the processing terminal 102 can also acquire the user's behavioral operations recorded by the smart bed 101, and correct the initial sleep staging results based on these operations to obtain corrected sleep staging results. This ensures the accuracy of sleep staging during periods of significant user activity. It is understood that the user's behavioral operations correspond to the user being awake. The initial sleep staging results can be corrected to reflect the awake state during the corresponding time period. Moreover, state transition constraints can be applied to ensure that the transition between each adjacent sleep state in the corrected sleep staging results conforms to physiological laws.
[0025] Furthermore, the processing terminal 102 can construct a state transition frequency matrix based on the sleep staging dataset, and determine a personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging results. Here, the sleep staging dataset includes historical sleep staging results from multiple users. A Markov model is used to statistically process this sleep staging dataset to obtain the state transition frequency matrix. This matrix includes multiple sleep states and the number of state transitions corresponding to each sleep state, such as the number of transitions from light sleep to deep sleep and from light sleep to light sleep, but is not limited to these. It is understood that by utilizing the conjugate prior properties of the Dirichlet distribution and a Bayesian update method to process the state transition frequency matrix and the corrected sleep staging results, a personalized state transition probability matrix that accurately reflects the individual's sleep structure characteristics is obtained. This personalized state transition probability matrix includes multiple sleep states and the state transition probabilities corresponding to each sleep state.
[0026] Furthermore, the processing terminal 102 can construct a directed graph based on a personalized state transition probability matrix, and optimize the corrected sleep staging results based on the directed graph to obtain optimized sleep staging results. Here, the weights between every two nodes (i.e., sleep states) in the directed graph can be used to determine whether there are sleep states with abnormal state transition jumps in the corrected sleep staging results, and transition state insertion processing is performed on all sleep states with abnormal state transition jumps based on the node paths of the directed graph, thereby effectively ensuring the rationality and smoothness of the optimized sleep staging results. It is understandable that after obtaining the optimized sleep staging results, the processing terminal 102 can also display the optimized sleep staging results to the user through a third-party application used for sleep monitoring, providing accurate data support for users to improve their sleep in a more targeted manner.
[0027] In this way, the initial sleep staging results can be corrected based on user behavior to ensure the accuracy of sleep staging during periods of significant user activity. In addition, a personalized state transition probability matrix that accurately reflects individual sleep structure characteristics can be determined based on the state transition frequency matrix and the corrected sleep staging results. This matrix can then be combined with the constructed directed graph to optimize the corrected sleep staging results, thereby effectively ensuring the rationality and smoothness of the optimized sleep staging results and accurately reflecting individualized and dynamically changing sleep characteristics.
[0028] It should be understood that the architecture and functionality in example environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Embodiments of this disclosure can also be applied to other environments with different architectures and / or functionalities.
[0029] Figure 2 A flowchart illustrating a personalized sleep staging optimization method according to some embodiments of this disclosure is shown. Method 200 may, for example, be derived from... Figure 1 The processing terminal in the example environment shown executes. For example... Figure 2 As shown in box 202, method 200 can determine the initial sleep staging result based on the user's multimodal physiological information. Here, the processing terminal can... Figure 1 In the example environment shown, a smart bed establishes a communication connection to obtain multimodal physiological information of the user continuously collected by the smart bed. This multimodal physiological information may include the user's heart rate, respiratory rate, body movement, and snoring information. Then, the multimodal physiological information is preprocessed and feature extracted sequentially, and the feature extraction results are input into a deep learning model to obtain the initial sleep staging results through model prediction.
[0030] In one example, at least two types of physiological information from multimodal physiological information can be preprocessed and feature extracted separately, and then input into a deep learning model corresponding to each sleep state to predict the sleep period that corresponds to the respective sleep state. For example, heart rate information from multimodal physiological information can be sequentially processed by sliding window averaging, standardization, and feature extraction; body movement information can be sequentially processed by standardization and feature extraction; and snoring information can be sequentially processed by standardization and feature extraction. All feature extraction results are then input into a deep learning model used to predict wakefulness to predict all sleep periods corresponding to wakefulness. Here, when training a deep learning model for predicting wakefulness, the training set may include multiple sets of physiological information feature samples labeled with wakefulness period tags and sleep period tags (physiological information types include the aforementioned heart rate information, body movement information, and snoring information). The loss function may be the cross-entropy loss function used to calculate the wakefulness period corresponding to each set of physiological information feature samples and the corresponding wakefulness period tag. The corresponding wakefulness period is predicted based on each set of input physiological information feature samples. Then, the total loss is calculated by the loss function based on the wakefulness period corresponding to each set of physiological information feature samples and the corresponding wakefulness period tag. The optimizer is then used to update the weights of the deep learning model based on the total loss to minimize the total loss until the maximum number of training rounds is reached.
[0031] Furthermore, the following processing steps can be performed sequentially on the multimodal physiological information: heart rate information, respiratory rate information, body movement information, snoring information, heart rate information, respiratory rate information, body movement information, snoring information, heart rate information, respiratory rate information, and snoring information. All feature extraction results are then input into a deep learning model for predicting REM sleep states to predict all sleep periods corresponding to REM sleep states. The training process of the deep learning model for predicting REM sleep states can be found above and will not be elaborated upon here.
[0032] Furthermore, the heart rate information from the multimodal physiological information can be processed sequentially using sliding window averaging, standardization, and feature extraction; the respiratory rate information can be processed sequentially using sliding window averaging, standardization, and feature extraction; and the snoring information can be processed sequentially using sliding window averaging, standardization, and feature extraction. All feature extraction results are then input into a deep learning model used to predict deep sleep states, thereby predicting all sleep periods corresponding to deep sleep states. The training process of the deep learning model used to predict deep sleep states can be found above and will not be elaborated upon here.
[0033] It is understandable that after determining all sleep periods corresponding to the waking state, all sleep periods corresponding to the REM sleep state, and all sleep periods corresponding to the deep sleep state, the sleep states of other sleep periods within the entire sleep stage can be set to the light sleep state and integrated in chronological order to obtain the initial sleep stage results, and any two adjacent sleep periods must be two consecutive sleep periods in time.
[0034] In box 204, method 200 can correct the initial sleep staging result based on the user's behavioral operations to obtain a corrected sleep staging result. Here, the processing terminal can obtain the user's behavioral operations throughout the sleep stage through the aforementioned smart bed. The user's behavioral operations may include the user's actions of getting out of bed, getting up at night, or selecting electric function operations, and the initial sleep staging result can be corrected based on the user's behavioral operations to obtain a corrected sleep staging result, thereby ensuring the accuracy of sleep staging during periods of significant user activity.
[0035] In some implementations, when the processing terminal corrects the initial sleep staging result based on the user's behavior to obtain a corrected sleep staging result, it can determine the awake state based on the user's behavior. The awake state has a corresponding awake time and awake duration. In one example, if the user's behavior is getting out of bed, the awake time (i.e., the start time) and awake duration (i.e., the difference between the end time and the start time) can be determined based on the start time and end time of the get-out-of-bed operation. Similarly, if the user's behavior is getting up at night, the awake time (i.e., the start time) and awake duration (i.e., the difference between the end time and the start time) can be determined based on the start time and end time of the get-up-at-night operation. Furthermore, if the user's behavior is a selected electric function operation, the awake time (i.e., the start time) and awake duration (i.e., the default awake duration corresponding to the operation time of the function type, such as a default awake duration of 5 minutes for a shorter operation time massage function A, and a default awake duration of 15 minutes for a longer operation time massage function B) can be determined based on the function type and start time of the electric function operation.
[0036] Subsequently, the processing terminal can overwrite the initial sleep staging results based on the awake state and determine whether there are any anomalous state transitions in the overwritten initial sleep staging results. In one example, the awake period can be determined based on the awake time and duration corresponding to the awake state. Then, based on this awake period, all sleep states in the initial sleep staging results within the same period are overwritten (that is, all sleep states are updated to awake states). By applying state transition constraints, it can be determined whether there are any anomalous state transitions between two sleep states adjacent to each other within the same period and the awake state.
[0037] Understandably, state transition constraints can include the ability to transition from a waking state to a light sleep state, the ability to transition from a waking state to a REM sleep state, the inability to transition from a waking state to a deep sleep state (because it does not conform to physiological laws), and the inability to transition from a REM sleep state to a waking state (because it does not conform to physiological laws). For example, when two sleep states adjacent to the aforementioned waking period are both REM sleep states, meaning there is a transition from REM sleep state to waking state, it can be determined that there is an abnormal state transition jump.
[0038] Subsequently, in response to the determination that there is an abnormal state transition in the initial sleep staging result after overlay processing, the processing terminal can correct the initial sleep staging result after overlay processing to obtain a corrected sleep staging result. Here, a transitional state that conforms to physiological laws can be inserted between the two sleep states with abnormal state transitions. For example, when the two sleep states with abnormal state transitions are REM sleep and wakefulness, light sleep can be inserted as a transitional state between REM sleep and wakefulness (that is, REM sleep transitions to light sleep, and then from light sleep to wakefulness), thereby ensuring that the corrected sleep staging result conforms to normal physiological laws.
[0039] In some implementations, when the processing terminal corrects the initial sleep staging results after overlay processing to obtain corrected sleep staging results, it can determine a state transition group with abnormal state transition jumps based on the initial sleep staging results after overlay processing. The state transition group includes two consecutive sleep states. Here, based on the awake state determined by the user's actions, two sleep states adjacent to the awake period corresponding to that awake state can be identified in the initial sleep staging results after overlay processing. When it is determined that there is an abnormal state transition jump between at least one sleep state and an awake state, that sleep state and the awake state are considered as a state transition group.
[0040] Subsequently, the processing terminal can determine a first transition state based on the state transition group. The first transition state has a corresponding transition time and transition duration. In one example, when the two sleep states in the state transition group are REM sleep and wakefulness (transition from REM sleep to wakefulness), light sleep can be used as the state type of the first transition state (because the transition from REM sleep to light sleep and from light sleep to wakefulness both conform to normal physiological laws). The start time of wakefulness is used as the end time of the first transition state, and the start time (i.e., the transition time) of the first transition state is determined based on a preset duration (i.e., the transition duration) and the end time. It is understood that the transition duration can also be one-third of the maximum duration between the duration corresponding to REM sleep and the duration corresponding to wakefulness, or any value between the preset duration and one-third of the maximum duration, and is not limited to this.
[0041] Subsequently, the processing terminal can correct the initial sleep staging result after overlay processing based on the first transition state to obtain a corrected sleep staging result. In one example, based on the transition duration and transition time corresponding to the first transition state, the sleep state corresponding to the time following the transition duration in the initial sleep staging result after overlay processing can be corrected; that is, the sleep state corresponding to the time following the transition duration is updated to the state type of the first transition state. It should be noted that the sleep duration in the corrected sleep staging result remains consistent with the initial sleep staging result; it only involves correcting the sleep state corresponding to a portion of the duration to a sleep state that conforms to normal physiological patterns.
[0042] In box 206, method 200 can construct a state transition frequency matrix based on the sleep staging dataset, and determine a personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging results. Here, the sleep staging dataset can be the Sleep-EDF dataset well-known in the art, which includes historical sleep staging results for multiple users. The sleep staging dataset is statistically processed using a Markov model to obtain the state transition frequency matrix. In one example, each historical sleep staging result in the sleep staging dataset can be converted into a sleep staging sequence (e.g., converting each sleep state into a corresponding character), that is, treating each sleep staging sequence as a Markov chain. Then, the total number of transitions from sleep state i to sleep state j in all sleep staging sequences is counted, and a state transition frequency matrix is constructed based on all sleep states and the total number of transitions from all sleep state i to sleep state j. For example, in the state transition frequency matrix, all sleep states distributed by rows can be deep sleep, light sleep, REM sleep, and wakefulness, respectively. All sleep states distributed by columns can also be deep sleep, light sleep, REM sleep, and wakefulness, respectively. The value in the first row and first column of this state transition frequency matrix can be understood as the total number of times the sleep state transitions to deep sleep, the value in the first row and second column can be understood as the total number of times the sleep state transitions to light sleep, the value in the first row and third column can be understood as the total number of times the sleep state transitions to REM sleep, and the value in the first row and fourth column can be understood as the total number of times the sleep state transitions to wakefulness.
[0043] Understandably, by utilizing the conjugate prior properties of the Dirichlet distribution and the Bayesian update method to process the state transition frequency matrix and the corrected sleep staging results, a personalized state transition probability matrix that can accurately reflect the individual's sleep structure characteristics can be obtained. This personalized state transition probability matrix includes multiple sleep states and the state transition probabilities corresponding to each sleep state.
[0044] In some implementations, when determining the personalized state transition probability matrix based on the state transition count matrix and the corrected sleep staging results, the processing terminal can determine the Dirichlet prior parameter matrix based on the state transition count matrix and preset prior parameters. Here, the state transition count matrix and preset prior parameters can be substituted into the Dirichlet prior parameter calculation formula shown below to obtain the corresponding Dirichlet prior parameter matrix:
[0045]
[0046] In the above formula, Let be the Dirichlet prior parameter matrix. This is the state transition number matrix (rows and columns can be represented as i*j). The control prior strength (a preset constant greater than 0) is a preset prior parameter. The smoothing parameter is a preset prior parameter (e.g., 1e-3).
[0047] The processing terminal can then convert the corrected sleep staging results into a corrected transition count matrix, and determine the updated state transition count matrix based on the corrected transition count matrix and the Dirichlet prior parameter matrix. Here, the corrected sleep staging results can be converted into a sleep staging sequence (e.g., converting each sleep state into a corresponding character), then the total number of transitions from sleep state i to sleep state j in the sleep staging sequence is counted, and the corrected transition count matrix is constructed based on all sleep states and the total number of transitions from all sleep state i to sleep state j. For example, in the modified transition number matrix, all sleep states distributed by rows can be deep sleep, light sleep, REM sleep, and wakefulness, respectively. All sleep states distributed by columns can be deep sleep, light sleep, REM sleep, and wakefulness, respectively. The value in the first row and first column of this modified transition number matrix can be understood as the total number of transitions from deep sleep to deep sleep, the value in the first row and second column can be understood as the total number of transitions from deep sleep to light sleep, the value in the first row and third column can be understood as the total number of transitions from deep sleep to REM sleep, and the value in the first row and fourth column can be understood as the total number of transitions from deep sleep to wakefulness.
[0048] In one example, when determining the updated state transition matrix based on the modified transition matrix and the Dirichlet prior parameter matrix, it can be determined whether the user has a sleep staging result from the previous night. Here, the sleep staging dataset mentioned above is used to query whether the user has a historical sleep staging result. If no result is found, it indicates that the user does not have a sleep staging result from the previous night (i.e., the modified transition matrix corresponds to the user's first night's transition matrix); if a result is found, it indicates that the user has a sleep staging result from the previous night, and the sleep staging result most recent to the current time can be identified as the previous night's sleep staging result.
[0049] Next, in response to determining that the user does not have a sleep stage result from the previous night, the processing terminal determines the updated state transition matrix as the sum of the modified transition number matrix and the Dirichlet prior parameter matrix. Here, utilizing the conjugate property of the Dirichlet distribution and the multinomial distribution, the modified transition number matrix and the Dirichlet prior parameter matrix are substituted into the first updated state transition calculation formula shown below to obtain the updated state transition number matrix. This achieves an adaptive transfer from group patterns to individual characteristics, and enables the updated state transition number matrix to gradually reflect the individual's true sleep state.
[0050]
[0051] In the above formula, To update the state transition count matrix, Let be the Dirichlet prior parameter matrix. To correct the number of transitions matrix (i.e., the number of transitions for the user on the first night).
[0052] It is understandable that the updated state transition matrix determined here based on the modified transition matrix and the Dirichlet prior parameter matrix can be used as the user's historical state transition matrix for the first night, in order to gradually determine the updated state transition matrix (i.e., the historical state transition matrix) for each subsequent night.
[0053] Alternatively, the processing terminal can also, in response to determining that the user has a sleep staged result from the previous night, determine an updated state transition number matrix based on the historical state transition matrix, the corrected transition number matrix, and a preset decay parameter corresponding to the previous night's sleep staged result. Here, the historical state transition matrix, the corrected transition number matrix, and the preset decay parameter corresponding to the previous night's sleep staged result are substituted into the second updated state transition calculation formula shown below to obtain the updated state transition number matrix, thereby enabling dynamic response to changes in the user's sleep habits and achieving online adaptive personalized updates:
[0054]
[0055] In the above formula, To update the state transition count matrix, The preset attenuation parameter (the value range is set between 0 and 1). This is the historical state transition matrix corresponding to the sleep staging results of the previous night. To correct the transition number matrix.
[0056] It should be noted that when the corrected transition number matrix corresponds to the user's transition number matrix for the second night, the historical state transition matrix corresponding to the sleep stage result of the previous night is the user's historical state transition matrix for the first night, which can be determined by referring to the first updated state transition calculation formula mentioned above; when the corrected transition number matrix corresponds to the user's transition number matrix for the nth night (n is a positive integer greater than 2), the historical state transition matrix corresponding to the sleep stage result of the previous night is the user's historical state transition matrix for the (n-1)th night, which can be determined step by step from the user's historical state transition matrix by referring to the first updated state transition calculation formula and the second updated state transition calculation formula mentioned above, and will not be elaborated further here.
[0057] The processing terminal can then normalize the updated state transition count matrix to obtain a personalized state transition probability matrix. In one example, all values corresponding to each row in the updated state transition count matrix can be summed, and the ratio between the value corresponding to each row and each column and the summation result of the corresponding row can be determined as the normalized result of the corresponding row and column. Based on the normalized results of all rows and all columns, the personalized state transition probability matrix is obtained.
[0058] For example, taking the values [851, 121, 6, 3] corresponding to the first row of the updated state transition count matrix as an example, we can determine that the values [0.866, 0.123, 0.006, 0.003] corresponding to the first row of the personalized state transition probability matrix; taking the values [181, 621, 151, 51] corresponding to the second row of the updated state transition count matrix as an example, we can determine that the values [0.180, 0.619, 0.150, 0.051] corresponding to the second row of the personalized state transition probability matrix. Taking the values of [4, 301, 401, 101] in the third row of the updated state transition number matrix as an example, the values of [0.005, 0.373, 0.498, 0.125] in the third row of the personalized state transition probability matrix can be determined. Taking the values of [11, 351, 6, 201] in the fourth row of the updated state transition number matrix as an example, the values of [0.019, 0.617, 0.011, 0.353] in the fourth row of the personalized state transition probability matrix can be determined.
[0059] Please see Figure 3 The diagram shown illustrates a personalized state transition probability matrix according to some embodiments of the present disclosure, such as... Figure 3As shown, the personalized state transition probability matrix 300 includes deep sleep, light sleep, REM sleep, and wakefulness. The probability of transitioning from deep sleep to light sleep is 0.172, from deep sleep to REM sleep is 0.0012, and from deep sleep to wakefulness is 0.0091. Similarly, the probability of transitioning from light sleep to deep sleep is 0.0312, from light sleep to light sleep is 0.9227, from light sleep to REM sleep is 0.0156, and from light sleep to wakefulness is 0.9227. The probability of being awake is 0.0305; the probability of transitioning from REM sleep to deep sleep is 0.0000, the probability of transitioning from REM sleep to light sleep is 0.0389, the probability of transitioning from REM sleep to light sleep is 0.9447, the probability of transitioning from REM sleep to awake is 0.0163; the probability of transitioning from awake to deep sleep is 0.0000, the probability of transitioning from awake to light sleep is 0.0145, the probability of transitioning from awake to REM sleep is 0.0003, and the probability of transitioning from awake to awake is 0.9852.
[0060] In box 208, method 200 can construct a directed graph based on the personalized state transition probability matrix, and optimize the corrected sleep staging results based on the directed graph to obtain optimized sleep staging results. Here, the probability of each sleep state transitioning to all other sleep states can be determined based on the sleep states corresponding to each row of sleep states in the personalized state transition probability matrix, and the probabilities corresponding to each row and column. A directed graph is then constructed based on the probabilities of all sleep states transitioning to all other sleep states. It is understood that the directed graph includes at least two node paths, each node path has at least two nodes (i.e., two different sleep states) and a directed edge between each pair of adjacent nodes, and the weight of the directed edge can be calculated by substituting the transition probabilities between the corresponding two adjacent nodes into the weight calculation expression shown below:
[0061]
[0062] In the above formula, Let be the weight of the directed edge between any two adjacent nodes. This represents the transition probability between two adjacent nodes.
[0063] Understandably, after obtaining the optimized sleep staging results, the processing terminal can also display these results to the user through a third-party application used for sleep monitoring, providing accurate data support for users to improve their sleep in a more targeted manner.
[0064] In some implementations, when the processing terminal optimizes the corrected sleep staging results based on a directed graph to obtain optimized sleep staging results, it can convert the corrected sleep staging results into at least two consecutive state segment sequences, each state segment sequence having a corresponding state type, start time, and end time. Here, the corrected sleep staging results can be converted into a sleep staging sequence (e.g., converting each sleep state into a corresponding character), and then the sleep staging sequence can be divided into multiple time-continuous state segment sequences, each of which can be represented as follows: ,in, The sleep state character corresponding to the i-th state segment sequence. Let be the starting time of the i-th state segment sequence. t is the termination time of the i-th state segment sequence.
[0065] For example, taking the character corresponding to light sleep as 1, the character corresponding to REM sleep as 2, and the character corresponding to wakefulness as 3, and the sleep stage sequence during the period from 6:00 to 6:20 as [2, 2, 2, 2, 2, 1, 1, 1, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2] as an example, multiple consecutive state segment sequences can be represented as (2, 6:00, 6:04), (1, 6:05, 6:07), (3, 6:08, 6:12), and (2, 6:13, 6:20).
[0066] Subsequently, the processing terminal can determine, based on the directed graph, whether the transition probability corresponding to each pair of adjacent state segments is less than a preset probability threshold. Here, the transition probability corresponding to each pair of adjacent state segments can be understood as the transition probability between two adjacent nodes in the directed graph for the corresponding two sleep states. When the transition probability is less than the preset probability threshold, it indicates that the state transition between the two sleep states is an unreasonable state jump; when the transition probability is not less than the preset probability threshold, it indicates that the state transition between the two sleep states is a reasonable state jump, and the preset probability threshold can be set to 0.01.
[0067] Subsequently, in response to determining that any transition probability is less than a preset probability threshold, the processing terminal determines a second transition state based on the two state segment sequences corresponding to the transition probabilities and the directed graph. The second transition state has a corresponding transition time and transition duration. In one example, after determining that any transition probability is less than the preset probability threshold, the shortest path containing the two state types corresponding to the transition probabilities can be determined based on the directed graph, and the transition state type can be determined based on the shortest path. Here, all node paths containing the two state types corresponding to the transition probabilities can be queried in the directed graph. Then, the target paths with the corresponding two state types as the path start and path end (each target path has at least one intermediate node) are extracted from each node path. Based on the sum of weights between all adjacent nodes in each target path, the target path corresponding to the smallest weight sum is taken as the shortest path, and the sleep state of the intermediate node (usually one) in the shortest path excluding the path start and path end is taken as the transition state type.
[0068] Next, based on the two state segment sequences corresponding to the transition probabilities, the borrowing source time period can be determined, and based on the borrowing source time period and preset borrowing time parameters, the transition time and transition duration can be determined. Here, based on the two state segment sequences corresponding to the transition probabilities, the state duration of each state segment sequence is determined (such as the difference between the termination time and the revelation time), and it is determined whether the state duration of each state segment sequence meets the minimum borrowing requirement (i.e., whether it exceeds the preset minimum duration). It can be understood that when the state duration of any state segment sequence meets the minimum borrowing requirement, the time period from the start time to the end time of that state segment sequence can be determined as the borrowing source time period; when the state durations of both state segment sequences meet the minimum borrowing requirement (or neither meets the minimum borrowing requirement), the time period from the start time to the end time of the state segment sequence corresponding to the longest state duration can be determined as the borrowing source time period, so as to better maintain the continuous stability of the sleep state.
[0069] The borrowing duration is determined based on the borrowing period, and the borrowing duration and the preset borrowing time parameter are substituted into the transition duration calculation formula shown below to obtain the transition duration:
[0070]
[0071] In the above formula, For the duration of the transition, The minimum borrowing time is the preset borrowing time parameter (e.g., it can be set to 2 minutes). In order to borrow the source duration, This is the time borrowing coefficient in the preset borrowing time parameters (e.g., it can be set to 0.3). The maximum borrowing time in the preset borrowing time parameters (e.g., it can be set to 5 minutes).
[0072] It should be noted that when the borrowed source time period belongs to the state segment sequence representing the transition start point among the two state segment sequences corresponding to the transition probability, the termination time of the state segment sequence can be used as the transition termination time, and the transition start time can be determined based on the transition termination time and the transition duration. The aforementioned transition state type, transition time (including the transition termination time and the transition start time), and transition duration are determined as the second transition state. When the borrowed source time period belongs to the state segment sequence representing the transition end point among the two state segment sequences corresponding to the transition probability, the start time of the state segment sequence can be used as the transition start time, and the transition termination time can be determined based on the transition start time and the transition duration. The aforementioned transition state type, transition time (including the transition termination time and the transition start time), and transition duration are determined as the second transition state.
[0073] Subsequently, the processing terminal can optimize the corrected sleep staging results based on the second transition state to obtain optimized sleep staging results. In one example, based on the transition duration and transition time corresponding to the second transition state, the sleep state in the corrected sleep staging results from the transition time to the time after the transition duration can be optimized, that is, the sleep state from the transition time to the time after the transition duration can be updated to the state type of the second transition state.
[0074] Figure 4 A block diagram of a personalized sleep staging optimization device according to some embodiments of the present disclosure is shown. The various embodiments in this specification are described in a progressive manner, and similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to the description of the method embodiments. Figure 4As shown, the personalized sleep staging optimization device 400 may include a result generation module 402, configured to determine an initial sleep staging result based on the user's multimodal physiological information. The personalized sleep staging optimization device 400 also includes a correction processing module 404, configured to correct the initial sleep staging result based on the user's behavioral operations, obtaining a corrected sleep staging result. The personalized sleep staging optimization device 400 further includes a matrix construction module 406, configured to construct a state transition frequency matrix based on the sleep staging dataset, and determine a personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging result. Furthermore, the personalized sleep staging optimization device 400 also includes a result optimization module 408, configured to construct a directed graph based on the personalized state transition probability matrix, and optimize the corrected sleep staging result based on the directed graph, obtaining an optimized sleep staging result.
[0075] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0076] Figure 5 Block diagrams of electronic devices that can implement various embodiments of the present disclosure are shown. For example... Figure 5As shown, the electronic device 500 includes a processor 501, which can perform various appropriate actions and processes based on computer program instructions loaded into random access memory (RAM) 503 according to computer program instructions stored in read-only memory (ROM) 502. The RAM 503 may also store various programs and data required for the operation of the electronic device 500. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0077] The various processes and procedures described above, such as method 200, can be executed by processor 501. For example, in some embodiments, method 200 may be implemented as a software program tangibly contained in a machine-readable medium. In some embodiments, part or all of the software program may be loaded into and / or installed onto electronic device 500 via ROM 502. When the software program is loaded into RAM 503 and executed by processor 501, one or more actions of method 200 described above may be performed.
[0078] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload programmable logic devices (CPLDs), and so on.
[0079] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0080] This disclosure can be a method, apparatus, system, and / or program product. The program product may include a machine-readable storage medium on which machine-readable program instructions for performing various aspects of this disclosure are loaded. The machine-readable program instructions described herein can be downloaded from the machine-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the machine-readable program instructions from the network and forwards them to the machine-readable storage medium in the respective computing / processing device.
[0081] Machine program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. Machine-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as a standalone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the machine-readable program instructions to implement various aspects of this disclosure.
[0082] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. Furthermore, although operations are depicted in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0083] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A personalized sleep staging optimization method, characterized in that, include: The initial sleep staging results are determined based on the user's multimodal physiological information; The initial sleep staging result is corrected based on the user's behavior to obtain a corrected sleep staging result. A state transition frequency matrix is constructed based on the sleep staging dataset, and a personalized state transition probability matrix is determined based on the state transition frequency matrix and the corrected sleep staging results. as well as A directed graph is constructed based on the personalized state transition probability matrix, and the corrected sleep staging results are optimized based on the directed graph to obtain optimized sleep staging results. The step of determining the personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging results includes: Based on the state transition number matrix and the preset prior parameters, the Dirichlet prior parameter matrix is determined; The corrected sleep staging results are converted into a corrected transition number matrix, and based on the corrected transition number matrix and the Dirichlet prior parameter matrix, an updated state transition number matrix is determined; and The updated state transition number matrix is normalized to obtain a personalized state transition probability matrix; The step of determining the updated state transition matrix based on the modified transition number matrix and the Dirichlet prior parameter matrix includes: Determine if the user has a sleep segmentation result from the previous night; In response to determining that the user does not have the previous night's sleep stage result, the sum of the modified transition number matrix and the Dirichlet prior parameter matrix is determined as the updated state transition number matrix; or In response to determining that the user has the previous night's sleep stage result, the updated state transition number matrix is determined based on the historical state transition matrix corresponding to the previous night's sleep stage result, the corrected transition number matrix, and the preset decay parameter; The optimization process based on the directed graph to obtain the optimized sleep staging result includes: The corrected sleep staging results are converted into at least two consecutive state segment sequences, each state segment sequence having a corresponding state type, start time, and end time; Based on the directed graph, determine whether the transition probability corresponding to each pair of adjacent state segment sequences is less than a preset probability threshold. In response to determining that any of the transition probabilities is less than the preset probability threshold, a second transition state is determined based on the two state segment sequences corresponding to the transition probabilities and the directed graph. The second transition state has a corresponding transition time and transition duration. The corrected sleep staging results are optimized based on the second transition state to obtain optimized sleep staging results.
2. The method according to claim 1, characterized in that, The step of correcting the initial sleep staging result based on the user's behavior to obtain a corrected sleep staging result includes: The user's conscious state is determined based on the user's behavior, and the conscious state has a corresponding conscious moment and conscious duration. The initial sleep staging results are overwritten based on the waking state, and it is determined whether there are any abnormal state transitions in the overwritten initial sleep staging results; and In response to the determination that there is an abnormal state transition jump in the initial sleep staging result after the overlay processing, the initial sleep staging result after the overlay processing is corrected to obtain a corrected sleep staging result.
3. The method according to claim 2, characterized in that, The step of correcting the initial sleep staging results after overlay processing to obtain corrected sleep staging results includes: Based on the initial sleep staging results after overlay processing, state transition groups with abnormal state transition jumps are identified, and the state transition groups include two consecutive sleep states; A first transition state is determined based on the state transition group, and the first transition state has a corresponding transition time and transition duration; and Based on the first transition state, the initial sleep staging result after the overlay process is corrected to obtain the corrected sleep staging result.
4. The method according to claim 1, characterized in that, The determination of the second transition state based on the two state segment sequences corresponding to the transition probabilities and the directed graph includes: Based on the directed graph, determine the shortest path containing two state types corresponding to the transition probabilities, and determine the transition state type based on the shortest path; Based on the two state segment sequences corresponding to the transition probabilities, the borrowing source time period is determined, and based on the borrowing source time period and preset borrowing time parameters, the transition time and transition duration are determined; and The transition state type, the transition time, and the transition duration are determined as the second transition state.
5. A personalized sleep staging optimization device, characterized in that, include: The results generation module is configured to determine the initial sleep staging results based on the user's multimodal physiological information; The correction processing module is configured to correct the initial sleep staging result based on the user's behavior to obtain a corrected sleep staging result. The matrix construction module is configured to construct a state transition frequency matrix based on the sleep staging dataset, and determine a personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging results. as well as The result optimization module is configured to construct a directed graph based on the personalized state transition probability matrix, and to optimize the corrected sleep staging result based on the directed graph to obtain the optimized sleep staging result. The step of determining the personalized state transition probability matrix based on the state transition frequency matrix and the corrected sleep staging results includes: Based on the state transition number matrix and the preset prior parameters, the Dirichlet prior parameter matrix is determined; The corrected sleep staging results are converted into a corrected transition number matrix, and based on the corrected transition number matrix and the Dirichlet prior parameter matrix, an updated state transition number matrix is determined; and The updated state transition number matrix is normalized to obtain a personalized state transition probability matrix; The step of determining the updated state transition matrix based on the modified transition number matrix and the Dirichlet prior parameter matrix includes: Determine if the user has a sleep segmentation result from the previous night; In response to determining that the user does not have the previous night's sleep stage result, the sum of the modified transition number matrix and the Dirichlet prior parameter matrix is determined as the updated state transition number matrix; or In response to determining that the user has the previous night's sleep stage result, the updated state transition number matrix is determined based on the historical state transition matrix corresponding to the previous night's sleep stage result, the corrected transition number matrix, and the preset decay parameter; The optimization process based on the directed graph to obtain the optimized sleep staging result includes: The corrected sleep staging results are converted into at least two consecutive state segment sequences, each state segment sequence having a corresponding state type, start time, and end time; Based on the directed graph, determine whether the transition probability corresponding to each pair of adjacent state segment sequences is less than a preset probability threshold. In response to determining that any of the transition probabilities is less than the preset probability threshold, a second transition state is determined based on the two state segment sequences corresponding to the transition probabilities and the directed graph. The second transition state has a corresponding transition time and transition duration. The corrected sleep staging results are optimized based on the second transition state to obtain optimized sleep staging results.
6. A computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the method as claimed in any one of claims 1-4.
7. An electronic device, characterized in that, include: One or more processors, and A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Adaptive sleep staging method and system based on key brain network
CN115844326A
Quaternary sleep state monitoring method based on non-contact sensor
CN120203504A