A sleep quality assessment method, client, server, and storage medium
By training the sleep quality assessment model on the client and adjusting it collaboratively with the server, the problem of privacy leakage when collecting sleep data in the remote cloud center is solved, and the security of sleep quality assessment is improved.
Patent Information
- Application Number
- CN202111602630.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-12-24
AI Technical Summary
In the existing technology, there is a risk of privacy leakage when remote cloud centers collect and store user sleep monitoring data, which reduces the security of sleep quality assessment.
By training the sleep quality assessment model on the client, using sample environment parameters and sleep labels for model training, and sending the trained model to the server for adjustment, it avoids directly collecting and storing the user's sleep environment parameters on the server side, and reduces privacy leakage. risk.
It improves the security of sleep quality assessment, avoids leakage of user sleep environment parameters, and enhances privacy protection.
Smart Images

Figure CN114343574B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a sleep quality assessment method and a client, a server, and a storage medium. Background Art
[0002] Sleep quality has an important impact on the physical health of contemporary people. Due to the rapid development of the contemporary Internet, more and more online "surfing" night owls have emerged, indulging in the world of the Internet. As people enjoy the audio-visual impact of this fast network flow, they are accompanied by the troubles of irregular sleep and insomnia. Therefore, it is necessary to monitor people's sleep and improve their physical health index.
[0003] In the prior art, a large amount of user sleep monitoring data is collected and stored in a remote cloud center, and the user sleep monitoring data is analyzed to determine the user's sleep quality. Since the user's sleep monitoring data involves the user's privacy, collecting and storing a large amount of user sleep monitoring data in a remote cloud center will bring a great risk of privacy leakage, reducing the security when evaluating the user's sleep quality. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present application hope to provide a sleep quality assessment method and a client, a server, and a storage medium, which can improve the security of sleep quality assessment.
[0005] The technical solution of this application is implemented as follows:
[0006] The present application embodiment provides a sleep quality assessment method, which is applied to a client, including:
[0007] Sending a model acquisition instruction to a server to acquire a first model from the server based on the model acquisition instruction;
[0008] The first model is trained using sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model; the sample environmental parameters are environmental parameters of the environment in which the sample objects are located; and the sample sleep labels are sleep labels corresponding to the sample environmental parameters;
[0009] When the test environment parameters corresponding to the test object are received, the test environment parameters are input into the sleep quality assessment model to obtain the sleep quality assessment result corresponding to the test object.
[0010] The present application embodiment further provides a sleep quality assessment method, which is applied to a server and includes:
[0011] Upon receiving a model acquisition instruction transmitted by the client, acquiring a first model corresponding to the model acquisition instruction;
[0012] The first model is sent to the client, so that the client trains the first model based on the sample environmental parameters and the sample sleep labels at the client to obtain the sleep quality assessment model.
[0013] An embodiment of the present application provides a client, the client comprising:
[0014] A first sending unit, used for sending a model acquisition instruction to a server;
[0015] A first acquisition unit, configured to acquire a first model from the server based on the model acquisition instruction;
[0016] A training unit, configured to train the first model using sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model; the sample environmental parameters are environmental parameters of the environment in which the sample objects are located; and the sample sleep labels are sleep labels corresponding to the sample environmental parameters;
[0017] The input unit is used to input the test environment parameters corresponding to the test object into the sleep quality assessment model to obtain the sleep quality assessment result corresponding to the test object when receiving the test environment parameters corresponding to the test object.
[0018] An embodiment of the present application provides a server, wherein the server includes:
[0019] A second acquisition unit, configured to acquire a first model corresponding to the model acquisition instruction upon receiving the model acquisition instruction transmitted by the client;
[0020] The second sending unit is used to send the first model to the client, so that the client can train the first model based on the sample environmental parameters and sample sleep labels at the client to obtain the sleep quality assessment model.
[0021] The present application embodiment further provides a client, the client comprising:
[0022] A first memory, a first processor and a first communication bus, wherein the first memory communicates with the first processor via the first communication bus, the first memory stores a sleep quality assessment program executable by the first processor, and when the sleep quality assessment program is executed, the sleep quality assessment method applied in the client described above is executed by the first processor.
[0023] The present application embodiment further provides a server, the server comprising:
[0024] a second memory, a second processor and a second communication bus, wherein the second memory communicates with the second processor via the second communication bus, and the second memory stores a sleep quality assessment program executable by the second processor, and when the sleep quality assessment program is executed, the sleep quality assessment method applied in the server as described above is executed by the second processor.
[0025] An embodiment of the present application provides a storage medium having a computer program stored thereon, which is applied to a server and a client, and is characterized in that when the computer program is executed by a first processor, the sleep quality assessment method applied to the client is implemented; when the computer program is executed by a second processor, the sleep quality assessment method applied to the server is implemented.
[0026] The embodiment of the present application provides a sleep quality assessment method and a client, a server, and a storage medium. The sleep quality assessment method includes: sending a model acquisition instruction to a server to obtain a first model from the server based on the model acquisition instruction; training the first model using sample environment parameters and sample sleep labels corresponding to the sample object to obtain a sleep quality assessment model; the sample environment parameters are environmental parameters of the environment in which the sample object is located; the sample sleep labels are sleep labels corresponding to the sample environment parameters; when receiving the environment parameters to be tested corresponding to the object to be tested, inputting the environment parameters to be tested into the sleep quality assessment model to obtain a sleep quality assessment result corresponding to the object to be tested. By adopting the above method implementation scheme, the client uses the sample environment parameters and sample sleep labels corresponding to the sample object to train and obtain the first model from the server to obtain the sleep quality assessment model, and there is no need to send the sample environment parameters of the sample object to the server. There is no risk of leaking the sample environment parameters of the sample object or the environment parameters to be tested corresponding to the object to be tested, which improves the security of sleep quality assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A sleep quality assessment network model training diagram based on traditional machine learning in the prior art provided in an embodiment of the present application;
[0028] Figure 2 A sleep quality assessment method process provided in this application embodiment Figure 1 ;
[0029] Figure 3 A schematic diagram of an exemplary data collection module provided in an embodiment of the present application;
[0030] Figure 4 An exemplary sleep prediction graph based on a random forest algorithm provided in an embodiment of the present application;
[0031] Figure 5 An overall process framework diagram of an exemplary sleep quality assessment method provided in an embodiment of the present application;
[0032] Figure 6 A sleep quality assessment method process provided in this application embodiment Figure 2 ;
[0033] Figure 7 A flowchart of an exemplary training sleep quality assessment model provided in an embodiment of the present application;
[0034] Figure 8 An exemplary schematic diagram of user sleep quality evaluation training based on federated learning and edge computing provided in an embodiment of the present application;
[0035] Fig. 9 A schematic diagram of the structure of a client provided in an embodiment of the present application Figure 1 ;
[0036] Fig.10 A schematic diagram of the structure of a client provided in an embodiment of the present application Figure 2
[0037] Fig.11 A schematic diagram of the composition structure of a server provided in an embodiment of the present application Figure 1 ;
[0038] Fig.12 A schematic diagram of the composition structure of a server provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0040] Current healthcare-related applications usually collect and store a large amount of user sleep monitoring data in a remote cloud center, and use the machine learning (ML) model trained with the user sleep monitoring data in the remote cloud center to perform user health monitoring. Figure 1 As shown in the figure, each terminal user will send his or her own user sleep data (user sleep monitoring data) to the remote cloud center (data processing center), and the data processing center will use the user sleep data corresponding to each terminal user to train the machine learning model. Since the user's sleep monitoring data involves the user's privacy, collecting and storing a large amount of user sleep monitoring data in the remote cloud center will bring a great risk of privacy leakage, reducing the security of evaluating the user's sleep quality.
[0041] Embodiment 1
[0042] The present application embodiment provides a sleep quality assessment method, which is applied in a client. Figure 2 A sleep quality assessment method process provided in this application embodiment Figure 1 ,like Figure 2 As shown, sleep quality assessment methods may include:
[0043] S101. Send a model acquisition instruction to a server to acquire a first model from the server based on the model acquisition instruction.
[0044] A sleep quality assessment method provided in an embodiment of the present application is suitable for a scenario in which a first model is trained on a client, and the sleep quality assessment model is used to perform sleep quality assessment on a to-be-tested environment parameter corresponding to the to-be-tested environment.
[0045] In the embodiments of the present application, the client can be implemented in various forms. For example, the client described in the present application may include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, smart gateways, routers, etc., as well as devices such as digital TVs and desktop computers.
[0046] In the embodiment of the present application, the number of clients can be one, the number of clients can be two, or the number of clients can be more than one; the specific number of clients can be determined according to actual circumstances, and the embodiment of the present application does not limit this.
[0047] In an embodiment of the present application, the client may periodically send a model acquisition instruction to the server to obtain a first model from the server based on the model acquisition instruction; the client may also send a model acquisition instruction to the server when the sample environment parameters and sample sleep labels corresponding to the sample object are obtained, so as to obtain the first model from the server based on the model acquisition instruction; the client may also send a model acquisition instruction to the server in other cases to obtain the first model from the server based on the model acquisition instruction; the specific method may be determined based on actual conditions, and the embodiment of the present application is not limited to this.
[0048] In an embodiment of the present application, if the client sends a model acquisition instruction to the server at a fixed time, the fixed time may be 8 o'clock in the morning every day; the fixed time may also be 0 o'clock in the evening every day; the fixed time may also be other time points; the specific fixed time point may be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0049] It should be noted that the first model can be a model whose model parameters have been initialized; the first model can also be a model that has been trained using the training environment parameters and training sleep labels corresponding to the training sample objects, and the model loss is less than a preset model loss threshold; the specific first model can be determined based on actual conditions, and the embodiments of the present application are not limited to this.
[0050] It should also be noted that if the first model is a model that has been trained using the training environment parameters and training sleep labels corresponding to the training sample objects and the model loss is less than the preset model loss threshold, the client uses the sample environment parameters and sample sleep labels corresponding to the sample objects to train the first model to obtain a sleep quality assessment model. This process is to adjust the first model using the sample environment parameters and sample sleep labels corresponding to the sample objects at the client. The sleep quality assessment model obtained after the adjustment is a model that has the ability to analyze the environmental parameters of the object to be tested corresponding to the client during sleep, thereby improving the accuracy of the sleep quality assessment model in evaluating the sleep quality assessment results corresponding to the environmental parameters to be tested at the client.
[0051] In an embodiment of the present application, the preset model loss threshold may be a threshold configured in the client; the preset model loss threshold may also be a threshold in the input value client; the preset model loss threshold may also be a threshold transmitted to the client by other devices; the specific way in which the client obtains the preset model loss threshold may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0052] S102. Train a first model using sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model; the sample environmental parameters are environmental parameters of the environment in which the sample objects are located; and the sample sleep labels are sleep labels corresponding to the sample environmental parameters.
[0053] In an embodiment of the present application, after the client sends a model acquisition instruction to the server to obtain the first model from the server based on the model acquisition instruction, the client can use the sample environment parameters and sample sleep labels corresponding to the sample object to train the first model to obtain a sleep quality assessment model.
[0054] It should be noted that the sample environmental parameters are environmental parameters of the environment in which the sample object is located; and the sample sleep tags are sleep tags corresponding to the sample environmental parameters.
[0055] It should also be noted that the sample environment parameters may include: the light intensity of the sample object's environment, the sound amplitude of the sample object's environment, and the sample object's motion acceleration change information; the environment parameters may also include the client's screen shading parameters, the sample object's gravity change information, the client screen switch status, the client application's usage status parameters, etc. The specific sample environment parameters can be determined according to actual conditions, and the embodiments of the present application are not limited to this. An exemplary sample environment parameter is shown in Table 1:
[0056] Table 1 Sample environmental parameters
[0057]
[0058] In an embodiment of the present application, the client can be a mobile phone, and the sensor data (i.e., sample environmental parameters) collected by the mobile phone sensor can be obtained by using an application, and recorded and saved in a log file. The number of sample objects can be 34, and the sample environmental parameters can be the environmental parameters of the 34 sample objects within a period of time (45 days). For each of the 34 sample objects, each client can divide the environmental parameters of each sample object within a period of time into test sample environmental parameters and training sample environmental parameters in a ratio of 3:7.
[0059] It should be noted that the mobile phone sensor can collect environmental parameters at a time interval of 10 minutes.
[0060] In an embodiment of the present application, the client periodically displays instructions for collecting sample sleep tags every day for the sample subject to enter a daily sleep diary (sample sleep tag). The sample sleep tag includes the time to fall asleep, sleep latency (the time required to fall asleep), the time to wake up, the sample subject's score for the quality of sleep the previous night (the scoring level can be 5 levels, including: excellent 5, good 4, general 3, poor 2, very poor 1), sleep disorders (such as being unable to fall asleep within 30 minutes, waking up in the middle of the night, etc.), and the sleeping environment. The sleeping environment is the position of the mobile phone when you can sleep (on the bed, near the bed, in the bedroom, not in the bedroom). The time window between the sample subject's wake-up time and the time to fall asleep is taken as the sleep time, marked as sleep, and the parameters of other time periods are marked as non-sleep.
[0061] It should be noted that the sleep quality score includes 5 levels: Level 5 is excellent, Level 4 is good, Level 3 is average, Level 2 is poor, and Level 1 is very poor.
[0062] It should be noted that sleep disorders can include being unable to fall asleep within 30 minutes, waking up in the middle of the night, etc.
[0063] It should be noted that the sample environment parameter is a parameter containing time information.
[0064] In the embodiment of the present application, the sample object may be a sample user. The sample sleep tag includes parameters such as the time of falling asleep, the time of waking up, the duration of falling asleep, the time required to fall asleep, the user's rating of sleep quality, and sleep disorders input by the sample user.
[0065] In an embodiment of the present application, the process in which the client trains a first model using sample environmental parameters and sample sleep labels corresponding to sample objects to obtain a sleep quality assessment model includes: the client trains the first model using sample environmental parameters and sample sleep labels to obtain an initial training model; the client obtains initial model parameters of the initial training model; and sends the initial model parameters to the server; so that the server adjusts the first model at the server according to the initial model parameters to obtain an adjusted first model; when the client receives an instruction transmitted by the server that the adjusted first model converges, the client obtains model adjustment parameters corresponding to the adjusted first model from the instruction; the client replaces the initial model parameters in the initial training model with the model adjustment parameters to obtain an initial model, and uses the initial model as a sleep quality assessment model.
[0066] In an embodiment of the present application, when the number of clients is at least one, at least one client will send at least one initial model parameter to the server; the server adjusts the first model at the server according to the initial model parameters to obtain the adjusted first model. The process can be: the server performs weighted processing on at least one initial model parameter to obtain the initial model weighted parameters; then the server uses the initial model weighted parameters to replace the model parameters in the first model to obtain the adjusted first model.
[0067] In the embodiment of the present application, the convergence of the adjusted first model may be that the model loss corresponding to the adjusted first model is less than a preset model loss threshold.
[0068] In an embodiment of the present application, after the client sends the initial model parameters to the server, when the client receives an instruction from the server that the adjusted first model does not converge, the client obtains the model adjustment parameters from the instruction; the client continues to train the initial training model using the model adjustment parameters, sample environment parameters, and sample sleep labels until a sleep quality assessment model is obtained.
[0069] In the embodiment of the present application, the adjusted first model does not converge, which may be because the model loss corresponding to the adjusted first model is greater than or equal to a preset model loss threshold.
[0070] In an embodiment of the present application, the client continues to train the initial training model using model adjustment parameters, sample environmental parameters and sample sleep labels until a sleep quality assessment model is obtained, including: the client replaces the initial model parameters in the initial training model using the model adjustment parameters to obtain the initial model; the client trains the initial model using the sample environmental parameters and the sample sleep labels to obtain a training adjustment model; the client sends the acquired training model parameters of the training adjustment model to the server until receiving a convergence instruction of a convergence model obtained according to the training model parameters transmitted by the server, obtains the convergence model parameters of the convergence model from the convergence instruction, and replaces the training model parameters in the training adjustment model according to the convergence model parameters to obtain a sleep quality assessment model.
[0071] In an embodiment of the present application, the acquired training model parameters of the training adjustment model are sent to the server until a convergence instruction of the convergence model obtained according to the training model parameters transmitted by the server is received, the convergence model parameters of the convergence model are obtained from the convergence instruction, and the training model parameters in the training adjustment model are replaced according to the convergence model parameters to obtain the sleep quality assessment model. The process can be as follows: the client sends the training model parameters to the server; so that the server adjusts the adjusted first model at the server according to the training model parameters to obtain the continued training sleep quality assessment model; when the client receives an instruction to continue training the sleep quality assessment model as a convergence model (i.e., the continued training of the sleep quality assessment model converges), the client obtains the first parameter corresponding to the continued training of the sleep quality assessment model from the instruction; the client replaces the training model parameters in the training adjustment model with the first parameter to obtain the sleep quality assessment model. When the client receives an instruction that continuing to train the sleep quality assessment model is not a convergent model (i.e., continuing to train the sleep quality assessment model does not converge), the client obtains the first parameter corresponding to continuing to train the sleep quality assessment model from the instruction; and continues to train the training adjustment model using the first parameter, sample environment parameters, and sample sleep labels until a sleep quality assessment model is obtained.
[0072] In an embodiment of the present application, the client uses sample environmental parameters and sample sleep labels to train a first model to obtain an initial training model, including: the client eliminates the first environmental parameters that do not exist in the first sample sleep labels from the sample environmental parameters to obtain the eliminated sample environmental parameters; the client eliminates the second sleep labels that do not exist in the second sample environmental parameters from the sample sleep labels to obtain the eliminated sample sleep labels; the client uses the eliminated sample environmental parameters and the eliminated sample sleep labels to train the first model to obtain the initial training model.
[0073] In the embodiment of the present application, the first environmental parameter is a parameter for which the sample subject has not input the first sample sleep tag, but the client has obtained the sample environmental parameter in the corresponding time period. For example, if the sample subject has not input the sleep diary (first sample sleep tag) of the day, that is, there is no tag information, the first environmental parameter corresponding to the day is removed.
[0074] In the embodiment of the present application, the second sleep tag is a tag for which the second sample environment parameter corresponding to the sample object is not obtained, but the sample object has input a sample sleep tag within the corresponding time period. For example, if there is no sensor data (second sample environment parameter), the corresponding second sleep tag within this day is removed.
[0075] It can be understood that the client obtains the sample environment parameters after elimination by eliminating the first environment parameters that do not exist in the first sample sleep labels from the sample environment parameters; and obtains the sample sleep labels after elimination by eliminating the second sleep labels that do not exist in the second sample environment parameters from the sample sleep labels; the sample environment parameters after elimination and the sample sleep labels after elimination are made to be one-to-one corresponding sample data, and the first model is trained using the one-to-one corresponding sample environment parameters after elimination and the sample sleep labels after elimination, thereby reducing the noise in the initial training model and improving the accuracy of the initial training model.
[0076] In an embodiment of the present application, the client uses the sample environment parameters after elimination and the sample sleep labels after elimination to train the first model to obtain the process of the initial training model, including: the client uses the decision tree method to obtain the sample environment characteristics from the sample environment parameters after elimination; the client trains the first model according to the sample environment characteristics, the sample environment parameters after elimination and the sample sleep labels after elimination to obtain the initial training model.
[0077] For example, Figure 3As shown, the data acquisition module of the client collects a wide variety of sample environment parameters corresponding to the sample objects from the terminal (the sample environment parameters include: the sound amplitude of the sample object's environment (sound amplitude), the sample object's motion acceleration change information (acceleration), the light intensity of the sample object's environment (ambient light intensity), the client screen switch state (screen switch state), the client screen shading parameters (screen shading parameters), etc.), and it is necessary to first use the sleep diary record (sample sleep label) for data annotation; then the sample environment parameters and sample sleep labels are cleaned (that is, the first environment parameters that do not exist in the first sample sleep label are eliminated from the sample environment parameters to obtain the eliminated sample environment parameters, and the second sleep labels that do not exist in the second sample environment parameters are eliminated from the sample sleep labels to obtain the eliminated sample sleep labels), and then the multiple types of cleaned sample environment parameters are evaluated and selected by machine learning, with every 10 minutes as the time unit for parameter analysis and parameter feature extraction, that is, a variety of sample environment parameters are collected every 10 minutes to determine the impact of the multiple sample environment parameters on sleep quality. The C4.5 decision tree method can be used to classify multiple sample environmental parameters, and multiple sample environmental parameters can be divided into two states: sleep and wakefulness. F1-Measure is used as the evaluation criterion, and single feature classification and combined feature classification are used to screen out target sample environmental parameters from multiple sample environmental parameters, namely, sample environmental parameters. The final sample environmental parameters include ambient light intensity (average light intensity), acceleration (standard deviation of acceleration change), and sound amplitude (average sound amplitude). The client stores ambient light intensity, acceleration, and sound amplitude in the database.
[0078] In an embodiment of the present application, the client uses the sample environment parameters after elimination and the sample sleep labels after elimination to train the first model to obtain the initial training model, including: the client divides the sample environment parameters after elimination into training sample environment parameters and test sample environment parameters; and obtains the training sample sleep labels corresponding to the training sample environment parameters and the test sample sleep labels corresponding to the test sample environment parameters from the sample sleep labels after elimination; the client trains the first model using the training sample environment parameters and the training sample sleep labels according to the random forest prediction model training method to obtain a first sleep quality assessment model; the client inputs the test sample environment parameters into the first sleep quality assessment model to obtain an output sleep assessment result; and determines the model loss of the first sleep quality assessment model according to the output sleep assessment result and the test sample sleep labels; when the model loss is less than a preset model loss threshold, the client uses the first sleep quality assessment model as the initial training model; when the model loss is greater than or equal to the preset model loss threshold, the client continues to train the first sleep quality assessment model to obtain the first training model, until when the model loss of the first training model is less than the preset model loss threshold, the first training model is used as the initial training model.
[0079] In the embodiment of the present application, the features of three sensors are selected as the feature set of the sleep data set by means of a C4.5 decision tree. According to the data records collected in each 10-minute time window, the window data is divided into sleep state and wake state. Then a low-pass filter is used on a series of classification windows to eliminate possible sleep state detection errors, such as time noise or interrupted states between very quiet and static states. The accumulated time segments are combined into the duration of sleep, and the time of falling asleep, sleep duration, and waking time are used as input to evaluate the quality of the user's sleep.
[0080] In the embodiment of the present application, the training method of the random forest prediction model is adopted to divide the sample environmental parameters after elimination into training sample environmental parameters (data collected in the first 30 days) and test sample environmental parameters (data collected in the last 15 days). The random forest classifier randomly selects K environmental parameters from the training sample environmental parameters to generate K training sets. This process extracts data in a repeated manner with replacement. Then, K classification trees are generated based on the K training sets to form a random forest, and finally the final output result is determined by voting. The training method of the random forest prediction model is as follows: Figure 4As shown: the sample environment parameters are divided into training parameters and test parameters; repeated random sampling (sub-sampling) with replacement is performed K times on the training parameters to generate K new training sets (sub-training set 1, sub-training set 2, ... sub-training set K); according to each of the K new training sets, a decision tree (sub-training) is established using the training feature set obtained in the training parameters to obtain M (M is less than or equal to K) decision tree models (base model 1, base model 2, ... base model M), and the M decision tree models are used to form a random forest, thereby obtaining a first sleep quality assessment model; by determining the prediction results of the M decision tree models, a voting method (classification tree) is used to determine the output result of the first sleep quality assessment model (the comprehensive voting method determines the comprehensive result).
[0081] S103 . When the test environment parameters corresponding to the test object are received, the test environment parameters are input into a sleep quality assessment model to obtain a sleep quality assessment result corresponding to the test object.
[0082] In an embodiment of the present application, the client trains a first model using sample environmental parameters and sample sleep labels corresponding to the sample object to obtain a sleep quality assessment model. After that, when the client receives the test environmental parameters corresponding to the test object, the client can input the test environmental parameters into the sleep quality assessment model to obtain a sleep quality assessment result corresponding to the test object.
[0083] In the embodiment of the present application, the sample object and the object to be tested may be the same person; the sample object and the object to be tested may also be different persons; the specific number may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0084] It should be noted that if the sample object and the object to be tested are the same person, it is necessary to first use the sample environment parameters and sample sleep labels corresponding to the sample object to train the first model to obtain a sleep quality assessment model. After that, when the client receives the test environment parameters corresponding to the object to be tested, the client can use the sleep quality assessment model to perform sleep quality assessment on the test environment parameters.
[0085] Exemplarily, the overall process framework of an exemplary sleep quality assessment method is as follows: Figure 5As shown: the client (terminal device / edge node) uses the data acquisition module to collect sample environment parameters, which include the sound amplitude of the sample object's environment (microphone collects sound amplitude), the sample object's motion acceleration change information (acceleration sensor collects motion state), the sample object's environment light intensity (light sensor collects light intensity), the client's screen occlusion parameters (distance sensor collects screen occlusion), and uses the data collection APP to collect sleep diary records (sample sleep tags). The data processing module obtains the sound amplitude of the sample object's environment, the sample object's motion acceleration change information, and the sample object's environment. The light intensity, the screen shading parameters of the client, and the sample sleep label (raw data loading), the client performs the data cleaning preprocessing process, the client removes the first environment parameter that does not exist in the first sample sleep label from the sample environment parameter, and obtains the removed sample environment parameter; removes the second sleep label that does not exist in the second sample environment parameter from the sample sleep label, and obtains the removed sample sleep label; the client obtains the sample environment feature (sleep data feature) from the removed sample environment parameter, and the client trains the first model using the removed sample environment parameter, the sample environment feature and the removed sample sleep label to obtain the initial training model. The client obtains the initial model parameters (model parameters) of the initial training model; and sends the initial model parameters to the server (when the number of clients is multiple, the number of initial model parameters is also multiple), the server performs weighted processing on multiple initial model parameters to obtain initial model weighted parameters; the server adjusts the first model using the initial model weighted parameters to obtain the adjusted first model (sleep prediction model), and the server determines the convergence information of the adjusted first model; the server obtains the model adjustment parameters of the adjusted first model, and transmits the convergence information and model adjustment parameters (model parameters) to multiple clients. When the client receives an instruction from the server that the adjusted first model has converged, the client obtains the model adjustment parameters corresponding to the adjusted first model from the instruction; replaces the initial model parameters in the initial training model with the model adjustment parameters to obtain the initial model, and uses the initial model as the sleep quality assessment model. When the client receives an instruction from the server that the adjusted first model has not converged, the client obtains the model adjustment parameters from the instruction; continues to train the initial training model using the model adjustment parameters, sample environment parameters, and sample sleep labels until a sleep quality assessment model is obtained.
[0086] It can be understood that the client uses the sample environmental parameters and sample sleep label training corresponding to the sample object to obtain the first model from the server to obtain the sleep quality assessment model. There is no need to send the sample environmental parameters of the sample object to the server. There is no risk of leaking the sample environmental parameters of the sample object or the test environmental parameters corresponding to the test object, which improves the security of sleep quality assessment.
[0087] Embodiment 2
[0088] The present application embodiment further provides a sleep quality assessment method, which is applied to a server. Figure 6 A sleep quality assessment method process provided in this application embodiment Figure 2 ,like Figure 6 As shown, sleep quality assessment methods may include:
[0089] S201. Upon receiving a model acquisition instruction transmitted by a client, acquire a first model corresponding to the model acquisition instruction.
[0090] A sleep quality assessment method provided in an embodiment of the present application is suitable for a scenario in which a first model is transmitted to a client, the first model is trained using the client, and the sleep quality assessment model is used to perform sleep quality assessment on a test environment parameter corresponding to the test.
[0091] In the embodiments of the present application, the server can be implemented in various forms. For example, the server described in the present application may include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs and desktop computers.
[0092] In the embodiment of the present application, the number of clients can be one, the number of clients can be two, or the number of clients can be more than one; the specific number of clients can be determined according to actual circumstances, and the embodiment of the present application does not limit this.
[0093] S202: Send the first model to the client, so that the client can train the first model based on the sample environment parameters and the sample sleep labels at the client to obtain a sleep quality assessment model.
[0094] In an embodiment of the present application, after the server obtains the first model corresponding to the model acquisition instruction, the server may send the first model to the client.
[0095] In an embodiment of the present application, the number of clients is at least one; the number of initial model parameters is at least one; after the server sends the first model to the client, the server will also receive at least one initial model parameter transmitted by at least one client; the server performs weighted processing on at least one initial model parameter to obtain an initial model weighted parameter; the server adjusts the first model using the initial model weighted parameter to obtain an adjusted first model; the server determines convergence information of the adjusted first model; the convergence information includes convergence or non-convergence; the server obtains the model adjustment parameters of the adjusted first model, and transmits the convergence information and the model adjustment parameters to at least one client.
[0096] It should be noted that at least one client corresponds to at least one initial model parameter.
[0097] In the embodiment of the present application, an exemplary process of training a sleep quality assessment model is as follows: Figure 7 As shown:
[0098] S71. The client trains a first model using sample environmental parameters and sample sleep labels to obtain an initial training model.
[0099] In an embodiment of the present application, the client includes a terminal device and an edge node; when sample environmental parameters and sample sleep labels are collected, the first model can be trained on the terminal device side according to the user's selection to obtain an initial training model; or the first model can be trained on the edge node side according to the user's selection to obtain an initial training model.
[0100] It should be noted that the edge node is an intelligent gateway.
[0101] S72: The client obtains initial model parameters of the initial training model; and sends the initial model parameters to the server.
[0102] S73. The server receives at least one initial model parameter transmitted by at least one client.
[0103] It should be noted that the number of the client is at least one, and the number of the corresponding initial model parameters is at least one.
[0104] S74. The server performs weighted processing on at least one initial model parameter to obtain an initial model weighted parameter.
[0105] S75. The server adjusts the first model using the initial model weighted parameters to obtain an adjusted first model.
[0106] S76. The server determines convergence information of the adjusted first model.
[0107] It should be noted that the convergence information includes convergence or non-convergence.
[0108] S77. The server obtains the adjusted model adjustment parameters of the first model, and transmits convergence information and the model adjustment parameters to at least one client.
[0109] S78. When the client receives the instruction transmitted by the server indicating that the adjusted first model has converged, the client obtains the model adjustment parameters corresponding to the adjusted first model from the instruction.
[0110] S79. The client uses the model adjustment parameters to replace the initial model parameters in the initial training model to obtain the initial model, and uses the initial model as a sleep quality assessment model.
[0111] In the embodiment of the present application, each user's home is equipped with an intelligent gateway system, which can be used as a distributed edge node. If there are N sample users (sample objects), N sample environmental parameters can be collected from the edge nodes of the N sample users. Each of the N sample environmental parameters includes the light intensity of the sample object's environment, the sound amplitude of the sample object's environment, the sample object's motion acceleration change information, the client's screen shading parameters, the sample object's gravity change information, the client's screen switch status, the client application's usage status parameters, sleep data, exercise records, heart rate records, etc., which contain privacy and sensitive data. Figure 8 As shown: In this application, a terminal or an edge node obtains a first model from a server (remote data processing center); the first model (personal training model) is trained on the terminal side using the sample environmental parameters (user sleep data) and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model, or the first model (local model) is trained on each edge node (smart gateway) in the edge computing network using the sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model.
[0112] It can be understood that, by sending the first model to the client, the client can use the sample environmental parameters and sample sleep label training corresponding to the sample object to obtain the first model from the server to obtain a sleep quality assessment model. The server does not need to obtain the sample environmental parameters of the sample object from the client, and there is no risk of the server leaking the sample environmental parameters of the sample object or the test environmental parameters corresponding to the test object, thereby improving the security of sleep quality assessment.
[0113] Embodiment 3
[0114] Based on the same inventive concept of the first embodiment, the present application embodiment provides a client 1 corresponding to a sleep quality assessment method; Fig. 9 A schematic diagram of the structure of a client provided in an embodiment of the present application Figure 1, the client 1 may include:
[0115] A first sending unit 11 is used to send a model acquisition instruction to a server;
[0116] A first acquisition unit 12, configured to acquire a first model from the server based on the model acquisition instruction;
[0117] A training unit 13 is used to train the first model using sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model; the sample environmental parameters are environmental parameters of the environment in which the sample objects are located; and the sample sleep labels are sleep labels corresponding to the sample environmental parameters;
[0118] The input unit 14 is used to input the test environment parameters corresponding to the test object into the sleep quality assessment model to obtain the sleep quality assessment result corresponding to the test object when receiving the test environment parameters corresponding to the test object.
[0119] In some embodiments of the present application, the client further includes a replacement unit;
[0120] The training unit 13 is used to train the first model using the sample environmental parameters and the sample sleep labels to obtain the initial training model;
[0121] The first acquisition unit 12 is used to acquire the initial model parameters of the initial training model; when receiving the instruction transmitted by the server that the adjusted first model has converged, acquire the model adjustment parameters corresponding to the adjusted first model from the instruction;
[0122] The first sending unit 11 is used to send the initial model parameters to the server, so that the server can adjust the first model at the server according to the initial model parameters to obtain an adjusted first model;
[0123] The replacement unit is used to replace the initial model parameters in the initial training model with the model adjustment parameters to obtain an initial model, and use the initial model as the sleep quality assessment model.
[0124] In some embodiments of the present application, the first acquisition unit 12 is configured to, when receiving an instruction transmitted by the server indicating that the adjusted first model does not converge, acquire the model adjustment parameter from the instruction;
[0125] The training unit 13 is used to continue training the initial training model using the model adjustment parameters, the sample environment parameters and the sample sleep labels until the sleep quality assessment model is obtained.
[0126] In some embodiments of the present application, the replacement unit is used to replace the initial model parameters in the initial training model with the model adjustment parameters to obtain the initial model; replace the training model parameters in the training adjustment model according to the converged model parameters to obtain the sleep quality assessment model;
[0127] The training unit 13 is used to train the initial model using the sample environment parameters and the sample sleep labels to obtain a training adjustment model;
[0128] The first sending unit 11 is used to send the acquired training model parameters of the training adjustment model to the server;
[0129] The first acquisition unit 12 is used to obtain convergence model parameters of the convergence model from the convergence instruction until a convergence instruction of the convergence model obtained according to the training model parameters is received and transmitted by the server.
[0130] In some embodiments of the present application, the client further includes a rejection unit;
[0131] The elimination unit is used to eliminate the first environment parameter without the first sample sleep tag from the sample environment parameter to obtain the eliminated sample environment parameter; and eliminate the second sleep tag without the second sample environment parameter from the sample sleep tag to obtain the eliminated sample sleep tag;
[0132] The training unit 13 is used to train the first model using the sample environmental parameters after elimination and the sample sleep labels after elimination to obtain the initial training model.
[0133] In some embodiments of the present application, the client further includes a dividing unit and a first determining unit;
[0134] The division unit is used to divide the sample environment parameters after elimination into training sample environment parameters and test sample environment parameters;
[0135] The first acquisition unit 12 is used to acquire the training sample sleep label corresponding to the training sample environment parameter and the test sample sleep label corresponding to the test sample environment parameter from the removed sample sleep labels;
[0136] The training unit 13 is used to train the first model using the training sample environment parameters and the training sample sleep labels in accordance with the random forest prediction model training method to obtain a first sleep quality assessment model; when the model loss is greater than or equal to a preset model loss threshold, continue to train the first sleep quality assessment model to obtain a first training model, until when the model loss of the first training model is less than the preset model loss threshold, use the first training model as the initial training model; when the model loss is less than the preset model loss threshold, use the first sleep quality assessment model as the initial training model;
[0137] An input unit 14 is used to input the test sample environment parameter into the first sleep quality assessment model to obtain an output sleep assessment result;
[0138] The first determining unit is used to determine the model loss of the first sleep quality assessment model according to the output sleep assessment result and the test sample sleep label.
[0139] It should be noted that, in actual applications, the above-mentioned first sending unit 11, first acquisition unit 12, training unit 13 and input unit 14 can be implemented by the first processor 15 on the client 1, specifically a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing) or a field programmable gate array (FPGA); the above-mentioned data storage can be implemented by the first memory 16 on the client 1.
[0140] The present application embodiment also provides a client 1, such as Fig.10 As shown, the client 1 includes: a first processor 15, a first memory 16 and a first communication bus 17. The first memory 16 communicates with the first processor 15 through the first communication bus 17. The first memory 16 stores a program executable by the first processor 15. When the program is executed, the sleep quality assessment method described above is executed by the first processor 15.
[0141] In practical applications, the first memory 16 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the first processor 15.
[0142] An embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the first processor 15 , the sleep quality assessment method as described above is implemented.
[0143] It can be understood that the client uses the sample environmental parameters and sample sleep label training corresponding to the sample object to obtain the first model from the server to obtain the sleep quality assessment model. There is no need to send the sample environmental parameters of the sample object to the server. There is no risk of leaking the sample environmental parameters of the sample object or the test environmental parameters corresponding to the test object, which improves the security of sleep quality assessment.
[0144] Embodiment 4
[0145] Based on the same inventive concept of the second embodiment, the embodiment of the present application provides a server 2 corresponding to a sleep quality assessment method; Fig.11 A schematic diagram of the composition structure of a server provided in an embodiment of the present application Figure 1 , the server 2 may include:
[0146] The second acquisition unit 21 is used to acquire the first model corresponding to the model acquisition instruction when receiving the model acquisition instruction transmitted by the client;
[0147] The second sending unit 22 is used to send the first model to the client, so that the client can train the first model based on the sample environmental parameters and sample sleep labels at the client to obtain the sleep quality assessment model.
[0148] In some embodiments of the present application, the number of the client is at least one; the number of the initial model parameters is at least one; the server further includes a receiving unit, a processing unit, an adjustment unit and a determination unit;
[0149] The receiving unit is configured to receive at least one initial model parameter transmitted by at least one client; the at least one client corresponds to the at least one initial model parameter in a one-to-one manner;
[0150] A processing unit, configured to perform weighted processing on the at least one initial model parameter to obtain an initial model weighted parameter;
[0151] An adjustment unit, configured to adjust the first model using the initial model weighted parameters to obtain an adjusted first model;
[0152] A determination unit, configured to determine convergence information of the adjusted first model; the convergence information includes convergence or non-convergence;
[0153] A second acquisition unit 21 is used to acquire the model adjustment parameters of the adjusted first model;
[0154] The second sending unit 22 is configured to transmit the convergence information and the model adjustment parameter to the at least one client.
[0155] It should be noted that, in actual applications, the above-mentioned second acquisition unit 21 and the second sending unit 22 can be implemented by the second processor 23 on the server 2, specifically a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing) or a field programmable gate array (FPGA), etc.; the above-mentioned data storage can be implemented by the second memory 24 on the server 2.
[0156] The present application embodiment also provides a server 2, such as Fig.12 As shown, the server 2 includes: a second processor 23, a second memory 24 and a second communication bus 25. The second memory 24 communicates with the second processor 23 via the second communication bus 25. The second memory 24 stores a program executable by the second processor 23. When the program is executed, the sleep quality assessment method described above is executed by the second processor 23.
[0157] In practical applications, the second memory 24 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the second processor 23.
[0158] The embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the second processor 23, the sleep quality assessment method as described above is implemented.
[0159] It can be understood that, by sending the first model to the client, the client can use the sample environmental parameters and sample sleep label training corresponding to the sample object to obtain the first model from the server to obtain a sleep quality assessment model. The server does not need to obtain the sample environmental parameters of the sample object from the client, and there is no risk of the server leaking the sample environmental parameters of the sample object or the test environmental parameters corresponding to the test object, thereby improving the security of sleep quality assessment.
[0160] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0161] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0164] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A method for evaluating sleep quality, characterized in that: Applied to a client, the method comprises: Sending a model acquisition instruction to a server to acquire a first model from the server based on the model acquisition instruction; The first model is trained using sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model; the sample environmental parameters are environmental parameters of the environment in which the sample objects are located; and the sample sleep labels are sleep labels corresponding to the sample environmental parameters; When the test environment parameters corresponding to the test object are received, the test environment parameters are input into the sleep quality assessment model to obtain the sleep quality assessment result corresponding to the test object.
2. The method according to claim 1, characterized in that The step of training the first model using the sample environment parameters and the sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model includes: Using the sample environment parameters and the sample sleep labels to train the first model to obtain an initial training model; Acquire initial model parameters of the initial training model; and send the initial model parameters to the server; so that the server adjusts the first model at the server according to the initial model parameters to obtain an adjusted first model; Upon receiving an instruction transmitted by the server indicating that the adjusted first model has converged, obtaining a model adjustment parameter corresponding to the adjusted first model from the instruction; The initial model parameters in the initial training model are replaced by the model adjustment parameters to obtain an initial model, and the initial model is used as the sleep quality assessment model.
3. The method according to claim 2, characterized in that After sending the initial model parameters to the server, the method further includes: In case of receiving an instruction transmitted by the server that the adjusted first model does not converge, obtaining the model adjustment parameter from the instruction; The initial training model is continuously trained using the model adjustment parameters, the sample environment parameters and the sample sleep labels until the sleep quality assessment model is obtained.
4. The method according to claim 3, characterized in that The step of continuing to train the initial training model using the model adjustment parameters, the sample environment parameters, and the sample sleep labels until the sleep quality assessment model is obtained includes: Replacing the initial model parameters in the initial training model with the model adjustment parameters to obtain the initial model; Using the sample environmental parameters and the sample sleep labels to train the initial model to obtain a training adjustment model; The acquired training model parameters of the training adjustment model are sent to the server, until a convergence instruction of a convergence model obtained according to the training model parameters is received from the server, the convergence model parameters of the convergence model are acquired from the convergence instruction, and the training model parameters in the training adjustment model are replaced according to the convergence model parameters to obtain the sleep quality assessment model.
5. The method according to claim 2, characterized in that: The step of training the first model using the sample environment parameters and the sample sleep labels to obtain the initial training model includes: Eliminating the first environmental parameter without the first sample sleep tag from the sample environmental parameters to obtain the eliminated sample environmental parameters; Eliminating the second sleep tag that does not contain the second sample environmental parameter from the sample sleep tags to obtain the eliminated sample sleep tags; The first model is trained using the sample environmental parameters after elimination and the sample sleep labels after elimination to obtain the initial training model.
6. The method according to claim 5, characterized in that The step of training the first model using the sample environment parameters after elimination and the sample sleep labels after elimination to obtain the initial training model includes: Dividing the sample environment parameters after elimination into training sample environment parameters and test sample environment parameters; and acquiring the training sample sleep labels corresponding to the training sample environment parameters and the test sample sleep labels corresponding to the test sample environment parameters from the sample sleep labels after elimination; According to the random forest prediction model training method, the first model is trained using the training sample environment parameters and the training sample sleep labels to obtain a first sleep quality assessment model; Inputting the test sample environmental parameter into the first sleep quality assessment model to obtain an output sleep assessment result; and determining a model loss of the first sleep quality assessment model according to the output sleep assessment result and the test sample sleep label; When the model loss is less than a preset model loss threshold, using the first sleep quality assessment model as the initial training model; When the model loss is greater than or equal to a preset model loss threshold, continue training the first sleep quality assessment model to obtain a first training model, until the model loss of the first training model is less than a preset model loss threshold, and use the first training model as the initial training model.
7. A method for evaluating sleep quality, characterized in that: Applied to a server, the method comprises: Upon receiving a model acquisition instruction transmitted by the client, acquiring a first model corresponding to the model acquisition instruction; The first model is sent to the client, so that the client can train the first model based on the sample environmental parameters and the sample sleep labels at the client to obtain a sleep quality assessment model.
8. The method according to claim 7, characterized in that The number of the client is at least one; the number of the initial model parameters is at least one; after sending the first model to the client, the method further includes: Receiving at least one initial model parameter transmitted by at least one client; the at least one client corresponds to the at least one initial model parameter in one-to-one correspondence; Performing weighted processing on the at least one initial model parameter to obtain an initial model weighted parameter; Using the initial model weighted parameters to adjust the first model to obtain an adjusted first model; Determining convergence information of the adjusted first model; the convergence information includes convergence or non-convergence; Acquire model adjustment parameters of the adjusted first model, and transmit the convergence information and the model adjustment parameters to the at least one client.
9. A client, characterized in that: The client comprises: A first sending unit, used for sending a model acquisition instruction to a server; A first acquisition unit, configured to acquire a first model from the server based on the model acquisition instruction; A training unit, configured to train the first model using sample environmental parameters and sample sleep labels corresponding to the sample objects to obtain a sleep quality assessment model; the sample environmental parameters are environmental parameters of the environment in which the sample objects are located; and the sample sleep labels are sleep labels corresponding to the sample environmental parameters; The input unit is used to input the test environment parameters corresponding to the test object into the sleep quality assessment model to obtain the sleep quality assessment result corresponding to the test object when receiving the test environment parameters corresponding to the test object.
10. A server, characterized in that: The server comprises: A second acquisition unit, configured to acquire a first model corresponding to the model acquisition instruction upon receiving the model acquisition instruction transmitted by the client; The second sending unit is used to send the first model to the client, so that the client can train the first model based on the sample environmental parameters and sample sleep labels at the client to obtain a sleep quality assessment model.
11. A client, characterized in that: The client comprises: A first memory, a first processor and a first communication bus, wherein the first memory communicates with the first processor via the first communication bus, the first memory stores a sleep quality assessment program executable by the first processor, and when the sleep quality assessment program is executed, the method according to any one of claims 1 to 6 is performed by the first processor.
12. A server, characterized in that: The server comprises: A second memory, a second processor and a second communication bus, wherein the second memory communicates with the second processor via the second communication bus, the second memory stores a sleep quality assessment program executable by the second processor, and when the sleep quality assessment program is executed, the method according to any one of claims 7 to 8 is performed by the second processor.
13. A storage medium having a computer program stored thereon, applied to a client and a server, characterized in that: When the computer program is executed by a first processor, the method described in any one of claims 1 to 6 is implemented; when the computer program is executed by a second processor, the method described in any one of claims 7 to 8 is implemented.
