A personalized dynamic sleep staging method and system

Through a personalized and dynamic sleep staging method, the sleep staging algorithm is adjusted in combination with user characteristics and feedback information, which solves the problem of inaccurate sleep staging data in existing technologies and provides accurate sleep analysis and health recommendations.

CN120267244BActive Publication Date: 2025-09-16ZHEJIANG QISHENG DATA SERVICE CO LTD

Patent Information

Application Number
CN202510757762.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-16
Estimated Expiration
2045-06-09

AI Technical Summary

Technical Problem

Existing sleep staging data is prone to inaccuracies for some user groups, and ignores the user's actual sleep status, making it impossible to provide accurate sleep analysis and health recommendations.

Method used

By determining the user category based on user feature information, the basic sleep staging algorithm in the branch algorithm library is used to generate target sleep staging data. In combination with user feedback information and sleep data, the optimal sleep staging algorithm is dynamically adjusted to improve accuracy.

Benefits of technology

It achieves real-time accuracy of personalized sleep staging data for different user groups, supporting precise sleep analysis and health recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120267244B_ABST
    Figure CN120267244B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a personalized dynamic sleep staging method and system. The method includes determining the user category of a user based on the user's characteristic information. The basic sleep staging algorithm corresponding to the user category of the user in the branch algorithm library is used as the target sleep staging algorithm. Based on the target sleep staging algorithm and the user's current sleep data, sleep staging data suitable for different user groups is generated. In addition, the method also includes obtaining user feedback information, determining the optimal sleep staging algorithm based on the user's feedback information, current sleep data, and historical sleep data; and updating the target sleep staging algorithm to the optimal sleep staging algorithm, so that the target sleep staging algorithm can take into account the user's sleep data while also taking into account the actual sleep state reported by the user to ensure the real-time accuracy of the generated sleep staging data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of sleep monitoring technology, and particularly relate to a personalized dynamic sleep staging method and system. Background Art

[0002] In sleep monitoring technology, accurate sleep staging is crucial for assessing sleep quality and health status. Currently, existing sleep staging data typically uses sensors to obtain the user's vital signs and then processes them using fixed algorithms.

[0003] However, due to the individual characteristics of different user groups and the particularity of sleep scenarios, the above-mentioned sleep stage generation method may easily lead to inaccurate sleep stage data for some user groups. In addition, the generated sleep stage data may easily ignore the user's actual sleep state, and thus fail to provide accurate sleep analysis and health recommendations. Summary of the Invention

[0004] To address the aforementioned technical issues of inaccurate sleep staging data for some user groups and the tendency of the generated sleep staging data to overlook the user's actual sleep state, thereby failing to provide accurate sleep analysis and health recommendations, embodiments of this specification disclose a personalized dynamic sleep staging method and system. A target sleep staging algorithm personalized for the user is determined from a branch algorithm library based on the user's characteristic information. The system then combines the collected current sleep data and the target sleep staging algorithm to generate sleep staging data suitable for different user groups. Furthermore, the system also combines user feedback, current sleep data, historical sleep data, the target sleep staging algorithm, and other basic sleep staging algorithms in the branch algorithm library to determine an optimal sleep staging algorithm. The target sleep staging algorithm is then updated to the optimal sleep staging algorithm. This ensures that the target sleep staging algorithm for the user not only takes into account the user's sleep data but also the actual sleep state reported by the user. This not only ensures the real-time accuracy of the generated sleep staging data but also provides accurate technical support for subsequent sleep analysis and health recommendations.

[0005] In a first aspect of an embodiment of the present disclosure, a personalized dynamic sleep staging method is provided. The method includes determining a user category based on user feature information, wherein the user category has a corresponding basic sleep staging algorithm. The user categories include 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. A basic sleep staging algorithm corresponding to the user category in a branch algorithm library is used as the user's target sleep staging algorithm. Sleep staging data for the user is generated based on the user's current sleep data and the target sleep staging algorithm. The branch algorithm library includes basic sleep staging algorithms corresponding to each user category. Furthermore, the method includes obtaining user feedback information and determining an optimal sleep staging algorithm based on the user feedback information, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained using a sleep data feature set generated from the user's historical sleep data and current sleep data, weight parameters for 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 sleep prediction requirements are met based on at least one evaluation metric. Finally, the method updates the target sleep staging algorithm to the optimal sleep staging algorithm.

[0006] In a second aspect of the embodiments of the present disclosure, a personalized dynamic sleep staging system is provided. A category identification module is configured to determine a user category of a user based on the user's characteristic information. 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. A data generation module is 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 branch algorithm library includes basic sleep staging algorithms corresponding to each user category. The system also includes a data feedback module configured to obtain user feedback and determine an optimal sleep staging algorithm based on the user's feedback, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained using a sleep data feature set generated from the user's historical and current sleep data, weight parameters for 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 sleep prediction requirements based on at least one evaluation metric; 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, comprising 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 an embodiment of the present disclosure, an electronic device is provided, comprising one or more processors and a memory associated with the one or more processors, wherein the memory is used to store program instructions. When the program instructions are read and executed by the one or more processors, the program instructions execute the personalized dynamic sleep staging method provided according to the first scheme.

[0009] It should be understood that the contents described in the Summary of the Invention section are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0011] Figure 1 A schematic diagram illustrating an example environment in which various embodiments of the present disclosure may be implemented;

[0012] Figure 2 A flowchart illustrating a personalized dynamic sleep staging method according to some embodiments of the present disclosure is shown;

[0013] Figure 3 A schematic diagram illustrating a branching algorithm library according to some embodiments of the present disclosure is shown;

[0014] Figure 4 A schematic diagram showing sleep stage data obtained for users with sleep disorders using an existing sleep stage generation method according to some embodiments of the present disclosure is shown;

[0015] Figure 5 A schematic diagram showing sleep staging data obtained for users with sleep disorders using the personalized dynamic sleep staging method according to some embodiments of the present disclosure is shown;

[0016] Figure 6 A schematic diagram illustrating basic properties of some embodiments of the present disclosure;

[0017] Figure 7 A schematic diagram of an interface for obtaining user feedback information in some embodiments of the present disclosure is shown;

[0018] Figure 8 Another schematic diagram illustrating a branching algorithm library according to some embodiments of the present disclosure is shown;

[0019] Figure 9 An example block diagram illustrating a personalized dynamic sleep staging system according to some embodiments of the present disclosure is shown;

[0020] Figure 10 A schematic block diagram of an electronic device according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

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

[0022] The terms "including" and "having" and any variations thereof in this specification and claims and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or apparatuses. Depending on the context, the word "if" as used herein may be interpreted as "at..." or "when..." or "in response to determining" or "in response to detecting".

