WO2020168451A1 - Sleep prediction method and apparatus, storage medium, and electronic device - Google Patents

Sleep prediction method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2020168451A1
WO2020168451A1 PCT/CN2019/075361 CN2019075361W WO2020168451A1 WO 2020168451 A1 WO2020168451 A1 WO 2020168451A1 CN 2019075361 W CN2019075361 W CN 2019075361W WO 2020168451 A1 WO2020168451 A1 WO 2020168451A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
sleep
work
sleep prediction
user
Prior art date
Application number
PCT/CN2019/075361
Other languages
French (fr)
Chinese (zh)
Inventor
戴堃
张寅祥
陆天洋
帅朝春
吴建文
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980080273.2A priority Critical patent/CN113170018A/en
Priority to PCT/CN2019/075361 priority patent/WO2020168451A1/en
Publication of WO2020168451A1 publication Critical patent/WO2020168451A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • This application belongs to the field of computer technology, and in particular relates to a sleep prediction method, device, storage medium, and electronic equipment.
  • electronic devices such as tablet computers and mobile phones are configured to perform system updates while the user is sleeping, and other operations that affect the user's use or take a long time to avoid affecting the user's use.
  • the related technology achieves the foregoing purpose by predicting the user's sleep, such as predicting the user's sleep interval, etc.
  • the accuracy of the related technology for predicting the user's sleep is low.
  • the embodiments of the present application provide a sleep prediction method, device, storage medium, and electronic device, which can enable the electronic device to accurately predict the user's sleep.
  • an embodiment of the present application provides a sleep prediction method applied to an electronic device, including:
  • an embodiment of the present application provides a sleep prediction device applied to an electronic device, including:
  • the condition judgment module is used to judge whether the preset sleep prediction condition is currently met
  • the data acquisition module is used to acquire the screen on and off data of the electronic device when the judgment result of the condition judgment module is yes, and acquire the user's work and rest behavior data and work and rest plan data;
  • a model acquisition module configured to select a target sleep prediction model corresponding to the current usage scenario from a set of sleep prediction models
  • the sleep prediction module is configured to perform sleep prediction on the user according to the screen on and off data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain a prediction result.
  • an embodiment of the present application provides a storage medium on which a computer program is stored.
  • the computer program is executed on a computer, the computer is caused to execute the sleep prediction method provided in the embodiment of the present application. step.
  • an embodiment of the present application provides an electronic device, including a memory and a processor, and the processor is configured to execute the following by calling a computer program stored in the memory:
  • the electronic device can obtain the screen on and off data of the electronic device when it currently meets the preset sleep prediction conditions, and obtain the user's work and rest behavior data and work and rest plan data.
  • it can also obtain the pre-trained sleep prediction
  • the model is used to predict the user's sleep based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtain the prediction result, which can improve the accuracy of sleep prediction for the user.
  • FIG. 1 is a schematic flowchart of a sleep prediction method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of another flow chart of a sleep prediction method provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of an electronic device acquiring a sleep prediction model in an embodiment of the present application.
  • Fig. 4 is a schematic diagram of an operation configuration interface provided in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of sleep prediction based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model in an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of a sleep prediction device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another structure of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a sleep prediction method provided by an embodiment of the present application.
  • the sleep prediction method can be applied to electronic devices.
  • the process of the sleep prediction method may include:
  • sleep prediction conditions there are no specific restrictions on the setting of sleep prediction conditions in the embodiments of the present application, and can be set by those of ordinary skill in the art according to actual needs. For example, you can set the sleep prediction condition that the environmental brightness of the current environment of the electronic device is lower than the preset brightness. In this way, the electronic device can detect the environmental brightness of its environment in real time, for example, through the set ambient light sensor. The environment brightness of the environment is detected, and when the environment brightness of the environment is lower than the preset brightness, it is determined that the sleep prediction condition is currently met.
  • the electronic device triggers the sleep prediction of the user when it determines that the preset sleep prediction condition is currently met.
  • the electronic device acquires the data required for the sleep prediction of the user.
  • the data required for the sleep prediction of the user includes at least the screen on and off data of the electronic device and the user's work and rest behavior data and work schedule data.
  • a sleep prediction model for predicting sleep of the user is also pre-trained, where the sleep prediction model can be stored locally in the electronic device or in a remote server.
  • the electronic device obtains the data required for the sleep prediction of the user, it further obtains the sleep prediction model used for the sleep prediction of the user locally, or obtains the sleep prediction model for the user from the remote server. Sleep prediction model.
  • the sleep prediction model is obtained through machine learning algorithm training in advance, and the machine learning algorithm can realize various functions through continuous feature learning. For example, it can be based on the user's work and rest behavior data, work schedule, and the on-off screen of electronic equipment.
  • the data makes sleep predictions for users.
  • machine learning algorithms may include: decision tree models, logistic regression models, Bayes models, neural network models, clustering models, and so on.
  • machine learning algorithms can be divided according to various situations. For example, machine learning algorithms can be divided into supervised learning algorithms, non-supervised learning algorithms, semi-supervised learning algorithms, reinforcement learning algorithms, etc. based on learning methods.
  • training data Under supervised learning, the input data is called “training data”, and each set of training data has a clear identification or result, such as “spam” and “non-spam” in the anti-spam system, and recognition of handwritten digits. "1, 2, 3, 4" etc.
  • Common application scenarios for supervised learning are classification problems and regression problems.
  • Common algorithms include Logistic Regression and Back Propagation Neural Network.
  • the data is not specifically identified, the model is to infer some internal structure of the data.
  • Common application scenarios include the learning of association rules and clustering.
  • Common algorithms include Apriori algorithm and k-Means algorithm.
  • Semi-supervised learning algorithm In this learning mode, the input data is partially identified.
  • This learning model can be used for type recognition, but the model first needs to learn the internal structure of the data in order to organize the data reasonably for prediction.
  • Application scenarios include classification and regression.
  • Algorithms include some extensions to commonly used supervised learning algorithms. These algorithms first try to model unidentified data, and then predict the identified data on this basis.
  • Graph inference algorithm Graph Inference
  • Laplacian SVM Laplacian SVM
  • Reinforcement learning algorithm In this learning mode, the input data is used as feedback to the model. Unlike the supervised model, the input data is only used as a way to check whether the model is right or wrong. Under reinforcement learning, the input data is directly fed back to the model. The model must be adjusted for this immediately.
  • Common application scenarios include dynamic systems and robot control.
  • Common algorithms include Q-Learning and Temporal difference learning.
  • machine learning algorithms can also be divided into:
  • Regression algorithm common regression algorithms include: Ordinary Least Square, Logistic Regression, Stepwise Regression, Multivariate Adaptive Regression Splines and Local Scatter Smoothing Estimate (Locally Estimated Scatterplot Smoothing).
  • Example-based algorithms include k-Nearest Neighbor (KNN), Learning Vector Quantization (LVQ), and Self-Organizing Map (SOM).
  • KNN k-Nearest Neighbor
  • LVQ Learning Vector Quantization
  • SOM Self-Organizing Map
  • Regularization methods common algorithms include: Ridge Regression, Least Absolute Shrinkage and Selection Operator (LASSO), and Elastic Net (Elastic Net).
  • LASSO Least Absolute Shrinkage and Selection Operator
  • Elastic Net Elastic Net
  • Decision tree algorithm common algorithms include: Classification and Regression Tree (CART), ID3 (Iterative Dichotomiser 3), C4.5, Chi-squared Automatic Interaction Detection (CHAID), Decision Stump, Random Forest (Random Forest), Multiple Adaptive Regression Spline (MARS) and Gradient Boosting Machine (GBM).
  • CART Classification and Regression Tree
  • ID3 Iterative Dichotomiser 3
  • C4.5 Chi-squared Automatic Interaction Detection
  • CHAI Chi-squared Automatic Interaction Detection
  • Decision Stump Random Forest
  • Random Forest Random Forest
  • MERS Multiple Adaptive Regression Spline
  • GBM Gradient Boosting Machine
  • Bayesian method algorithms include: Naive Bayes algorithm, Averaged One-Dependence Estimators (AODE), and Bayesian Belief Network (BBN).
  • AODE Averaged One-Dependence Estimators
  • BBN Bayesian Belief Network
  • a sleep prediction is performed on the user according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and the prediction result is obtained.
  • the electronic device after the electronic device obtains the screen on and off data, the user's work and rest behavior data, and the work schedule data of the electronic device, and obtains the sleep prediction model, it can be based on the on and off screen data, work and rest behavior data,
  • the work and rest plan data and the sleep prediction model are used to predict the user's sleep and obtain the prediction results.
  • the weight of the screen on and off data is greater than the weight of the work and rest behavior data and the work plan data.
  • the sleep prediction for the user includes but is not limited to the time when the user enters sleep, the time when the user ends sleep, and the sleep interval composed of the time when the user enters sleep and the time when sleep ends.
  • the time when the user enters sleep is 23:30 of the day
  • the time of receiving sleep is 06:60 the next day
  • the corresponding user's sleep interval is 23:30-06 the next day :60.
  • the electronic device in the embodiment of the present application can obtain the screen on and off data of the electronic device when it currently meets the preset sleep prediction conditions, and obtain the user's work and rest behavior data and work and rest plan data.
  • the pre-trained sleep prediction model can predict the user's sleep based on the acquired screen on and off data, work and rest behavior data, work schedule data, and sleep prediction model, and obtain the prediction result, which can improve the accuracy of sleep prediction for the user.
  • FIG. 2 is a schematic diagram of another flow chart of the sleep prediction method provided by an embodiment of the application.
  • the sleep prediction method can be applied to electronic devices.
  • the process of the sleep prediction method may include:
  • the electronic device determines whether a preset sleep prediction condition is currently met.
  • the sleep recognition condition can be configured as:
  • the duration of the static state reaches the preset duration.
  • the electronic device can start a timer for timing while entering a static state (for example, the electronic device can detect whether there is acceleration in any direction according to the built-in three-axis acceleration sensor, and if it does not exist, it is determined to be in a static state).
  • the timing duration of the timer represents the continuous duration of the electronic device in the static state, where the electronic device stops counting the timer and resets the timer when the timing duration of the timer reaches the preset duration or exits the static state. In this way, when the timing duration of the timer reaches the preset duration, that is, when the duration of its static state reaches the preset duration, the electronic device determines that the sleep recognition condition is currently met.
  • the sleep recognition condition may be configured as:
  • the preset sleep prediction moment is reached.
  • the embodiment of the present application does not specifically limit the value of the sleep prediction time, which can be configured by a person of ordinary skill in the art according to actual needs. For example, it can be fixedly set to 21:00 every natural day, so that the electronic device After reaching 21:00 of each natural day, it is determined that the sleep recognition condition is satisfied; for another example, the sleep prediction time can also be set to a time 30 minutes before the time when the user enters sleep that was predicted last time.
  • the sleep recognition condition may be configured as:
  • the ambient brightness of the environment is lower than or equal to the preset brightness.
  • the preset brightness can be configured to 300 nits, so that the electronic device can use it
  • the configured ambient light sensor detects the ambient brightness of the environment in real time. When the ambient brightness of the environment is detected to be lower than or equal to 300 nits, it is determined that the sleep recognition conditions are met.
  • the electronic device obtains the on-off screen data of the electronic device, and obtains the user's work and rest behavior data and work and rest plan data.
  • the electronic device triggers the sleep prediction of the user when it determines that the preset sleep prediction condition is currently met.
  • the electronic device acquires the data required for the sleep prediction of the user.
  • the data required for the sleep prediction of the user includes at least the screen on and off data of the electronic device and the user's work and rest behavior data and work schedule data.
  • the screen on and off data includes, but is not limited to, the switching time used to describe the switching time of the electronic device from the off-screen to the on-screen state, the switching time from the on-screen to the off-screen, and the switching from the off-screen to the on-screen state.
  • the screen-on duration and screen-off duration obtained by "switching time” and "switching time for switching from on to off".
  • the work and rest behavior data includes but is not limited to data describing when and how the user rests (such as sleep, nap, etc.), data describing when the user exercises and how to exercise data, etc.
  • Work and rest plan data includes but is not limited to data describing when the user plans to do something (such as schedule), data describing when the user plans to take a break, and data describing when the user ends the break, etc.
  • the electronic device determines the current usage scenario of the electronic device.
  • the electronic device obtains a sleep prediction model corresponding to the current use scenario from the multiple pre-trained sleep prediction models, where different sleep prediction models in the multiple sleep prediction models correspond to different use scenarios.
  • multiple sleep prediction models are pre-trained, and different sleep prediction models are suitable for predicting sleep of users in different usage scenarios, where the usage scenarios describe where the user uses the electronic device.
  • Scenes including but not limited to home vacation scenes, travel scenes, work trip scenes and daily work scenes.
  • the electronic device after the electronic device obtains the data required for the user’s sleep prediction, it further determines the current usage scenario of the electronic device, thereby obtaining it from multiple pre-trained sleep prediction models
  • the sleep prediction model corresponding to the current usage scenario is used for subsequent sleep prediction of the user.
  • the aforementioned pre-trained multiple sleep prediction models can all be stored locally in the electronic device, or all can be stored in a remote server, or partly stored locally in the electronic device and partly stored in a remote server. .
  • FIG. 3 there are four pre-trained sleep prediction models stored in the local memory of the electronic device, namely A sleep prediction model suitable for sleep prediction in the home vacation scene, and sleep prediction model suitable for the sleep prediction in the travel scene B sleep prediction model, C sleep prediction model suitable for sleep prediction in work travel scenarios, and D sleep prediction model suitable for sleep prediction in daily work scenarios.
  • the electronic device determines that its current use scene is a home vacation scene, it will obtain a sleep prediction model for sleep prediction of the user; if the electronic device determines that its current use scene is a travel scene, it will obtain a sleep prediction model for the user Perform sleep prediction; if the electronic device determines that its current use scene is a work trip scenario, obtain the C sleep prediction model for sleep prediction of the user; if the electronic device determines that its current use scene is a daily work scenario, obtain a D sleep prediction model Used to predict user sleep.
  • the electronic device predicts the user's sleep based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtains the prediction result.
  • the electronic device after the electronic device obtains the screen on and off data, the user's work and rest behavior data, and the work schedule data of the electronic device, and obtains the sleep prediction model, it can be based on the on and off screen data, work and rest behavior data,
  • the work and rest plan data and the sleep prediction model are used to predict the user's sleep and obtain the prediction results.
  • the weight of the screen on and off data is greater than the weight of the work and rest behavior data and the work plan data.
  • the sleep prediction of the user includes but is not limited to the time when the user enters sleep, the time when the user ends sleep, and the sleep interval composed of the time when the user enters sleep and the time when sleep ends.
  • the time when the user enters sleep is 23:30 of the day
  • the time of receiving sleep is 06:60 the next day
  • the corresponding user's sleep interval is 23:30-06 the next day :60.
  • the prediction result is the user's sleep interval. After the obtained screen on/off data, work and rest behavior data, work schedule data, and sleep prediction model are obtained, sleep prediction is performed on the user, and after the prediction result is obtained, the following can be executed:
  • the electronic device If it reaches the sleep interval, the electronic device performs a preset operation.
  • the electronic device after predicting the sleeping interval of the user, if the electronic device reaches the predicted sleeping interval, it executes a preset operation configured in advance and executed when the user is in a sleeping state.
  • the preset operation includes but is not limited to at least one of a system update operation, an application update operation, and a power consumption control operation, which may be manually configured by the user or may be configured by the electronic device by default.
  • the electronic device can configure the system update operation as a preset operation, so as to perform the system update operation when the predicted sleep interval is reached, and update the system to the latest version; the electronic device can also configure the application update operation as a preset operation, thereby The application update operation is performed when the predicted sleep interval is reached, and the installed application is updated to the latest version; the electronic device can also configure the "application preset power consumption control strategy for reducing power consumption" as a preset operation, Thus, when the predicted sleep interval is reached, the preset power consumption control strategy for reducing power consumption is applied, and the power consumption of the electronic device is reduced, and so on.
  • the electronic device provides a preset operation configuration interface.
  • the preset operation configuration interface includes the prompt message "Please select the operation performed during sleep", operation selection box, drop-down button, drop-down Menu, OK button, and Cancel button.
  • the drop-down menu is called out according to the user's click operation on the drop-down button.
  • the drop-down menu provides various operations that the electronic device can perform during the user's sleep interval, as shown in the system update in Figure 4 Operation, application update operations, etc., the user can select the operation performed by the electronic device in the user's sleep interval according to actual needs, and after selecting the operation that needs to be performed by the electronic device in the user's sleep interval, click the OK button to instruct the electronic device to The operation selected by the user is the aforementioned preset operation. Or, if the user finds that there is no need for an operation performed by the electronic device during the user's sleep interval, he can click the cancel button to instruct the electronic device to perform a preset operation of the default configuration.
  • the electronic device obtains the corresponding user's motion sensor data recorded by the sports application, and generates the user's work and rest behavior data according to the obtained motion sensor data;
  • the electronic device obtains the event schedule data configured by the user in the memo application and the alarm clock data configured by the user in the alarm clock application, and generates the user's schedule data based on the obtained event schedule data and alarm clock data.
  • the electronic device when it obtains the user's work and rest behavior data, it can obtain the corresponding user's motion sensor data recorded by the sports application (motion sensors include but are not limited to three-axis acceleration sensors, gyroscopes, and geomagnetic sensors, etc.), thereby Generate the user's work and behavior data based on the acquired motion sensor data.
  • motion sensors include but are not limited to three-axis acceleration sensors, gyroscopes, and geomagnetic sensors, etc.
  • the electronic device generates the user's work and behavior data based on the acquired motion sensor data as "The user walks 10,000 steps between 20:30-21:00, and at 21: 00-21:00 rested for 30 minutes".
  • the electronic device When the electronic device obtains the user's schedule data, it can obtain the user's schedule data configured in the memo application and the alarm clock data configured by the user in the alarm clock application, so as to generate the user's schedule according to the obtained schedule data and alarm clock data Data, for example, the electronic device obtains the user configuration data in the memo application as "departure to visit XX customer at 08:00 the next day", and obtains the alarm clock data configured by the user in the alarm clock application as "wake up alarm clock at 06:30 the next day” , The electronic device can generate the user’s schedule data based on the acquired event scheduling data and alarm clock data as "the user plans to wake up at 06:30 the next day and set off to visit the XX customer at 08:00"
  • the electronic device preprocesses the acquired screen on and off data, work and rest behavior data, and work and rest plan data;
  • the electronic device inputs the preprocessed on-screen data, work and rest behavior data, and work and rest plan data into the sleep prediction model to obtain the prediction results output by the sleep prediction model for the user's sleep prediction.
  • the electronic device predicts the user's sleep based on the screen on and off data, work and rest behavior data, schedule data, and sleep prediction model, and when the prediction result is obtained, it can first compare the acquired screen on and off data, work and rest behavior The data and schedule data are preprocessed, and then the preprocessed screen on and off data, work and rest behavior data, and schedule data are input into the sleep prediction model, and the sleep prediction model is based on the input on and off screen data, work and rest behavior data And the schedule data for sleep prediction of the user, and output the prediction result.
  • the electronic device preprocesses the acquired screen on and off data, work and rest behavior data, and schedule data, it can perform data cleaning processing on the acquired screen on and off data, work and rest behavior data, and schedule data. , Data integration processing, data transformation processing and data reduction processing.
  • data cleaning processing is the process of re-examining and verifying data, with the purpose of deleting duplicate information, correcting existing errors, and providing data consistency.
  • Data integration processing is to integrate the data of a single dimension into a higher and more abstract dimension. After the integration, more accurate, richer, and more targeted data can be obtained.
  • Data transformation processing requires the data to meet certain conditions when performing statistical analysis on the data. For example, in the analysis of variance, the test error is required to be independent, unbiased, uniform and normal in variance, but in actual analysis , Independence and unbiasedness are easier to satisfy, homogeneity of variance can be satisfied in most cases, and normality sometimes cannot be satisfied.
  • the data is properly transformed, such as square root transformation, logarithmic transformation, square root arcsine transformation, etc., the data can meet the requirements of variance analysis. This kind of data conversion is called data conversion.
  • Data reduction means to minimize the amount of data while maintaining the original appearance of the data as much as possible (the necessary prerequisite for completing this task is to understand the mining task and be familiar with the content of the data itself).
  • attribute selection and data sampling respectively, for attributes and records in the original data set.
  • the following when determining the current usage scenario of the electronic device, the following may be executed:
  • the electronic device acquires current state information of the electronic device, where the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
  • the electronic device determines, from the multiple usage scenarios, the usage scenario whose status information matches the current status information according to the prestored status information of the multiple usage scenarios, as the current usage scenario of the electronic device.
  • the current status information includes, but is not limited to, relevant information used to describe the current use status, location status, and environmental status of the electronic device.
  • an electronic device generates state information describing its use state based on gravity sensor data and acceleration sensor data, generates state information describing its position based on positioning sensor data, and generates state information describing its environment based on sound sensors and light sensors. State information, etc.
  • the electronic device locally prestores the state information of a plurality of different usage scenarios (in other words, a plurality of different state information is used to describe a plurality of different usage scenarios), such as the state information of a home vacation scenario, and going out. Status information of travel scenes, status information of work trip scenes, and status information of daily work scenes. In this way, when the electronic device determines its current usage scenario, it determines from the multiple usage scenarios a usage scenario whose status information matches the current status information based on the prestored status information of the multiple usage scenarios, as the current usage scenario of the electronic device.
  • the electronic device can determine whether the two status information matches according to the similarity between the two status information. In this way, the electronic device can obtain the status of each usage scene separately when determining the usage scenarios in which the status information matches its current status information.
  • the similarity between the information and its current state information, and the use scenario where the similarity reaches the preset similarity is determined as the use scenario that matches the state information and its current state information.
  • the electronic device prestores state information of a home vacation scene, state information of a travel scene, state information of a work trip scene, and state information of a daily work scene, and the preset similarity is configured to be 85%. If the electronic device obtains that the status information of the home vacation scene is similar to its current status information at 40%, the status information of the outing travel scene is similar to its current status information at 45%, and the status information of the work trip scene is similar to its current status information. The similarity is 70%, and the similarity between the status information of the daily work scene and its current status information is 86%. It can be seen that the similarity between the status information of the daily work scene and the current status information of the electronic device reaches the preset similarity (85 %), the electronic device determines the daily work scene as the use scene whose status information matches its current status information.
  • the electronic device when the electronic device obtains the similarity between the status information of each usage scene and its current status information, the electronic device performs feature extraction on any one of the pre-stored status information of multiple usage scenes to obtain The word vector set of the state information of each usage scene is recorded, and the word vector set of the state information of each usage scene is recorded as the first word vector set.
  • the electronic device also performs feature extraction on its current state information, and obtains the word vector set of its current state information, which is recorded as the second word vector set.
  • the electronic device After the electronic device obtains the first word vector set of the state information of each usage scene and the second word vector set of its current state information, it calculates the difference between each first word vector set and the second word vector set. The distance is calculated as the similarity between the status information of each usage scene and its current status information.
  • the cosine distance between the first word vector set and the second word vector set can be obtained by referring to the following formula:
  • e represents the cosine distance between the first word vector set and the second word vector set
  • f represents the first word vector set
  • N represents the dimensions of the first word vector set and the second word vector set (the dimensions of the two word vector sets Same)
  • f i represents the word vector of the i-th dimension in the first word vector set (the state information of a usage scenario includes state information of multiple dimensions, such as use state information, location state information, environmental state information, etc.
  • the dimension word vector is the word vector of the state information of the i-th dimension
  • g i represents the word vector of the i-th dimension in the second word vector set.
  • the electronic device when the electronic device obtains the word vector set of its current state information and obtains the second word vector set, it can perform word segmentation operation on its current state information and then input it into the encoder neural network, which is processed by the encoder neural network and the output corresponds to the aforementioned The word vector of the current state information, correspondingly, the electronic device uses the word vector set of the current state information output by the encoder neural network as the second word vector set.
  • a single-layer recurrent neural network can be used for training to obtain the encoder neural network, or a multi-layer recurrent neural network can be used.
  • the encoder neural network obtained by training may also be trained using a convolutional neural network, or its variants, or a neural network of other network structures to obtain an encoder neural network.
  • the electronic device when the electronic device separately obtains the word vector sets of the state information of each use scene, and obtains multiple first word vector sets, it can input the state information of each use scene into the encoder neural network, and send the encoder neural network to the encoder neural network.
  • the output word vector set of the status information of each usage scene is used as the first word vector set.
  • a usage scene recognition model for usage scene recognition, and configure the usage scene recognition model locally in the electronic device.
  • the electronic device determines its current usage scenario based on its current status information, it can input its current status information into the configured usage scenario recognition model, and the usage scenario recognition model can identify the usage scenario corresponding to the aforementioned current status information, and Output.
  • the electronic device uses the use scene corresponding to the aforementioned current state information output by the use scene recognition model as its current use scene.
  • FIG. 6 is a schematic structural diagram of a sleep prediction device provided by an embodiment of the application.
  • the sleep prediction device can be applied to electronic equipment.
  • the sleep prediction device may include: a condition determination module 401, a data acquisition module 402, a model acquisition module 403, and a sleep prediction module 404.
  • the condition judgment module 401 is used to judge whether the preset sleep prediction condition is currently met
  • the data acquisition module 402 is configured to acquire the screen on and off data of the electronic device when the judgment result of the condition judgment module 401 is yes, and acquire the user's work and rest behavior data and work and rest plan data;
  • the model acquisition module 403 is used to acquire a pre-trained sleep prediction model
  • the sleep prediction module 404 is configured to perform sleep prediction on the user according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model to obtain a prediction result.
  • the data acquisition module 402 may be used to:
  • the sleep prediction module 404 when performing sleep prediction on the user according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtain the prediction result, the sleep prediction module 404 can be used to:
  • the sleep prediction module 404 when preprocessing the acquired screen on and off data, work and rest behavior data, and work and rest plan data, the sleep prediction module 404 may be used to:
  • the sleep prediction conditions include:
  • the duration of the static state reaches the preset duration
  • the model acquiring module 403 may be used to:
  • a sleep prediction model corresponding to the current use scenario is obtained, where different sleep prediction models in the multiple sleep prediction models correspond to different use scenarios.
  • the model acquisition module 403 may be used to:
  • the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
  • a use scenario whose state information matches the current state information is determined from the multiple use scenarios, as the current use scenario of the electronic device.
  • the model acquisition module 403 may be used to:
  • the similarity between the status information of each usage scene and its current status information is respectively acquired, and the usage scene with the similarity reaching the preset similarity is determined as the usage scene matching the status information and its current status information.
  • the model acquisition module 403 when acquiring the similarity between the status information of each usage scenario and its current status information, the model acquisition module 403 may be used to:
  • the calculated distances are taken as the similarity between the state information of each usage scene and the aforementioned current state information.
  • the model acquiring module 403 when acquiring the word vector sets of the status information of each usage scenario, and obtaining multiple first word vector sets, the model acquiring module 403 may be used to:
  • the state information of each use scene is input into the encoder neural network, and the word vector set of the state information of each use scene output by the encoder neural network is used as the first word vector set.
  • the model obtaining module 403 when obtaining the word vector set of the aforementioned current state information to obtain the second word vector set, the model obtaining module 403 may be used to:
  • the word vector set of the foregoing current state information output by the encoder neural network is used as the second word vector set.
  • the model obtaining module 403 may also be used to:
  • the usage scene corresponding to the aforementioned current status information is identified as the current usage scene of the electronic device.
  • the prediction result includes the user's sleep interval
  • the sleep prediction device further includes an operation execution module for:
  • the sleep prediction module 404 predicts the user's sleep based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtains the user's sleep interval, if the aforementioned sleep interval is reached, the preset operation is performed .
  • the aforementioned preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  • the embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the stored computer program is executed on a computer, the computer is caused to execute the steps in the sleep prediction method provided in the embodiment of the present application.
  • An embodiment of the present application further provides an electronic device including a memory and a processor, and the processor executes the steps in the sleep prediction method provided in the embodiment of the present application by calling a computer program stored in the memory.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device may include a memory 601 and a processor 602.
  • a person of ordinary skill in the art can understand that the structure of the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device, and may include more or less components than those shown in the figure, or a combination of certain components, or different component arrangements. .
  • the memory 601 can be used to store application programs and data.
  • the application program stored in the memory 601 contains executable code.
  • Application programs can be composed of various functional modules.
  • the processor 602 executes various functional applications and data processing by running application programs stored in the memory 601.
  • the processor 602 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, and executes the electronic device by running or executing the application program stored in the memory 601 and calling the data stored in the memory 601
  • the various functions and processing data of the electronic device can be used to monitor the electronic equipment as a whole.
  • the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code
  • the application program in the memory 601 thus executes:
  • a sleep prediction is performed on the user to obtain a prediction result.
  • FIG. 8 is another schematic structural diagram of the electronic device provided by an embodiment of the application. The difference from the electronic device shown in FIG. 7 is that the electronic device further includes components such as an input unit 603 and an output unit 604.
  • the input unit 603 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • user characteristic information such as fingerprints
  • the output unit 604 may be used to output information input by the user or information provided to the user, such as a speaker.
  • the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code
  • the application program in the memory 601 thus executes:
  • a sleep prediction is performed on the user to obtain a prediction result.
  • the processor 602 may execute:
  • the processor 602 when performing sleep prediction on the user according to the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and when the prediction result is obtained, the processor 602 may execute:
  • the processor 602 may execute:
  • the sleep prediction conditions include:
  • the duration of the static state reaches the preset duration
  • the processor 602 may execute:
  • a sleep prediction model corresponding to the current use scenario is obtained, where different sleep prediction models in the multiple sleep prediction models correspond to different use scenarios.
  • the processor 602 may execute:
  • the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
  • a use scenario whose state information matches the current state information is determined from the multiple use scenarios, as the current use scenario of the electronic device.
  • the processor 602 may execute:
  • the similarity between the status information of each usage scene and its current status information is respectively acquired, and the usage scene with the similarity reaching the preset similarity is determined as the usage scene matching the status information and its current status information.
  • the processor 602 may execute:
  • the calculated distances are taken as the similarity between the state information of each usage scene and the aforementioned current state information.
  • the processor 602 may execute:
  • the state information of each use scene is input into the encoder neural network, and the word vector set of the state information of each use scene output by the encoder neural network is used as the first word vector set.
  • the processor 602 may execute:
  • the word vector set of the foregoing current state information output by the encoder neural network is used as the second word vector set.
  • the processor 602 may execute:
  • the usage scene corresponding to the aforementioned current status information is identified as the current usage scene of the electronic device.
  • the prediction result includes the user's sleep interval. After the obtained screen on and off data, work and rest behavior data, work schedule data, and sleep prediction model are obtained, sleep prediction is performed on the user, and the user's sleep interval is obtained.
  • the device 602 can execute:
  • the preset operation is performed.
  • the aforementioned preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  • the sleep prediction device/electronic device provided by the embodiment of the application belongs to the same concept as the sleep prediction method in the above embodiment. Any method provided in the sleep prediction method embodiment can be run on the sleep prediction device/electronic device. For the implementation process, refer to the embodiment of the sleep prediction method, which will not be repeated here.
  • the program may be stored in a computer readable storage medium, such as stored in a memory, and executed by at least one processor, and the execution process may include a process such as an embodiment of the sleep prediction method.
  • the storage medium may be a magnetic disk, an optical disc, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
  • the sleep prediction device of the embodiment of the present application its functional modules may be integrated in one processing chip, or each module may exist alone physically, or two or more modules may be integrated in one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

A sleep prediction method: when a preset sleep prediction condition is currently met, an electronic device can acquire the data required for performing sleep prediction for a user and acquire a pre-trained sleep prediction model, and thereby perform sleep prediction for the user on the basis of the acquired data required for performing sleep prediction for the user and the sleep prediction model to obtain a prediction result, thus increasing the accuracy of sleep prediction for the user.

Description

睡眠预测方法、装置、存储介质及电子设备Sleep prediction method, device, storage medium and electronic equipment 技术领域Technical field
本申请属于计算机技术领域,尤其涉及一种睡眠预测方法、装置、存储介质及电子设备。This application belongs to the field of computer technology, and in particular relates to a sleep prediction method, device, storage medium, and electronic equipment.
背景技术Background technique
目前,如平板电脑、手机等电子设备经过配置,可以在用户睡眠时进行系统更新等影响用户使用或者耗时较长的操作,以此来避免对用户的使用造成影响。为此,相关技术通过对用户进行睡眠预测,比如预测用户的睡眠区间等来达到前述目的,然而相关技术中对用户进行睡眠预测的准确度较低。At present, electronic devices such as tablet computers and mobile phones are configured to perform system updates while the user is sleeping, and other operations that affect the user's use or take a long time to avoid affecting the user's use. For this reason, the related technology achieves the foregoing purpose by predicting the user's sleep, such as predicting the user's sleep interval, etc. However, the accuracy of the related technology for predicting the user's sleep is low.
发明内容Summary of the invention
本申请实施例提供一种睡眠预测方法、装置、存储介质及电子设备,可以使得电子设备能够准确的对用户进行睡眠预测。The embodiments of the present application provide a sleep prediction method, device, storage medium, and electronic device, which can enable the electronic device to accurately predict the user's sleep.
第一方面,本申请实施例提供一种睡眠预测方法,应用于电子设备,包括:In the first aspect, an embodiment of the present application provides a sleep prediction method applied to an electronic device, including:
判断当前是否满足预设的睡眠预测条件;Determine whether the preset sleep prediction conditions are currently met;
若是,则获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;If yes, obtain the screen on and off data of the electronic device, and obtain the user's work and rest behavior data and work schedule data;
获取预先训练的睡眠预测模型;Obtain a pre-trained sleep prediction model;
根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果。Perform sleep prediction on the user according to the screen on and off data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain a prediction result.
第二方面,本申请实施例提供一种睡眠预测装置,应用于电子设备,包括:In the second aspect, an embodiment of the present application provides a sleep prediction device applied to an electronic device, including:
条件判断模块,用于判断当前是否满足预设的睡眠预测条件;The condition judgment module is used to judge whether the preset sleep prediction condition is currently met;
数据获取模块,用于在条件判断模块的判断结果为是时,获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;The data acquisition module is used to acquire the screen on and off data of the electronic device when the judgment result of the condition judgment module is yes, and acquire the user's work and rest behavior data and work and rest plan data;
模型获取模块,用于从睡眠预测模型集合中选取对应所述当前使用场景的目标睡眠预测模型;A model acquisition module, configured to select a target sleep prediction model corresponding to the current usage scenario from a set of sleep prediction models;
睡眠预测模块,用于根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果。The sleep prediction module is configured to perform sleep prediction on the user according to the screen on and off data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain a prediction result.
第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行本申请实施例提供的睡眠预测方法中的步骤。In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer is caused to execute the sleep prediction method provided in the embodiment of the present application. step.
第四方面,本申请实施例提供一种电子设备,包括存储器,处理器,所述处理器通过 调用所述存储器中存储的计算机程序,用于执行:In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, and the processor is configured to execute the following by calling a computer program stored in the memory:
判断当前是否满足预设的睡眠预测条件;Determine whether the preset sleep prediction conditions are currently met;
若是,则获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;If yes, obtain the screen on and off data of the electronic device, and obtain the user's work and rest behavior data and work and rest plan data;
获取预先训练的睡眠预测模型;Obtain a pre-trained sleep prediction model;
根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果。Perform sleep prediction on the user according to the screen on and off data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain a prediction result.
申请实施例中,电子设备可以在其当前满足预设的睡眠预测条件时,获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据,此外,还获取预先训练的睡眠预测模型,从而根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果,能够提高对用户进行睡眠预测的准确度。In the application embodiment, the electronic device can obtain the screen on and off data of the electronic device when it currently meets the preset sleep prediction conditions, and obtain the user's work and rest behavior data and work and rest plan data. In addition, it can also obtain the pre-trained sleep prediction The model is used to predict the user's sleep based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtain the prediction result, which can improve the accuracy of sleep prediction for the user.
附图说明Description of the drawings
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其有益效果显而易见。The following detailed description of specific implementations of the present application in conjunction with the accompanying drawings will make the technical solutions of the present application and its beneficial effects obvious.
图1是本申请实施例提供的睡眠预测方法的一流程示意图。FIG. 1 is a schematic flowchart of a sleep prediction method provided by an embodiment of the present application.
图2是本申请实施例提供的睡眠预测方法的另一流程示意图。FIG. 2 is a schematic diagram of another flow chart of a sleep prediction method provided by an embodiment of the present application.
图3是本申请实施例中电子设备获取睡眠预测模型的示意图。Figure 3 is a schematic diagram of an electronic device acquiring a sleep prediction model in an embodiment of the present application.
图4是本申请实施例中提供的操作配置界面的示意图。Fig. 4 is a schematic diagram of an operation configuration interface provided in an embodiment of the present application.
图5是本申请实施例中根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型进行睡眠预测的示意图。FIG. 5 is a schematic diagram of sleep prediction based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model in an embodiment of the present application.
图6是本申请实施例提供的睡眠预测装置的结构示意图。Fig. 6 is a schematic structural diagram of a sleep prediction device provided by an embodiment of the present application.
图7是本申请实施例提供的电子设备的一结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图8是本申请实施例提供的电子设备的另一结构示意图。FIG. 8 is a schematic diagram of another structure of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
请参照图示,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Please refer to the drawings, in which the same component symbols represent the same components, and the principle of the present application is implemented in an appropriate computing environment for illustration. The following description is based on the exemplified specific embodiments of the present application, which should not be regarded as limiting other specific embodiments that are not described in detail herein.
请参照图1,图1是本申请实施例提供的睡眠预测方法的一流程示意图。该睡眠预测方法可以应用于电子设备。该睡眠预测方法的流程可以包括:Please refer to FIG. 1, which is a schematic flowchart of a sleep prediction method provided by an embodiment of the present application. The sleep prediction method can be applied to electronic devices. The process of the sleep prediction method may include:
在101中,判断当前是否满足预设的睡眠预测条件。In 101, it is determined whether a preset sleep prediction condition is currently met.
应当说明的是,本申请实施例中对于睡眠预测条件的设置不做具体限制,可由本领域 普通技术人员根据实际需要进行设置。比如,可以设置睡眠预测条件为电子设备当前所处环境的环境亮度低于预设亮度,这样,电子设备可以实时对其所处环境的环境亮度进行侦测,比如通过设置的环境光传感器对所处环境的环境亮度进行侦测,当其所处环境的环境亮度低于预设亮度时,判定当前满足睡眠预测条件。It should be noted that there are no specific restrictions on the setting of sleep prediction conditions in the embodiments of the present application, and can be set by those of ordinary skill in the art according to actual needs. For example, you can set the sleep prediction condition that the environmental brightness of the current environment of the electronic device is lower than the preset brightness. In this way, the electronic device can detect the environmental brightness of its environment in real time, for example, through the set ambient light sensor. The environment brightness of the environment is detected, and when the environment brightness of the environment is lower than the preset brightness, it is determined that the sleep prediction condition is currently met.
在102中,若是,则获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据。In 102, if yes, obtain the screen on and off data of the electronic device, and obtain the user's work and rest behavior data and work and rest plan data.
本申请实施例中,电子设备在判定当前满足预设的睡眠预测条件时,触发对用户的睡眠预测。首先,电子设备获取对用户进行睡眠预测所需的数据,其中,对用户进行睡眠预测所需的数据至少包括电子设备的亮熄屏数据以及用户的作息行为数据和作息计划数据。In the embodiment of the present application, the electronic device triggers the sleep prediction of the user when it determines that the preset sleep prediction condition is currently met. First, the electronic device acquires the data required for the sleep prediction of the user. The data required for the sleep prediction of the user includes at least the screen on and off data of the electronic device and the user's work and rest behavior data and work schedule data.
在103中,获取预先训练的睡眠预测模型。In 103, a pre-trained sleep prediction model is obtained.
在本申请实施例中,还预先训练有用于对用户进行睡眠预测的睡眠预测模型,其中,该睡眠预测模型可以存储在电子设备本地,也可以存储在远端的服务器中。这样,电子设备在获取到对用户进行睡眠预测所需的数据之后,进一步从本地获取用于对用户进行睡眠预测的睡眠预测模型,或者,从远端的服务器获取用于对用户进行睡眠预测的睡眠预测模型。In the embodiment of the present application, a sleep prediction model for predicting sleep of the user is also pre-trained, where the sleep prediction model can be stored locally in the electronic device or in a remote server. In this way, after the electronic device obtains the data required for the sleep prediction of the user, it further obtains the sleep prediction model used for the sleep prediction of the user locally, or obtains the sleep prediction model for the user from the remote server. Sleep prediction model.
应当说明的是,睡眠预测模型预先通过机器学习算法训练得到,机器学习算法可以通过不断的特征学习来实现各种功能,比如,可以根据用户的作息行为数据、作息计划以及电子设备的亮熄屏数据对用户进行睡眠预测。其中,机器学习算法可以包括:决策树模型、逻辑回归模型、贝叶斯模型、神经网络模型、聚类模型等等。It should be noted that the sleep prediction model is obtained through machine learning algorithm training in advance, and the machine learning algorithm can realize various functions through continuous feature learning. For example, it can be based on the user's work and rest behavior data, work schedule, and the on-off screen of electronic equipment. The data makes sleep predictions for users. Among them, machine learning algorithms may include: decision tree models, logistic regression models, Bayes models, neural network models, clustering models, and so on.
机器学习算法的算法类型可以根据各种情况划分,比如,可以基于学习方式可以将机器学习算法划分成:监督式学习算法、非监控式学习算法、半监督式学习算法、强化学习算法等等。The algorithm types of machine learning algorithms can be divided according to various situations. For example, machine learning algorithms can be divided into supervised learning algorithms, non-supervised learning algorithms, semi-supervised learning algorithms, reinforcement learning algorithms, etc. based on learning methods.
在监督式学习下,输入数据被称为“训练数据”,每组训练数据有一个明确的标识或结果,如对防垃圾邮件系统中“垃圾邮件”“非垃圾邮件”,对手写数字识别中的“1、2、3、4”等。监督式学习的常见应用场景如分类问题和回归问题。常见算法有逻辑回归(Logistic Regression)和反向传递神经网络(Back Propagation Neural Network)。Under supervised learning, the input data is called "training data", and each set of training data has a clear identification or result, such as "spam" and "non-spam" in the anti-spam system, and recognition of handwritten digits. "1, 2, 3, 4" etc. Common application scenarios for supervised learning are classification problems and regression problems. Common algorithms include Logistic Regression and Back Propagation Neural Network.
在非监督式学习中,数据并不被特别标识,模型是为了推断出数据的一些内在结构。常见的应用场景包括关联规则的学习以及聚类等。常见算法包括Apriori算法以及k-Means算法等。In unsupervised learning, the data is not specifically identified, the model is to infer some internal structure of the data. Common application scenarios include the learning of association rules and clustering. Common algorithms include Apriori algorithm and k-Means algorithm.
半监督式学习算法,在此学习方式下,输入数据被部分标识,这种学习模型可以用来 进行类型识别,但是模型首先需要学习数据的内在结构以便合理的组织数据来进行预测。应用场景包括分类和回归,算法包括一些对常用监督式学习算法的延伸,这些算法首先试图对未标识数据进行建模,在此基础上再对标识的数据进行预测。如图论推理算法(Graph Inference)或者拉普拉斯支持向量机(Laplacian SVM)等。Semi-supervised learning algorithm. In this learning mode, the input data is partially identified. This learning model can be used for type recognition, but the model first needs to learn the internal structure of the data in order to organize the data reasonably for prediction. Application scenarios include classification and regression. Algorithms include some extensions to commonly used supervised learning algorithms. These algorithms first try to model unidentified data, and then predict the identified data on this basis. Graph inference algorithm (Graph Inference) or Laplacian SVM (Laplacian SVM), etc.
强化学习算法,在这种学习模式下,输入数据作为对模型的反馈,不像监督模型那样,输入数据仅仅是作为一个检查模型对错的方式,在强化学习下,输入数据直接反馈到模型,模型必须对此立刻作出调整。常见的应用场景包括动态系统以及机器人控制等。常见算法包括Q-Learning以及时间差学习(Temporal difference learning)。Reinforcement learning algorithm. In this learning mode, the input data is used as feedback to the model. Unlike the supervised model, the input data is only used as a way to check whether the model is right or wrong. Under reinforcement learning, the input data is directly fed back to the model. The model must be adjusted for this immediately. Common application scenarios include dynamic systems and robot control. Common algorithms include Q-Learning and Temporal difference learning.
此外,还可以基于根据算法的功能和形式的类似性将机器学习算法划分成:In addition, machine learning algorithms can also be divided into:
回归算法,常见的回归算法包括:最小二乘法(Ordinary Least Square),逻辑回归(Logistic Regression),逐步式回归(Stepwise Regression),多元自适应回归样条(Multivariate Adaptive Regression Splines)以及本地散点平滑估计(Locally Estimated Scatterplot Smoothing)。Regression algorithm, common regression algorithms include: Ordinary Least Square, Logistic Regression, Stepwise Regression, Multivariate Adaptive Regression Splines and Local Scatter Smoothing Estimate (Locally Estimated Scatterplot Smoothing).
基于实例的算法,包括k-Nearest Neighbor(KNN),学习矢量量化(Learning Vector Quantization,LVQ),以及自组织映射算法(Self-Organizing Map,SOM)。Example-based algorithms include k-Nearest Neighbor (KNN), Learning Vector Quantization (LVQ), and Self-Organizing Map (SOM).
正则化方法,常见的算法包括:Ridge Regression,Least Absolute Shrinkage and Selection Operator(LASSO),以及弹性网络(Elastic Net)。Regularization methods, common algorithms include: Ridge Regression, Least Absolute Shrinkage and Selection Operator (LASSO), and Elastic Net (Elastic Net).
决策树算法,常见的算法包括:分类及回归树(Classification And Regression Tree,CART),ID3(Iterative Dichotomiser 3),C4.5,Chi-squared Automatic Interaction Detection(CHAID),Decision Stump,随机森林(Random Forest),多元自适应回归样条(MARS)以及梯度推进机(Gradient Boosting Machine,GBM)。Decision tree algorithm, common algorithms include: Classification and Regression Tree (CART), ID3 (Iterative Dichotomiser 3), C4.5, Chi-squared Automatic Interaction Detection (CHAID), Decision Stump, Random Forest (Random Forest), Multiple Adaptive Regression Spline (MARS) and Gradient Boosting Machine (GBM).
贝叶斯方法算法,包括:朴素贝叶斯算法,平均单依赖估计(Averaged One-Dependence Estimators,AODE),以及Bayesian Belief Network(BBN)。Bayesian method algorithms include: Naive Bayes algorithm, Averaged One-Dependence Estimators (AODE), and Bayesian Belief Network (BBN).
在104中,根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果。In 104, a sleep prediction is performed on the user according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and the prediction result is obtained.
在本申请实施例中,电子设备在获取到电子设备的亮熄屏数据、用户的作息行为数据和作息计划数据,以及获取到睡眠预测模型之后,即可根据亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果,其中,在进行睡眠预测时,亮熄屏数据所占的权重大于作息行为数据和作息计划数据所占的权重。In the embodiments of the present application, after the electronic device obtains the screen on and off data, the user's work and rest behavior data, and the work schedule data of the electronic device, and obtains the sleep prediction model, it can be based on the on and off screen data, work and rest behavior data, The work and rest plan data and the sleep prediction model are used to predict the user's sleep and obtain the prediction results. In the sleep prediction, the weight of the screen on and off data is greater than the weight of the work and rest behavior data and the work plan data.
应当说明的是,对用户的睡眠预测包括但不限于用户进入睡眠的时刻、结束睡眠的时 刻以及进入睡眠的时刻和结束睡眠的时刻所组成的睡眠区间等。比如,根据睡眠预测模型对用户进行睡眠预测,得到用户进入睡眠的时刻为当日23:30,接收睡眠的时刻为次日06:60,相应的用户睡眠区间即为当日23:30-次日06:60。It should be noted that the sleep prediction for the user includes but is not limited to the time when the user enters sleep, the time when the user ends sleep, and the sleep interval composed of the time when the user enters sleep and the time when sleep ends. For example, according to the sleep prediction model to predict the user’s sleep, the time when the user enters sleep is 23:30 of the day, the time of receiving sleep is 06:60 the next day, and the corresponding user's sleep interval is 23:30-06 the next day :60.
由上可知,本申请实施例中的电子设备可以在其当前满足预设的睡眠预测条件时,获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据,此外,还获取预先训练的睡眠预测模型,从而根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果,能够提高对用户进行睡眠预测的准确度。It can be seen from the above that the electronic device in the embodiment of the present application can obtain the screen on and off data of the electronic device when it currently meets the preset sleep prediction conditions, and obtain the user's work and rest behavior data and work and rest plan data. In addition, it also obtains The pre-trained sleep prediction model can predict the user's sleep based on the acquired screen on and off data, work and rest behavior data, work schedule data, and sleep prediction model, and obtain the prediction result, which can improve the accuracy of sleep prediction for the user.
请参照图2,图2为本申请实施例提供的睡眠预测方法的另一流程示意图。该睡眠预测方法可以应用于电子设备。该睡眠预测方法的流程可以包括:Please refer to FIG. 2, which is a schematic diagram of another flow chart of the sleep prediction method provided by an embodiment of the application. The sleep prediction method can be applied to electronic devices. The process of the sleep prediction method may include:
在201中,电子设备判断当前是否满足预设的睡眠预测条件。In 201, the electronic device determines whether a preset sleep prediction condition is currently met.
应当说明的是,本申请实施例中对于睡眠识别条件的设置不做具体限制,可由本领域普通技术人员根据实际需要进行设置。It should be noted that there is no specific limitation on the setting of the sleep recognition condition in the embodiment of the present application, and can be set by a person of ordinary skill in the art according to actual needs.
比如,作为一种可选的实施方式,睡眠识别条件可以被配置为:For example, as an optional implementation manner, the sleep recognition condition can be configured as:
处于静止状态的持续时长达到预设时长。The duration of the static state reaches the preset duration.
其中,电子设备可以在进入静止状态(比如,电子设备可以根据内置的三轴加速度传感器侦测是否存在任一方向的加速度,若不存在则判定处于静止状态)的同时启动定时器进行计时,使用定时器的计时时长表征电子设备处于静止状态的持续时长,其中,电子设备在定时器的计时时长达到预设时长或者退出静止状态时停止定时器计时,并复位定时器。这样,电子设备当定时器的计时时长达到预设时长,也即是其处于静止状态的持续时长达到预设时长时,判定当前满足睡眠识别条件。Among them, the electronic device can start a timer for timing while entering a static state (for example, the electronic device can detect whether there is acceleration in any direction according to the built-in three-axis acceleration sensor, and if it does not exist, it is determined to be in a static state). The timing duration of the timer represents the continuous duration of the electronic device in the static state, where the electronic device stops counting the timer and resets the timer when the timing duration of the timer reaches the preset duration or exits the static state. In this way, when the timing duration of the timer reaches the preset duration, that is, when the duration of its static state reaches the preset duration, the electronic device determines that the sleep recognition condition is currently met.
作为另一种可选的实施方式,睡眠识别条件可以被配置为:As another optional implementation manner, the sleep recognition condition may be configured as:
到达预设的睡眠预测时刻。The preset sleep prediction moment is reached.
其中,本申请实施例对于睡眠预测时刻的取值不做具体限制,可由本领域普通技术人员根据实际需要进行配置,比如,可以固定设置为每一自然日的21:00,这样,电子设备在到达每一自然日的21:00之后,判定满足睡眠识别条件;又比如,还可以将睡眠预测时刻设置为上一次预测得到的用户进入睡眠的时刻之前30分钟的时刻。Among them, the embodiment of the present application does not specifically limit the value of the sleep prediction time, which can be configured by a person of ordinary skill in the art according to actual needs. For example, it can be fixedly set to 21:00 every natural day, so that the electronic device After reaching 21:00 of each natural day, it is determined that the sleep recognition condition is satisfied; for another example, the sleep prediction time can also be set to a time 30 minutes before the time when the user enters sleep that was predicted last time.
作为又一种可选的实施方式,睡眠识别条件可以被配置为:As yet another optional implementation manner, the sleep recognition condition may be configured as:
所处环境的环境亮度低于或等于预设亮度。The ambient brightness of the environment is lower than or equal to the preset brightness.
其中,本申请实施例中对于预设亮度的取值不做具体限制,可由本领域普通技术人员根据实际需要进行配置,比如,可以配置预设亮度为300尼特,这样,电子设备可以通过其配置的环境光传感器实时对所处环境的环境亮度进行侦测,当侦测到所处环境的环境亮度低于或等于300尼特时,判定满足睡眠识别条件。Among them, there are no specific restrictions on the value of the preset brightness in the embodiments of the present application, and can be configured by those of ordinary skill in the art according to actual needs. For example, the preset brightness can be configured to 300 nits, so that the electronic device can use it The configured ambient light sensor detects the ambient brightness of the environment in real time. When the ambient brightness of the environment is detected to be lower than or equal to 300 nits, it is determined that the sleep recognition conditions are met.
在202中,若是,则电子设备获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据。In 202, if yes, the electronic device obtains the on-off screen data of the electronic device, and obtains the user's work and rest behavior data and work and rest plan data.
本申请实施例中,电子设备在判定当前满足预设的睡眠预测条件时,触发对用户的睡眠预测。首先,电子设备获取对用户进行睡眠预测所需的数据,其中,对用户进行睡眠预测所需的数据至少包括电子设备的亮熄屏数据以及用户的作息行为数据和作息计划数据。In the embodiment of the present application, the electronic device triggers the sleep prediction of the user when it determines that the preset sleep prediction condition is currently met. First, the electronic device acquires the data required for the sleep prediction of the user. The data required for the sleep prediction of the user includes at least the screen on and off data of the electronic device and the user's work and rest behavior data and work schedule data.
其中,亮熄屏数据包括但不限于用于描述电子设备由熄屏切换至亮屏状态的切换时刻,以及由亮屏切换至熄屏的切换时刻,以及由“熄屏切换至亮屏状态的切换时刻”和“亮屏切换至熄屏的切换时刻”所得到亮屏持续时长和熄屏持续时长。Among them, the screen on and off data includes, but is not limited to, the switching time used to describe the switching time of the electronic device from the off-screen to the on-screen state, the switching time from the on-screen to the off-screen, and the switching from the off-screen to the on-screen state. The screen-on duration and screen-off duration obtained by "switching time" and "switching time for switching from on to off".
作息行为数据包括但不限于用于描述用户在何时休息以及如何休息(如睡眠、小憩等)的数据、描述用户在何时运动的数据以及如何运动数据等。The work and rest behavior data includes but is not limited to data describing when and how the user rests (such as sleep, nap, etc.), data describing when the user exercises and how to exercise data, etc.
作息计划数据包括但不限于用于描述用户计划在何时做某事的数据(比如事项安排)、描述用户计划在何时休息的数据以及描述用户在何时结束休息的数据,等等Work and rest plan data includes but is not limited to data describing when the user plans to do something (such as schedule), data describing when the user plans to take a break, and data describing when the user ends the break, etc.
在203中,电子设备确定电子设备的当前使用场景。In 203, the electronic device determines the current usage scenario of the electronic device.
在204中,电子设备从预先训练的多个睡眠预测模型中,获取对应当前使用场景的睡眠预测模型,其中,多个睡眠预测模型中不同的睡眠预测模型对应不同的使用场景。In 204, the electronic device obtains a sleep prediction model corresponding to the current use scenario from the multiple pre-trained sleep prediction models, where different sleep prediction models in the multiple sleep prediction models correspond to different use scenarios.
需要说明的是,本申请实施例中预先训练有多个睡眠预测模型,不同的睡眠预测模型适于在不同的使用场景对用户进行睡眠预测,其中,使用场景用于描述用户使用电子设备所处的场景,包括但不限于居家休假场景、外出旅行场景、工作出差场景以及日常工作场景等。It should be noted that in the embodiments of the present application, multiple sleep prediction models are pre-trained, and different sleep prediction models are suitable for predicting sleep of users in different usage scenarios, where the usage scenarios describe where the user uses the electronic device. Scenes, including but not limited to home vacation scenes, travel scenes, work trip scenes and daily work scenes.
这样,为了能够更准确的对用户进行睡眠预测,电子设备在获取到对用户进行睡眠预测所需的数据之后,进一步确定电子设备的当前使用场景,从而从预先训练的多个睡眠预测模型中获取对应当前使用场景的睡眠预测模型,用于后续对用户进行睡眠预测。In this way, in order to be able to predict the user’s sleep more accurately, after the electronic device obtains the data required for the user’s sleep prediction, it further determines the current usage scenario of the electronic device, thereby obtaining it from multiple pre-trained sleep prediction models The sleep prediction model corresponding to the current usage scenario is used for subsequent sleep prediction of the user.
应当说明的是,前述预先训练的多个睡眠预测模型可以全部存储在电子设备本地,也可以全部存储在远端的服务器中,还可以部分存储在电子设备本地、部分存储在远端的服务器中。It should be noted that the aforementioned pre-trained multiple sleep prediction models can all be stored locally in the electronic device, or all can be stored in a remote server, or partly stored locally in the electronic device and partly stored in a remote server. .
比如,请参照图3,电子设备本地的存储器中存储有四个预先训练的睡眠预测模型, 分别为适于在居家休假场景进行睡眠预测的A睡眠预测模型、适于在外出旅行场景进行睡眠预测的B睡眠预测模型、适于在工作出差场景进行睡眠预测的C睡眠预测模型以及适于在日常工作场景进行睡眠预测的D睡眠预测模型。若电子设备确定其当前使用场景为居家休假场景,则获取A睡眠预测模型用于对用户进行睡眠预测;若电子设备确定其当前使用场景为外出旅行场景,则获取B睡眠预测模型用于对用户进行睡眠预测;若电子设备确定其当前使用场景为工作出差场景,则获取C睡眠预测模型用于对用户进行睡眠预测;若电子设备确定其当前使用场景为日常工作场景,则获取D睡眠预测模型用于对用户进行睡眠预测。For example, referring to Figure 3, there are four pre-trained sleep prediction models stored in the local memory of the electronic device, namely A sleep prediction model suitable for sleep prediction in the home vacation scene, and sleep prediction model suitable for the sleep prediction in the travel scene B sleep prediction model, C sleep prediction model suitable for sleep prediction in work travel scenarios, and D sleep prediction model suitable for sleep prediction in daily work scenarios. If the electronic device determines that its current use scene is a home vacation scene, it will obtain a sleep prediction model for sleep prediction of the user; if the electronic device determines that its current use scene is a travel scene, it will obtain a sleep prediction model for the user Perform sleep prediction; if the electronic device determines that its current use scene is a work trip scenario, obtain the C sleep prediction model for sleep prediction of the user; if the electronic device determines that its current use scene is a daily work scenario, obtain a D sleep prediction model Used to predict user sleep.
在205中,电子设备根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果。In 205, the electronic device predicts the user's sleep based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtains the prediction result.
在本申请实施例中,电子设备在获取到电子设备的亮熄屏数据、用户的作息行为数据和作息计划数据,以及获取到睡眠预测模型之后,即可根据亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果,其中,在进行睡眠预测时,亮熄屏数据所占的权重大于作息行为数据和作息计划数据所占的权重。应当说明的是,对用户的睡眠预测包括但不限于用户进入睡眠的时刻、结束睡眠的时刻以及进入睡眠的时刻和结束睡眠的时刻所组成的睡眠区间等。比如,根据睡眠预测模型对用户进行睡眠预测,得到用户进入睡眠的时刻为当日23:30,接收睡眠的时刻为次日06:60,相应的用户睡眠区间即为当日23:30-次日06:60。In the embodiments of the present application, after the electronic device obtains the screen on and off data, the user's work and rest behavior data, and the work schedule data of the electronic device, and obtains the sleep prediction model, it can be based on the on and off screen data, work and rest behavior data, The work and rest plan data and the sleep prediction model are used to predict the user's sleep and obtain the prediction results. In the sleep prediction, the weight of the screen on and off data is greater than the weight of the work and rest behavior data and the work plan data. It should be noted that the sleep prediction of the user includes but is not limited to the time when the user enters sleep, the time when the user ends sleep, and the sleep interval composed of the time when the user enters sleep and the time when sleep ends. For example, according to the sleep prediction model to predict the user’s sleep, the time when the user enters sleep is 23:30 of the day, the time of receiving sleep is 06:60 the next day, and the corresponding user's sleep interval is 23:30-06 the next day :60.
在一实施方式中,预测结果为用户的睡眠区间,在根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果之后,可以执行:In one embodiment, the prediction result is the user's sleep interval. After the obtained screen on/off data, work and rest behavior data, work schedule data, and sleep prediction model are obtained, sleep prediction is performed on the user, and after the prediction result is obtained, the following can be executed:
若到达睡眠区间,则电子设备执行预设操作。If it reaches the sleep interval, the electronic device performs a preset operation.
本申请实施例中,电子设备在预测得到用户的睡眠区间之后,若到达预测的睡眠区间,则执行预先配置的、在用户处于睡眠状态时执行的预设操作。其中,预设操作包括但不限于系统更新操作、应用更新操作以及功耗控制操作中的至少一种,可以由用户手动配置,也可由电子设备缺省配置。In the embodiment of the present application, after predicting the sleeping interval of the user, if the electronic device reaches the predicted sleeping interval, it executes a preset operation configured in advance and executed when the user is in a sleeping state. Wherein, the preset operation includes but is not limited to at least one of a system update operation, an application update operation, and a power consumption control operation, which may be manually configured by the user or may be configured by the electronic device by default.
比如,电子设备可以将系统更新操作配置为预设操作,从而在到达预测的睡眠区间时执行系统更新操作,将系统更新到最新版本;电子设备也可以将应用更新操作配置为预设操作,从而在到达预测的睡眠区间时执行应用更新操作,将已安装的应用程序更新到最新版本;电子设备还可以将“应用预设的用于降低功耗的功耗控制策略”配置为预设操作, 从而在到达预测的睡眠区间时应用预设的用于降低功耗的功耗控制策略,降低电子设备的功耗,等等。For example, the electronic device can configure the system update operation as a preset operation, so as to perform the system update operation when the predicted sleep interval is reached, and update the system to the latest version; the electronic device can also configure the application update operation as a preset operation, thereby The application update operation is performed when the predicted sleep interval is reached, and the installed application is updated to the latest version; the electronic device can also configure the "application preset power consumption control strategy for reducing power consumption" as a preset operation, Thus, when the predicted sleep interval is reached, the preset power consumption control strategy for reducing power consumption is applied, and the power consumption of the electronic device is reduced, and so on.
又比如,请参照图4,电子设备提供有预设操作配置界面,如图4所示,预设操作配置界面包括提示信息“请选择睡眠期间执行的操作”,操作选择框、下拉按钮、下拉菜单、确定按钮以及取消按钮,其中,下拉菜单根据用户对下拉按钮的点击操作呼出,下拉菜单中提供有电子设备可以在用户睡眠区间内执行的多种操作,如图4中示出的系统更新操作、应用更新操作等,用户可以根据实际需要选择电子设备在用户睡眠区间内执行的操作,并在选定需要由电子设备在用户睡眠区间内执行的操作后,点击确定按钮,指示电子设备将用户选择的操作作为前述预设操作。或者,若用户发现无需要电子设备在用户睡眠区间执行的操作,则可以点击取消按钮,指示电子设备执行缺省配置的预设操作。For another example, please refer to Figure 4. The electronic device provides a preset operation configuration interface. As shown in Figure 4, the preset operation configuration interface includes the prompt message "Please select the operation performed during sleep", operation selection box, drop-down button, drop-down Menu, OK button, and Cancel button. Among them, the drop-down menu is called out according to the user's click operation on the drop-down button. The drop-down menu provides various operations that the electronic device can perform during the user's sleep interval, as shown in the system update in Figure 4 Operation, application update operations, etc., the user can select the operation performed by the electronic device in the user's sleep interval according to actual needs, and after selecting the operation that needs to be performed by the electronic device in the user's sleep interval, click the OK button to instruct the electronic device to The operation selected by the user is the aforementioned preset operation. Or, if the user finds that there is no need for an operation performed by the electronic device during the user's sleep interval, he can click the cancel button to instruct the electronic device to perform a preset operation of the default configuration.
在一实施方式中,在获取用户的作息行为数据和作息计划数据时,可以执行:In one embodiment, when obtaining the user's work and rest behavior data and work rest plan data, the following can be performed:
(1)电子设备获取运动应用记录的对应用户的运动传感器数据,根据获取到的运动传感器数据生成用户的作息行为数据;(1) The electronic device obtains the corresponding user's motion sensor data recorded by the sports application, and generates the user's work and rest behavior data according to the obtained motion sensor data;
(2)电子设备获取用户在备忘录应用配置的事项安排数据,以及获取用户在闹钟应用配置的闹钟数据,并根据获取到的事项安排数据和闹钟数据生成用户的作息计划数据。(2) The electronic device obtains the event schedule data configured by the user in the memo application and the alarm clock data configured by the user in the alarm clock application, and generates the user's schedule data based on the obtained event schedule data and alarm clock data.
本申请实施例中,电子设备在获取用户的作息行为数据时,可以获取运动应用记录的对应用户的运动传感器数据(运动传感器包括但不限于三轴加速度传感器、陀螺仪以及地磁传感器等),从而根据获取到的运动传感器数据生成用户的作息行为数据,比如,电子设备根据获取到运动传感器数据生成用户的作息行为数据为“用户在20:30-21:00步行了一万步,在21:00-21:00休息的了30分钟”。In the embodiment of the present application, when the electronic device obtains the user's work and rest behavior data, it can obtain the corresponding user's motion sensor data recorded by the sports application (motion sensors include but are not limited to three-axis acceleration sensors, gyroscopes, and geomagnetic sensors, etc.), thereby Generate the user's work and behavior data based on the acquired motion sensor data. For example, the electronic device generates the user's work and behavior data based on the acquired motion sensor data as "The user walks 10,000 steps between 20:30-21:00, and at 21: 00-21:00 rested for 30 minutes".
电子设备在获取用户的作息计划数据时,可以获取用户在备忘录应用配置的事项安排数据,以及获取用户在闹钟应用配置的闹钟数据,从而根据获取到的事项安排数据和闹钟数据生成用户的作息计划数据,比如,电子设备获取到用户在备忘录应用配置的事项安排数据为“次日08:00出发拜访XX客户”,获取到用户在闹钟应用配置的闹钟数据为“起床闹钟次日06:30”,则电子设备可以根据获取到的该事项安排数据和闹钟数据,生成用户的作息计划数据为“用户计划在次日06:30起床,并于08:00出发拜访XX客户”When the electronic device obtains the user's schedule data, it can obtain the user's schedule data configured in the memo application and the alarm clock data configured by the user in the alarm clock application, so as to generate the user's schedule according to the obtained schedule data and alarm clock data Data, for example, the electronic device obtains the user configuration data in the memo application as "departure to visit XX customer at 08:00 the next day", and obtains the alarm clock data configured by the user in the alarm clock application as "wake up alarm clock at 06:30 the next day" , The electronic device can generate the user’s schedule data based on the acquired event scheduling data and alarm clock data as "the user plans to wake up at 06:30 the next day and set off to visit the XX customer at 08:00"
在一实施方式中,在根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果时,可以执行:In one embodiment, according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, perform sleep prediction on the user, and when the prediction result is obtained, you can execute:
(1)电子设备对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理;(1) The electronic device preprocesses the acquired screen on and off data, work and rest behavior data, and work and rest plan data;
(2)电子设备将完成预处理后的亮熄屏数据、作息行为数据以及作息计划数据输入睡 眠预测模型,得到睡眠预测模型对用户进行睡眠预测所输出的预测结果。(2) The electronic device inputs the preprocessed on-screen data, work and rest behavior data, and work and rest plan data into the sleep prediction model to obtain the prediction results output by the sleep prediction model for the user's sleep prediction.
请参照图5,电子设备在根据亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果时,可以首先对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理,然后再将完成预处理后的亮熄屏数据、作息行为数据以及作息计划数据输入到睡眠预测模型,由睡眠预测模型根据输入的亮熄屏数据、作息行为数据以及作息计划数据对用户进行睡眠预测,输出预测结果。Referring to Figure 5, the electronic device predicts the user's sleep based on the screen on and off data, work and rest behavior data, schedule data, and sleep prediction model, and when the prediction result is obtained, it can first compare the acquired screen on and off data, work and rest behavior The data and schedule data are preprocessed, and then the preprocessed screen on and off data, work and rest behavior data, and schedule data are input into the sleep prediction model, and the sleep prediction model is based on the input on and off screen data, work and rest behavior data And the schedule data for sleep prediction of the user, and output the prediction result.
应当说明的是,电子设备在对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理时,可以对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行数据清洗处理、数据集成处理、数据变换处理以及数据归约处理。It should be noted that when the electronic device preprocesses the acquired screen on and off data, work and rest behavior data, and schedule data, it can perform data cleaning processing on the acquired screen on and off data, work and rest behavior data, and schedule data. , Data integration processing, data transformation processing and data reduction processing.
其中,数据清洗处理是对数据进行重新审查和校验的过程,目的在于删除重复信息、纠正存在的错误,并提供数据一致性。Among them, data cleaning processing is the process of re-examining and verifying data, with the purpose of deleting duplicate information, correcting existing errors, and providing data consistency.
数据集成处理是将单个维度的数据集成到一个更高更抽象的维度,集成后能够得到更为准确、更为丰富、更具有针对性的数据。Data integration processing is to integrate the data of a single dimension into a higher and more abstract dimension. After the integration, more accurate, richer, and more targeted data can be obtained.
数据变换处理是在对数据进行统计分析时,要求数据必须满足一定的条件,如在方差分析时,要求试验误差具有独立性、无偏性、方差齐性和正态性,但在实际分析中,独立性、无偏性比较容易满足,方差齐性在大多数情况下能满足,正态性有时不能满足。此时若将数据经过适当的转换,如平方根转换、对数转换、平方根反正弦转换等,则可以使数据满足方差分析的要求。其中所进行的此种数据转换,称为数据变换。Data transformation processing requires the data to meet certain conditions when performing statistical analysis on the data. For example, in the analysis of variance, the test error is required to be independent, unbiased, uniform and normal in variance, but in actual analysis , Independence and unbiasedness are easier to satisfy, homogeneity of variance can be satisfied in most cases, and normality sometimes cannot be satisfied. At this time, if the data is properly transformed, such as square root transformation, logarithmic transformation, square root arcsine transformation, etc., the data can meet the requirements of variance analysis. This kind of data conversion is called data conversion.
数据归约是指在尽可能保持数据原貌的前提下,最大限度地精简数据量(完成该任务的必要前提是理解挖掘任务和熟悉数据本身内容)。数据归约主要有两个途径:属性选择和数据采样,分别针对原始数据集中的属性和记录。Data reduction means to minimize the amount of data while maintaining the original appearance of the data as much as possible (the necessary prerequisite for completing this task is to understand the mining task and be familiar with the content of the data itself). There are two main ways of data reduction: attribute selection and data sampling, respectively, for attributes and records in the original data set.
在一实施方式中,在确定电子设备的当前使用场景时,可以执行:In an embodiment, when determining the current usage scenario of the electronic device, the following may be executed:
(1)电子设备获取电子设备的当前状态信息,其中,当前状态信息包括描述电子设备当前的使用状态、位置状态以及环境状态的信息;(1) The electronic device acquires current state information of the electronic device, where the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
(2)电子设备根据预存的多个使用场景的状态信息,从多个使用场景中确定出状态信息与当前状态信息匹配的使用场景,作为电子设备的当前使用场景。(2) The electronic device determines, from the multiple usage scenarios, the usage scenario whose status information matches the current status information according to the prestored status information of the multiple usage scenarios, as the current usage scenario of the electronic device.
应当说明的是,当前状态信息包括但不限于用于描述电子设备当前的使用状态、位置状态以及环境状态等的相关信息。比如,电子设备根据重力传感器数据和加速度传感器数据生成用于描述其使用状态的状态信息,根据定位传感器数据生成用于描述其位置状态的状态信息,根据声音传感器和光线传感器生成用于描述其环境状态的状态信息等。It should be noted that the current status information includes, but is not limited to, relevant information used to describe the current use status, location status, and environmental status of the electronic device. For example, an electronic device generates state information describing its use state based on gravity sensor data and acceleration sensor data, generates state information describing its position based on positioning sensor data, and generates state information describing its environment based on sound sensors and light sensors. State information, etc.
本申请实施例中,电子设备本地预存有多个不同使用场景的状态信息(或者说,使用多个不同的状态信息分别描述了多个不同的使用场景),比如居家休假场景的状态信息、外出旅行场景的状态信息、工作出差场景的状态信息以及日常工作场景的状态信息等。这样,电子设备在确定其当前使用场景时,根据预存的多个使用场景的状态信息,从多个使用场景中确定出状态信息与当前状态信息匹配的使用场景,作为电子设备的当前使用场景。In the embodiment of the present application, the electronic device locally prestores the state information of a plurality of different usage scenarios (in other words, a plurality of different state information is used to describe a plurality of different usage scenarios), such as the state information of a home vacation scenario, and going out. Status information of travel scenes, status information of work trip scenes, and status information of daily work scenes. In this way, when the electronic device determines its current usage scenario, it determines from the multiple usage scenarios a usage scenario whose status information matches the current status information based on the prestored status information of the multiple usage scenarios, as the current usage scenario of the electronic device.
其中,电子设备可以根据两个状态信息之间的相似度来判断两个状态信息是否匹配,这样,电子设备在确定状态信息与其当前状态信息匹配的使用场景时,可以分别获取各使用场景的状态信息与其当前状态信息之间的相似度,并将相似度达到预设相似度的使用场景确定为状态信息与其当前状态信息所匹配的使用场景。Among them, the electronic device can determine whether the two status information matches according to the similarity between the two status information. In this way, the electronic device can obtain the status of each usage scene separately when determining the usage scenarios in which the status information matches its current status information. The similarity between the information and its current state information, and the use scenario where the similarity reaches the preset similarity is determined as the use scenario that matches the state information and its current state information.
应当说明的是,本申请实施例中对于预设相似度的取值不做具体限制,可由本领域普通技术人员根据实际需要取合适值。It should be noted that there is no specific limitation on the value of the preset similarity in the embodiments of the present application, and a person of ordinary skill in the art can select an appropriate value according to actual needs.
比如,假设电子设备预存有居家休假场景的状态信息、外出旅行场景的状态信息、工作出差场景的状态信息以及日常工作场景的状态信息,且预设相似度被配置为85%。若电子设备获取到居家休假场景的状态信息与其当前状态信息的相似度为40%、外出旅行场景的状态信息与其当前状态信息的相似度为45%、工作出差场景的状态信息与其当前状态信息的相似度为70%、日常工作场景的状态信息与其当前状态信息的相似度为86%,可以看出,日常工作场景的状态信息与电子设备的当前状态信息的相似度达到预设相似度(85%),电子设备将日常工作场景确定为状态信息与其当前状态信息所匹配的使用场景。For example, suppose that the electronic device prestores state information of a home vacation scene, state information of a travel scene, state information of a work trip scene, and state information of a daily work scene, and the preset similarity is configured to be 85%. If the electronic device obtains that the status information of the home vacation scene is similar to its current status information at 40%, the status information of the outing travel scene is similar to its current status information at 45%, and the status information of the work trip scene is similar to its current status information. The similarity is 70%, and the similarity between the status information of the daily work scene and its current status information is 86%. It can be seen that the similarity between the status information of the daily work scene and the current status information of the electronic device reaches the preset similarity (85 %), the electronic device determines the daily work scene as the use scene whose status information matches its current status information.
其中,电子设备在获取各使用场景的状态信息与其当前状态信息之间的相似度时,对于预存的多个使用场景的状态信息中的任一状态信息,电子设备对其进行特征提取,获取到各使用场景的状态信息的词向量集合,并将各使用场景的状态信息的词向量集合记为第一词向量集合。此外,电子设备还对其当前状态信息进行特征提取,获取到其当前状态信息的词向量集合,记为第二词向量集合。Wherein, when the electronic device obtains the similarity between the status information of each usage scene and its current status information, the electronic device performs feature extraction on any one of the pre-stored status information of multiple usage scenes to obtain The word vector set of the state information of each usage scene is recorded, and the word vector set of the state information of each usage scene is recorded as the first word vector set. In addition, the electronic device also performs feature extraction on its current state information, and obtains the word vector set of its current state information, which is recorded as the second word vector set.
电子设备在获取到各使用场景的状态信息的第一词向量集合以及获取到的其当前状态信息的第二词向量集合之后,分别计算各第一词向量集合与第二词向量集合之间的距离,并将计算得到各距离作为各使用场景的状态信息与其当前状态信息之间的相似度。After the electronic device obtains the first word vector set of the state information of each usage scene and the second word vector set of its current state information, it calculates the difference between each first word vector set and the second word vector set. The distance is calculated as the similarity between the status information of each usage scene and its current status information.
其中,可由本领域普通技术人员根据实际需要选取任意一种特征距离(比如欧氏距离、曼哈顿距离、切比雪夫距离以及余弦距离等)来衡量两个词向量集合之间的距离。Among them, a person of ordinary skill in the art can select any characteristic distance (such as Euclidean distance, Manhattan distance, Chebyshev distance, cosine distance, etc.) according to actual needs to measure the distance between two word vector sets.
比如,可以获取第一词向量集合和第二词向量集合的余弦距离,具体参照以下公式:For example, the cosine distance between the first word vector set and the second word vector set can be obtained by referring to the following formula:
Figure PCTCN2019075361-appb-000001
Figure PCTCN2019075361-appb-000001
其中,e表示第一词向量集合和第二词向量集合的余弦距离,f表示第一词向量集合,N表示第一词向量集合和第二词向量集合的维度(两个词向量集合的维度相同),f i表示第一词向量集合中第i维度的词向量(一种使用场景的状态信息包括多种维度的状态信息,比如使用状态信息、位置状态信息、环境状态信息等,第i维度的词向量即第i维度的状态信息的词向量),g i表示第二词向量集合中第i维度的词向量。 Among them, e represents the cosine distance between the first word vector set and the second word vector set, f represents the first word vector set, and N represents the dimensions of the first word vector set and the second word vector set (the dimensions of the two word vector sets Same), f i represents the word vector of the i-th dimension in the first word vector set (the state information of a usage scenario includes state information of multiple dimensions, such as use state information, location state information, environmental state information, etc., The dimension word vector is the word vector of the state information of the i-th dimension), and g i represents the word vector of the i-th dimension in the second word vector set.
其中,电子设备在获取其当前状态信息的词向量集合,得到第二词向量集合时,可以对其当前状态信息进行分词操作后输入编码器神经网络,由编码器神经网络进行处理后输出对应前述当前状态信息的词向量,相应的,电子设备将编码器神经网络输出的前述当前状态信息的词向量集合作为第二词向量集合。Among them, when the electronic device obtains the word vector set of its current state information and obtains the second word vector set, it can perform word segmentation operation on its current state information and then input it into the encoder neural network, which is processed by the encoder neural network and the output corresponds to the aforementioned The word vector of the current state information, correspondingly, the electronic device uses the word vector set of the current state information output by the encoder neural network as the second word vector set.
应当说明的是,本申请实施例并不限定编码器神经网络的具体模型和拓扑结构,比如,可以采用单层的递归神经网络进行训练得到编码器神经网络,也可以采用多层的递归神经网络进行训练得到编码器神经网络还可以采用卷积神经网络、或者其变种、或者其他网络结构的神经网络进行训练,得到编码器神经网络。It should be noted that the embodiments of this application do not limit the specific model and topology of the encoder neural network. For example, a single-layer recurrent neural network can be used for training to obtain the encoder neural network, or a multi-layer recurrent neural network can be used. The encoder neural network obtained by training may also be trained using a convolutional neural network, or its variants, or a neural network of other network structures to obtain an encoder neural network.
相应的,电子设备在分别获取各使用场景的状态信息的词向量集合,得到多个第一词向量集合时,可以分别将各使用场景的状态信息输入编码器神经网络,并将编码器神经网络输出的各使用场景的状态信息的词向量集合作为第一词向量集合。Correspondingly, when the electronic device separately obtains the word vector sets of the state information of each use scene, and obtains multiple first word vector sets, it can input the state information of each use scene into the encoder neural network, and send the encoder neural network to the encoder neural network. The output word vector set of the status information of each usage scene is used as the first word vector set.
此外,还可以预先训练用于使用场景识别的使用场景识别模型,并将该使用场景识别模型配置在电子设备本地。这样,电子设备在根据其当前状态信息确定其当前使用场景时,可以将其当前状态信息输入到配置的使用场景识别模型,由使用场景识别模型识别出前述当前状态信息所对应的使用场景,并输出。相应的,电子设备将使用场景识别模型输出的前述当前状态信息所对应的使用场景作为其当前使用场景。In addition, it is also possible to pre-train a usage scene recognition model for usage scene recognition, and configure the usage scene recognition model locally in the electronic device. In this way, when the electronic device determines its current usage scenario based on its current status information, it can input its current status information into the configured usage scenario recognition model, and the usage scenario recognition model can identify the usage scenario corresponding to the aforementioned current status information, and Output. Correspondingly, the electronic device uses the use scene corresponding to the aforementioned current state information output by the use scene recognition model as its current use scene.
请参照图6,图6为本申请实施例提供的睡眠预测装置的结构示意图。该睡眠预测装置可以应用于电子设备。睡眠预测装置可以包括:条件判断模块401、数据获取模块402、模型获取模块403以及睡眠预测模块404。Please refer to FIG. 6, which is a schematic structural diagram of a sleep prediction device provided by an embodiment of the application. The sleep prediction device can be applied to electronic equipment. The sleep prediction device may include: a condition determination module 401, a data acquisition module 402, a model acquisition module 403, and a sleep prediction module 404.
条件判断模块401,用于判断当前是否满足预设的睡眠预测条件;The condition judgment module 401 is used to judge whether the preset sleep prediction condition is currently met;
数据获取模块402,用于在条件判断模块401的判断结果为是时,获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;The data acquisition module 402 is configured to acquire the screen on and off data of the electronic device when the judgment result of the condition judgment module 401 is yes, and acquire the user's work and rest behavior data and work and rest plan data;
模型获取模块403,用于获取预先训练的睡眠预测模型;The model acquisition module 403 is used to acquire a pre-trained sleep prediction model;
睡眠预测模块404,用于根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果。The sleep prediction module 404 is configured to perform sleep prediction on the user according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model to obtain a prediction result.
在一实施方式中,在获取用户的作息行为数据和作息计划数据时,数据获取模块402可以用于:In an embodiment, when acquiring the user's work and rest behavior data and work rest plan data, the data acquisition module 402 may be used to:
获取运动应用记录的对应用户的运动传感器数据,根据获取到的运动传感器数据生成用户的作息行为数据;Obtain the corresponding user's motion sensor data recorded by the sports application, and generate the user's work and rest behavior data according to the obtained motion sensor data;
获取用户在备忘录应用配置的事项安排数据,以及获取用户在闹钟应用配置的闹钟数据,并根据获取到的事项安排数据和闹钟数据生成用户的作息计划数据。Obtain the event schedule data configured by the user in the memo application, and obtain the alarm clock data configured by the user in the alarm clock application, and generate the user's schedule data based on the obtained event schedule data and alarm clock data.
在一实施方式中,在根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果时,睡眠预测模块404可以用于:In one embodiment, when performing sleep prediction on the user according to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtain the prediction result, the sleep prediction module 404 can be used to:
对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理;Preprocess the acquired screen on and off data, work and rest behavior data, and work and rest plan data;
将完成预处理后的亮熄屏数据、作息行为数据以及作息计划数据输入睡眠预测模型,得到睡眠预测模型对用户进行睡眠预测所输出的预测结果。Input the preprocessed on-off screen data, work and rest behavior data, and work and rest plan data into the sleep prediction model to obtain the prediction results output by the sleep prediction model for the user's sleep prediction.
在一实施方式中,在对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理时,睡眠预测模块404可以用于:In one embodiment, when preprocessing the acquired screen on and off data, work and rest behavior data, and work and rest plan data, the sleep prediction module 404 may be used to:
对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行数据清洗处理、数据集成处理、数据变换处理以及数据归约处理。Perform data cleaning processing, data integration processing, data transformation processing, and data reduction processing on the acquired screen on and off data, work and rest behavior data, and work and rest plan data.
在一实施方式中,睡眠预测条件包括:In one embodiment, the sleep prediction conditions include:
处于静止状态的持续时长达到预设时长;The duration of the static state reaches the preset duration;
或者,到达预设的睡眠预测时刻。Or, reach the preset sleep prediction time.
在一实施方式中,在获取预先训练的睡眠预测模型时,模型获取模块403可以用于:In an embodiment, when acquiring a pre-trained sleep prediction model, the model acquiring module 403 may be used to:
确定电子设备的当前使用场景;Determine the current usage scenarios of electronic equipment;
从预先训练的多个睡眠预测模型中,获取对应当前使用场景的睡眠预测模型,其中,多个睡眠预测模型中不同的睡眠预测模型对应不同的使用场景。From the multiple pre-trained sleep prediction models, a sleep prediction model corresponding to the current use scenario is obtained, where different sleep prediction models in the multiple sleep prediction models correspond to different use scenarios.
在一实施方式中,在确定电子设备的当前使用场景时,模型获取模块403可以用于:In an embodiment, when determining the current usage scenario of the electronic device, the model acquisition module 403 may be used to:
获取电子设备的当前状态信息,其中,当前状态信息包括描述电子设备当前的使用状态、位置状态以及环境状态的信息;Acquiring current state information of the electronic device, where the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
根据预存的多个使用场景的状态信息,从多个使用场景中确定出状态信息与当前状态信息匹配的使用场景,作为电子设备的当前使用场景。According to the pre-stored state information of multiple use scenarios, a use scenario whose state information matches the current state information is determined from the multiple use scenarios, as the current use scenario of the electronic device.
在一实施方式中,在根据预存的多个使用场景的状态信息,从多个使用场景中确定出状态信息与当前状态信息匹配的使用场景时,模型获取模块403可以用于:In an embodiment, when the use scenario whose state information matches the current state information is determined from the multiple use scenarios based on the state information of multiple prestored use scenarios, the model acquisition module 403 may be used to:
分别获取各使用场景的状态信息与其当前状态信息之间的相似度,并将相似度达到预设相似度的使用场景确定为状态信息与其当前状态信息所匹配的使用场景。The similarity between the status information of each usage scene and its current status information is respectively acquired, and the usage scene with the similarity reaching the preset similarity is determined as the usage scene matching the status information and its current status information.
在一实施方式中,在获取各使用场景的状态信息与其当前状态信息之间的相似度时,模型获取模块403可以用于:In an embodiment, when acquiring the similarity between the status information of each usage scenario and its current status information, the model acquisition module 403 may be used to:
分别获取各使用场景的状态信息的词向量集合,得到多个第一词向量集合;Obtain the word vector sets of the status information of each usage scene respectively to obtain multiple first word vector sets;
获取前述当前状态信息的词向量集合,得到第二词向量集合;Obtain the word vector set of the aforementioned current state information, and obtain the second word vector set;
分别计算各第一词向量集合与第二词向量集合之间的距离;Calculate the distance between each first word vector set and the second word vector set;
将计算得到的各距离作为各使用场景的状态信息与前述当前状态信息之间的相似度。The calculated distances are taken as the similarity between the state information of each usage scene and the aforementioned current state information.
在一实施方式中,在获取各使用场景的状态信息的词向量集合,得到多个第一词向量集合时,模型获取模块403可以用于:In an embodiment, when acquiring the word vector sets of the status information of each usage scenario, and obtaining multiple first word vector sets, the model acquiring module 403 may be used to:
分别将各使用场景的状态信息输入编码器神经网络,并将编码器神经网络输出的各使用场景的状态信息的词向量集合作为第一词向量集合。The state information of each use scene is input into the encoder neural network, and the word vector set of the state information of each use scene output by the encoder neural network is used as the first word vector set.
在一实施方式中,在获取前述当前状态信息的词向量集合,得到第二词向量集合时,模型获取模块403可以用于:In an embodiment, when obtaining the word vector set of the aforementioned current state information to obtain the second word vector set, the model obtaining module 403 may be used to:
将前述当前状态信息输入编码器神经网络;Input the aforementioned current state information into the encoder neural network;
将编码器神经网络输出的前述当前状态信息的词向量集合作为第二词向量集合。The word vector set of the foregoing current state information output by the encoder neural network is used as the second word vector set.
在一实施方式中,在获取电子设备的当前状态信息之后,模型获取模块403还可以用于:In an embodiment, after obtaining the current state information of the electronic device, the model obtaining module 403 may also be used to:
根据前述当前状态信息以及预先训练的使用场景识别模型,识别前述当前状态信息对应的使用场景,作为电子设备的当前使用场景。According to the aforementioned current status information and the pre-trained usage scene recognition model, the usage scene corresponding to the aforementioned current status information is identified as the current usage scene of the electronic device.
在一实施方式中,预测结果包括用户的睡眠区间,睡眠预测装置还包括操作执行模块,用于:In an embodiment, the prediction result includes the user's sleep interval, and the sleep prediction device further includes an operation execution module for:
在睡眠预测模块404根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到用户的睡眠区间之后,若到达前述睡眠区间,则执行预设操作。After the sleep prediction module 404 predicts the user's sleep based on the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and obtains the user's sleep interval, if the aforementioned sleep interval is reached, the preset operation is performed .
在一实施方式中,前述预设操作包括系统更新操作、应用更新操作以及功耗控制操作 中的至少一种。In an embodiment, the aforementioned preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
本申请实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当其存储的计算机程序在计算机上执行时,使得计算机执行如本申请实施例提供的睡眠预测方法中的步骤。The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the stored computer program is executed on a computer, the computer is caused to execute the steps in the sleep prediction method provided in the embodiment of the present application.
本申请实施例还提供一种电子设备,包括存储器,处理器,处理器通过调用存储器中存储的计算机程序,执行本申请实施例提供的睡眠预测方法中的步骤。An embodiment of the present application further provides an electronic device including a memory and a processor, and the processor executes the steps in the sleep prediction method provided in the embodiment of the present application by calling a computer program stored in the memory.
请参照图7,图7为本申请实施例提供的电子设备的结构示意图。该电子设备可以包括存储器601以及处理器602。本领域普通技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 7, which is a schematic structural diagram of an electronic device provided by an embodiment of the application. The electronic device may include a memory 601 and a processor 602. A person of ordinary skill in the art can understand that the structure of the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device, and may include more or less components than those shown in the figure, or a combination of certain components, or different component arrangements. .
存储器601可用于存储应用程序和数据。存储器601存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器602通过运行存储在存储器601的应用程序,从而执行各种功能应用以及数据处理。The memory 601 can be used to store application programs and data. The application program stored in the memory 601 contains executable code. Application programs can be composed of various functional modules. The processor 602 executes various functional applications and data processing by running application programs stored in the memory 601.
处理器602是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器601内的应用程序,以及调用存储在存储器601内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 602 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, and executes the electronic device by running or executing the application program stored in the memory 601 and calling the data stored in the memory 601 The various functions and processing data of the electronic device can be used to monitor the electronic equipment as a whole.
在本申请实施例中,电子设备中的处理器602会按照如下的指令,将一个或一个以上的音频处理程序的进程对应的可执行代码加载到存储器601中,并由处理器602来运行存储在存储器601中的应用程序,从而执行:In the embodiment of the present application, the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code The application program in the memory 601 thus executes:
判断当前是否满足预设的睡眠预测条件;Determine whether the preset sleep prediction conditions are currently met;
若是,则获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;If yes, obtain the screen on and off data of the electronic device, and obtain the user's work and rest behavior data and work and rest plan data;
获取预先训练的睡眠预测模型;Obtain a pre-trained sleep prediction model;
根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果。According to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, a sleep prediction is performed on the user to obtain a prediction result.
请参照图8,图8为本申请实施例提供的电子设备的另一结构示意图,与图7所示电子设备的区别在于,电子设备还包括输入单元603和输出单元604等组件。Please refer to FIG. 8. FIG. 8 is another schematic structural diagram of the electronic device provided by an embodiment of the application. The difference from the electronic device shown in FIG. 7 is that the electronic device further includes components such as an input unit 603 and an output unit 604.
其中,输入单元603可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入 等。The input unit 603 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
输出单元604可用于输出由用户输入的信息或提供给用户的信息,如扬声器等。The output unit 604 may be used to output information input by the user or information provided to the user, such as a speaker.
在本申请实施例中,电子设备中的处理器602会按照如下的指令,将一个或一个以上的音频处理程序的进程对应的可执行代码加载到存储器601中,并由处理器602来运行存储在存储器601中的应用程序,从而执行:In the embodiment of the present application, the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code The application program in the memory 601 thus executes:
判断当前是否满足预设的睡眠预测条件;Determine whether the preset sleep prediction conditions are currently met;
若是,则获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;If yes, obtain the screen on and off data of the electronic device, and obtain the user's work and rest behavior data and work and rest plan data;
获取预先训练的睡眠预测模型;Obtain a pre-trained sleep prediction model;
根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果。According to the obtained screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, a sleep prediction is performed on the user to obtain a prediction result.
在一实施方式中,在获取用户的作息行为数据和作息计划数据时,处理器602可以执行:In an embodiment, when acquiring the user's work and rest behavior data and work and rest plan data, the processor 602 may execute:
获取运动应用记录的对应用户的运动传感器数据,根据获取到的运动传感器数据生成用户的作息行为数据;Obtain the corresponding user's motion sensor data recorded by the sports application, and generate the user's work and rest behavior data according to the obtained motion sensor data;
获取用户在备忘录应用配置的事项安排数据,以及获取用户在闹钟应用配置的闹钟数据,并根据获取到的事项安排数据和闹钟数据生成用户的作息计划数据。Obtain the event schedule data configured by the user in the memo application, and obtain the alarm clock data configured by the user in the alarm clock application, and generate the user's schedule data based on the obtained event schedule data and alarm clock data.
在一实施方式中,在根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到预测结果时,处理器602可以执行:In an embodiment, when performing sleep prediction on the user according to the acquired screen on and off data, work and rest behavior data, work and rest plan data, and sleep prediction model, and when the prediction result is obtained, the processor 602 may execute:
对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理;Preprocess the acquired screen on and off data, work and rest behavior data, and work and rest plan data;
将完成预处理后的亮熄屏数据、作息行为数据以及作息计划数据输入睡眠预测模型,得到睡眠预测模型对用户进行睡眠预测所输出的预测结果。Input the preprocessed on-off screen data, work and rest behavior data, and work and rest plan data into the sleep prediction model to obtain the prediction results output by the sleep prediction model for the user's sleep prediction.
在一实施方式中,在对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行预处理时,处理器602可以执行:In an embodiment, when preprocessing the acquired screen on and off data, work and rest behavior data, and work and rest plan data, the processor 602 may execute:
对获取到的亮熄屏数据、作息行为数据以及作息计划数据进行数据清洗处理、数据集成处理、数据变换处理以及数据归约处理。Perform data cleaning processing, data integration processing, data transformation processing, and data reduction processing on the acquired screen on and off data, work and rest behavior data, and work and rest plan data.
在一实施方式中,睡眠预测条件包括:In one embodiment, the sleep prediction conditions include:
处于静止状态的持续时长达到预设时长;The duration of the static state reaches the preset duration;
或者,到达预设的睡眠预测时刻。Or, reach the preset sleep prediction time.
在一实施方式中,在获取预先训练的睡眠预测模型时,处理器602可以执行:In an embodiment, when acquiring the pre-trained sleep prediction model, the processor 602 may execute:
确定电子设备的当前使用场景;Determine the current usage scenarios of electronic equipment;
从预先训练的多个睡眠预测模型中,获取对应当前使用场景的睡眠预测模型,其中,多个睡眠预测模型中不同的睡眠预测模型对应不同的使用场景。From the multiple pre-trained sleep prediction models, a sleep prediction model corresponding to the current use scenario is obtained, where different sleep prediction models in the multiple sleep prediction models correspond to different use scenarios.
在一实施方式中,在确定电子设备的当前使用场景时,处理器602可以执行:In an implementation manner, when determining the current usage scenario of the electronic device, the processor 602 may execute:
获取电子设备的当前状态信息,其中,当前状态信息包括描述电子设备当前的使用状态、位置状态以及环境状态的信息;Acquiring current state information of the electronic device, where the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
根据预存的多个使用场景的状态信息,从多个使用场景中确定出状态信息与当前状态信息匹配的使用场景,作为电子设备的当前使用场景。According to the pre-stored state information of multiple use scenarios, a use scenario whose state information matches the current state information is determined from the multiple use scenarios, as the current use scenario of the electronic device.
在一实施方式中,在根据预存的多个使用场景的状态信息,从多个使用场景中确定出状态信息与当前状态信息匹配的使用场景时,处理器602可以执行:In an embodiment, when determining a usage scenario whose status information matches the current status information from the multiple usage scenarios according to the prestored status information of multiple usage scenarios, the processor 602 may execute:
分别获取各使用场景的状态信息与其当前状态信息之间的相似度,并将相似度达到预设相似度的使用场景确定为状态信息与其当前状态信息所匹配的使用场景。The similarity between the status information of each usage scene and its current status information is respectively acquired, and the usage scene with the similarity reaching the preset similarity is determined as the usage scene matching the status information and its current status information.
在一实施方式中,在获取各使用场景的状态信息与其当前状态信息之间的相似度时,处理器602可以执行:In an implementation manner, when acquiring the similarity between the status information of each usage scenario and its current status information, the processor 602 may execute:
分别获取各使用场景的状态信息的词向量集合,得到多个第一词向量集合;Obtain the word vector sets of the status information of each usage scene respectively to obtain multiple first word vector sets;
获取前述当前状态信息的词向量集合,得到第二词向量集合;Obtain the word vector set of the aforementioned current state information, and obtain the second word vector set;
分别计算各第一词向量集合与第二词向量集合之间的距离;Calculate the distance between each first word vector set and the second word vector set;
将计算得到的各距离作为各使用场景的状态信息与前述当前状态信息之间的相似度。The calculated distances are taken as the similarity between the state information of each usage scene and the aforementioned current state information.
在一实施方式中,在获取各使用场景的状态信息的词向量集合,得到多个第一词向量集合时,处理器602可以执行:In an embodiment, when acquiring the word vector sets of the status information of each usage scenario, and obtaining multiple first word vector sets, the processor 602 may execute:
分别将各使用场景的状态信息输入编码器神经网络,并将编码器神经网络输出的各使用场景的状态信息的词向量集合作为第一词向量集合。The state information of each use scene is input into the encoder neural network, and the word vector set of the state information of each use scene output by the encoder neural network is used as the first word vector set.
在一实施方式中,在获取前述当前状态信息的词向量集合,得到第二词向量集合时,处理器602可以执行:In one embodiment, when obtaining the word vector set of the aforementioned current state information to obtain the second word vector set, the processor 602 may execute:
将前述当前状态信息输入编码器神经网络;Input the aforementioned current state information into the encoder neural network;
将编码器神经网络输出的前述当前状态信息的词向量集合作为第二词向量集合。The word vector set of the foregoing current state information output by the encoder neural network is used as the second word vector set.
在一实施方式中,在获取电子设备的当前状态信息之后,处理器602可以执行:In an embodiment, after acquiring the current state information of the electronic device, the processor 602 may execute:
根据前述当前状态信息以及预先训练的使用场景识别模型,识别前述当前状态信息对应的使用场景,作为电子设备的当前使用场景。According to the aforementioned current status information and the pre-trained usage scene recognition model, the usage scene corresponding to the aforementioned current status information is identified as the current usage scene of the electronic device.
在一实施方式中,预测结果包括用户的睡眠区间,在根据获取到的亮熄屏数据、作息行为数据、作息计划数据以及睡眠预测模型,对用户进行睡眠预测,得到用户的睡眠区间 之后,处理器602可以执行:In one embodiment, the prediction result includes the user's sleep interval. After the obtained screen on and off data, work and rest behavior data, work schedule data, and sleep prediction model are obtained, sleep prediction is performed on the user, and the user's sleep interval is obtained. The device 602 can execute:
若到达前述睡眠区间,则执行预设操作。If the aforementioned sleep interval is reached, the preset operation is performed.
在一实施方式中,前述预设操作包括系统更新操作、应用更新操作以及功耗控制操作中的至少一种。In an embodiment, the aforementioned preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对睡眠预测方法的详细描述,此处不再赘述。In the foregoing embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in an embodiment, please refer to the detailed description of the sleep prediction method above, which will not be repeated here.
本申请实施例提供的睡眠预测装置/电子设备与上文实施例中的睡眠预测方法属于同一构思,在睡眠预测装置/电子设备上可以运行睡眠预测方法实施例中提供的任一方法,其具体实现过程详见睡眠预测方法实施例,此处不再赘述。The sleep prediction device/electronic device provided by the embodiment of the application belongs to the same concept as the sleep prediction method in the above embodiment. Any method provided in the sleep prediction method embodiment can be run on the sleep prediction device/electronic device. For the implementation process, refer to the embodiment of the sleep prediction method, which will not be repeated here.
需要说明的是,对本申请实施例睡眠预测方法而言,本领域普通技术人员可以理解实现本申请实施例睡眠预测方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如睡眠预测方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that for the sleep prediction method of the embodiment of the present application, those of ordinary skill in the art can understand that all or part of the process of implementing the sleep prediction method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program. The program may be stored in a computer readable storage medium, such as stored in a memory, and executed by at least one processor, and the execution process may include a process such as an embodiment of the sleep prediction method. Among them, the storage medium may be a magnetic disk, an optical disc, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
对本申请实施例的睡眠预测装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。For the sleep prediction device of the embodiment of the present application, its functional modules may be integrated in one processing chip, or each module may exist alone physically, or two or more modules may be integrated in one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
以上对本申请实施例所提供的一种睡眠预测方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。The above describes in detail a sleep prediction method, device, storage medium, and electronic equipment provided by the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementations of the present application. The description of the above embodiments is only It is used to help understand the method and core idea of this application; at the same time, for those skilled in the art, according to the idea of this application, there will be changes in the specific implementation and scope of application. In summary, the content of this specification does not It should be understood as a limitation of this application.

Claims (12)

  1. 一种睡眠预测方法,应用于电子设备,其中,包括:A sleep prediction method applied to electronic equipment, including:
    判断当前是否满足预设的睡眠预测条件;Determine whether the preset sleep prediction conditions are currently met;
    若是,则获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;If yes, obtain the screen on and off data of the electronic device, and obtain the user's work and rest behavior data and work and rest plan data;
    获取预先训练的睡眠预测模型;Obtain a pre-trained sleep prediction model;
    根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果。Perform sleep prediction on the user according to the screen on and off data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain a prediction result.
  2. 根据权利要求1所述的睡眠预测方法,其中,所述获取用户的作息行为数据和作息计划数据,包括:The sleep prediction method according to claim 1, wherein said acquiring the user’s work and rest behavior data and work and rest plan data comprises:
    获取运动应用记录的对应所述用户的运动传感器数据,根据所述运动传感器数据生成所述作息行为数据;Acquiring motion sensor data corresponding to the user recorded by the motion application, and generating the work and rest behavior data according to the motion sensor data;
    获取所述用户在备忘录应用配置的事项安排数据,以及获取所述用户在闹钟应用配置的闹钟数据,并根据所述事项安排数据和所述闹钟数据生成所述作息计划数据。Obtain the event schedule data configured by the user in the memo application, and obtain the alarm clock data configured by the user in the alarm clock application, and generate the schedule data according to the event schedule data and the alarm clock data.
  3. 根据权利要求1所述的睡眠预测方法,其中,所述根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果,包括:The sleep prediction method according to claim 1, wherein the sleep prediction is performed on the user according to the on-off screen data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain Forecast results, including:
    对所述亮熄屏数据、所述作息行为数据以及所述作息计划数据进行预处理;Preprocessing the on-off screen data, the work and rest behavior data, and the work and rest plan data;
    将完成预处理后的所述亮熄屏数据、所述作息行为数据以及所述作息计划数据输入所述睡眠预测模型,得到所述睡眠预测模型对所述用户进行睡眠预测所输出的预测结果。The preprocessed screen on and off data, the work and rest behavior data, and the work and rest plan data are input into the sleep prediction model to obtain a prediction result output by the sleep prediction model for the user's sleep prediction.
  4. 根据权利要求3所述的睡眠预测方法,其中,所述对所述亮熄屏数据、所述作息行为数据以及所述作息计划数据进行预处理,包括:The sleep prediction method according to claim 3, wherein the preprocessing of the on-off screen data, the work and rest behavior data, and the work and rest plan data comprises:
    对所述亮熄屏数据、所述作息行为数据以及所述作息计划数据进行数据清洗处理、数据集成处理、数据变换处理以及数据归约处理。Perform data cleaning processing, data integration processing, data transformation processing, and data reduction processing on the on-off screen data, the work and rest behavior data, and the work and rest plan data.
  5. 根据权利要求1所述的睡眠预测方法,其中,所述睡眠预测条件包括:The sleep prediction method according to claim 1, wherein the sleep prediction condition comprises:
    处于静止状态的持续时长达到预设时长;The duration of the static state reaches the preset duration;
    或者,到达预设的睡眠预测时刻。Or, reach the preset sleep prediction time.
  6. 根据权利要求1所述的睡眠预测方法,其中,所述获取预先训练的睡眠预测模型,包括:The sleep prediction method according to claim 1, wherein said obtaining a pre-trained sleep prediction model comprises:
    确定所述电子设备的当前使用场景;Determine the current usage scenario of the electronic device;
    从预先训练的多个睡眠预测模型中,获取对应所述当前使用场景的睡眠预测模型,其 中,所述多个睡眠预测模型中不同的睡眠预测模型对应不同的使用场景。Obtain a sleep prediction model corresponding to the current use scene from a plurality of pre-trained sleep prediction models, where different sleep prediction models in the plurality of sleep prediction models correspond to different use scenarios.
  7. 根据权利要求6所述的睡眠预测方法,其中,所述确定所述电子设备的当前使用场景,包括:The sleep prediction method according to claim 6, wherein the determining the current usage scenario of the electronic device comprises:
    获取所述电子设备的当前状态信息,其中,所述当前状态信息包括描述所述电子设备当前的使用状态、位置状态以及环境状态的信息;Acquiring current state information of the electronic device, where the current state information includes information describing the current use state, location state, and environmental state of the electronic device;
    根据预存的多个使用场景的状态信息,从所述多个使用场景中确定出状态信息与所述当前状态信息匹配的使用场景,作为所述电子设备的当前使用场景。According to the pre-stored state information of the multiple use scenarios, a use scenario whose state information matches the current state information is determined from the multiple use scenarios as the current use scenario of the electronic device.
  8. 根据权利要求1所述的睡眠预测方法,其中,所述预测结果包括用户的睡眠区间,所述根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果之后,还包括:The sleep prediction method according to claim 1, wherein the prediction result includes a user's sleep interval, and the sleep prediction model is based on the on-off screen data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model , Perform sleep prediction on the user, and after obtaining the prediction result, it also includes:
    若到达所述睡眠区间,则执行预设操作。If the sleep interval is reached, a preset operation is performed.
  9. 根据权利要求8所述的睡眠预测方法,其中,所述预设操作包括系统更新操作、应用更新操作以及功耗控制操作中的至少一种。The sleep prediction method according to claim 8, wherein the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  10. 一种睡眠预测装置,应用于电子设备,其中,包括:A sleep prediction device applied to electronic equipment, including:
    条件判断模块,用于判断当前是否满足预设的睡眠预测条件;The condition judgment module is used to judge whether the preset sleep prediction condition is currently met;
    数据获取模块,用于在条件判断模块的判断结果为是时,获取电子设备的亮熄屏数据,以及获取用户的作息行为数据和作息计划数据;The data acquisition module is used to acquire the screen on and off data of the electronic device when the judgment result of the condition judgment module is yes, and acquire the user's work and rest behavior data and work and rest plan data;
    模型获取模块,用于从睡眠预测模型集合中选取对应所述当前使用场景的目标睡眠预测模型;A model acquisition module, configured to select a target sleep prediction model corresponding to the current usage scenario from a set of sleep prediction models;
    睡眠预测模块,用于根据所述亮熄屏数据、所述作息行为数据、所述作息计划数据以及所述睡眠预测模型,对所述用户进行睡眠预测,得到预测结果。The sleep prediction module is configured to perform sleep prediction on the user according to the screen on and off data, the work and rest behavior data, the work and rest plan data, and the sleep prediction model to obtain a prediction result.
  11. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行如权利要求1至9中任一项所述的睡眠预测方法。A storage medium having a computer program stored thereon, wherein when the computer program is executed on a computer, the computer is caused to execute the sleep prediction method according to any one of claims 1 to 9.
  12. 一种电子设备,包括存储器,处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行如权利要求1至9中任一项所述的睡眠预测方法。An electronic device comprising a memory and a processor, wherein the processor is configured to execute the sleep prediction method according to any one of claims 1 to 9 by calling a computer program stored in the memory.
PCT/CN2019/075361 2019-02-18 2019-02-18 Sleep prediction method and apparatus, storage medium, and electronic device WO2020168451A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980080273.2A CN113170018A (en) 2019-02-18 2019-02-18 Sleep prediction method, device, storage medium and electronic equipment
PCT/CN2019/075361 WO2020168451A1 (en) 2019-02-18 2019-02-18 Sleep prediction method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075361 WO2020168451A1 (en) 2019-02-18 2019-02-18 Sleep prediction method and apparatus, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2020168451A1 true WO2020168451A1 (en) 2020-08-27

Family

ID=72143948

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075361 WO2020168451A1 (en) 2019-02-18 2019-02-18 Sleep prediction method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113170018A (en)
WO (1) WO2020168451A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420740B (en) * 2021-08-24 2021-12-03 深圳小小小科技有限公司 Control method of smart home, electronic device and computer readable medium
CN117061658A (en) * 2023-07-11 2023-11-14 荣耀终端有限公司 Sleep time identification method, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105640508A (en) * 2016-03-30 2016-06-08 安徽华米信息科技有限公司 Realtime sleep monitoring method and device and intelligent wearable equipment
CN107567083A (en) * 2017-10-16 2018-01-09 北京小米移动软件有限公司 The method and apparatus for carrying out power saving optimization processing
CN107666540A (en) * 2017-10-17 2018-02-06 北京小米移动软件有限公司 Terminal control method, device and storage medium
CN107708191A (en) * 2017-09-30 2018-02-16 北京小米移动软件有限公司 Terminal control method, device and computer-readable recording medium
WO2018212500A1 (en) * 2017-05-17 2018-11-22 삼성전자주식회사 Method for displaying content and electronic device therefor

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292584A1 (en) * 2015-03-31 2016-10-06 Microsoft Technology Licensing, Llc Inferring User Sleep Patterns
CN105549718A (en) * 2015-12-09 2016-05-04 北京金山安全软件有限公司 Method and device for optimizing power consumption of application program and electronic equipment
CN108536099A (en) * 2018-02-26 2018-09-14 维沃移动通信有限公司 A kind of information processing method, device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105640508A (en) * 2016-03-30 2016-06-08 安徽华米信息科技有限公司 Realtime sleep monitoring method and device and intelligent wearable equipment
WO2018212500A1 (en) * 2017-05-17 2018-11-22 삼성전자주식회사 Method for displaying content and electronic device therefor
CN107708191A (en) * 2017-09-30 2018-02-16 北京小米移动软件有限公司 Terminal control method, device and computer-readable recording medium
CN107567083A (en) * 2017-10-16 2018-01-09 北京小米移动软件有限公司 The method and apparatus for carrying out power saving optimization processing
CN107666540A (en) * 2017-10-17 2018-02-06 北京小米移动软件有限公司 Terminal control method, device and storage medium

Also Published As

Publication number Publication date
CN113170018A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN109863721B (en) Digital assistant extended automatic ranking and selection
WO2020168448A1 (en) Sleep prediction method and apparatus, and storage medium and electronic device
WO2020207249A1 (en) Notification message pushing method and apparatus, and storage medium and electronic device
KR20200052448A (en) System and method for integrating databases based on knowledge graph
CN108664651B (en) Pattern recommendation method, device and storage medium
CN111797078A (en) Data cleaning method, model training method, device, storage medium and equipment
US11705111B2 (en) Methods and systems for predicting non-default actions against unstructured utterances
CN107943582B (en) Feature processing method, feature processing device, storage medium and electronic equipment
WO2019062369A1 (en) Application management method and apparatus, storage medium, and electronic device
WO2020168444A1 (en) Sleep prediction method and apparatus, storage medium, and electronic device
US20230035366A1 (en) Image classification model training method and apparatus, computer device, and storage medium
CN111512299A (en) Method for content search and electronic device thereof
CN111797861A (en) Information processing method, information processing apparatus, storage medium, and electronic device
WO2020168451A1 (en) Sleep prediction method and apparatus, storage medium, and electronic device
KR102398386B1 (en) Method of filtering a plurality of messages and apparatus thereof
CN113569138A (en) Intelligent device control method and device, electronic device and storage medium
CN111797854A (en) Scene model establishing method and device, storage medium and electronic equipment
US11468270B2 (en) Electronic device and feedback information acquisition method therefor
US11733666B2 (en) Smart home bubble creation
CN111797874B (en) Behavior prediction method and device, storage medium and electronic equipment
Jeon et al. Ontology-based user intention recognition for proactive planning of intelligent robot behavior
WO2020207294A1 (en) Service processing method and apparatus, and storage medium and electronic device
CN116415624A (en) Model training method and device, and content recommendation method and device
US20190236410A1 (en) Bootstrapping recommendation systems from passive data
WO2020168445A1 (en) Sleep recognition method, apparatus, storage medium, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19915718

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19915718

Country of ref document: EP

Kind code of ref document: A1