Personalized dynamic sleep staging method and system
Through the personalized dynamic sleep staging method, the sleep staging algorithm is adjusted based on user characteristics and feedback information, and the problem of inaccurate sleep staging data in the existing technology is solved, and accurate reflection and accurate analysis of the user's real sleep state is achieved.
Patent Information
- Application Number
- CN202510757762.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
The existing sleep staging data cannot adapt to the individual characteristics of different user groups and the particularity of sleep scenarios, resulting in the inaccurate sleep staging data of some user groups and the inaccurate sleep state and cannot accurately reflect the user's real sleep state, which in turn affects the accuracy of sleep analysis and health suggestions.
By determining user categories based on user characteristic information, selecting suitable basic sleep staging algorithms, and combining current and historical sleep data, dynamically adjusting the optimal sleep staging algorithms to generate personalized sleep staging data, and using feedback information optimization algorithms to improve accuracy.
Real-time accuracy of sleep staging data for different user groups is achieved, and accurate sleep analysis and health advice is supported.
Smart Images

Figure CN120267244A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification belong to the technical field of sleep monitoring. In particular, it relates to a personalized dynamic sleep staging method and system. Background Art
[0002] In sleep monitoring technology, accurate sleep staging is crucial for evaluating sleep quality and health status. Currently, existing sleep staging data is usually obtained by using sensors to acquire the user's physiological signs and processed through fixed algorithms.
[0003] However, due to the individual characteristics of different user groups and the particularity of the sleep scenario, the above-mentioned way of generating sleep staging is likely to lead to inaccurate sleep staging data for some user groups, and it is also easy to ignore the user's true sleep state for the generated sleep staging data, thus unable to provide accurate sleep analysis and health advice. Summary of the Invention
[0004] To solve the above-mentioned technical problems that are likely to lead to inaccurate sleep staging data for some user groups, and it is also easy to ignore the user's true sleep state for the generated sleep staging data, thus unable to provide accurate sleep analysis and health advice, etc., the embodiments of this specification disclose a personalized dynamic sleep staging method and system. According to the user's characteristic information, a target sleep staging algorithm that conforms to the user's personalization is determined from the branch algorithm library, and combined with the currently collected sleep data and the target sleep staging algorithm, sleep staging data adapted to different user groups is generated; secondly, the user's feedback information, current sleep data, historical sleep data, target sleep staging algorithm, and the remaining basic sleep staging algorithms in the branch algorithm library can also be combined to determine the optimal sleep staging algorithm, and the target sleep staging algorithm is updated to the optimal sleep staging algorithm, so that the target sleep staging algorithm for the user can take into account both the user's sleep data and the true sleep state feedback by the user, not only ensuring the real-time accuracy of the generated sleep staging data, but also providing accurate technical support for subsequent sleep analysis and health advice.
[0005] In the first aspect of the embodiments of the present disclosure, a personalized dynamic sleep staging method is provided. The method includes determining a user category of a user based on the user's characteristic information, where the user category has a corresponding basic sleep staging algorithm, and the user category includes one or more of a normal category, a sleep disorder category, a respiratory disorder category, a severe snoring category, a heart disease category, and an irregular body movement category. Using the basic sleep staging algorithm corresponding to the user's user category in the branch algorithm library as the user's target sleep staging algorithm, and generating sleep staging data of the user based on the user's current sleep data and the user's target sleep staging algorithm, where the branch algorithm library includes basic sleep staging algorithms corresponding to each user category. In addition, the method further includes obtaining feedback information of the user, and determining an optimal sleep staging algorithm based on the feedback information of the user, the current sleep data, and the historical sleep data, where the optimal sleep staging algorithm is trained by a sleep data feature set generated by the user's historical sleep data and current sleep data, weight parameters of each sleep data feature type in the sleep data feature set, and an error function constructed based on the feedback information, and the optimal sleep staging algorithm determines whether it meets the sleep prediction requirement according to at least one evaluation index; and updating the target sleep staging algorithm to the optimal sleep staging algorithm.
[0006] In the second aspect of the embodiments of the present disclosure, a personalized dynamic sleep staging system is provided. A category recognition module configured to determine a user category of a user based on the user's characteristic information, where the user category has a corresponding basic sleep staging algorithm, and the user category includes one or more of a normal category, a sleep disorder category, a respiratory disorder category, a severe snoring category, a heart disease category, and an irregular body movement category. A data generation module configured to use the basic sleep staging algorithm corresponding to the user's user category in the branch algorithm library as the user's target sleep staging algorithm, and generate sleep staging data of the user based on the user's current sleep data and the user's target sleep staging algorithm, where the branch algorithm library includes basic sleep staging algorithms corresponding to each user category. In addition, the system further includes a data feedback module configured to obtain feedback information of the user, and determine an optimal sleep staging algorithm based on the feedback information of the user, the current sleep data, and the historical sleep data, where the optimal sleep staging algorithm is trained by a sleep data feature set generated by the user's historical sleep data and current sleep data, weight parameters of each sleep data feature type in the sleep data feature set, and an error function constructed based on the feedback information, and the optimal sleep staging algorithm determines whether it meets the sleep prediction requirement according to at least one evaluation index; and an algorithm update module configured to update the target sleep staging algorithm to the optimal sleep staging algorithm.
[0007] In a third aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program which, when executed by a processor, implements the personalized dynamic sleep staging method provided according to the first aspect.
[0008] In a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, including one or more processors, and a memory associated with the one or more processors, where the memory is used to store program instructions, and the program instructions, when read and executed by the one or more processors, execute the personalized dynamic sleep staging method provided according to the first aspect.
[0009] It should be understood that the content described in the summary of the invention section is not intended to limit the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Combined with the accompanying drawings and referring to the following detailed description, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. In the drawings, the same or similar reference numerals denote the same or similar elements, where: Figure 1 A schematic diagram of an example environment in which multiple embodiments of the present disclosure can be implemented is shown; Figure 2 A flowchart of the personalized dynamic sleep staging method according to some embodiments of the present disclosure is shown; Figure 3 A schematic diagram of a branch algorithm library according to some embodiments of the present disclosure is shown; Figure 4 A schematic diagram of sleep staging data obtained by the existing sleep staging generation method according to some embodiments of the present disclosure for users with sleep disorder categories is shown; Figure 5 A schematic diagram of sleep staging data obtained by the personalized dynamic sleep staging method according to some embodiments of the present disclosure for users with sleep disorder categories is shown; Figure 6 A schematic diagram of basic attributes according to some embodiments of the present disclosure is shown; Figure 7 A schematic diagram of an interface for obtaining feedback information of a user according to some embodiments of the present disclosure is shown; Figure 8 Another schematic diagram of a branch algorithm library according to some embodiments of the present disclosure is shown; Figure 9 A schematic block diagram of a personalized dynamic sleep staging system according to some embodiments of the present disclosure is shown; Figure 10 A schematic block diagram of an electronic device according to some embodiments of the present disclosure is shown. Detailed implementation manners
[0011] To make the objectives, technical solutions and advantages of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this specification in conjunction with the embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part rather than all of the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the scope of protection of this application.
[0012] The terms "including" and "having" and any variations thereof in this specification, the claims and the above drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices. Depending on the context, the word "if" as used herein may be interpreted as "when", "while", "in response to determining" or "in response to detecting".
[0013] As described above, existing sleep staging data is usually obtained by using sensors to acquire the physical sign signals of users and processed by a fixed sleep staging algorithm. However, when using this fixed sleep staging algorithm to serve a large number of users, the sleep staging data of some users will be seriously inaccurate. For example, for some users with diseases, due to frequent body movements occurring intermittently during sleep due to the diseases, such body movement behaviors have nothing to do with the sleep state, but will cause large deviations in the generated sleep staging data; for another example, for some users with severe snoring, the heartbeat waveform will be damaged during snoring during sleep, resulting in unavailable detected heart rate data, and coupled with the easy occurrence of snoring and waking up, the generated sleep staging data has large deviations; for another example, for some users with implanted cardiac pacemakers, the heart rate remains at a constant value during sleep, and such a special sleep scenario also causes large deviations in the sleep staging data generated based on the detected heart rate data. And so on, using a fixed sleep staging algorithm will result in poor generalization ability for sleep staging recognition of these user groups.
[0014] Based on this, embodiments of the present disclosure propose a personalized dynamic sleep staging method. In the embodiments of the present disclosure, a user category of a user is determined based on the user's characteristic information, and the user category has a corresponding basic sleep staging algorithm. The user category includes one or more of a normal category, a sleep disorder category, a breathing disorder category, a severe snoring category, a heart disease category, and an irregular body movement category. The basic sleep staging algorithm corresponding to the user's user category in the branch algorithm library is used as the user's target sleep staging algorithm, and sleep staging data of the user is generated based on the user's current sleep data and the user's target sleep staging algorithm. The branch algorithm library includes basic sleep staging algorithms corresponding to each user category. In addition, the method further includes obtaining the user's feedback information, and determining an optimal sleep staging algorithm based on the user's feedback information, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained by a sleep data feature set generated from the user's historical sleep data and current sleep data, weight parameters of each sleep data feature type in the sleep data feature set, and an error function constructed based on the feedback information. The optimal sleep staging algorithm determines whether it meets the sleep prediction requirements according to at least one evaluation index; and updating the target sleep staging algorithm to the optimal sleep staging algorithm.
[0015] In this way, it is possible to determine the user category to which the user belongs in combination with the user's characteristic information, such as but not limited to any one of a normal category, a sleep disorder category, a breathing disorder category, a severe snoring category, a heart disease category, and an irregular body movement category, so as to screen out a target sleep staging algorithm that conforms to the user category in the branch algorithm library; secondly, the optimal sleep staging algorithm can also be determined in combination with the user's feedback information, current sleep data, historical sleep data, target sleep staging algorithm, and the remaining basic sleep staging algorithms in the branch algorithm library, and the target sleep staging algorithm is updated to the optimal sleep staging algorithm, so that the target sleep staging algorithm for the user can take into account the user's sleep data while also considering the true sleep state feedback by the user, not only ensuring the real-time accuracy of the generated sleep staging data, but also providing accurate technical support for subsequent sleep analysis and health advice.
[0016] Please refer to Figure 1 , Figure 1 which shows an example environment 100 in which multiple embodiments of the present disclosure can be implemented. As Figure 1 shown, the environment 100 includes an electronic device 101, a signal acquisition device 102, and a server 103. It can be understood that Figure 1 the numbers of the electronic device 101, the signal acquisition device 102, and the server 103 shown in The electronic device 101 may be installed with a third-party application for sleep monitoring. Through this third-party application, the basic attributes of the user can be obtained. For example, when the user first enters the main interface of the third-party application, the user can be prompted to fill in the corresponding basic attributes in combination with the user registration interface or the questionnaire interface. Here, the basic attributes may include, but are not limited to, one or more of the user's name, gender, date of birth, sleep disorder situation, snoring situation, whether a cardiac pacemaker is installed, symptoms of palpitation and chest tightness, and the number of nocturia, so as to obtain the user's basic physical condition.
[0017] After obtaining the basic attributes of the user, the electronic device 101 can also display the sleep stage data to the user through the third-party application, so that the user can understand his / her own sleep condition. Here, the sleep stage data may be historical sleep stage data or current sleep stage data. The historical sleep stage data can be understood as the sleep stage data of the user at a historical time point (for example, the sleep stage data three days ago), and the current sleep stage data can be understood as the sleep stage data of the user at the current time point (for example, the sleep stage data of the current day). And the sleep stage data may include, but are not limited to, multiple sleep stages (such as the wakefulness time period, the rapid eye movement time period, the core sleep time period, and the deep sleep time period) shown by a bar chart and the duration of each sleep stage. Of course, it may also include the sleep start time point and the wake-up time point, etc., and is not limited thereto.
[0018] In addition to displaying the sleep stage data to the user, the electronic device 101 can also obtain the feedback information input by the user. For example, after the user views the current sleep stage data, the user can correct the sleep start time point and the wake-up time point through the third-party application interface. At this time, the feedback information input by the user may include the correction data corresponding to the current sleep data. Of course, the feedback information input by the user may also include the correction data corresponding to the historical sleep stage data, and is not limited thereto. Here, the feedback information input by the user may include, but are not limited to, one or more of the corrected sleep start time point, the corrected wake-up time point, and the corrected sleep stage duration.
[0019] The electronic device involved in the embodiments of the present disclosure may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, or a personal digital assistant (PDA), etc.
[0020] The signal acquisition device 102 can be used to obtain the physical sign signals of the user during sleep. The physical sign signals (which can also be understood as human body vibration signals) can be the physical sign signals of the user at historical time points and at the current time point. Here, the signal acquisition device 102 can, but is not limited to, include a high-precision non-contact sensor arranged under the mattress to collect the physical sign signals of the user when the user is sleeping on the mattress. Of course, the signal acquisition device 102 can also include a contact sensor worn on the user's body part, and is not limited to this.
[0021] After obtaining the physical sign signals of the user during sleep, the signal acquisition device 102 can also process the physical sign signals to generate corresponding sleep data. For example, the signal acquisition device 102 can decompose the physical sign signals at the current time point into multiple independent channel signals such as heart rate, respiration, snoring, and body movement. Then, noise reduction, filtering, and feature extraction processing are performed on each independent channel signal, and various feature indicators calculated from the basic feature indicators such as heart rate, respiration rate, snoring times, and body movement times are used as the current sleep data. Here, the processing method of the physical sign signals can be the technical means disclosed in the art. The signal acquisition device 102 can also use this processing method to process the physical sign signals at historical time points to obtain corresponding historical sleep data, and is not limited to this.
[0022] For example, taking the basic feature indicators such as heart rate, respiration rate, snoring times, and body movement times obtained from the user's daily physical sign signals within the recent 60 days as an example, the user's historical sleep data can include the calculated snoring times in the recent 30 days, the recent change rate of snoring times (which can be understood as the change rate between the snoring times in the most recent 7 days and the snoring times in the previous 7 days), the long-term change rate of snoring times (which can be understood as the change rate between the snoring times in the most recent 30 days and the snoring times in the previous 30 days), the daily heart rate fluctuation value (which can be understood as the standard deviation of the daily heart rate mean within 60 days), the recent change rate of heart rate (which can be understood as the linear regression slope of the heart rate in the most recent 7 days), the long-term change rate of heart rate (which can be understood as the linear regression slope of the heart rate in the most recent 30 days), the average daily sleep duration, and the sleep time regularity (which can be understood as the standard deviation of all sleep times), etc. The calculation methods of each of the above-mentioned feature indicators are the technical means disclosed in the art. Of course, it can also, but is not limited to, include feature indicators such as the respiration rate in the recent 30 days, the recent change rate of respiration rate, the long-term change rate of respiration rate, and heart rate variability, and is not limited to this.
[0023] It should be noted that the user's current sleep data can refer to all the feature indicators mentioned in the above historical sleep data. For example, it can include one or more of the current snoring times, the recent change rate of snoring times, the long-term change rate of snoring times, the current heart rate fluctuation value, the recent change rate of heart rate, the long-term change rate of heart rate, the current sleep duration, and the sleep time regularity, and is also not limited to this.
[0024] The server 103 can be, but is not limited to, a hardware server, a virtual server, a cloud server, etc. It can receive the basic attributes of users uploaded by a third-party application for sleep monitoring on the electronic device 101, and can store and process all the received basic attributes of users by constructing a user information database.
[0025] The server 103 can also receive the sleep data of users uploaded by the signal acquisition device 102. Of course, it can also receive the physical sign signals of users during sleep uploaded by the signal acquisition device 102 to process the physical sign signals to obtain corresponding sleep data, and can combine the basic attributes, sleep data of the same user, and the branch algorithm library to determine the sleep staging data of the user. For example, the user category of the user can be determined according to the basic attributes of the user and the historical sleep data of the user, and the target sleep staging algorithm that meets the personalized needs of the user category can be determined from the branch algorithm library. Furthermore, the current sleep data of the user and the target sleep staging algorithm can be combined to generate more accurate sleep staging data.
[0026] Here, the branch algorithm library can include one or more user categories and corresponding basic sleep staging algorithms. For example, when the user categories include normal category, sleep disorder category, breathing disorder category, severe snoring category, heart disease category, and irregular body movement category, the corresponding basic sleep staging algorithms can include normal sleep branch algorithm, sleep disorder type sleep branch algorithm, breathing disorder type sleep branch algorithm, severe snoring type sleep branch algorithm, heart disease type sleep branch algorithm, and irregular body movement type sleep branch algorithm.
[0027] It is understandable that each basic sleep staging algorithm can be a Hidden Markov Model well-known in the art. For example, taking the normal sleep branch algorithm as an example, when training the Hidden Markov Model, the sleep data samples collected from normal category users (such as but not limited to including heart rate, respiratory rate, body movement count, snoring intensity, and heart rate variability (HRV), etc.), and the sleep stage labels corresponding to the sleep data samples can be used as the training set. This Hidden Markov Model can generate initial probability parameters, transition matrix parameters, and observation distribution parameters based on the input sleep data samples collected from normal category users (such as but not limited to including heart rate, respiratory rate, body movement count, snoring intensity, and heart rate variability (HRV), etc.). Then, the Baum-Welch iterative algorithm is used to perform iterative calculations on the initial probability parameters, transition matrix parameters, observation distribution parameters, the input sleep data samples, and the corresponding sleep stage labels (such as calculating the forward probability, backward probability, and intermediate variable probability in sequence), and update the initial probability parameters, transition matrix parameters, and observation distribution parameters according to the calculation results of each time until the maximum number of iterations is reached. Here, medical rules (such as restricting impossible transitions) and regularization of the transition matrix can be considered to achieve state transition constraints on the Hidden Markov Model. Then, after the iterative calculation of the initial probability parameters, transition matrix parameters, and observation distribution parameters is completed, the Hidden Markov Model can use the Viterbi algorithm to perform dynamic programming processing based on the iterative completed initial probability parameters, transition matrix parameters, observation distribution parameters, and sleep data samples to obtain the sleep onset time point and the duration of the sleep stage.
[0028] For another example, taking the sleep branch algorithm for sleep disorders as an example, the Hidden Markov Model well-known in the art can also be used. The sleep data samples collected from users with sleep disorders (such as but not limited to including heart rate, respiratory rate, body movement count, snoring intensity, and heart rate variability (HRV), etc.), the sleep stage labels corresponding to the sleep data samples, and the respiratory event labels can be used as the training set. The training process can refer to the training process of the above normal sleep branch algorithm. However, when using the Baum-Welch iterative algorithm to perform iterative calculations on the initial probability parameters, transition matrix parameters, observation distribution parameters, the input sleep data samples, and the corresponding sleep stage labels, the respiratory event feature weight needs to be introduced, and when using the Viterbi algorithm for dynamic programming processing, it needs to be dynamically adjusted in combination with the respiratory events.
[0029] Regarding the sleep branch algorithms for severe snoring, heart diseases, and irregular body movements, the Hidden Markov Model well-known in the art can also be used. The training set and the training process can refer to the training process of the above sleep branch algorithm for sleep disorders, and will not be elaborated here.
[0030] It should be noted that the normal sleep branch algorithm, sleep disorder sleep branch algorithm, respiratory disorder sleep branch algorithm, severe snoring sleep branch algorithm, heart disease sleep branch algorithm, and irregular body movement sleep branch algorithm included in the branch algorithm library of some embodiments of the present disclosure can also be understood as conventional technical means in the art and are not the focus of protection of the present disclosure.
[0031] After generating the sleep staging data of the user, the server 103 can feedback the sleep staging data to the electronic device 101 of the corresponding user, so that the third-party application for monitoring sleep on the electronic device 101 can display the sleep staging data to the user. Of course, after the electronic device 101 receives the feedback information of the user, the server 103 can also perform dynamic adjustment processing on the above-mentioned target sleep staging algorithm. For example, other basic sleep staging algorithms can be determined from the branch algorithm library to update the target sleep staging algorithm to other basic sleep staging algorithms; or a personalized sleep staging algorithm of the user can also be constructed to update the target sleep staging algorithm to a personalized sleep staging algorithm, and the like is not limited thereto.
[0032] It should be noted that the example environment in which multiple embodiments of the present disclosure can be implemented may also only include the electronic device 101 and the signal acquisition device 102, so as to determine the sleep staging data of the user through the electronic device 101, which will not be elaborated here.
[0033] Please refer to Figure 2 , Figure 2 which shows a flowchart of the personalized dynamic sleep staging method 200 of some embodiments of the present disclosure. The method 200 can be executed, for example, by the above-mentioned server, or by the above-mentioned electronic device, or by the above-mentioned server and the electronic device in cooperation with each other.
[0034] As Figure 2 shown, the personalized dynamic sleep staging method 200 can at least include the following steps: Step 202, determining the user category of the user based on the feature information of the user.
[0035] Here, the user's characteristic information can be the user's basic attributes, or the user's basic attributes and the user's historical sleep data. For example, when the user's characteristic information includes the user's basic attributes, it indicates that the current user is a newly registered user. Furthermore, the preset user category can be used as the user category of the current user. The preset user category can be, but is not limited to, the normal category. After generating the historical sleep data of the current user, the user category can be dynamically adjusted by combining the historical sleep data and the basic attributes. Another example is that when the user's characteristic information includes the user's basic attributes and the user's historical sleep data, it indicates that the current user is a registered user. Furthermore, the user category to which the user belongs can be selected from the normal category, sleep disorder category, breathing disorder category, severe snoring category, heart disease category, and irregular body movement category by combining the user's basic attributes and the user's historical sleep data.
[0036] Step 204: Use the basic sleep staging algorithm corresponding to the user's user category in the branch algorithm library as the user's target sleep staging algorithm, and generate the sleep staging data of the user based on the user's current sleep data and the user's target sleep staging algorithm.
[0037] After determining the user's user category, to ensure the personalized needs of different user groups, the basic sleep staging algorithm corresponding to the user category can be determined in the branch algorithm library, and the basic sleep staging algorithm can be used as the user's target sleep staging algorithm. For example, when the user's user category is the sleep disorder category, the sleep disorder sleep branch algorithm corresponding to the sleep disorder category can be used as the user's target sleep staging algorithm in the branch algorithm library. Here, the basic sleep staging algorithms in the branch algorithm library can include one or more of the normal sleep branch algorithm, sleep disorder sleep branch algorithm, breathing disorder sleep branch algorithm, severe snoring sleep branch algorithm, heart disease sleep branch algorithm, and irregular body movement sleep branch algorithm. Each basic sleep staging algorithm can be trained by the historical sleep data samples and sleep staging data labels of the corresponding user category.
[0038] Please refer to Figure 3 , Figure 3 which shows a schematic diagram of the branch algorithm library of some embodiments of the present disclosure. As Figure 3As shown, a branch algorithm library 300 of the present disclosure may include five user categories, namely, a normal category, a sleep disorder category, a respiratory disorder category, a severe snoring category, a heart disease category, and an irregular body movement category, as well as a normal sleep branch algorithm corresponding to the normal category, a sleep disorder type sleep branch algorithm corresponding to the sleep disorder category, a respiratory disorder type sleep branch algorithm corresponding to the respiratory disorder category, a severe snoring type sleep branch algorithm corresponding to the severe snoring category, a heart disease type sleep branch algorithm corresponding to the heart disease category, and an irregular body movement type sleep branch algorithm corresponding to the irregular body movement category. Here, a branch algorithm library 300 of the present disclosure is not limited to the above-mentioned user categories and the types of basic sleep staging algorithms.
[0039] After determining the target sleep staging algorithm of the user, the current sleep data of the user can be input into the target sleep staging algorithm to obtain the current sleep staging data of the user, and the sleep staging data can be more intuitively and understandably presented to the user in the form of a bar chart or the like by using visualization technology. Here, the current sleep staging data of the user may include one or more of multiple sleep stages (such as, but not limited to, wake-up time period, rapid eye movement time period, core sleep time period, and deep sleep time period) shown by the bar chart, the duration of each sleep stage, the bedtime point, and the wake-up time point, and is not limited thereto.
[0040] Step 206: Obtain the feedback information of the user, and determine the optimal sleep staging algorithm based on the feedback information of the user, the current sleep data, and the historical sleep data.
[0041] Step 208: Update the target sleep staging algorithm to the optimal sleep staging algorithm.
[0042] After generating the user's current sleep stage data, it is also possible to obtain the feedback information input by the user for this sleep stage data. This feedback information can be obtained through a third-party sleep monitoring application on the electronic device, the user's voice communication content, or the after-sales service platform. It can include the correction data corresponding to the current sleep stage data and the correction data corresponding to the historical sleep stage data, such as but not limited to one or more of the corrected bedtime, corrected wake-up time, and corrected sleep stage duration. And based on the feedback information, the current sleep data, and the historical sleep data, an optimal sleep staging algorithm that takes into account both the user's sleep data and the user's true sleep state is determined. Here, the optimal sleep staging algorithm can be understood as a personalized sleep staging algorithm generated for the user. This personalized sleep staging algorithm can, but is not limited to, train a classification model (or a regression model) by combining the user's current sleep data and historical sleep data, and can construct an error function based on the prediction results of the classification model and the feedback information, and optimize the classification model through this error function (for example, using the gradient descent method to make the error function converge to the minimum value), and can update the target sleep staging algorithm to this optimal sleep staging algorithm in real time after determining that the optimal sleep staging algorithm meets the sleep prediction requirements according to at least one of the error evaluation index, adaptability evaluation index, and improvement degree evaluation index, so that after obtaining the user's sleep data next time, sleep stage data that combines the user's recent true sleep state can be accurately generated.
[0043] Of course, the optimal sleep staging algorithm of the present disclosure can also be the user's current target sleep staging algorithm, or can be any other basic sleep staging algorithm in the branch algorithm library, and is not limited thereto.
[0044] In this way, on the one hand, it is possible to generate sleep stage data adapted to different user groups, and on the other hand, it is also possible to determine the optimal sleep staging algorithm by combining the user's feedback information, current sleep data, and historical sleep data, and update the target sleep staging algorithm to the optimal sleep staging algorithm, so that the target sleep staging algorithm for the user can take into account the user's sleep data while also considering the true sleep state feedback by the user, not only ensuring the real-time accuracy of the generated sleep stage data, but also providing accurate technical support for subsequent sleep analysis and health advice.
[0045] Please refer to Figure 4 and Figure 5 , Figure 4 which shows a schematic diagram of the sleep stage data obtained by the existing sleep staging generation method for users with sleep disorder categories in some embodiments of the present disclosure, Figure 5 which shows a schematic diagram of the sleep stage data obtained by the personalized dynamic sleep staging method for users with sleep disorder categories in some embodiments of the present disclosure. As Figure 4As shown, taking the sleep stage data obtained by the existing sleep staging generation method for users with sleep disorder categories, which includes light sleep stage, deep sleep stage, and wakefulness stage as an example, the sleep stage data 400 obtained by the existing sleep staging generation method can reflect that users with sleep disorder categories are mainly divided into the light sleep stage and the deep sleep stage during 00:00 - 05:00, and are only in the wakefulness stage around 05:00 before waking up. However, users with sleep disorder categories are prone to frequent awakenings or difficulty falling asleep during sleep. Therefore, the existing sleep staging generation method cannot provide sleep stage data that is more in line with the true sleep situation of users with sleep disorder categories. For example Figure 5 As shown, taking the sleep stage data obtained by the personalized dynamic sleep staging method of the present disclosure for users with sleep disorder categories, which includes light sleep stage, deep sleep stage, and wakefulness stage as an example, the sleep stage data 500 obtained by the personalized dynamic sleep staging method can reflect that users with sleep disorder categories are mainly divided into the light sleep stage, the deep sleep stage, and the wakefulness stage during 00:00 - 05:00. This wakefulness stage is mainly concentrated around 01:00, and continues to be in the wakefulness stage around 05:00 before waking up. Therefore, the personalized dynamic sleep staging method can provide sleep stage data that is more in line with the true sleep situation of users with sleep disorder categories.
[0046] In some embodiments of the present disclosure, the user's characteristic information includes the user's historical sleep data and basic attributes; and step 202 may include: Determining at least two historical sleep metrics of the user based on the user's historical sleep data; Determining the user's user characteristic metric based on all the historical sleep metrics and the basic attributes; and Inputting the user's user characteristic metric into the classification model to obtain the user's user category.
[0047] When the user's characteristic information includes the user's historical sleep data and basic attributes, in order to ensure the recognition accuracy of different users, at least two historical sleep metrics can be extracted from the user's historical sleep data. Each historical sleep metric can be, but is not limited to, any one of the characteristic metrics such as the number of snoring times in the past 30 days, the recent change rate of the number of snoring times, the long-term change rate of the number of snoring times, the daily heart rate fluctuation value, the recent change rate of the heart rate, the long-term change rate of the heart rate, the average daily sleep duration, and the sleep time pattern. Then, all the historical sleep metrics and the basic attributes can be subjected to transformation processing (such as normalization processing) to obtain all the historical sleep metrics and the basic attributes that conform to the data format. The concatenation result between the processed all historical sleep metrics and the processed basic attributes is used as the user's user characteristic metric in matrix form.
[0048] Here, the types of metrics included in the basic attributes can refer to Figure 6Schematic diagram of the basic attributes 600 of some embodiments of the present disclosure shown. As Figure 6 shown, the basic attributes 600 may include the corresponding index values input by the user according to each index description. For example, it may include that the gender index is male, the birth date index is 1970-01, the sleep disorder index is 3, the snoring condition is 1, the index of whether a cardiac pacemaker is installed is 0, the symptoms of palpitation and chest tightness are 0, and the night waking condition index is 1. Here, when converting the basic attributes, if the gender index input by the user is male, the gender index can be converted to the value 1 (or 0) to obtain the gender index that conforms to the data format, and it is not limited to this.
[0049] Furthermore, after obtaining the user's user characteristic index, the user's user characteristic index can be input into the classification model to obtain a user category with higher accuracy through model prediction. Here, the classification model can be but is not limited to the decision tree machine learning model disclosed in the art, and is trained by multiple groups of user characteristic samples and the classification labels of each group of user characteristic samples. Each group of user characteristic samples may include user characteristic index samples that have been converted and presented in matrix form, and the classification labels may include one or more of the normal category, sleep disorder category, respiratory disorder category, severe snoring category, heart disease category, and irregular body movement category.
[0050] In some embodiments of the present disclosure, the basic sleep staging algorithm has corresponding clustering centers; and step 204 further includes: Determining the current data characteristics corresponding to the user's current sleep data; Determining the historical clustering center corresponding to the user's historical sleep data, and determining whether the user's state has changed according to the current data characteristics and the historical clustering center; and In response to determining that the user's state has changed, based on the current data characteristics and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm corresponding to the clustering center closest to the current data characteristics in the branch algorithm library is determined as the user's target sleep staging algorithm.
[0051] Since the user's sleep state is not constant, for example, the user's sleep state is easily affected by the sleep environment or physical state, in order to ensure the real-time performance and accuracy of the target sleep staging algorithm, the user's current sleep data and the branch algorithm library can also be combined to realize the dynamic adjustment of the sleep staging algorithm, and then the user's target sleep staging algorithm can be obtained.
[0052] After obtaining the user's current sleep data, at least two current sleep metrics can be extracted from the current sleep data as current data features. Each current sleep metric can be, but is not limited to, any one of the following feature metrics: current snoring frequency, recent change rate of snoring frequency, long-term change rate of snoring frequency, current heart rate fluctuation value, recent change rate of heart rate, long-term change rate of heart rate, current sleep duration, and sleep onset time pattern. Subsequently, the historical sleep data of the same user can be standardized to obtain the corresponding historical clustering centers. It should be noted that there is a corresponding relationship between the data feature types of the historical clustering centers and the current data features. For example, when the current data features successively include the current snoring frequency, recent change rate of snoring frequency, and long-term change rate of snoring frequency, the corresponding historical clustering centers can successively include the standardized value of the snoring frequency in the past 30 days, the standardized value of the recent change rate of snoring frequency, and the standardized value of the long-term change rate of snoring frequency. Moreover, the above-mentioned standardization processing method is a technical means disclosed in the art and will not be elaborated here.
[0053] Furthermore, by determining whether the current data features significantly deviate from the historical clustering centers, it can be identified whether the user has potential changes in sleep states, that is, to determine whether the user's state has changed. Here, when determining whether the current data features significantly deviate from the historical clustering centers, it can be, but is not limited to, substituting the current data features and the historical clustering centers into the following formula (1) to calculate the feature distance between the current data features and the historical clustering centers: Formula (1) where d can be the feature distance between the current data features and the historical clustering centers, can be the j-th current sleep metric of the current data features, can be the j-th standardized value of the historical clustering centers, M is the number of current sleep metrics of the current data features, and the data feature type of has a corresponding relationship with the data feature type of
[0054] If the feature distance between the current data features and the historical clustering centers is less than or equal to the specified threshold, it indicates that the user's sleep state has not changed significantly. Furthermore, the basic sleep staging algorithm corresponding to the user category in the branch algorithm library can continue to be used as the user's target sleep staging algorithm. It should be noted that the specified threshold in the embodiments of the present disclosure can be the product result of a preset adjustment coefficient and the standard deviation corresponding to the user's category, so as to ensure that the judgment basis for the feature distance between the current data features and the historical clustering centers is more reliable. The preset adjustment coefficient can be, but is not limited to, 2. The standard deviation corresponding to the user's category can be calculated based on the user feature samples corresponding to the user's category and will not be elaborated here.
[0055] If the feature distance between the current data feature and the historical clustering center is greater than the specified threshold, it indicates that the user's sleep state has changed. Then, in response to determining that the user's state has changed, based on the feature distance between the current data feature and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm with the closest feature distance to the current data feature is determined. The user category corresponding to this basic sleep staging algorithm is closer to the user's current sleep data, and this basic sleep staging algorithm can be used as the user's target sleep staging algorithm, and the user's category can also be updated to the user category corresponding to this basic sleep staging algorithm. Here, each basic sleep staging algorithm in the branch algorithm library has a clustering center, and the clustering center of each basic sleep staging algorithm can be obtained by normalizing the historical sleep data samples of the corresponding user category.
[0056] It should be noted that there is also a corresponding relationship between the data feature types of the clustering centers of each basic sleep staging algorithm and the data feature type of the current data feature. For example, when the current data feature sequentially includes the current snoring frequency, the recent change rate of the snoring frequency, and the long-term change rate of the snoring frequency, the clustering center of each basic sleep staging algorithm can sequentially include the normalized value of the snoring frequency in the recent 30 days, the normalized value of the recent change rate of the snoring frequency, and the normalized value of the long-term change rate of the snoring frequency. And the above-mentioned normalization processing method is a technical means disclosed in the art, and will not be elaborated here.
[0057] In some embodiments of the present disclosure, based on the current data feature and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library, determining the basic sleep staging algorithm corresponding to the clustering center closest to the current data feature in the branch algorithm library as the user's target sleep staging algorithm further includes: Determining whether the closest feature distance between the current data feature and the clustering centers of the remaining basic sleep staging algorithms is greater than or equal to a preset distance threshold; In response to the closest feature distance being greater than or equal to the preset distance threshold, obtaining the user's feedback information; and Generating a personalized sleep staging algorithm for the user based on the user's feedback information, the current sleep data, and the historical sleep data, and adding the personalized sleep staging algorithm to the branch algorithm library.
[0058] Since the current user categories are relatively fixed, when the current sleep data of the user does not significantly approach any user category, it is easy to cause the generated sleep staging data to still be inaccurate. At this time, the user can be reminded to calibrate independently to judge the accuracy of the generated sleep staging data. If the user believes that the generated sleep staging data is inaccurate, the user can also be reminded to input feedback information to construct a personalized sleep staging algorithm for the user in combination with the user's feedback information, thereby ensuring the accuracy of the sleep staging data.
[0059] After the feature distance between the current data feature and the historical clustering center is greater than the specified threshold, it is possible to identify other user categories that are more significantly close to the current sleep data of the user by determining whether the current data feature is significantly close to the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library. Here, when determining whether the current data feature is significantly close to the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library, it is possible but not limited to substituting the current data feature and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library into the following formula (2) to calculate the feature distance between the current data feature and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library: Formula (2) In the above formula, can be the feature distance between the current data feature and the clustering center of the remaining j-th basic sleep staging algorithm in the branch algorithm library, can be the m-th current sleep index of the current data feature, M is the number of current sleep indices of the current data feature, can be the m-th normalized value in the clustering center of the remaining j-th basic sleep staging algorithm in the branch algorithm library, and the data feature type of has a corresponding relationship with the data feature type of
[0060] If the minimum feature distance (i.e., the nearest feature distance) between the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library is less than the preset distance threshold, it indicates that there are other user categories that are more significantly close to the user's current sleep data. Furthermore, the basic sleep staging algorithm corresponding to the minimum feature distance can be used as the user's target sleep staging algorithm, and the user's category can also be updated to the user category corresponding to the minimum feature distance. It should be noted that the preset distance threshold in the embodiments of the present disclosure can be the product result of a preset proportional coefficient and the category spacing, so as to ensure that the judgment basis for the feature distance between the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library is more reliable. The preset proportional coefficient can be, but is not limited to, 0.5, and the category spacing can be the mean result of the feature distances between the cluster center of the basic sleep staging algorithm corresponding to the user's current category in the branch algorithm library and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library.
[0061] If the minimum feature distance (i.e., the nearest feature distance) between the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library is greater than or equal to the preset distance threshold, it indicates that there are no other user categories that are more significantly close to the user's current sleep data. At this time, the feedback information of the user on the sleep staging data can be obtained to generate a personalized sleep staging algorithm for the user by combining the feedback information, the current sleep data, and the historical sleep data, and the personalized sleep staging algorithm can be added to the branch algorithm library. Here, the user's feedback information can be obtained through a third-party application for monitoring sleep on an electronic device, the user's voice communication content, or a customer service platform. It can include the correction data corresponding to the current sleep staging data, or can also include the correction data corresponding to the current sleep staging data and the correction data corresponding to the historical sleep staging data, such as, but not limited to, one or more of the corrected bedtime, the corrected wake-up time, and the corrected sleep stage duration.
[0062] Reference can be made here to Figure 7 the schematic diagram of the interface for obtaining the user's feedback information in some embodiments of the present disclosure shown in Figure 7 As shown, the user can view the generated bedtime and wake-up time in the interface 700 for displaying sleep time feedback. If the user believes that the bedtime is abnormal, the user can select the correct bedtime in the selection box corresponding to the bedtime, that is, input the corrected bedtime. For example, the user can correct the bedtime displayed as 22:39 on May 13, 2025 to 22:50 on May 13, 2025.
[0063] In some embodiments of the present disclosure, a personalized sleep staging algorithm for a user is generated based on the user's feedback information, current sleep data, and historical sleep data, including: Respectively according to each basic sleep staging algorithm in the branch algorithm library, determine the historical staging data of the historical sleep data corresponding to each basic sleep staging algorithm, and the current staging data of the current sleep data corresponding to each basic sleep staging algorithm. The historical sleep data has corresponding actual historical staging data; Determine the staging data error of each basic sleep staging algorithm. The staging data error includes the error between the actual historical staging data corresponding to the historical sleep data and the historical staging data corresponding to each basic sleep staging algorithm, and the error between the corrected data corresponding to the current sleep data in the feedback information and the current staging data corresponding to each basic sleep staging algorithm; In response to the staging data error of each basic sleep staging algorithm being greater than or equal to a preset error threshold, generate a personalized sleep staging algorithm for the user based on the user's feedback information, current sleep data, and historical sleep data.
[0064] In order to more accurately identify whether there are other user categories that are more significantly close to the user's current sleep data, the corrected data corresponding to the current sleep staging data in the user's feedback information can also be combined. After determining that there are no other user categories that are more significantly close to the user's current sleep data, a personalized sleep staging algorithm for the user is constructed, thereby ensuring the accuracy of the sleep staging data.
[0065] After obtaining the user's feedback information, the historical staging data of the historical sleep data corresponding to each basic sleep staging algorithm can be determined according to each basic sleep staging algorithm in the branch algorithm library. For example, the historical sleep data can be respectively input into each basic sleep staging algorithm, and the predicted sleep staging data can be used as the historical staging data corresponding to each basic sleep staging algorithm. Also, the current staging data of the current sleep data corresponding to each basic sleep staging algorithm can be determined according to each basic sleep staging algorithm in the branch algorithm library. For example, the current sleep data can be respectively input into each basic sleep staging algorithm, and the predicted sleep staging data can be used as the current staging data corresponding to each basic sleep staging algorithm. Here, the historical sleep data has corresponding actual staging data, and the actual staging data can be the sleep staging data predicted by the user's current target sleep staging algorithm according to the historical sleep data; the current sleep data can also have corresponding actual staging data, and the actual staging data is the corrected data corresponding to the current sleep data in the user's feedback information.
[0066] Further, the actual staging data corresponding to the historical sleep data and the actual staging data corresponding to the current sleep data (i.e., the corrected data corresponding to the current sleep data in the user's feedback information) can be integrated into a first data set, and the historical staging data and the current staging data corresponding to each basic sleep staging algorithm can be used as a second data set. By calculating the error between the first data set and each second data set, the staging data error of each basic sleep staging algorithm can be determined. Here, taking the staging data as the bedtime point as an example, when determining the staging data error of each basic sleep staging algorithm, it is possible but not limited to substituting the first data set and each second data set into the following formulas (3) to (5): Formula (3) In the above formula, can be the bedtime error result of the first data set and the i-th second data set on the j-th historical day, can be the bedtime point of the i-th second data set on the j-th historical day, can be the bedtime point of the first data set on the j-th historical day.
[0067] Formula (4) In the above formula, can be the bedtime error result of the first data set and the i-th second data set at present, can be the bedtime point of the i-th second data set at present, can be the bedtime point of the first data set at present (i.e., the corrected data corresponding to the current sleep staging data).
[0068] Formula (5) In the above formula, can be the error result of the first data set and the i-th second data set, can be the bedtime error result of the first data set and the i-th second data set on the j-th historical day, can be the bedtime error result of the first data set and the i-th second data set at present. n can be the number of bedtime points (i.e., the number of historical days) in the first data set excluding the current bedtime point.
[0069] If the staging data error of any one of the basic sleep staging algorithms is less than the preset error threshold, it indicates that there are still other user categories that are more significantly close to the user's current sleep data. Furthermore, the basic sleep staging algorithm corresponding to this staging data error can be used as the user's target sleep staging algorithm, and the user's user category can also be updated to the user category corresponding to this staging data error.
[0070] If the staging data errors of all basic sleep staging algorithms are greater than or equal to a preset error threshold, it indicates that there are no other user categories that are significantly closer to the user's current sleep data. At this time, a personalized sleep staging algorithm for the user can be generated based on the user's current sleep data, historical sleep data, and feedback information. Furthermore, more accurate user sleep staging data can be predicted using this personalized sleep staging algorithm. Here, the feedback information includes the correction data corresponding to the current sleep staging data and the correction data corresponding to the historical sleep staging data. When generating a personalized sleep staging algorithm for the user, it is possible to, but not limited to, train a classification model (or a regression model) disclosed in the art by combining the user's current sleep data and historical sleep data, and an error function can be constructed based on the prediction result of the classification model and the feedback information. The classification model can be optimized through this error function (for example, using the gradient descent method to make the error function converge to the minimum value), and then a personalized sleep staging algorithm for the user is generated.
[0071] For example, taking the sleep staging data as the bedtime as an example, a sleep data feature set can be generated based on the user's historical sleep data and current sleep data. By combining this sleep data feature set and the weight parameters of each sleep data feature type in this sleep data feature set, a classification model (or a regression model) disclosed in the art can be trained, and an error function can be constructed based on the predicted bedtime of the classification model and the correction data in the feedback information. By using the gradient descent method to adjust the weight parameters of each sleep data feature type, the error function can be made to converge to the minimum value, and then the trained classification model is used as a personalized sleep staging algorithm for the user. Here, the expression of the error function can be, but not limited to, referring to the following formula (6): Formula (6) In the above formula, L can be the error function, n can be the historical number of days corresponding to the historical sleep data (n + 1 can be the current day), can be the predicted bedtime on the j-th historical day by the classification model, can be the correction data on the j-th historical day in the feedback information (i.e., the corrected bedtime).
[0072] Of course, the embodiments of the present disclosure can also, but not limited to, construct the error function in a weighted form, and the expression of the error function can be, but not limited to, referring to the following formula (7): Formula (7) In the above formula, L can be the error function, n can be the historical number of days corresponding to the historical sleep data (n + 1 can be the current day), can be the historical data weight (which can be, but not limited to, set to 0.3), Can be the bedtime predicted by the classification model on the j-th day in history, Can be the correction data (i.e., the corrected bedtime) in the feedback information on the j-th day in history, Can be the bedtime predicted by the classification model currently, Can be the correction data (i.e., the corrected bedtime) in the feedback information currently.
[0073] In some embodiments of the present disclosure, after generating the personalized sleep staging algorithm for the user, it is also necessary to combine the personalized sleep staging algorithm to predict the historical sleep data, current sleep data, and future sleep data, and comprehensively judge whether the personalized sleep staging algorithm meets the sleep prediction requirements through at least one evaluation index. The multiple evaluation indexes can be one or more of an error evaluation index, an adaptability evaluation index, and an improvement degree evaluation index.
[0074] After generating the personalized sleep staging algorithm for the user, an error evaluation index can be obtained by combining the personalized sleep staging algorithm, current sleep data, historical sleep data, and feedback information, and the error evaluation index is compared with a preset error threshold. Here, when obtaining the error evaluation index, the current sleep data and historical sleep data can be input into the personalized sleep staging algorithm to predict the sleep staging data at the corresponding time point, and the error evaluation index can be obtained by calculating the error with the feedback information. For example, taking the sleep staging data as the bedtime and the correction data type of the sleep staging data in the feedback information as the bedtime as an example, the bedtime predicted by the personalized sleep staging algorithm and the corrected bedtime in the feedback information can be substituted into the following formula (8): Formula (8) In the above formula, Can be the error evaluation index, n can be the historical number of days corresponding to the historical sleep data (n + 1 can be the current day), Can be the bedtime predicted by the personalized sleep staging algorithm on the j-th day in history, Can be the correction data (i.e., the corrected bedtime) in the feedback information on the j-th day in history.
[0075] After generating a personalized sleep staging algorithm for a user, an adaptability evaluation index can also be obtained by combining the personalized sleep staging algorithm, the user's sleep data in the next few days, and the feedback information in the next few days, and the adaptability evaluation index is compared with a preset adaptability threshold. Here, when obtaining the adaptability evaluation index, after obtaining the user's sleep data in the next few days, the user's sleep data can be input into the personalized sleep staging algorithm to predict the sleep staging data at the corresponding time point, and the adaptability evaluation index can be obtained by calculating the error with the feedback information pointed out by the user for the sleep staging data. For example, taking the sleep staging data as the falling asleep time point and the correction data type of the sleep staging data in the feedback information as the falling asleep time point as an example, the falling asleep time point predicted by the personalized sleep staging algorithm and the corrected falling asleep time point in the feedback information can be substituted into the following formula (9): Formula (9) In the above formula, can be the adaptability evaluation index, n can be the historical number of days corresponding to the historical sleep data (n + 1 can be the current day), and k can be the number of future days (usually 5 days). can be the falling asleep time point predicted by the personalized sleep staging algorithm on the k-th day in the future. can be the correction data (i.e., the corrected falling asleep time point) in the feedback information on the k-th day in the future.
[0076] After generating a personalized sleep staging algorithm for a user, an improvement degree evaluation index can also be obtained by combining the personalized sleep staging algorithm, the current sleep data, the historical sleep data, the feedback information, and each basic sleep staging algorithm in the branch algorithm library, and the improvement degree evaluation index is judged. Here, when obtaining the improvement degree evaluation index, the current sleep data and the historical sleep data can be input into each basic sleep staging algorithm in the branch algorithm library to predict the sleep staging data at the corresponding time point, and the error evaluation index corresponding to each basic sleep staging algorithm in the branch algorithm library can be obtained by calculating the error with the feedback information. Then, the minimum error evaluation index can also be selected from the error evaluation indexes corresponding to each basic sleep staging algorithm, and the product result of the minimum error evaluation index and a preset coefficient (usually set to 0.9) is compared with the error evaluation index corresponding to the personalized sleep staging algorithm.
[0077] In an embodiment of the present disclosure, when multiple evaluation indicators include an error evaluation indicator, an adaptability evaluation indicator, and an improvement degree evaluation indicator, when the error evaluation indicator is less than a preset error threshold, the adaptability evaluation indicator is less than a preset adaptability threshold, and the improvement degree evaluation indicator is less than the product result between the minimum error evaluation indicator and a preset coefficient, it indicates that the user's personalized sleep staging algorithm meets the sleep prediction requirements. Furthermore, the user's target sleep staging algorithm can be updated to this personalized sleep staging algorithm, and this personalized sleep staging algorithm can be added to the branch algorithm library.
[0078] Reference can be made here to Figure 8 Another schematic diagram of the branch algorithm library of some embodiments of the present disclosure shown, such as Figure 8 As shown, another branch algorithm library 800 of the present disclosure may include six user categories, namely, a normal category, a sleep disorder category, a respiratory disorder category, a severe snoring category, a heart disease category, an irregular body movement category, and a user a category, as well as a normal sleep branch algorithm corresponding to the normal category, a sleep disorder type sleep branch algorithm corresponding to the sleep disorder category, a respiratory disorder type sleep branch algorithm corresponding to the respiratory disorder category, a severe snoring type sleep branch algorithm corresponding to the severe snoring category, a heart disease type sleep branch algorithm corresponding to the heart disease category, an irregular body movement type sleep branch algorithm corresponding to the irregular body movement category, and a personalized sleep staging algorithm a corresponding to the user a category. Here, another branch algorithm library 800 of the present disclosure is not limited to the above-mentioned user categories and the types of basic sleep staging algorithms.
[0079] Please refer to Figure 9 , Figure 9 An example block diagram of a personalized dynamic sleep staging system 900 of some embodiments of the present disclosure is shown. Each embodiment in this specification is described in a progressive manner. For the parts that are the same or similar among the embodiments, they can be referred to each other. Each embodiment focuses on 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 the relevant parts can refer to the partial description of the method embodiments. Such as Figure 9As shown, the personalized dynamic sleep staging system 900 includes a category recognition module 901 configured to determine the user category of a user based on the user's characteristic information. The user category has a corresponding basic sleep staging algorithm, and the user category includes one or more of a normal category, a sleep disorder category, a breathing disorder category, a severe snoring category, a heart disease category, and an irregular body movement category. The personalized dynamic sleep staging system 900 further includes a data generation module 902 configured to use the basic sleep staging algorithm corresponding to the user's user category in the branch algorithm library as the user's target sleep staging algorithm, and generate the user's sleep staging data based on the user's current sleep data and the user's target sleep staging algorithm. The personalized dynamic sleep staging system 900 further includes a data feedback module 903 configured to obtain the user's feedback information, and determine the optimal sleep staging algorithm based on the user's feedback information, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained by a set of sleep data features generated from the user's historical sleep data and current sleep data, weight parameters of each sleep data feature type in the set of sleep data features, and an error function constructed based on the feedback information. The optimal sleep staging algorithm determines whether the sleep prediction requirement is met according to at least one evaluation index. In addition, the personalized dynamic sleep staging system 900 further includes an algorithm update module 904 configured to update the target sleep staging algorithm to the optimal sleep staging algorithm.
[0080] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of 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, the processes or functions described in the embodiments of this specification are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the 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 in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a Digital Versatile Disc (DVD)), or a semiconductor medium (for example, a Solid State Disk (SSD)), etc.
[0081] Please refer to Figure 10 , Figure 10 which shows a schematic block diagram of an electronic device 1000 according to some embodiments of the present disclosure. As Figure 10 shown, the electronic device 1000 includes a processor 1010, a disk drive 1020, an input / output interface 1030, a network interface 1040, and a memory 1050. The above-mentioned processor 1010, disk drive 1020, input / output interface 1030, network interface 1040, and memory 1050 can be communicatively connected through a communication bus 1060.
[0082] Among them, the processor 1010 can be implemented in a general-purpose CPU, a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by this application.
[0083] The memory 1050 may be implemented in the form of a ROM (Read Only Memory), a RAM (Read Access Memory), a static memory, a dynamic storage device, etc. The memory 1050 may store an operating system 1051 for controlling the operation of the electronic device 1000, and a Basic Input / Output System (BIOS) 1052 for controlling the low-level operations of the electronic device 1000. In addition, a web browser 1053, a data storage management system 1054, etc. may also be stored. In short, when implementing the technical solution provided by this application through software or firmware, the relevant program codes are stored in the memory 1050 and are called and executed by the processor 1010.
[0084] The input / output interface 1030 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or may be externally connected to the device to provide corresponding functions. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, a warning light, etc.
[0085] The network interface 1040 is used to connect to a communication module (not shown in the figure) to implement communication and interaction between the device and other devices. Among them, the communication module may implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0086] The bus 1060 includes a path for transmitting information between various components of the device (such as the processor 1010, the disk drive 1020, the input / output interface 1030, the network interface 1040, and the memory 1050).
[0087] It should be noted that although the above device only shows the processor 1010, the disk drive 1020, the input / output interface 1030, the network interface 1040, the memory 1050, the bus 1060, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may only include the components necessary for implementing the method of this application and does not necessarily include all the components shown in the figure.
[0088] The program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.
[0089] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. Additionally, although the operations are depicted in a particular order, this should be understood to require that the operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation may also be implemented separately or in any suitable sub-combination in multiple implementations.
[0090] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A personalized and dynamic sleep staging method, characterized in that, Including: Determining the user category of the user based on the user's characteristic information, where the user category has a corresponding basic sleep staging algorithm; Taking the basic sleep staging algorithm corresponding to the user category of the user in the branch algorithm library as the target sleep staging algorithm of the user, and generating sleep staging data of the user based on the current sleep data of the user and the target sleep staging algorithm of the user; Obtaining the feedback information of the user, and determining the optimal sleep staging algorithm based on the feedback information, current sleep data, and historical sleep data of the user. The optimal sleep staging algorithm is trained by a sleep data feature set generated by the historical sleep data and current sleep data of the user, weight parameters of each sleep data feature type in the sleep data feature set, and an error function constructed based on the feedback information. The optimal sleep staging algorithm determines whether the sleep prediction requirement is met according to at least one evaluation index; and Updating the target sleep staging algorithm to the optimal sleep staging algorithm.
2. The method according to claim 1, wherein The basic sleep staging algorithm has a corresponding clustering center; and The step of taking the basic sleep staging algorithm corresponding to the user category of the user in the branch algorithm library as the target sleep staging algorithm of the user further includes: Determining the current data feature corresponding to the current sleep data of the user; Determining the historical clustering center corresponding to the historical sleep data of the user, and determining whether the state of the user has changed according to the current data feature and the historical clustering center; and In response to determining that the state of the user has changed, based on the current data feature and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library, determining the basic sleep staging algorithm corresponding to the clustering center closest to the current data feature in the branch algorithm library as the target sleep staging algorithm of the user.
3. The method according to claim 2, wherein The step of determining the basic sleep staging algorithm corresponding to the clustering center closest to the current data feature in the branch algorithm library as the target sleep staging algorithm of the user based on the current data feature and the clustering centers of the remaining basic sleep staging algorithms in the branch algorithm library further includes: Determining whether the closest feature distance between the current data feature and the clustering centers of the remaining basic sleep staging algorithms is greater than or equal to a preset distance threshold; In response to the closest feature distance being greater than or equal to the preset distance threshold, obtaining the feedback information of the user; and Generating a personalized sleep staging algorithm for the user based on the feedback information, current sleep data, and historical sleep data of the user, and adding the personalized sleep staging algorithm to the branch algorithm library.
4. The method according to claim 3, wherein The step of generating a personalized sleep staging algorithm for the user based on the feedback information, current sleep data, and historical sleep data of the user includes: According to each basic sleep staging algorithm in the branch algorithm library, determine the historical staging data of the historical sleep data corresponding to each basic sleep staging algorithm, and the current staging data of the current sleep data corresponding to each basic sleep staging algorithm. The historical sleep data has corresponding actual historical staging data. Determine the staging data error of each basic sleep staging algorithm. The staging data error includes the error between the actual historical staging data corresponding to the historical sleep data and the historical staging data corresponding to each basic sleep staging algorithm, and the error between the correction data corresponding to the current sleep data in the feedback information and the current staging data corresponding to each basic sleep staging algorithm. In response to the staging data error of each basic sleep staging algorithm being greater than or equal to a preset error threshold, generate a personalized sleep staging algorithm for the user based on the user's feedback information, current sleep data, and historical sleep data.
5. The method according to any one of claims 1 to 4, characterized in that The feature information of the user includes the user's historical sleep data and basic attributes; and Determining the user category of the user based on the user's feature information includes: Determine at least two historical sleep metrics of the user based on the user's historical sleep data; Determine the user's user feature metrics based on all the historical sleep metrics and the basic attributes; and Input the user's user feature metrics into a classification model to obtain the user's user category.
6. A personalized and dynamic sleep staging system, characterized in that Includes: A category recognition module configured to determine the user category of the user based on the user's feature information. The user category has a corresponding basic sleep staging algorithm. A data generation module configured to use the basic sleep staging algorithm corresponding to the user category of the user in the branch algorithm library as the user's target sleep staging algorithm, and generate the user's sleep staging data based on the user's current sleep data and the user's target sleep staging algorithm. A data feedback module configured to obtain the user's feedback information, and determine the optimal sleep staging algorithm based on the user's feedback information, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained by a sleep data feature set generated by the user's historical sleep data and current sleep data, weight parameters of each sleep data feature type in the sleep data feature set, and an error function constructed based on the feedback information. The optimal sleep staging algorithm determines whether it meets the sleep prediction requirement according to at least one evaluation metric. And An algorithm update module configured to update the target sleep staging algorithm to the optimal sleep staging algorithm.
7. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-5.
8. An electronic device, characterized in that, Includes: One or more processors, and A memory associated with the one or more processors. The memory is used to store program instructions that, when read and executed by the one or more processors, execute the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Regard point cluster data processing method based on time domain constraint
CN102096757A
Human health evaluation method and evaluation system based on sleep big data
CN109087706A
Determination method and device of sleep staging, computer equipment and storage medium
CN109567748A
Automatic sleep staging method, device, computer equipment and computer storage medium
CN110141226A
Sleep staging method and system based on cloud platform
CN110327040A
Cited By
Knowledge-driven and data-fused sleep staging method and device
CN121313120A
Personalized sleep staging optimization method and device
CN121337284A