[0023] As mentioned above, existing sleep staging data typically utilizes sensors to acquire a user's vital signs and processes them using a fixed sleep staging algorithm. However, when this fixed sleep staging algorithm is used to serve a large number of users, the sleep staging data for some users can be severely inaccurate. For example, some users with medical conditions experience frequent intermittent body movements during sleep due to their illness. This body movement behavior is unrelated to their sleep state, but it can lead to significant deviations in the generated sleep staging data. Another example is that some users who snore heavily disrupt their heartbeat waveforms during sleep, rendering the detected heart rate data unusable. Furthermore, they are prone to waking up from snoring, which results in significant deviations in the generated sleep staging data. For another example, some users with pacemakers maintain a constant heart rate during sleep. This special sleep scenario also results in significant deviations in the sleep staging data generated based on the detected heart rate data. For these reasons, using a fixed sleep staging algorithm will result in poor generalization of sleep stage recognition for these user groups.

[0024] Based on this, embodiments of the present disclosure propose a personalized dynamic sleep staging method. In this embodiment, a user's user category is determined based on user feature information. The user category has a corresponding basic sleep staging algorithm. User categories include one or more of normal, sleep disorder, breathing disorder, severe snoring, heart disease, and irregular body movement. A basic sleep staging algorithm corresponding to the user's user category in a branch algorithm library is used as the user's target sleep staging algorithm. Sleep staging data for the user is generated based on the user's current sleep data and the target sleep staging algorithm. The branch algorithm library includes basic sleep staging algorithms corresponding to each user category. Furthermore, the method includes obtaining user feedback and determining an optimal sleep staging algorithm based on the user's feedback, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained using a sleep data feature set generated from the user's historical and current sleep data, weight parameters for 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 sleep prediction requirements are met based on at least one evaluation metric. Finally, the target sleep staging algorithm is updated to the optimal sleep staging algorithm.

[0025] In this way, the user's characteristic information can be combined to determine the user's category, such as but not limited to any one of the normal category, sleep disorder category, breathing disorder category, severe snoring category, heart disease category and irregular body movement category, so as to filter out the target sleep staging algorithm that meets the user's category in the branch algorithm library; secondly, the user's feedback information, current sleep data, historical sleep data, target sleep staging algorithm and other basic sleep staging algorithms in the branch algorithm library can be combined to determine the optimal sleep staging algorithm, and the target sleep staging algorithm can be 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 taking into account the actual sleep state reported by the user, which not only ensures the real-time accuracy of the generated sleep staging data, but also provides accurate technical support for subsequent sleep analysis and health recommendations.

[0026] See also Figure 1 , Figure 1 1 shows an example environment 100 in which various embodiments of the present disclosure may be implemented. Figure 1 As 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 number of electronic devices 101, signal collection devices 102, and servers 103 shown in the figure is only for example. In a specific implementation, any number of electronic devices 101, signal collection devices 102, and servers 103 may be included without limitation.

[0027] The electronic device 101 may be installed with a third-party application for sleep monitoring. This third-party application may be used to obtain basic user attributes. For example, when a user first accesses the main interface of the third-party application, the user may be prompted to enter the corresponding basic attributes in conjunction with a user registration interface or a questionnaire interface. Here, basic attributes may include, but are not limited to, one or more of the user's name, gender, date of birth, sleep disorders, snoring, whether a pacemaker is installed, symptoms of palpitations and chest tightness, and nighttime awakenings, to obtain the user's basic physical condition.

[0028] After obtaining the user's basic attributes, the electronic device 101 can also display sleep stage data to the user through a third-party application to help the user understand their sleep status. Here, the sleep stage data can be historical sleep stage data or current sleep stage data. Historical sleep stage data can be understood as the user's sleep stage data at historical time points (for example, sleep stage data from three days ago), and current sleep stage data can be understood as the user's sleep stage data at the current time point (for example, sleep stage data for the current day). The sleep stage data can include, but is not limited to, multiple sleep stages (for example, awake time, rapid eye movement time, core sleep time, and deep sleep time) displayed via a bar graph and the duration of each sleep stage. Of course, it can also include the time of falling asleep and the time of waking up, etc., but is not limited to this.

[0029] In addition to displaying sleep stage data to the user, electronic device 101 may also receive feedback from the user. For example, after viewing the current sleep stage data, the user may modify the bedtime and wake-up times through a third-party application interface. The feedback provided by the user may include the modified data corresponding to the current sleep data. The feedback provided by the user may also include, but is not limited to, modified data corresponding to historical sleep stage data. The feedback provided by the user may include, but is not limited to, one or more of the following: the modified bedtime, the modified wake-up time, and the modified sleep stage duration.

[0030] The electronic devices involved in the embodiments of the present disclosure may be mobile phones, tablet computers, desktop computers, laptop computers, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, or personal digital assistants (PDAs).

[0031] Signal acquisition device 102 can be used to acquire vital signs signals of the user during sleep. These vital signs signals (also understood as human body vibration signals) can include the user's vital signs signals at historical time points as well as the user's vital signs signals at the current time point. Here, signal acquisition device 102 can include, but is not limited to, a high-precision non-contact sensor positioned beneath the mattress to collect the user's vital signs signals while the user sleeps on the mattress. Of course, signal acquisition device 102 can also include a contact sensor worn on the user's body, but is not limited to this.

[0032] After acquiring the user's vital sign signals during sleep, the signal acquisition device 102 may also process the vital sign signals to generate corresponding sleep data. For example, the signal acquisition device 102 may decompose the vital sign signals at the current time point into multiple independent channel signals such as heart rate, breathing, snoring, and body movement, and then perform noise reduction, filtering, and feature extraction on each independent channel signal, and use the obtained heart rate, breathing rate, number of snoring, and number of body movement and other basic feature indicators calculated as the current sleep data. Here, the processing method of the vital sign signals may be a technical means disclosed in the art, and the signal acquisition device 102 may also use this processing method to process the vital sign signals at historical time points to obtain corresponding historical sleep data, and is not limited thereto.

[0033] For example, taking the basic characteristic indicators such as heart rate, respiratory rate, snoring, and body movement obtained based on the user's daily vital signs in the past 60 days as an example, the user's historical sleep data may include the calculated number of snoring in the past 30 days, the recent change rate of snoring (which can be understood as the change rate between the number of snoring in the past 7 days and the number of snoring in the previous 7 days), the long-term change rate of snoring (which can be understood as the change rate between the number of snoring in the past 30 days and the number of snoring in the previous 30 days), daily heart rate fluctuation value (which can be understood as the standard deviation of the daily heart rate mean in 60 days), the recent change rate of heart rate (which can be understood as the linear regression slope of the heart rate in the past 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 past 30 days), the average daily sleep duration and the regularity of sleep time (which can be understood as the standard deviation of all sleep times), and other characteristic indicators. The calculation method of each characteristic indicator mentioned above is a technical means disclosed in the art. Of course, it can also include, but is not limited to, characteristic indicators such as respiratory rate in the past 30 days, recent change rate of respiratory rate, long-term change rate of respiratory rate, and heart rate variability.

