A sleep quality monitoring method and electronic device
Patent Information
- Application Number
- CN202211177165.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-09-26
AI Technical Summary
[0005]本申请实施例提供了一种睡眠质量监测方法及电子设备,用以解决现有技术中对睡眠时长需求不同的用户的睡眠质量监测结果不够准确的问题
[0016]由于在本申请实施例中,获取同一用户集合内多个用户的第一睡眠数据;针对每个用户,将该用户的第一睡眠数据输入到该用户对应的第一睡眠评分模型中,得到该用户的第一睡眠评分;根据多个用户的第一睡眠评分,确定在用户集合内每个用户的第一睡眠质量结果。考虑到用户对睡眠时长需求的差异性,在本申请中基于每个用户对应的第一睡眠评分模型对每个用户的睡眠质量进行个性化评分,可以提高用户的睡眠质量监测结果的准确性。
Smart Images

Figure CN117796759B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data acquisition technology for smart wearable devices, and in particular to a method and electronic device for monitoring sleep quality. Background Technology
[0002] For key personnel, their health needs to be closely monitored. Take bus drivers as an example: insufficient sleep can easily lead to fatigue, and drowsy driving can cause traffic accidents. If a safety accident occurs due to a bus driver's health issues, it could affect the safety of all passengers. Therefore, monitoring the sleep quality of bus drivers is crucial.
[0003] A driver's sleep quality can be monitored using a smartwatch. The smartwatch divides the sleep state into four stages based on the driver's vital signs: wakefulness, REM sleep, light sleep, and deep sleep. The driver's sleep quality is then assessed based on the duration of each of the four stages.
[0004] However, different drivers have different sleep duration requirements. For example, some drivers only need 6 hours of sleep to recover, while others need 7 hours. Currently, smartwatch manufacturers usually use a uniform sleep quality assessment model to monitor drivers' sleep quality, which results in inaccurate sleep quality monitoring results for drivers with different sleep duration requirements. Summary of the Invention
[0005] This application provides a sleep quality monitoring method and electronic device to solve the problem that the sleep quality monitoring results of users with different sleep duration needs are not accurate enough in the prior art.
[0006] In a first aspect, embodiments of this application provide a sleep quality monitoring method, the method comprising:
[0007] Obtain the first sleep data of multiple users within the same user set;
[0008] For each user, the user's first sleep data is input into the user's corresponding first sleep rating model to obtain the user's first sleep rating;
[0009] Based on the first sleep scores of the multiple users, determine the first sleep quality result for each user within the user set.
[0010] Secondly, embodiments of this application also provide a sleep quality monitoring device, the device comprising:
[0011] The acquisition module is used to acquire the first sleep data of multiple users within the same user set;
[0012] The scoring module is used to input the user's first sleep data into the corresponding first sleep scoring model for each user to obtain the user's first sleep score.
[0013] A determination module is used to determine the first sleep quality result for each user in the user set based on the first sleep scores of the plurality of users.
[0014] Thirdly, embodiments of this application also provide an electronic device, which includes at least a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the steps of the sleep quality monitoring method as described in any of the above claims.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the sleep quality monitoring method as described in any of the preceding claims.
[0016] In this embodiment, first sleep data from multiple users within the same user set is acquired. For each user, their first sleep data is input into a corresponding first sleep scoring model to obtain their first sleep score. Based on the first sleep scores of multiple users, the first sleep quality result for each user within the user set is determined. Considering the differences in users' sleep duration needs, this application uses a personalized sleep quality score for each user based on their corresponding first sleep scoring model, which can improve the accuracy of sleep quality monitoring results. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic diagram of a sleep quality monitoring process is provided for some embodiments of this application;
[0019] Figure 2 A schematic diagram of sleep data provided for some embodiments of this application;
[0020] Figure 3 A schematic diagram illustrating the percentage of sleep states provided for some embodiments of this application;
[0021] Figure 4 A schematic diagram of fitting effect provided for some embodiments of this application;
[0022] Figure 5 A schematic diagram illustrating the training process of a first sleep scoring model provided for some embodiments of this application;
[0023] Figure 6 A schematic diagram illustrating the training process of a second sleep scoring model provided for some embodiments of this application;
[0024] Figure 7 A schematic diagram illustrating the training process of a data mapping model provided for some embodiments of this application;
[0025] Figure 8 One of the schematic diagrams of a sleep quality monitoring device provided for some embodiments of this application;
[0026] Figure 9 A second schematic diagram of a sleep quality monitoring device provided for some embodiments of this application;
[0027] Figure 10 This is another schematic diagram of the structure of a terminal device provided for some embodiments of this application. Detailed Implementation
[0028] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0029] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0030] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0031] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0032] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0033] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0034] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
[0035] This application provides a sleep quality monitoring method and electronic device. The method acquires first sleep data from multiple users within the same user set. For each user, the first sleep data is input into a corresponding first sleep scoring model to obtain the user's first sleep score. Based on the first sleep scores of multiple users, the first sleep quality result for each user within the user set is determined. Considering the differences in users' sleep duration needs, this application provides personalized sleep quality scoring for each user based on their corresponding first sleep scoring model, which can improve the accuracy of sleep quality monitoring results.
[0036] Figure 1 A schematic diagram of a sleep quality monitoring process is provided for some embodiments of this application. The process includes:
[0037] S101: Obtain the first sleep data of multiple users within the same user set.
[0038] The sleep quality monitoring method provided in this application is applied to an electronic device, which may be a server, a terminal, or a wearable device (such as a smartwatch or smart bracelet).
[0039] In this embodiment, the electronic device monitors the sleep quality of each user within the same user set. That is, the user set includes multiple users whose sleep quality needs to be monitored. For example, the multiple users included in the user set may be operators in key positions, such as bus drivers (hereinafter referred to as drivers) at the same bus depot. By monitoring the sleep quality of drivers, it can be determined whether the drivers are suitable for their posts, ensuring that drivers get sufficient rest before starting work and reducing the occurrence of safety accidents.
[0040] The first sleep data can be sleep data collected by a wearable device, or it can be data obtained after processing the sleep data collected by the wearable device. The first sleep data can be the user's sleep data within a certain statistical period, which includes, but is not limited to, daily, weekly, monthly, or yearly statistics. In this embodiment, daily statistics are used as an example for explanation.
[0041] The first sleep data includes the start time and duration of each sleep state. Typically, sleep states include one or more of the following: wakefulness, REM sleep, light sleep, or deep sleep. Correspondingly, the first sleep data may also include one or more of the following: wakefulness duration, REM sleep duration, light sleep duration, and deep sleep duration.
[0042] Figure 2 This shows the user's sleep data for the day of August 10, 2022 (i.e., daily statistics). The user's sleep started at 22:56 and ended at 05:19. Figure 2 The horizontal axis represents the time interval from the start to the end of sleep, and the vertical axis, from top to bottom, represents the four states of sleep: wakefulness, REM sleep, light sleep, and deep sleep. Therefore, through... Figure 2 It can obtain the user's sleep state at different times from the start of sleep, and the duration of each block of sleep state (e.g., Figure 2 The duration of deep sleep (05:03-05:18) is 15 minutes, and the total duration of each sleep state can be calculated.
[0043] S102: For each user, input the user's first sleep data into the first sleep rating model corresponding to the user to obtain the user's first sleep rating.
[0044] Each user has their own corresponding first sleep rating model. Since each user's sleep needs are different, their corresponding first sleep rating models are also different. Therefore, based on each user's first sleep data and their corresponding first sleep rating model, a personalized sleep score can be obtained for each user. Simply put, User 1 only needs 6 hours of sleep to recover, while User 2 needs 7 hours. Even if User 1 and User 2 have the same sleep duration, their corresponding first sleep scores will be different.
[0045] The primary sleep rating model for a user can be a pre-trained model specific to that user. When training the primary sleep rating model for a user, the user's historical sleep data can be used as sample data. Taking daily statistics as an example, the user's historical sleep data can be the user's daily sleep data for m consecutive days, where m is a non-zero natural number. By training the primary sleep rating model for each user using their historical sleep data, taking into account the different sleep needs of different users, a unique primary sleep rating model can be obtained for each user, thus improving the accuracy of sleep quality monitoring results for different users. A description of the training process for the primary sleep rating model is provided in the following examples.
[0046] Optionally, the first sleep scoring model may include mathematical models and / or neural network models, etc.
[0047] S103: Determine the first sleep quality result for each user within the user set based on the first sleep scores of multiple users.
[0048] Because the first sleep score is a quantified result, each user's first sleep quality can be directly determined based on their first sleep score. For example, multiple users' first sleep scores can be sorted (e.g., from high to low or from low to high). One or more users with lower first sleep scores have poor sleep quality or insufficient sleep that day, while the remaining users have good sleep quality or sufficient sleep. The one or more users with lower first sleep scores can be those ranked lower in the first sleep score sorting process.
[0049] Alternatively, in another implementation, the electronic device stores a scoring threshold. Users with a first sleep score higher than this threshold have better sleep quality and sufficient sleep that day; conversely, users with a first sleep score lower than this threshold have poorer sleep quality and insufficient sleep that day. In this embodiment, the value of this scoring threshold is not limited.
[0050] Taking bus drivers as an example, in order to ensure the safety of drivers and passengers and reduce the occurrence of safety accidents, safety managers can make a judgment on whether drivers who have poor sleep quality or insufficient sleep are currently suitable for their posts.
[0051] This application embodiment scores the sleep quality of each user based on a first sleep scoring model corresponding to each user. Considering the differences in users' sleep duration requirements, this application uses a first sleep scoring model corresponding to each user to personalize the sleep quality score of each user, which can improve the accuracy of the user's sleep quality monitoring results.
[0052] To further improve the accuracy of sleep quality monitoring for users, based on the above embodiments, the method in this application embodiment further includes:
[0053] For each user, the user's first sleep data is input into the second sleep scoring model corresponding to the user set to obtain the user's second sleep score; based on the user's first sleep score and second sleep score, the difference in sleep scores between the user and other users in the user set is determined.
[0054] A second sleep quality result is determined for each user based on the difference in sleep scores relative to other users in the user set.
[0055] Since each user belongs to the same user set, and the work or study environments of users within this user set are similar, the user set can be regarded as a standard for user groups in similar environments. Therefore, for users within this user set, a second sleep score for each user can be obtained based on their sleep data and the second sleep scoring model corresponding to the user set, according to this standard.
[0056] Users within different user sets typically have different sleep needs, and correspondingly, the second sleep rating models for different user sets will also differ. Therefore, for a given user, the second sleep rating model of the user set to which that user belongs can be used to determine that user's second sleep rating. For example, taxi drivers may need to work late at night, while bus drivers only need to work during the day. Clearly, the sleep data of taxi drivers will differ from that of bus drivers, leading to differences in the sleep rating models between the two groups. Therefore, the second sleep rating model for bus drivers is used to score their sleep data, and the second sleep rating model for taxi drivers is used to score their sleep data, resulting in their second sleep rating.
[0057] The second sleep scoring model corresponding to a user set can be a pre-trained model for that user set. When training the second sleep scoring model for a user set, historical sleep data from multiple users within that user set can be used as sample data. Taking daily statistics as an example, the historical data for multiple users can be daily sleep data from multiple users for m consecutive days within that user set. Training the second sleep scoring model for a user set using historical sleep data from multiple users within the user set takes into account the similarity of work or study environments within the same group, such as the similarity of work and rest times among bus drivers. This allows for scoring of user sleep data under the same user set standard, thus further improving the accuracy of sleep quality monitoring results for different users. A description of the training process for the second sleep scoring model is provided in the following embodiments.
[0058] Optionally, the second sleep scoring model may include mathematical models and / or neural network models, etc.
[0059] For the same user, when determining the sleep score difference of the user based on the difference between the user's first sleep score and second sleep score, the following formula (1) can be satisfied:
[0060] bias = y_all - y_single (1)
[0061] Here, bias represents the difference between the user's second sleep score and first sleep score, y_all represents the user's second sleep score, and y_single represents the user's first sleep score. If bias is negative, it means that the user's sleep duration is less than that of other users in the user set, i.e., the sleep quality is poor; if bias is positive, it means that the user's sleep duration is more than that of other users in the user set, i.e., the sleep quality is good. To illustrate with a concrete example, suppose a user sleeps approximately 6 hours per day for m consecutive days, while other users in the same user group sleep approximately 7 hours per day for the same m consecutive days. This user sleeps 6.5 hours on this particular day. Using the first sleep rating model, the user receives a score of 70, while using the second sleep rating model, the user receives a score of 50. It's clear from this description that this user's sleep duration is relatively short compared to other users in the same user group. Using the aforementioned difference formula, the resulting bias is -20. A negative bias indicates that this user's sleep duration is relatively short compared to other users in the same user group, indicating a poor sleep quality.
[0062] Of course, the difference in sleep scores for this user could also be the difference between the user's first sleep score and second sleep score, for example, satisfying the following formula (2):
[0063] bias = y_single - y_all (2)
[0064] Because the sleep score difference for each user is a quantified result, the second sleep quality of each user can be determined directly based on the difference between their sleep scores and those of other users in the user set. For example, the sleep score differences of multiple users relative to other users in the user set can be sorted (e.g., from high to low or from low to high). One or more users with lower sleep score differences relative to other users in the user set can be identified as having a risk of long-term poor sleep quality and insufficient sleep, while the remaining users can be identified as having good long-term sleep quality and sufficient sleep. The one or more users with lower sleep score differences relative to other users in the user set can be the one or more users ranked lower after sorting the sleep score differences relative to other users in the user set from high to low.
[0065] Alternatively, in another implementation, the electronic device stores a difference threshold. Users whose sleep scores differ from those of other users in the user set by more than the difference threshold have better long-term sleep quality and sufficient sleep. Conversely, users whose sleep scores differ from those of other users in the user set by less than the difference threshold are at risk of poor long-term sleep quality and insufficient sleep. In this embodiment, the value of the difference threshold is not restricted.
[0066] Taking bus drivers as an example, in order to ensure the safety of drivers and passengers and reduce the occurrence of safety accidents, safety managers can pay attention to whether drivers with poor sleep quality or insufficient sleep need to adjust their work and rest schedules to ensure that drivers get enough rest before going on duty.
[0067] Because different manufacturers and models of wearable devices on the market may use different sleep staging algorithms, the sleep data collected by wearable devices with different sleep staging algorithms belongs to different data spaces. This may lead to different sleep quality scores for the same user and the same sleep data due to differences in wearable devices. Therefore, based on the above embodiments, in this application embodiment, sleep data collected by different wearable devices can be mapped to the same data space (hereinafter referred to as the baseline data space). Specifically, obtaining the first sleep data of multiple users within the same user set includes:
[0068] For each user, obtain the user's second sleep data and the device information for collecting the second sleep data; input the second sleep data into the data mapping model corresponding to the device information to obtain the user's first sleep data.
[0069] The second sleep data refers to sleep data collected by wearable devices. This second sleep data can be user sleep data within a certain statistical period, including but not limited to daily, weekly, monthly, or yearly statistics. In this embodiment, daily statistics are used as an example. The second sleep data includes the start time and duration of each recorded sleep state. Typically, sleep states include one or more of the following: wakefulness, REM sleep, light sleep, or deep sleep. Correspondingly, the second sleep data may also include one or more of the following: wakefulness duration, REM sleep duration, light sleep duration, and deep sleep duration.
[0070] Since different wearable devices may correspond to different data spaces, the data mapping model corresponding to the wearable device collecting the second sleep data can be used to represent the mapping relationship between the data space corresponding to that wearable device and the baseline data space. In other words, each manufacturer and model of wearable device has its own corresponding data mapping model. The data space corresponding to the wearable device can be represented by device information, which may include, but is not limited to, one or more of the following: the model and manufacturer of the wearable device. The baseline data space is one of the data spaces corresponding to different manufacturers and models of wearable devices on the market. For example, the data space corresponding to the wearable device with the highest accuracy in sleep state recognition (i.e., the highest accuracy of the sleep staging algorithm) can be selected as the baseline data space. Specifically, the accuracy of the wearable device in recognizing sleep states can be determined based on the manufacturer, model, sales volume, or the number of projects the wearable device has collaborated on with hospitals.
[0071] Optionally, in addition to model and / or manufacturer information, the device information may also include identification accuracy information.
[0072] In this embodiment, the first sleep data is the data obtained after processing the sleep data collected by the wearable device. Specifically, the user's first sleep data is obtained based on the data mapping model corresponding to the user's second sleep data and the device information that collected the user's second sleep data.
[0073] The data mapping model corresponding to the device information can be a model pre-trained for that device information. When training the data mapping model corresponding to the device information, historical sleep data from multiple users within the user set collected by the first wearable device corresponding to the device information and historical sleep data from multiple users within the same user set collected by the benchmark wearable device (the wearable device corresponding to the benchmark data space) can be used to train the data mapping model. Taking daily statistics as an example, the historical sleep data can include daily sleep data collected by multiple users simultaneously using both the first wearable device and the benchmark wearable device for m consecutive days. Therefore, it is convenient to analyze and build models for second sleep data collected from wearable devices of different manufacturers and models. See the following embodiments for a description of the training process of the data mapping model.
[0074] Optionally, the data mapping model may include mathematical models and / or neural network models, etc.
[0075] The training process for each of the above models will be explained below.
[0076] In one possible implementation, the training process of the first sleep scoring model is as follows: Figure 5 As shown, it includes:
[0077] S501: Obtain first sample data pairs for multiple users, each user's first sample sleep data pair including the user's first sample sleep data and first training sleep score.
[0078] The first sample sleep data can be sleep data collected by wearable devices, or sleep data obtained by inputting sleep data collected by wearable devices into a data mapping model.
[0079] S502: For each user, input the user's first sample sleep data into the user's corresponding first sleep rating model, and determine the user's first predicted sleep rating based on the first sleep rating model.
[0080] S503: Train the first sleep score model based on the first training sleep score and the first predicted sleep score.
[0081] For example, the first sleep rating model is a mathematical model, which can be a linear regression model. The linear regression model of the first sleep rating model can satisfy the following formula (3) or (4):
[0082] y(w, b) = wx + b (3)
[0083] y(w1,w2,w3,b)=w1x1+w2x2+w3x3+b (4)
[0084] In formula (3), y(w, b) represents the sleep score, x is the total duration of each sleep state, w and b are the parameters to be trained in the first sleep score model, and in formula (4), y(w1, w2, w3, b) represents the sleep score, x1 represents the REM sleep duration, x2 represents the light sleep duration, x3 represents the deep sleep duration, w1, w2, w3, and b are the parameters to be trained in the first sleep score model, and w1, w2, and w3 represent the weights corresponding to each sleep state. The higher the weight, the higher the importance.
[0085] Formula (3) primarily considers the differences in total sleep duration requirements among different users, while Formula (4) considers both the differences in total sleep duration requirements among different users and the different duration requirements of users for each sleep state. The first sleep rating model trained using Formula (4) can characterize the importance ranking of each sleep state and the proportion of relevant states specified in sleep recommendations. See [link to relevant documentation] Figure 3 The data shows the reference values for the percentages of relevant sleep states as recommended by the sleep guidelines, the percentages of each sleep state for the user, and normal and abnormal situations for the percentages of each sleep state. The reference values for the percentage of deep sleep as recommended by the sleep guidelines are 20%-60%, the percentage of light sleep is less than 55%, and the percentage of rapid eye movement (REM) sleep is 10%-30%. The user's percentage of deep sleep is 39%, the percentage of light sleep is 45%, and the percentage of REM sleep is 16%. All percentages of each sleep state are within the normal range.
[0086] To address the differences in total sleep duration requirements among different users as stated in formula (3), this application also proposes a first objective function. Substituting the first sample sleep data and the first training sleep score of each user into formula (3) yields multiple solutions for (w, b). Substituting these multiple solutions for (w, b) into the first objective function yields multiple first function values. The (w, b) corresponding to the smallest first function value (for example only) is selected as the parameter of the first sleep scoring model. The first function value represents the deviation between the sleep score predicted by the first sleep scoring model (i.e., the first predicted sleep score mentioned above) and the sleep score corresponding to the first sample sleep data (i.e., the first training sleep score mentioned above). The first objective function can satisfy the following formula (5):
[0087]
[0088] In formula (5), n represents the number of days of sleep data collected for the user; i represents the i-th day of the sleep data collection for the user. Let y represent the (w, b) solution that minimizes the value of the first function. i This represents the user's first training sleep score on day i; (wx+b) represents the user's first predicted sleep score on day i. This represents the deviation between the user's first training sleep score and first predicted sleep score on day i.
[0089] The first sample sleep data X is used to determine the total duration x of each sleep state, where X = {x1, x2, x3}, that is, the first sample sleep data X includes REM sleep duration x1, light sleep duration x2, and deep sleep duration x3, and the total sleep duration is the sum of REM sleep duration, light sleep duration, and deep sleep duration.
[0090] Regarding formula (4), which takes into account both the differences in the total sleep duration requirements of different users and the different requirements of users for the duration of each sleep state, this application embodiment also proposes a second objective function. Substituting the first sample sleep data and the first training sleep score of each user into formula (4), multiple solutions of (w1, w2, w3, b) can be obtained. Substituting the solutions of the above multiple sets of (w1, w2, w3, b) into the second objective function, multiple second function values can be obtained. The (w1, w2, w3, b) corresponding to the smallest second function value (for example only) is selected as the parameter of the first sleep score model. The second objective function value is used to represent the deviation between the first predicted sleep score and the first training sleep score. The second objective function can satisfy the following formula (6):
[0091]
[0092] In formula (6), n represents the number of days of sleep data collected for the user; i represents the i-th day of the sleep data collection for the user. Let (w1, w2, w3, b) be the solution that minimizes the value of the second function; yi represents the user's first training sleep score; (w1x1+w2x2+w3x3+b) represents the user's first predicted sleep score. This indicates the deviation between the user's first training sleep score and first predicted sleep score; It is the regular term of w1. It is the regular term of w2. w3 is the regularization term. w1, w2, and w3 can be determined by their corresponding regularization terms. For example, the proportion of rapid eye movement (REM) is w1 = 0.2, the proportion of light sleep is w2 = 0.5, and the proportion of deep sleep is w3 = 0.3. a, b′, and c are hyperparameters. There are no restrictions on the values of the hyperparameters. In some scenarios, w3 corresponding to c has the highest importance, and w2 corresponding to b′ has the lowest importance. Therefore, the following order of importance exists among the three hyperparameters: b′ > a > c.
[0093] Among them, x1, x2, and x3 in formula (6) can be directly determined by the above X = {x1, x2, x3}.
[0094] The aforementioned first training sleep score is related to the user's personalized first sample sleep data. For example, the first training sleep score can be the user's personalized sample sleep score collected by the device. Alternatively, the first training sleep score can be determined based on the sample sleep score; optionally, the first training sleep score is determined based on the first sample sleep scores of multiple users within the user set. For example, in the above S501, the process of obtaining the first training sleep score for each user includes:
[0095] For each user, obtain the first sample sleep score corresponding to the user's first sample sleep data;
[0096] Determine sleep score segmentation values based on the first sample sleep scores of multiple users;
[0097] For each user, a sleep data segmentation value is determined based on the user's first sample sleep data; and a first training sleep score is determined based on the sleep score segmentation value, the sleep data segmentation value, and the first sample sleep data.
[0098] The sleep score segmentation values include the quartiles and / or medians of the first sample sleep scores of multiple users. For example, the quartiles are obtained by statistically analyzing the daily sleep scores of multiple users over m consecutive days, and can be represented by y_1_4, y_1_2, and y_3_4, where the median can be represented by y_1_2.
[0099] For each user, the sleep data segmentation value for that user includes the quartiles and / or median of the user's first sample sleep data. For example, the quartiles are obtained by statistically analyzing the user's daily sleep data for m consecutive days, and can be represented by x_1_4, x_1_2, and x_3_4, where the median can be represented by x_1_2.
[0100] For each user, the process of determining the user's first training sleep score based on the sleep score segmentation value, the user's sleep data segmentation value, and the user's first sample sleep data can satisfy the following formula (7):
[0101]
[0102] In the above formula (7), the corresponding formula in formula (7) is used to process the data based on the relationship between the user's first sample sleep data x and the median x_1_2 in the sleep data segmentation value. The first sample sleep data x can be the user's total sleep duration (i.e., corresponding to the above formula (3)) or the total duration of each sleep state (i.e., corresponding to the above formula (4)). It is worth noting that if the first sample sleep data x is the total duration of each sleep state, then based on the above formula (7), y1 corresponding to the REM sleep duration x1, y2 corresponding to the light sleep duration x2, and y3 corresponding to the deep sleep duration x3 can be calculated. Summing y1, y2, and y3 (including but not limited to weighted summation, where the weights of each sleep state can optionally be w1, w2, and w3) can yield a final y value.
[0103] The first sleep score model obtained by training the first training sleep score is the first sleep score model corresponding to the user. It can give a personalized score for each user's sleep quality based on the differences in each user's sleep duration needs, thereby improving the accuracy of the user's sleep quality monitoring results.
[0104] In one possible implementation, the training process of the second sleep scoring model is as follows: Figure 6 As shown, it includes:
[0105] S601: Obtain second sample data pairs for multiple users, where each user's second sample data pair includes the user's first sample sleep data and first sample sleep score.
[0106] The first sample sleep data can be sleep data collected by wearable devices, or sleep data obtained by inputting the sleep data collected by wearable devices into a data mapping model.
[0107] S602: Input the first sample sleep data of multiple users into the second sleep scoring model, and determine the second predicted sleep score of multiple users based on the second sleep scoring model.
[0108] S603: Train the second sleep rating model based on the first sample sleep scores and the second predicted sleep scores of multiple users.
[0109] For example, the second sleep rating model is a mathematical model, which can be a linear regression model. The linear regression model of the second sleep rating model can be found in the above formulas (3) and (4), and the similarities will not be elaborated further.
[0110] In formula (3) above, the first sample sleep data is the user's total sleep duration X, where X = {x1, x2, x3}, and the total sleep duration X is the sum of REM sleep duration x1, light sleep duration x2, and deep sleep duration x3. In formula (4) above, the first sample sleep data is the duration of each sleep state of the user, namely REM sleep duration x1, light sleep duration x2, and deep sleep duration x3.
[0111] Regarding formula (3) of the second sleep scoring model, this application embodiment also proposes a third objective function. Substituting the first sample sleep data and the first sample sleep score of each user into formula (3) of the second sleep scoring model, multiple solutions of (w, b) can be obtained. Substituting the solutions of the above multiple sets of (w, b) into the third objective function, multiple third function values can be obtained. The (w, b) corresponding to the smallest third function value (for example only) is selected as the parameter of the second sleep scoring model. Among them, the third function value is used to represent the deviation between the sleep score predicted by the second sleep scoring model (i.e., the second predicted sleep score mentioned above) and the sleep score corresponding to the first sample sleep data (i.e., the first sample sleep score mentioned above). The third objective function can be referred to formula (5) above, the difference being that y i Let (wx+b) represent the user's first sample sleep score on day i, and let (wx+b) represent the user's second predicted sleep score on day i. Other similarities will not be elaborated here.
[0112] Regarding formula (4) of the second sleep scoring model, this application embodiment also proposes a fourth objective function. Substituting the first sample sleep data and the first sample sleep score of each user into formula (4) of the second sleep scoring model, multiple solutions (w1, w2, w3, b) can be obtained. Substituting the solutions of the above multiple sets of (w1, w2, w3, b) into the fourth objective function, multiple fourth function values can be obtained. The (w1, w2, w3, b) corresponding to the smallest fourth function value (for example only) is selected as the parameter of the second sleep scoring model. The fourth objective function value is used to represent the deviation between the second predicted sleep score and the first sample sleep score. The fourth objective function can be found in formula (6) above, the difference being that y i Let (w1x1+w2x2+w3x3+b) represent the user's first sample sleep score on day i; (w1x1+w2x2+w3x3+b) represent the user's second predicted sleep score on day i. Other similarities will not be elaborated upon.
[0113] The second sleep scoring model, trained using the first sample sleep data, the first sample sleep score, and the second predicted sleep score, is the second sleep scoring model corresponding to this user set. It can score users' sleep data based on the similarity of the work or study environment of the same group and under the same user set standard, further improving the accuracy of sleep quality monitoring results for different users.
[0114] In one possible implementation, the training process of the data mapping model is as follows: Figure 7 As shown, it includes:
[0115] S701: Acquire third sample data pairs from multiple users, where each user's third sample data pair includes second sample sleep data collected by the first device and third sample sleep data collected by the second device.
[0116] Among them, for each user, the accuracy of the second sample sleep data collected by the first device was higher than the accuracy of the third sample sleep data collected by the second device.
[0117] S702: Input the third sample sleep data of multiple users into the data mapping model corresponding to the second device, and determine the predicted sleep data of multiple users based on the data mapping model.
[0118] S703: Train the data mapping model based on second-sample sleep data and predicted sleep data from multiple users.
[0119] The third sample data pair includes the second sample sleep data collected by the first device and the third sample sleep data collected by the second device. The first device has a higher accuracy in identifying sleep states than the second device; that is, the accuracy of the second sample sleep data collected by the first device is higher than the accuracy of the third sample sleep data collected by the second device. Therefore, the first device is used as the baseline device, and the data space corresponding to the first device is used as the baseline data space. Inputting the user's third sample sleep data into the data mapping model corresponding to the second device yields predicted sleep data mapped to the baseline data space.
[0120] The third sample data pair can be daily sleep data collected by multiple users simultaneously using both the first and second devices for m consecutive days. Specifically, for k users simultaneously using the first device and continuously monitoring for m days, the sleep data collected by the first device, i.e., the second sample sleep data, is Y = {y1, y2, y3, ..., y...}. i ......, y n}, and the sleep data collected by the second device, i.e., the third sample sleep data, is X = {x1, x2, x3, ..., x}. i ..., xn}, where n represents the total sleep duration in the second and third sample sleep data, and n is in minutes, y i Let x represent the user's sleep state at minute i, as collected by the first device. i This represents the user's sleep state at minute i, as collected by the second device.
[0121] For example, the data mapping model can be a mathematical model, which can be a linear regression model, and the linear regression model of the data mapping model can satisfy the following formulas (8), (9), (10) or (11):
[0122] y(w, b) = wx + b (8)
[0123]
[0124]
[0125]
[0126] In formula (8), y(w, b) represents the predicted sleep data mapped from the third sample sleep data to the baseline data space; x represents the third sample sleep data collected by the second device, i.e., X mentioned above; w and b are the parameters to be trained in the data mapping model. In formula (9), y(b) represents the predicted sleep data mapped from the third sample sleep data to the baseline data space; x represents the third sample sleep data collected by the second device, i.e., X mentioned above; T represents the duration of the sleep cycle, and in the example, T is a hyperparameter with a value of 90; t represents the t-th minute of sleep; b is the parameter to be trained in the data mapping model. In formula (10), y(b) represents the predicted sleep data mapped from the third sample sleep data to the baseline data space; x represents the third sample sleep data collected by the second device, i.e., X mentioned above; T represents the duration of the sleep cycle; t represents the t-th minute of sleep; b is the parameter to be trained in the data mapping model. In formula (11), y(a j b j b) represents the predicted sleep data mapped from the third sample sleep data to the baseline data space; x represents the third sample sleep data collected by the second device, i.e., X mentioned above; T represents the duration of the sleep cycle; t represents the t-th minute of sleep; N is a parameter used to control complexity, in the example N is a hyperparameter with a value of 3; a j b j b are the parameters to be trained in the data mapping model.
[0127] Formula (8) mainly considers the differences in data space corresponding to different manufacturers and models of wearable devices; Formula (9) considers both the differences in data space corresponding to different manufacturers and models of wearable devices and the periodicity of sleep; Formula (10) considers both the differences in data space corresponding to different manufacturers and models of wearable devices and the periodicity of sleep. The period of Formula (9) is fixed and uniform, while the period of Formula (10) is shorter and the upper and lower limits are larger than those of Formula (9); Formula (11) considers both the differences in data space corresponding to different manufacturers and models of wearable devices and the periodicity of sleep, and also considers different periodic characteristics, so parameter a is used. j b j However, considering that the period of formula (10) is fixed and uniform, it cannot fit complex periods. Therefore, formula (11) uses N to control the complexity of the model and mitigate the risk of overfitting. See Figure 4 The figure shows the fitting results of formulas (9), (10), and (11). The solid line represents the fitting result of formula (9), the dashed line represents the fitting result of formula (10), and the dotted line represents the fitting result of formula (11). The parameters in formula (11) are a1 = 0.5, a2 = 0.2, a3 = 0.6, b1 = 0.5, b2 = 0.8, and b3 = 0.4, respectively. Figure 4 It is not difficult to see that formula (11) fits the various sleep states better, which not only reflects the complexity of the periodic characteristics, but also avoids the risk of overfitting.
[0128] Regarding formula (8), which addresses the differences in data space corresponding to wearable devices from different manufacturers and models, this application also proposes a fifth objective function. Substituting the third sample sleep data and the second sample sleep data of multiple users into formula (8) yields multiple solutions for (w, b). Substituting these multiple solutions for (w, b) into the fifth objective function yields multiple fifth function values. The (w, b) corresponding to the smallest fifth function value (for example only) is selected as the parameter of the data mapping model. The fifth function value represents the deviation between the sleep data predicted by the data mapping model (i.e., the predicted sleep data mentioned above) and the sleep data collected by the wearable device corresponding to the baseline data space (i.e., the second sample sleep data mentioned above). The fifth objective function can satisfy the following formula (12):
[0129]
[0130] In formula (12), n is the total sleep duration, and the unit of n is minutes; i represents the i-th minute. This represents the (w, b) solution that minimizes the value of the first function; y iLet (wx+b) represent the second sample sleep data of multiple users at minute i; let (wx+b) represent the predicted sleep data of multiple users at minute i. This represents the deviation between the second sample sleep data and the predicted sleep data for multiple users at minute i.
[0131] The second sample of sleep data Y is used here to determine the sleep state per minute, where Y = {y1, y2, y3, ..., y...} i ......, y n The second sample sleep data Y includes the user's sleep status every minute.
[0132] Regarding formula (11), considering the differences in data space corresponding to wearable devices from different manufacturers and models, the periodicity of sleep, and the complexity of fitting different periodic characteristics to periodic features, this embodiment also proposes a sixth objective function. Substituting the third sample sleep data and the second sample sleep data of multiple users into formula (11), multiple sets of (a) can be obtained. j b j The solution of b) will be used to solve the above multiple sets of (a) j b j Substituting the solution of b) into the sixth objective function yields multiple values for the sixth function. The value corresponding to the smallest sixth function value is selected from (a). j b j b) are used as parameters of the data mapping model. The sixth function value is used to represent the deviation between the predicted sleep data and the second sample sleep data. The sixth objective function can satisfy the following formula (13):
[0133]
[0134] Where, α i The following formula (14) can be satisfied:
[0135]
[0136] In formula (13), n represents the total sleep duration in minutes; i represents the i-th minute; α i This indicates the weight of different sleep states. This represents the value of the sixth function that minimizes (a). j b j b) Solution; y i This represents the second sample of sleep data from multiple users; This represents predicted sleep data for multiple users; This represents the deviation between the second sample sleep data and the predicted sleep data for multiple users.
[0137] In formula (14), m i Let M represent the total duration of the i-th minute of sleep, and M represent the total sleep duration. Specifically, since deep sleep accounts for the smallest proportion of the duration of each sleep state, but the longer the deep sleep duration, the better the user's sleep quality, formula (14) can increase the weight of deep sleep. The principle of the weight of other sleep states is the same as that of deep sleep, so it will not be repeated here.
[0138] The data mapping model trained using the third sample sleep data collected by the second device is the data mapping model corresponding to the second device. It can map the sleep data collected by different manufacturers and models of wearable devices to the benchmark data space according to the differences in the data space corresponding to different manufacturers and models, thereby further improving the accuracy of the user's sleep quality monitoring results.
[0139] Based on the same technical concept and the above embodiments, this application provides a sleep quality monitoring device. Figure 8 A schematic diagram of a sleep quality monitoring device is provided for some embodiments of this application, such as... Figure 8 As shown, the device includes:
[0140] The acquisition module 801 is used to acquire the first sleep data of multiple users within the same user set;
[0141] The scoring module 802 is used to input the user's first sleep data into the first sleep scoring model corresponding to the user for each user, so as to obtain the user's first sleep score.
[0142] The determination module 803 is used to determine the first sleep quality result for each user in the user set based on the first sleep scores of multiple users.
[0143] In one possible implementation, the scoring module 802 is further configured to input the user's first sleep data into the second sleep scoring model corresponding to the user set for each user, so as to obtain the user's second sleep score.
[0144] In one possible implementation, the determining module 803 is further configured to determine the difference in sleep scores between the user and other users in the user set based on the user's first sleep score and second sleep score; and to determine the second sleep quality result for each user based on the difference in sleep scores between each user and other users in the user set.
[0145] In one possible implementation, the acquisition module 801 is specifically used to acquire the second sleep data of each user, as well as the device information for acquiring the second sleep data; and input the second sleep data into the data mapping model corresponding to the device information to obtain the first sleep data of the user.
[0146] exist Figure 8 Based on this, see Figure 9 The above-mentioned device may also include a training module 804;
[0147] In one possible implementation, the training module 804 is used to acquire first sample data pairs of multiple users, each user's first sample data pair including the user's first sample sleep data and a first training sleep score; for each user, the user's first sample sleep data is input into the user's corresponding first sleep score model, and the user's first predicted sleep score is determined based on the first sleep score model; the first sleep score model is trained according to the first training sleep score and the first predicted sleep score.
[0148] In one possible implementation, the training module 804 is specifically configured to: obtain a first sample sleep score corresponding to the first sample sleep data of each user; determine a sleep score segmentation value based on the first sample sleep scores of multiple users; determine a sleep data segmentation value for each user based on the first sample sleep data of that user; and determine a first training sleep score for that user based on the sleep score segmentation value, the sleep data segmentation value, and the first sample sleep data.
[0149] In one possible implementation, the training module 804 is used to acquire second sample data pairs of multiple users, each user's second sample data pair including the user's first sample sleep data and first sample sleep score; input the first sample sleep data of multiple users into a second sleep score model, determine the second predicted sleep score of multiple users based on the second sleep score model; and train the second sleep score model according to the first sample sleep score and the second predicted sleep score of multiple users.
[0150] In one possible implementation, the training module 804 is used to acquire third sample data pairs from multiple users. Each user's third sample data pair includes second sample sleep data collected by a first device and third sample sleep data collected by a second device. For each user, the accuracy of the second sample sleep data collected by the first device is higher than the accuracy of the third sample sleep data collected by the second device. The third sample sleep data from multiple users is input into the data mapping model corresponding to the second device. Based on the data mapping model, the predicted sleep data for multiple users is determined. The data mapping model is trained based on the second sample sleep data and the predicted sleep data for multiple users.
[0151] In one possible implementation, the first sleep scoring model and / or the second sleep scoring model satisfy the following formula: y(w1,w2,w3,b)=w1x1+w2x2+w3x3+b, where y(w1,w2,w3,b) represents the sleep score, x1 represents the REM sleep duration, x2 represents the light sleep duration, x3 represents the deep sleep duration, w1, w2, w3, and b are the parameters corresponding to the first sleep scoring model and / or the second sleep scoring model, and w1, w2, and w3 represent the weights corresponding to each sleep state.
[0152] In one possible implementation, the data mapping model satisfies the following formula: Where y(a) j b j b) represents the first sleep data; x represents the second sleep data; T represents the duration of the sleep cycle; t represents the t-th minute; N is a parameter used to control complexity; a j b j b are the parameters corresponding to the data mapping model.
[0153] Based on the same technical concept, this application also provides an electronic device. Figure 10 This application provides a schematic diagram of an electronic device structure, such as... Figure 10 As shown, it includes: processor 1001, communication interface 1002, memory 1003 and communication bus 1004, wherein processor 1001, communication interface 1002 and memory 1003 communicate with each other through communication bus 1004.
[0154] The memory 1003 stores a computer program. When the program is executed by the processor 1001, the processor 1001 performs the following steps:
[0155] Obtain the first sleep data of multiple users within the same user set;
[0156] For each user, the user's first sleep data is input into the user's corresponding first sleep rating model to obtain the user's first sleep rating;
[0157] Based on the first sleep scores of multiple users, determine the first sleep quality result for each user within the user set.
[0158] In one possible implementation, the processor 1001 is further configured to: for each user, input the user's first sleep data into a second sleep rating model corresponding to the user set to obtain the user's second sleep rating; and, based on the user's first sleep rating and second sleep rating, determine the difference in sleep rating between the user and other users in the user set.
[0159] A second sleep quality result is determined for each user based on the difference in sleep scores relative to other users in the user set.
[0160] In one possible implementation, processor 1001 is specifically configured to acquire first sleep data of multiple users within the same user set;
[0161] For each user, obtain the user's second sleep data and the device information for collecting the second sleep data; input the second sleep data into the data mapping model corresponding to the device information to obtain the user's first sleep data.
[0162] In one possible implementation, the processor 1001 is further configured to perform the following training process on the first sleep scoring model:
[0163] Acquire first sample data pairs from multiple users. Each user's first sample data pair includes the user's first sample sleep data and first training sleep score.
[0164] For each user, the user's first sample sleep data is input into the user's corresponding first sleep scoring model. Based on the first sleep scoring model, the user's first predicted sleep score is determined. The first sleep scoring model is trained based on the first training sleep score and the first predicted sleep score.
[0165] In one possible implementation, processor 1001 is specifically configured to acquire a first training sleep score;
[0166] For each user, obtain the first sample sleep score corresponding to the user's first sample sleep data;
[0167] Determine sleep score segmentation values based on the first sample sleep scores of multiple users;
[0168] For each user, a sleep data segmentation value is determined based on the user's first sample sleep data; and a first training sleep score is determined based on the sleep score segmentation value, the sleep data segmentation value, and the first sample sleep data.
[0169] In one possible implementation, the processor 1001 is further configured to perform the following training process on the second sleep scoring model:
[0170] Acquire second sample data pairs from multiple users, where each user's second sample data pair includes the user's first sample sleep data and first sample sleep score;
[0171] The first sample sleep data of multiple users are input into the second sleep scoring model, and the second predicted sleep score of multiple users is determined based on the second sleep scoring model.
[0172] The second sleep scoring model is trained based on the first sample sleep scores and the second predicted sleep scores of multiple users.
[0173] In one possible implementation, the processor 1001 is further configured to perform the following training process on the data mapping model:
[0174] Acquire third sample data pairs from multiple users. Each user's third sample data pair includes second sample sleep data collected by the first device and third sample sleep data collected by the second device. For each user, the accuracy of the second sample sleep data collected by the first device is higher than the accuracy of the third sample sleep data collected by the second device.
[0175] Third-sample sleep data from multiple users are input into the data mapping model corresponding to the second device. Based on the data mapping model, predicted sleep data for multiple users are determined.
[0176] The data mapping model is trained based on second-sample sleep data and predicted sleep data from multiple users.
[0177] In one possible implementation, the first sleep scoring model and / or the second sleep scoring model satisfy the following formula:
[0178] y(w1, w2, w3, b) = w1x1 + w2x2 + w3x3 + b, where y(w1, w2, w3, b) represents the sleep score, x1 represents the REM sleep duration, x2 represents the light sleep duration, x3 represents the deep sleep duration, w1, w2, w3, b are the parameters corresponding to the first sleep scoring model and / or the second sleep scoring model, and w1, w2, w3 represent the weights corresponding to each sleep state.
[0179] In one possible implementation, the data mapping model satisfies the following formula:
[0180] Where y(a) j b j b) represents the first sleep data; x represents the second sleep data; T represents the duration of the sleep cycle; t represents the t-th minute; N is a parameter used to control complexity; a j b j b are the parameters corresponding to the data mapping model.
[0181] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0182] The communication interface 1002 is used for communication between the above-mentioned electronic device and other devices.
[0183] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0184] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0185] Based on the same technical concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by an electronic device. When the program is run on the electronic device, it causes the electronic device to implement any of the above embodiments.
[0186] The aforementioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in an electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.
[0187] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0188] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0189] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0190] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0191] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for monitoring sleep quality, characterized in that, The method includes: Obtain the first sleep data of multiple users within the same user set; For each user, the user's first sleep data is input into the first sleep scoring model corresponding to that user to obtain the user's first sleep score. The first sleep scoring model corresponds to each user. Based on the first sleep scores of the multiple users, determine the first sleep quality result for each user within the user set; The method further includes: For each user, the user's first sleep data is input into the second sleep scoring model corresponding to the user set to obtain the user's second sleep score. The second sleep scoring model corresponds to the same user set, and each user belongs to the same user set. Based on the user's first sleep score and second sleep score, the difference in sleep scores between the user and other users in the user set is determined. A second sleep quality result for each user is determined based on the difference in sleep scores between each user and other users in the user set.
2. The method according to claim 1, characterized in that, The step of obtaining the first sleep data of multiple users within the same user set includes: For each user, the user's second sleep data and the device information for collecting the second sleep data are obtained, wherein the second sleep data is the user's sleep data collected by the wearable device within the statistical period; the second sleep data is input into the data mapping model corresponding to the device information to obtain the user's first sleep data; The data mapping model satisfies the following formula: ,in This represents the first sleep data; This represents the second sleep data; Indicates the duration of a sleep cycle; Indicates the first minute; These are parameters used to control complexity; , , These are the parameters corresponding to the data mapping model.
3. The method according to claim 1, characterized in that, The training process of the first sleep scoring model includes: Obtain first sample data pairs of the multiple users, where each user's first sample data pair includes the user's first sample sleep data and first training sleep score; For each user, the user's first sample sleep data is input into the user's corresponding first sleep scoring model. Based on the first sleep scoring model, the user's first predicted sleep score is determined. The first sleep scoring model is then trained based on the first training sleep score and the first predicted sleep score.
4. The method according to claim 3, characterized in that, Obtain the first training sleep score, including: For each user, obtain the first sample sleep score corresponding to the first sample sleep data of that user; Based on the first sample sleep scores of the multiple users, determine the sleep score segmentation value; For each user, a sleep data segmentation value is determined based on the user's first sample sleep data; and a first training sleep score is determined based on the sleep score segmentation value, the sleep data segmentation value, and the first sample sleep data.
5. The method according to claim 1, characterized in that, The training process of the second sleep scoring model includes: Obtain second sample data pairs from the multiple users, where each user's second sample data pair includes the user's first sample sleep data and first sample sleep score; The first sample sleep data of the multiple users are input into the second sleep scoring model, and the second predicted sleep score of the multiple users is determined based on the second sleep scoring model. The second sleep scoring model is trained based on the first sample sleep scores and the second predicted sleep scores of the multiple users.
6. The method according to claim 2, characterized in that, The training process of the data mapping model includes: Obtain third sample data pairs from the multiple users. Each user's third sample data pair includes second sample sleep data collected by the first device and third sample sleep data collected by the second device. For each user, the accuracy of the second sample sleep data collected by the first device is higher than the accuracy of the third sample sleep data collected by the second device. The third sample sleep data of multiple users is input into the data mapping model corresponding to the second device, and the predicted sleep data of the multiple users is determined based on the data mapping model. The data mapping model is trained based on the second sample sleep data of the multiple users and the predicted sleep data.
7. The method according to any one of claims 1, 3, and 5, characterized in that, The first sleep scoring model and / or the second sleep scoring model satisfy the following formula: ,in Indicates sleep score, Indicates the duration of rapid eye movement (REM) Indicates the duration of light sleep. Indicates the duration of deep sleep. These are the parameters corresponding to the first sleep scoring model and / or the second sleep scoring model. , , These represent the weights corresponding to each sleep state.
8. An electronic device, characterized in that, The electronic device includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the steps of a sleep quality monitoring method as described in any one of claims 1-7.
Citation Information
Patent Citations
Sleep scoring based on physiological information
CN108852283A
Sleep determination method and apparatus
JP2007244597A