[0034] It should be noted that the user's current sleep data can refer to all the characteristic indicators mentioned in the above historical sleep data, for example, it may include one or more of the current number of snoring, the recent change rate of snoring, the long-term change rate of snoring, 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 regularity of falling asleep time, and is also not limited to this.

[0035] The server 103 can be, but is not limited to, a hardware server, a virtual server, a cloud server, etc. It can receive basic attributes of users uploaded by a third-party application for sleep monitoring on the electronic device 101, and can store and process the basic attributes of all users received by building a user information database.

[0036] The server 103 may also receive the user's sleep data uploaded by the signal acquisition device 102, and may also receive the user's vital signs signals uploaded by the signal acquisition device 102 during sleep, process the vital signs signals to obtain corresponding sleep data, and determine the user's sleep staging data by combining the user's basic attributes, sleep data, and branch algorithm library. For example, the user's user category may be determined based on the user's basic attributes and historical sleep data, and a target sleep staging algorithm that meets the personalized needs of the user category may be determined from the branch algorithm library. Furthermore, the user's current sleep data and the target sleep staging algorithm may be combined to generate more accurate sleep staging data.

[0037] Here, the branch algorithm library may 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 algorithm may 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.

[0038] 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, sleep data samples collected from normal users (such as but not limited to heart rate, respiratory rate, number of body movements, snoring intensity and heart rate variability (HRV)) and the sleep stage labels corresponding to the sleep data samples can be used as a training set. The hidden Markov model can generate initial probability parameters, transfer matrix parameters and observation distribution parameters based on the input sleep data samples collected from normal users (such as but not limited to heart rate, respiratory rate, number of body movements, snoring intensity and heart rate variability (HRV)), and then use the Baum-Welch iterative algorithm to iteratively calculate the initial probability parameters, transfer matrix parameters, observation distribution parameters, input sleep data samples and corresponding sleep stage labels (for example, calculating the forward probability, backward probability and intermediate variable probability in sequence), and update the initial probability parameters, transfer matrix parameters and observation distribution parameters according to the calculation results each time until the maximum number of iterations is reached. Here, medical rules (such as restricting impossible transitions) and regularizing the transition matrix can be considered to implement state transition constraints on the hidden Markov model. Then, after iterating the initial probability parameters, transition matrix parameters, and observation distribution parameters, the hidden Markov model can use the Viterbi algorithm to perform dynamic programming based on the iterated initial probability parameters, transition matrix parameters, observation distribution parameters, and sleep data samples to determine the time of sleep onset and the duration of the sleep stage.

[0039] For example, taking the sleep branching 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 heart rate, respiratory rate, number of body movements, snoring intensity and heart rate variability (HRV)), the sleep stage labels corresponding to the sleep data samples, and the respiratory event labels can be used as training sets. The training process can refer to the training process of the above-mentioned normal sleep branching algorithm. However, when using the Baum-Welch iterative algorithm to iteratively calculate the initial probability parameters, transfer matrix parameters, observation distribution parameters, input sleep data samples and the corresponding sleep stage labels, it is necessary to introduce respiratory event feature weights, and when using the Viterbi algorithm for dynamic programming processing, it is necessary to dynamically adjust in combination with respiratory events.

[0040] Regarding the sleep branching algorithm for severe snoring, the sleep branching algorithm for heart disease, and the sleep branching algorithm for irregular body movement, the hidden Markov model well known in the art can also be used. The training set and training process can refer to the training process of the sleep branching algorithm for sleep disorders mentioned above, which will not be described in detail here.

[0041] It should be noted that the branch algorithm library of some embodiments of the present disclosure includes normal sleep branch algorithms, sleep disorder branch algorithms, breathing disorder branch algorithms, severe snoring branch algorithms, heart disease branch algorithms and irregular body movement branch algorithms, which can also be understood as conventional technical means in this field and are not the focus of protection of the present disclosure.

[0042] After generating the user's sleep staging data, the server 103 may feed the sleep staging data back to the corresponding user's electronic device 101, so that a third-party application for sleep monitoring on the electronic device 101 can display the sleep staging data to the user. Of course, after the electronic device 101 receives the user's feedback information, the server 103 may also dynamically adjust the target sleep staging algorithm mentioned above based on the feedback information. For example, other basic sleep staging algorithms may 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 for the user may be constructed to update the target sleep staging algorithm to a personalized sleep staging algorithm, without limitation.

[0043] It should be noted that the example environment in which the multiple embodiments of the present disclosure can be implemented may also include only the electronic device 101 and the signal acquisition device 102, so as to determine the user's sleep stage data through the electronic device 101, but will not be elaborated here.

[0044] See also Figure 2 , Figure 2 A flowchart of a personalized dynamic sleep staging method 200 according to some embodiments of the present disclosure is shown. The method 200 may be executed by the aforementioned server, the aforementioned electronic device, or the aforementioned server and electronic device in cooperation with each other.

[0045] like Figure 2 As shown, the personalized dynamic sleep staging method 200 may include at least the following steps:

[0046] Step 202: Determine the user category of the user based on the user's characteristic information.

[0047] Here, the user's characteristic information may 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, and then 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, a normal category, and after generating the current user's historical sleep data, the user category can be dynamically adjusted in combination with the historical sleep data and the basic attributes. For another example, 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, and then the user category to which the user belongs can be screened from the normal category, sleep disorder category, breathing disorder category, severe snoring category, heart disease category, and irregular body movement category in combination with the user's basic attributes and the user's historical sleep data.

[0048] Step 204: Use the basic sleep staging algorithm corresponding to the user category in the branch algorithm library as the target sleep staging algorithm for the user, and generate sleep staging data for the user based on the user's current sleep data and the user's target sleep staging algorithm.

[0049] After determining the user category of the user, in order 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 category of the user is a sleep disorder category, the sleep disorder 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 may include one or more of a normal sleep branch algorithm, a sleep disorder branch algorithm, a breathing disorder branch algorithm, a severe snoring branch algorithm, a heart disease branch algorithm, and an irregular body movement branch algorithm. Each basic sleep staging algorithm can be trained by historical sleep data samples and sleep staging data labels of the corresponding user category.

[0050] See also Figure 3 , Figure 3 Schematic diagram of the branch algorithm library of some embodiments of the present disclosure is shown. Figure 3As shown, a branch algorithm library 300 of the present disclosure may include five user categories: normal, sleep disorder, breathing disorder, severe snoring, heart disease, and irregular body movement, as well as a normal sleep branch algorithm corresponding to the normal category, a sleep disorder branch algorithm corresponding to the sleep disorder category, a breathing disorder branch algorithm corresponding to the breathing disorder category, a severe snoring branch algorithm corresponding to the severe snoring category, a heart disease branch algorithm corresponding to the heart disease category, and an irregular body movement branch algorithm corresponding to the irregular body movement category. The branch algorithm library 300 of the present disclosure is not limited to the aforementioned user categories and basic sleep staging algorithm types.

[0051] After determining the user's target sleep staging algorithm, the user's current sleep data can be input into the target sleep staging algorithm to obtain the user's current sleep staging data. This sleep staging data can then be presented to the user in a more intuitive and understandable manner, such as in the form of a bar graph, using visualization technology. Here, the user's current sleep staging data may include, but is not limited to, multiple sleep stages (such as, but not limited to, awake time, rapid eye movement time, core sleep time, and deep sleep time) displayed via a bar graph, the duration of each sleep stage, and one or more of the following data: sleep onset time and wake-up time.

[0052] Step 206: Obtain user feedback information, and determine an optimal sleep staging algorithm based on the user feedback information, current sleep data, and historical sleep data.

[0053] Step 208: Update the target sleep staging algorithm to the optimal sleep staging algorithm.

[0054] After generating the user's current sleep staging data, feedback information input by the user regarding the sleep staging data can also be obtained. The feedback information can be obtained through a third-party application for monitoring sleep on the electronic device, user voice communication content, or an after-sales service platform. It may include corrected data corresponding to the current sleep staging data and corrected data corresponding to the historical sleep staging data, such as but not limited to one or more of the corrected bedtime, the corrected waking time, and the corrected sleep stage duration. Based on the feedback information, the current sleep data, and the historical sleep data, an optimal sleep staging algorithm is determined that takes into account both the user's sleep data and the user's actual sleep state. Here, the optimal sleep staging algorithm can be understood as a personalized sleep staging algorithm generated for the user. The personalized sleep staging algorithm can, but is not limited to, train a classification model (or a regression model) in combination with the user's current sleep data and historical sleep data, and can construct an error function based on the prediction results and feedback information of the classification model. The classification model is optimized by the error function (for example, using the gradient descent method to converge the error function to a minimum value). After judging that the optimal sleep staging algorithm meets the sleep prediction requirements based on at least one evaluation indicator among the error evaluation indicator, the adaptability evaluation indicator, and the improvement evaluation indicator, the target sleep staging algorithm is updated to the optimal sleep staging algorithm in real time, so that after the user's sleep data is obtained next time, sleep staging data combined with the user's most recent actual sleep state can be accurately generated.

[0055] Of course, the optimal sleep staging algorithm disclosed herein may also be the user's current target sleep staging algorithm, or any other basic sleep staging algorithm in the branch algorithm library, and is not limited thereto.

[0056] In this way, on the one hand, sleep staging data suitable for different user groups can be generated; on the other hand, the user's feedback information, current sleep data, and historical sleep data can be combined to determine the optimal sleep staging algorithm, and the target sleep staging algorithm can be 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 taking into account the actual sleep status reported by the user. This not only ensures the real-time accuracy of the generated sleep staging data, but also provides accurate technical support for subsequent sleep analysis and health recommendations.

[0057] See also Figure 4 and Figure 5 , Figure 4 A schematic diagram showing sleep stage data obtained for users with sleep disorders using an existing sleep stage generation method according to some embodiments of the present disclosure is shown. Figure 5 FIG2 shows a schematic diagram of sleep stage data obtained by the personalized dynamic sleep stage method for sleep disorder category users according to some embodiments of the present disclosure. Figure 4As shown, taking the sleep stage data including light sleep stage, deep sleep stage and awake stage obtained by the existing sleep stage generation method for users with sleep disorders as an example, the sleep stage data 400 obtained by the existing sleep stage generation method can reflect that users with sleep disorders are mainly divided into light sleep stage and deep sleep stage during 00:00-05:00, and are in the awake stage only around 05:00 before waking up. Users with sleep disorders are prone to frequent awakening or difficulty falling asleep during sleep. Therefore, the existing sleep stage generation method cannot provide users with sleep disorders with sleep stage data that is more in line with the user's reality. Figure 5 As shown, taking the sleep staging data including light sleep stage, deep sleep stage and awake stage obtained by the personalized dynamic sleep staging method of the present invention for users with sleep disorders as an example, the sleep staging data 500 obtained by the personalized dynamic sleep staging method can reflect that the users with sleep disorders are mainly divided into light sleep stage, deep sleep stage and awake stage during the period of 00:00-05:00. The awake stage is mainly concentrated around 01:00 and continues to be in the awake stage around 05:00 before waking up. Therefore, the personalized dynamic sleep staging method can provide users with sleep disorders with sleep staging data that is more in line with the user's reality.

[0058] 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:

[0059] determining at least two historical sleep indicators of the user based on the historical sleep data of the user;

[0060] Determine the user's user characteristic indicators based on all historical sleep indicators and basic attributes; and

[0061] The user's user feature indicators are input into the classification model to obtain the user's user category.

[0062] When the user's characteristic information includes the user's historical sleep data and basic attributes, in order to ensure the accuracy of identifying different users, at least two historical sleep indicators can be extracted from the user's historical sleep data. Each historical sleep indicator can be, but is not limited to, any one of the characteristic indicators of the number of snoring in the past 30 days, the recent change rate of snoring, the long-term change rate of snoring, the daily heart rate fluctuation value, the recent change rate of heart rate, the long-term change rate of heart rate, the average daily sleep duration, and the regularity of falling asleep time. Then, all historical sleep indicators and basic attributes can be converted (for example, normalized) to obtain all historical sleep indicators and basic attributes that conform to the data format, and the splicing results of all processed historical sleep indicators and processed basic attributes are used in matrix form as the user characteristic indicators of the user.

[0063] Here, the indicator types included in the basic attributes can be found in Figure 6 Schematic diagram of basic attributes 600 of some embodiments of the present disclosure is shown. Figure 6 As shown, basic attributes 600 may include corresponding indicator values ​​entered by the user according to each indicator description, such as a gender indicator of male, a birth date indicator of 1970-01, a sleep disorder indicator of 3, a snoring condition indicator of 1, a pacemaker indicator of 0, a palpitation and chest tightness symptom indicator of 0, and a nighttime waking condition indicator of 1. When converting the basic attributes, if the gender indicator entered by the user is male, the gender indicator may be converted to a value of 1 (or 0) to obtain a gender indicator that conforms to the data format, but the present invention is not limited thereto.

[0064] Furthermore, after obtaining the user's user feature indicators, the user's user feature indicators can be input into a classification model to obtain a more accurate user category through model prediction. Here, the classification model can be, but is not limited to, a decision tree machine learning model disclosed in the art, trained using multiple sets of user feature samples and classification labels for each set of user feature samples. Each set of user feature samples can include user feature indicator samples that have undergone conversion and are presented in matrix form. The classification labels can include 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.

[0065] In some embodiments of the present disclosure, the basic sleep staging algorithm has corresponding cluster centers; and step 204 further includes:

[0066] Determining current data features corresponding to the user's current sleep data;

[0067] Determine the historical cluster center corresponding to the user's historical sleep data, and determine whether the user's status has changed based on current data characteristics and the historical cluster center; and

[0068] In response to determining the user's state change, based on the current data features and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm corresponding to the cluster center closest to the current data features in the branch algorithm library is determined as the user's target sleep staging algorithm.

[0069] Since the user's sleep state is not static, for example, the user is affected by the sleeping environment or physical condition, which can easily cause the user's sleep state to change. In order to ensure the real-time 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 dynamic adjustment of the sleep staging algorithm, thereby obtaining the user's target sleep staging algorithm.

[0070] After obtaining the user's current sleep data, at least two current sleep indicators can be extracted from the current sleep data as current data features. Each current sleep indicator can be, but is not limited to, any one of the following: the current number of snoring, the recent change rate of snoring, the long-term change rate of snoring, 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 regularity of falling asleep. The historical sleep data of the same user can then be standardized to obtain the corresponding historical cluster center. It should be noted that there is a corresponding relationship between the data feature types of the historical cluster center and the data feature types of the current data features. For example, when the current data features sequentially include the current number of snoring, the recent change rate of snoring, and the long-term change rate of snoring, the corresponding historical cluster center can sequentially include the standardized value of the number of snoring in the past 30 days, the standardized value of the recent change rate of snoring, and the standardized value of the long-term change rate of snoring. The above-mentioned standardization processing method is a technical means disclosed in the art and will not be elaborated on here.

[0071] Furthermore, by determining whether the current data feature significantly deviates from the historical cluster center, it is possible to identify whether the user has a potential change in sleep state, that is, to determine whether the user's state has changed. Here, when determining whether the current data feature significantly deviates from the historical cluster center, the current data feature and the historical cluster center can be substituted into the following formula (1) to calculate the feature distance between the current data feature and the historical cluster center:

[0072] Formula (1)

[0073] Among them, d can be the characteristic distance between the current data feature and the historical cluster center, It can be the jth current sleep indicator of the current data feature, can be the jth normalized value of the historical cluster center, M is the number of current sleep indicators of the current data feature, and The data feature type and There is a corresponding relationship between the data feature types.

[0074] If the characteristic distance between the current data features and the historical cluster centers is less than or equal to a specified threshold, it indicates that the user's sleep state has not changed significantly, and 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 disclosed embodiment can be the product of a preset adjustment coefficient and the standard deviation corresponding to the user's user category to ensure that the basis for determining the characteristic distance between the current data features and the historical cluster centers is more reliable. The preset adjustment coefficient can be, but is not limited to, 2. The standard deviation corresponding to the user category of the user can be calculated based on the user feature samples corresponding to the user category of the user, but no further details are given here.

[0075] If the characteristic distance between the current data feature and the historical cluster center is greater than a specified threshold, it indicates that the user's sleep state has changed. In response to determining the user's state change, the basic sleep staging algorithm with the closest distance to the current data feature can be determined based on the characteristic distance between the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library. 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. The user 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 cluster center, and each cluster center of each basic sleep staging algorithm can be obtained by normalizing the historical sleep data samples of the corresponding user category.

[0076] It should be noted that there is also a corresponding relationship between the data feature type of the cluster center of each basic sleep staging algorithm and the data feature type of the current data feature. For example, when the current data features include the current number of snoring times, the recent change rate of snoring times, and the long-term change rate of snoring times in sequence, the cluster center of each basic sleep staging algorithm can include the standardized value of the number of snoring times in the past 30 days, the standardized value of the recent change rate of snoring times, and the standardized value of the long-term change rate of snoring times in sequence. The above-mentioned standardization processing method is a technical means disclosed in the art and will not be elaborated here.

[0077] In some embodiments of the present disclosure, based on current data features and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm corresponding to the cluster center closest to the current data features in the branch algorithm library is determined as the target sleep staging algorithm for the user, further comprising:

[0078] Determine whether the closest feature distance between the current data feature and the cluster center of the remaining basic sleep staging algorithms is greater than or equal to a preset distance threshold;

[0079] In response to the nearest feature distance being greater than or equal to a preset distance threshold, obtaining user feedback information; and

[0080] Based on the user's feedback information, current sleep data and historical sleep data, a personalized sleep staging algorithm for the user is generated, and the personalized sleep staging algorithm is added to the branch algorithm library.

[0081] Because current user categories are relatively fixed, if a user's current sleep data doesn't significantly approach any user category, the generated sleep staging data can be inaccurate. In this case, the system can prompt the user to perform a self-calibration to allow the user to assess the accuracy of the generated sleep staging data. If the user believes the generated sleep staging data is inaccurate, the system can also prompt the user to provide feedback. This feedback will then be combined to create a personalized sleep staging algorithm tailored to the user, further ensuring the accuracy of the sleep staging data.

[0082] After the feature distance between the current data feature and the historical cluster center is greater than a specified threshold, other user categories that are more significantly similar to the user's current sleep data can be identified by determining whether the current data feature is significantly close to the cluster 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 cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library, the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library can be substituted into the following formula (2) to calculate the feature distance between the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library:

[0083] Formula (2)

[0084] In the above formula, It can be the characteristic distance between the current data feature and the cluster center of the remaining j-th basic sleep staging algorithm in the branch algorithm library, It can be the mth current sleep indicator of the current data feature, M is the number of current sleep indicators of the current data feature, can be the mth normalized value among the cluster centers of the remaining jth basic sleep staging algorithms in the branch algorithm library, and The data feature type and There is a corresponding relationship between the data feature types.

[0085] If the minimum feature distance (i.e., the closest 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 a preset distance threshold, it indicates that there are other user categories that are significantly closer to the user's current sleep data. The basic sleep staging algorithm corresponding to the minimum feature distance can then be selected 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 disclosed embodiments may be the product of a preset scaling factor and a class spacing to ensure a more reliable basis for determining the feature distance between the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library. The preset scaling factor may be, but is not limited to, 0.5. The class spacing may be the average feature distance between the cluster center of the basic sleep staging algorithm corresponding to the user's current user category in the branch algorithm library and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library.

[0086] If the minimum feature distance (i.e., the closest feature distance) between the current data feature and the cluster center of the remaining basic sleep staging algorithms in the branch algorithm library is greater than or equal to a preset distance threshold, it indicates that there are no other user categories that are significantly closer to the user's current sleep data. In this case, user feedback on the sleep staging data can be obtained, and combined with the feedback information, current sleep data, and historical sleep data to generate a personalized sleep staging algorithm for the user, and the personalized sleep staging algorithm can be added to the branch algorithm library. Here, the user feedback information can be obtained through a third-party sleep monitoring application on the electronic device, user voice communication content, or after-sales service platform. It may include corrected data corresponding to the current sleep staging data, or it may also include corrected data corresponding to the current sleep staging data and corrected data corresponding to historical sleep staging data, such as, but not limited to, one or more of a corrected bedtime, a corrected wake-up time, and a corrected sleep stage duration.

[0087] See here Figure 7 The interface diagram of obtaining user feedback information in some embodiments of the present disclosure is shown as follows Figure 7 As shown, the user can view the generated bedtime and wake-up time in the interface 700 displaying the sleep time feedback. If the user believes that the bedtime is abnormal, the correct bedtime can be selected in the selection box corresponding to the bedtime, that is, the correct bedtime can be entered in the correction box. For example, the user can correct the bedtime displayed as 22:39 on May 13, 2025 to 22:50 on May 13, 2025.

[0088] In some embodiments of the present disclosure, a personalized sleep staging algorithm for the user is generated based on the user's feedback information, current sleep data, and historical sleep data, including:

[0089] According to each basic sleep staging algorithm in the branch algorithm library, determining that the historical sleep data corresponds to the historical staging data of each basic sleep staging algorithm, and the current sleep data corresponds to the current staging data of each basic sleep staging algorithm, the historical sleep data has corresponding actual historical staging data;

[0090] Determining the staging data error of each basic sleep staging algorithm, where 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;

[0091] In response to the fact that the staging data errors of each basic sleep staging algorithm are greater than or equal to a preset error threshold, a personalized sleep staging algorithm for the user is generated based on user feedback information, current sleep data, and historical sleep data.

[0092] In order to more accurately identify whether there are other user categories that are more significantly similar to the user's current sleep data, the correction data corresponding to the current sleep stage data in the user's feedback information can also be combined to construct a personalized sleep staging algorithm for the user after determining that there are no other user categories that are more significantly similar to the user's current sleep data, thereby ensuring the accuracy of the sleep stage data.

[0093] After receiving user feedback, historical sleep data corresponding to each basic sleep staging algorithm in the branch algorithm library can be determined. For example, the historical sleep data can be input into each basic sleep staging algorithm, with the predicted sleep staging data serving as the historical staging data for the corresponding basic sleep staging algorithm. Furthermore, current sleep data corresponding to each basic sleep staging algorithm in the branch algorithm library can be determined. For example, the current sleep data can be input into each basic sleep staging algorithm, with the predicted sleep staging data serving as the current staging data for the corresponding basic sleep staging algorithm. Here, the historical sleep data has corresponding actual staging data, which can be the sleep staging data predicted by the user's current target sleep staging algorithm based on the historical sleep data. The current sleep data can also have corresponding actual staging data, which is the correction data corresponding to the current sleep data in the user's feedback.

[0094] Furthermore, 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 current staging data corresponding to each basic sleep staging algorithm can be used as a second data set. By performing error calculation on 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 sleep onset time point as an example, when determining the staging data error of each basic sleep staging algorithm, the first data set and each second data set can be substituted into the following formulas (3) to (5):

[0095] Formula (3)

[0096] In the above formula, It can be the error result of the sleeping time point between the first data set and the i-th second data set on the j-th day in history, It can be the sleeping time point of the jth historical day in the i-th second data set, It can be the sleeping time point on the j-th historical day in the first data set.

[0097] Formula (4)

[0098] In the above formula, It can be the error result between the first data set and the i-th second data set at the current sleeping time point, It can be the current sleeping time point in the i-th second data set, It may be the current sleep onset time point in the first data set (ie, the correction data corresponding to the current sleep stage data).

[0099] Formula (5)

[0100] In the above formula, can be the error result between the first data set and the i-th second data set, It can be the error result of the sleeping time point between the first data set and the i-th second data set on the j-th day in history, It can be the error result between the first data set and the i-th second data set at the current sleeping time point, and n can be the number of sleeping time points in the first data set excluding the current sleeping time point (ie, the number of historical days).

[0101] If the staging data error of any basic sleep staging algorithm is less than the preset error threshold, it indicates that there are still other user categories that are significantly closer to the user's current sleep data. Therefore, the basic sleep staging algorithm corresponding to the staging data error can be used as the user's target sleep staging algorithm, and the user category can also be updated to the user category corresponding to the staging data error.

[0102] If the staging data errors of all basic sleep staging algorithms are greater than or equal to a preset error threshold, indicating that no other user category exists that is significantly closer to the user's current sleep data, a personalized sleep staging algorithm can be generated for the user based on the user's current sleep data, historical sleep data, and feedback information. This personalized sleep staging algorithm can then be used to predict more accurate sleep staging data for the user. Here, the feedback information includes correction data corresponding to the current sleep staging data and correction data corresponding to the historical sleep staging data. When generating the personalized sleep staging algorithm for the user, a classification model (or regression model) disclosed in the art can be trained, but is not limited to, using the user's current and historical sleep data. An error function can be constructed based on the prediction results of the classification model and the feedback information. The classification model can then be optimized using this error function (e.g., using gradient descent to minimize the error function), thereby generating a personalized sleep staging algorithm for the user.

[0103] For example, taking the sleep staging data as the time of falling asleep as an example, a sleep data feature set can be generated based on the user's historical sleep data and current sleep data. Combined with the sleep data feature set and the weight parameters of each sleep data feature type in the sleep data feature set, a classification model (or regression model) disclosed in the art is trained. An error function can be constructed based on the sleep onset time predicted by the classification model and the correction data in the feedback information. The weight parameters of each sleep data feature type are adjusted using the gradient descent method so that the error function converges to a minimum value, and the trained classification model is then used as a personalized sleep staging algorithm for the user. Here, the expression of the error function can be, but is not limited to, referring to the following formula (6):

[0104] Formula (6)

[0105] In the above formula, L can be the error function, n can be the number of historical days corresponding to the historical sleep data (n+1 can be the current day), The time of falling asleep on the jth day in history can be predicted by the classification model. It can be the revised data on the jth day in the feedback information (that is, the revised time of falling asleep).

[0106] Of course, the embodiments of the present disclosure may also be, but not limited to, constructing an error function in a weighted form. The expression of the error function may be, but not limited to, referring to the following formula (7):

[0107] Formula (7)

[0108] In the above formula, L can be the error function, n can be the number of historical days corresponding to the historical sleep data (n+1 can be the current day), It can be the weight of historical data (can be set to but not limited to 0.3), The time of falling asleep on the jth day in history can be predicted by the classification model. It can be the revised data of the historical day j in the feedback information (that is, the revised sleeping time point), The classification model can predict the current time of falling asleep. It can be the current revised data in the feedback information (that is, the revised sleeping time point).

[0109] In some embodiments of the present disclosure, after generating a personalized sleep staging algorithm for a user, it is also necessary to use the personalized sleep staging algorithm to predict historical sleep data, current sleep data, and future sleep data, and use at least one evaluation indicator to comprehensively judge whether the personalized sleep staging algorithm meets the sleep prediction requirements. The multiple evaluation indicators may be one or more of an error evaluation indicator, an adaptability evaluation indicator, and an improvement evaluation indicator.

[0110] After generating a 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 can be 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 performing an error calculation with the feedback information. For example, taking the sleep staging data as the sleep onset time point and the corrected data type of the sleep staging data in the feedback information as the sleep onset time point as an example, the sleep onset time point predicted by the personalized sleep staging algorithm and the corrected sleep onset time point in the feedback information can be substituted into the following formula (8):

[0111] Formula (8)

[0112] In the above formula, It can be an error evaluation index, n can be the number of historical days corresponding to the historical sleep data (n+1 can be the current day), The time of falling asleep on the jth day in history can be predicted by the personalized sleep staging algorithm. It can be the revised data on the jth day in the feedback information (that is, the revised time of falling asleep).

[0113] After generating a personalized sleep staging algorithm for the user, an adaptability evaluation index can 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 can be 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 performing an error calculation with the feedback information indicated by the user for the sleep staging data. For example, taking the sleep staging data as the sleep onset time point and the corrected data type of the sleep staging data in the feedback information as the sleep onset time point as an example, the sleep onset time point predicted by the personalized sleep staging algorithm and the corrected sleep onset time point in the feedback information can be substituted into the following formula (9):

[0114] Formula (9)

[0115] In the above formula, It can be an adaptability evaluation index, n can be the number of historical days corresponding to the historical sleep data (n+1 can be the current day), and k can be the number of days in the future (usually 5 days). The personalized sleep staging algorithm can predict the time of falling asleep on the kth day in the future. It can be the revised data in the feedback information on the kth day in the future (that is, the revised sleeping time point).

[0116] After generating a personalized sleep staging algorithm for the user, an improvement evaluation index can be obtained by combining the personalized sleep staging algorithm, current sleep data, historical sleep data, feedback information, and each basic sleep staging algorithm in the branch algorithm library, and then judging this improvement evaluation index. Here, when obtaining the improvement evaluation index, the current sleep data and 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. The error evaluation index corresponding to each basic sleep staging algorithm in the branch algorithm library is then calculated by performing an error calculation with the feedback information. Next, the minimum error evaluation index can be selected from the error evaluation indexes corresponding to each basic sleep staging algorithm. The product of this minimum error evaluation index and a preset coefficient (generally set to 0.9) is then compared with the error evaluation index corresponding to the personalized sleep staging algorithm.

[0117] In an embodiment of the present disclosure, when multiple evaluation indicators include an error evaluation indicator, an adaptability evaluation indicator, and an improvement 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 evaluation indicator is less than the product of the minimum error evaluation indicator and a preset coefficient, it indicates that the user's personalized sleep staging algorithm meets the sleep prediction requirements, and the user's target sleep staging algorithm can be updated to the personalized sleep staging algorithm, and the personalized sleep staging algorithm can be added to the branch algorithm library.

[0118] See here Figure 8 Another schematic diagram of the branch algorithm library of some embodiments of the present disclosure is shown, as shown in FIG. Figure 8 As shown, another branch algorithm library 800 of the present disclosure may include six user categories: normal, sleep disorder, breathing disorder, severe snoring, heart disease, irregular body movement, and user a, as well as a normal sleep branch algorithm corresponding to the normal category, a sleep disorder branch algorithm corresponding to the sleep disorder category, a breathing disorder branch algorithm corresponding to the breathing disorder category, a severe snoring branch algorithm corresponding to the severe snoring category, a heart disease branch algorithm corresponding to the heart disease category, an irregular body movement branch algorithm corresponding to the irregular body movement category, and a personalized sleep staging algorithm a corresponding to user a. Here, another branch algorithm library 800 of the present disclosure may not be limited to the user categories and basic sleep staging algorithm types mentioned above.

[0119] See also Figure 9 , Figure 9 The following is an example block diagram of a personalized dynamic sleep staging system 900 according to some embodiments of the present disclosure. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Figure 9As shown, personalized dynamic sleep staging system 900 includes a category identification module 901, which is configured to determine a user category 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. Personalized dynamic sleep staging system 900 also includes a data generation module 902, which is 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 for the user based on the user's current sleep data and the user's target sleep staging algorithm. The personalized dynamic sleep staging system 900 also includes a data feedback module 903, which is configured to obtain user feedback and determine an optimal sleep staging algorithm based on the user's feedback, current sleep data, and historical sleep data. The optimal sleep staging algorithm is trained using a sleep data feature set generated from the user's historical and current sleep data, weight parameters for 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 sleep prediction requirements based on at least one evaluation metric. Furthermore, the personalized dynamic sleep staging system 900 also includes an algorithm update module 904, which is configured to update the target sleep staging algorithm to the optimal sleep staging algorithm.

[0120] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented 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, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via 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 via wired (e.g., coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).

[0121] See also Figure 10 , Figure 10 1 is a schematic block diagram of an electronic device 1000 according to some embodiments of the present disclosure. Figure 10 As 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 processor 1010, the disk drive 1020, the input / output interface 1030, the network interface 1040, and the memory 1050 can be communicatively connected via a communication bus 1060.

[0122] The processor 1010 may be implemented as a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and may be used to execute relevant programs to implement the technical solutions provided in this application.

[0123] The memory 1050 can be implemented in the form of ROM (Read Only Memory), RAM (Read Access Memory), static memory, dynamic storage device, etc. The memory 1050 can store an operating system 1051 for controlling the operation of the electronic device 1000 and a basic input and 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. can also be stored. In short, when the technical solutions provided in this application are implemented through software or firmware, the relevant program code is stored in the memory 1050 and is called and executed by the processor 1010.

[0124] The input / output interface 1030 is used to connect to an input / output module to enable information input and output. The input / output module can be configured as a component within the device (not shown) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc. Output devices may include a display, speaker, vibrator, indicator light, etc.

[0125] The network interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via wired means (e.g., USB, network cable, etc.) or wireless means (e.g., mobile network, Wi-Fi, Bluetooth, etc.).

[0126] The bus 1060 comprises a pathway for transmitting information between the various components of the device (eg, the processor 1010 , the disk drive 1020 , the input / output interface 1030 , the network interface 1040 , and the memory 1050 ).

[0127] It should be noted that although the above device only shows the processor 1010, disk drive 1020, input / output interface 1030, network interface 1040, memory 1050, bus 1060, etc., in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will understand that the above device may only include the components necessary to implement the method of the present application, and does not necessarily include all the components shown in the figure.

[0128] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0129] In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. Furthermore, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in a sequential order, or that all illustrated operations be performed to achieve the desired result. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of separate embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented in multiple implementations individually or in any suitable subcombination.

[0130] Although the subject matter has been described in language specific to structural features and / or methodological logical 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 dynamic sleep staging method, implemented by an electronic device, characterized in that: include: determining a user category of the user based on characteristic information of the user, the user category having a corresponding basic sleep staging algorithm; using a basic sleep staging algorithm corresponding to the user category of the user in a branch algorithm library as a target sleep staging algorithm for the user, and generating sleep staging data for the user based on the user's current sleep data and the user's target sleep staging algorithm; obtaining feedback from the user, and determining an optimal sleep staging algorithm based on the user's feedback, current sleep data, and historical sleep data, wherein the optimal sleep staging algorithm is trained using a sleep data feature set generated from the user's historical sleep data and current sleep data, weight parameters for 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 sleep prediction requirements are met based on at least one evaluation indicator; and Updating the target sleep staging algorithm to the optimal sleep staging algorithm; The basic sleep staging algorithm has corresponding cluster centers; The method of using the basic sleep staging algorithm corresponding to the user category of the user in the branch algorithm library as the target sleep staging algorithm for the user further includes: determining a current data feature corresponding to the current sleep data of the user, wherein the current data feature comprises at least two sleep indicators extracted from the current sleep data; Determining a historical cluster center corresponding to the historical sleep data of the user, and determining whether the user's status has changed based on the current data feature and the historical cluster center, wherein a data feature type of the historical cluster center corresponds to a data feature type of the current data feature; and In response to determining the change in the user's state, based on the current data features and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm corresponding to the cluster center in the branch algorithm library closest to the current data features is determined as the target sleep staging algorithm for the user.

2. The method according to claim 1, characterized in that The step of determining, based on the current data feature and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm corresponding to the cluster center closest to the current data feature in the branch algorithm library as the target sleep staging algorithm for the user further includes: Determining whether a closest feature distance between the current data feature and the cluster 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 feedback information from the user; and Based on the user's feedback information, current sleep data, and historical sleep data, a personalized sleep staging algorithm for the user is generated, and the personalized sleep staging algorithm is added to the branch algorithm library.

3. The method according to claim 2, characterized in that Generating a personalized sleep staging algorithm for the user based on the user's feedback information, current sleep data, and historical sleep data includes: Determining, based on each basic sleep staging algorithm in the branch algorithm library, that the historical sleep data corresponds to the historical staging data of each basic sleep staging algorithm, and that the current sleep data corresponds to the current staging data of each basic sleep staging algorithm, wherein the historical sleep data has corresponding actual historical staging data; determining a staging data error for each of the basic sleep staging algorithms, the staging data error comprising an error between actual historical staging data corresponding to the historical sleep data and the historical staging data corresponding to each of the basic sleep staging algorithms, and an error between corrected data corresponding to the current sleep data in the feedback information and current staging data corresponding to each of the basic sleep staging algorithms; In response to the fact that the staging data errors of the basic sleep staging algorithms are greater than or equal to a preset error threshold, a personalized sleep staging algorithm for the user is generated based on the user's feedback information, current sleep data, and historical sleep data.

4. The method according to any one of claims 1 to 3, characterized in that The user's characteristic information includes the user's historical sleep data and basic attributes; and The determining the user category of the user based on the user's characteristic information includes: determining at least two historical sleep indicators of the user based on the historical sleep data of the user; Determining a user characteristic index of the user based on all the historical sleep indicators and the basic attributes; and The user characteristic index of the user is input into a classification model to obtain the user category of the user.

5. A personalized dynamic sleep staging system, characterized by: include: a category identification module configured to determine a user category of the user based on characteristic information of the user, the user category having a corresponding basic sleep staging algorithm; a data generation module configured to use a basic sleep staging algorithm corresponding to the user category of the user in a branch algorithm library as a target sleep staging algorithm for the user, and generate sleep staging data for the user based on the user's current sleep data and the user's target sleep staging algorithm; a data feedback module configured to obtain feedback information from the user and determine an optimal sleep staging algorithm based on the user's feedback information, current sleep data, and historical sleep data, wherein the optimal sleep staging algorithm is trained using a sleep data feature set generated from the user's historical sleep data and current sleep data, weight parameters for 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 sleep prediction requirements are met based on at least one evaluation indicator; as well as an algorithm updating module, configured to update the target sleep staging algorithm to the optimal sleep staging algorithm; The basic sleep staging algorithm has corresponding cluster centers; The method of using the basic sleep staging algorithm corresponding to the user category of the user in the branch algorithm library as the target sleep staging algorithm for the user further includes: determining a current data feature corresponding to the current sleep data of the user, wherein the current data feature comprises at least two sleep indicators extracted from the current sleep data; Determining a historical cluster center corresponding to the historical sleep data of the user, and determining whether the user's status has changed based on the current data feature and the historical cluster center, wherein a data feature type of the historical cluster center corresponds to a data feature type of the current data feature; and In response to determining the change in the user's state, based on the current data features and the cluster centers of the remaining basic sleep staging algorithms in the branch algorithm library, the basic sleep staging algorithm corresponding to the cluster center in the branch algorithm library closest to the current data features is determined as the target sleep staging algorithm for the user.

6. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 4 when being executed by a processor.

7. An electronic device, characterized in that: include: one or more processors, and A memory associated with the one or more processors, the memory being used to store program instructions, wherein when the program instructions are read and executed by the one or more processors, the steps of the method according to any one of claims 1 to 4 are executed.

Citation Information

Patent Citations

  • Determination method and device of sleep staging, computer equipment and storage medium

    CN109567748A

  • Sleep management method and device based on wearable device

    CN116048250A

Cited By

  • Personalized sleep state monitoring method and system based on multi-modal physiological electrical signals

    CN122376022A