Disclosure of Invention
In view of this, in order to solve the problems set forth in the above background art, an intelligent environment comprehensive regulation method based on sleep assistance is now proposed.
The intelligent environment comprehensive regulation and control method based on sleep aiding provided by the invention comprises the following steps of S1, judging sleep state grades of users, collecting heart rate and skin resistance of each user at each set monitoring time point, and analyzing sleep state stability indexes of each user.
S2, judging sleep state grades, namely judging the sleep state grades of the users according to sleep state stability indexes of the users, and adjusting the brightness and the color temperature of the lamplight corresponding to the environment where the users are located based on the sleep state grades.
S3, environment temperature and humidity regulation, namely extracting the wake-up time, the wake-up times at night, the sleep-on time and the sleep-on time of each user on each set historical day from the historical sleep data of each user, acquiring the actual maximum sleep time, the shortest sleep-on time and the temperature and humidity of the sleep environment of each user on the historical day corresponding to the minimum wake-up times at night, determining the temperature and humidity of the preference sleep environment of each user, and regulating the temperature and humidity of the sleep environment of each user.
Wherein the temperature and humidity of the preferential sleeping environment of each user are determined by respectively recording the actual longest sleeping time, shortest sleeping time and the temperature of the sleeping environment of the history day corresponding to the minimum night awakening frequency of each user as、And,Represent the firstThe number corresponding to the number of the individual user,。
Determining the temperature of a preferred sleep environment for each user,Wherein、AndWeights corresponding to the temperatures of the sleeping environments of the history days corresponding to the actual longest sleeping time, the shortest falling sleeping time and the minimum night awakening times of the user are respectively represented, and。
And similarly obtaining the humidity of the preferential sleep environment of each user based on the analysis mode of the temperature of the preferential sleep environment of each user.
S4, recommending the music types, namely collecting the environmental noise of the environment where each user is located at each set monitoring time point, analyzing to obtain the similarity of the environmental noise of the environment where each user is located at each set monitoring time point and the frequency spectrum feature vector corresponding to each environmental noise type, further analyzing the environmental noise type of the environment where each user is located at the set monitoring time point, and further recommending the music types for each user according to the preset music type matching rule.
S5, recommending music, namely acquiring the ratio of the clicking times of the music in the recommended music types of the users, and recommending the music which the users listen to during sleeping.
S6, adjusting the music volume, namely collecting the environmental noise decibels of the environment where each user is located in real time, and adjusting the music volume of each user during sleeping.
Preferably, analyzing sleep state stability index of each user comprises collecting heart rate of each user at each monitoring time point, and recording asThe skin resistance of each user at each set monitoring time point is acquired by a skin resistance meter and is recorded asWhereinRepresent the firstThe number corresponding to the number of the individual user,,Represent the firstThe number corresponding to the point in time of the monitoring,。
And extracting the average heart rate of the users at the sleep stage of each age group from the database, screening the average heart rate of the users at the sleep stage of the age corresponding to the age group of each user according to the age of each user, and recording the average heart rate as the reference heart rate of each user.
Analyzing sleep state stability index of each user,
WhereinAndRespectively represent the firstThe reference heart rate and the reference skin resistance of the individual user,The total number of monitoring time points is indicated,AndRespectively represent the weight corresponding to the heart rate and skin resistance of the user, and。
Preferably, the judging the sleep state grade of each user includes comparing the sleep state stability index of each user with the sleep state stability index range corresponding to the preset sleep state grade, and using the sleep state stability index range to which the sleep state stability index of a certain user belongs as the sleep state grade of the user to obtain the sleep state grade of each user.
Preferably, the adjusting the brightness and the color temperature of the lamplight corresponding to the environment where the user is located comprises the steps of extracting proper brightness and color temperature of the lamplight in each sleep state level of the user from a database, screening the brightness and the color temperature of the lamplight corresponding to the sleep state level of each user, and adjusting the brightness and the color temperature of the lamplight of the environment where each user is located.
Preferably, the acquiring the temperature and humidity of the sleeping environment of the history days corresponding to the actual longest sleeping time, the shortest sleeping time and the minimum night awakening times of each user comprises extracting the history sleeping data of each user, and extracting the awakening time, the night awakening times, the sleeping time and the sleeping time of each user in the set history days from the history sleeping data of each user.
Subtracting the sleeping time from the wake-up time of each user on each set historical day to obtain the actual sleeping time of each user on each set historical day;
the temperature and humidity of the sleeping environment of each user at each monitoring time point of each set historical day are collected.
Substituting the temperature of the sleeping environment of each user at each monitoring time point of each set historical day into an average calculation formula to obtain the temperature of the sleeping environment of each user at each set historical day.
Based on the analysis mode of the temperature of the sleeping environment of each user on each set history day, the humidity of the sleeping environment of each user on each set history day is obtained in the same way.
And screening the actual longest sleeping time of each user from the set actual sleeping time of each historical day, thereby obtaining the temperature and humidity of the sleeping environment of the historical day corresponding to the actual longest sleeping time of each user.
And screening the shortest sleeping time length of each user from the sleeping time length of each user in each set historical day, and further obtaining the temperature and humidity of the sleeping environment of the historical day corresponding to the shortest sleeping time length of each user.
And screening the minimum night awakening times of each user from the set night awakening times of each user on each historical day, and further obtaining the temperature and humidity of the sleeping environment of the historical day corresponding to the minimum night awakening times of each user.
Preferably, the temperature and humidity regulation of the sleeping environment of each user comprises the steps of collecting the temperature and humidity of the sleeping environment of each user in real time, comparing the temperature of the sleeping environment of each user with the temperature of the sleeping environment of the preference corresponding to the user, and if the temperature of the sleeping environment of a certain user is different from the temperature of the sleeping environment of the preference corresponding to the user, regulating the temperature of the sleeping environment of the user to the temperature of the sleeping environment of the preference corresponding to the user, and further regulating the temperature of the sleeping environment of each user.
Based on the regulation and control mode of the temperature of the sleeping environment of each user, the humidity of the sleeping environment of each user is regulated and controlled in the same way.
Preferably, the analyzing the environmental noise type of the environment where each user is located includes collecting environmental noise of the environment where each user is located at each set monitoring time point, obtaining each spectral feature of the environmental noise of each set monitoring time point of the environment where each user is located through spectral analysis software, and further obtaining a spectral feature vector of the environmental noise of each set monitoring time point of the environment where each user is located.
Spectral feature vectors corresponding to each ambient noise type are extracted from the database.
Substituting the frequency spectrum feature vector of the environmental noise of the environment where each user is located at each set monitoring time point and the frequency spectrum feature vector corresponding to each environmental noise type into a cosine similarity calculation formula to obtain the similarity of the frequency spectrum feature vector corresponding to each environmental noise type and the environmental noise of the environment where each user is located at each set monitoring time point.
And sequencing the similarity of the environmental noise of the environment where each user is located at each set monitoring time point and the frequency spectrum feature vector corresponding to each environmental noise type to obtain the environmental noise type with the first similarity ranking, and taking the environmental noise type as the environmental noise type of the environment where each user is located at each set monitoring time point.
And correlating the environmental noise types of the environments of the users at the set monitoring time points with preset music type matching rules, and recommending the music types for the users.
Preferably, the method for recommending the music which each user listens to during sleeping comprises the steps of extracting historical data of music listened to by each user from a database, extracting the clicking times of each music in the recommended music types of each user from the historical data of music listened to by each user, dividing the clicking times of each music in the recommended music types of each user by the total clicking times of the corresponding music types, and obtaining the ratio of the clicking times of each music in the recommended music types of each user.
The music with the largest click frequency ratio is selected from the click frequency ratios of the music in the recommended music types of the users and is used as the music which is recommended to be listened to by the users during sleeping.
Preferably, analyzing the music volume of each user during sleeping comprises collecting the environmental noise decibels of the environment where each user is located in real time, and adjusting the music volume of the corresponding user during sleeping based on the preset adjusting proportion of the environmental noise decibels to the music volume.
Compared with the prior art, the invention has the beneficial effects that (1) the system can accurately evaluate the sleep state of the user by monitoring the physiological indexes such as heart rate, skin resistance and the like in real time, thereby better adjusting the environmental factors to promote good sleep, helping the user to fall asleep more quickly, improving the proportion of deep sleep, improving the mental state in the daytime, and improving the working efficiency and the quality of life by timely adjusting the brightness and the color temperature of the lamplight.
(2) According to the invention, the temperature and humidity of the sleep environment of each user, which are the actual longest sleep time, the shortest sleep time and the historical day corresponding to the minimum night awakening times, are obtained, the temperature and humidity of the sleep environment of each user are determined, the temperature and humidity of the sleep environment of each user are regulated and controlled, the temperature and humidity conditions are optimized, the night awakening times are reduced, the sleep time is shortened, the deep sleep time is possibly prolonged, environmental parameters can be accurately regulated to promote better sleep, more accurate and personalized sleep support is provided for the user, the sleep quality and the life quality of the user are obviously improved, the overall health condition of the user is improved, the health problem caused by insufficient sleep or poor sleep quality is reduced, and unnecessary energy consumption can be avoided based on the temperature and humidity regulation of the actual demands of the user.
(3) According to the invention, through analyzing the environmental noise types and monitoring the environmental noise decibels in real time, corresponding music is recommended and the music volume is automatically adjusted to mask or neutralize bad noise, a more calm and comfortable sleep environment can be created for the user, noise interference is reduced, the sleep quality of the user is improved, deep sleep is promoted, different users have different preferences and responses to the music, the music favored by the user can be recommended more accurately based on the click frequency ratio of the music in the music types of the users, and the personalized recommendation not only improves the satisfaction degree of the user, but also can help the user relax the mind and body and enter the sleep state more effectively.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the invention provides an intelligent environment comprehensive regulation method based on sleep aiding, which comprises the following steps of S1, judging sleep state grades of users, collecting heart rate and skin resistance of each user at each set monitoring time point, and analyzing sleep state stability indexes of each user.
Further, analyzing sleep state stability index of each user includes collecting heart rate of each user at each monitoring time point, and recording asThe skin resistance of each user at each set monitoring time point is acquired by a skin resistance meter and is recorded asWhereinRepresent the firstThe number corresponding to the number of the individual user,,Represent the firstThe number corresponding to the point in time of the monitoring,。
And extracting the average heart rate of the users at the sleep stage of each age group from the database, screening the average heart rate of the users at the sleep stage of the age corresponding to the age group of each user according to the age of each user, and recording the average heart rate as the reference heart rate of each user.
Analyzing sleep state stability index of each user,
WhereinAndRespectively represent the firstThe reference heart rate and the reference skin resistance of the individual user,The total number of monitoring time points is indicated,AndRespectively represent the weight corresponding to the heart rate and skin resistance of the user, and。
As a preferred embodiment, theAndThe rates may be set to 0.6 and 0.4, respectively, as important indicators of the cardiovascular system, and are generally considered as key factors in assessing sleep quality and stability, skin resistance is generally associated with an individual's emotional state and physiological arousal level, and changes in skin resistance may reflect stress or mood swings during sleep, but it may be slightly weaker in directly reflecting sleep depth and quality relative to heart rate, and thus the heart rate of the user may be weighted more than the skin resistance.
S2, judging sleep state grades, namely judging the sleep state grades of the users according to sleep state stability indexes of the users, and adjusting the brightness and the color temperature of the lamplight corresponding to the environment where the users are located based on the sleep state grades.
Further, judging the sleep state grades of the users comprises the steps of comparing the sleep state stability index of each user with a sleep state stability index range corresponding to the preset sleep state grades, and using the sleep state stability index range of a certain user corresponding to the preset sleep state grade as the sleep state grade of the user so as to obtain the sleep state grade of each user.
Further, the adjusting of the brightness and the color temperature of the lamplight corresponding to the environment where the user is located comprises the steps of extracting proper brightness and color temperature of the lamplight in each sleep state level of the user from a database, screening the brightness and the color temperature of the lamplight corresponding to the sleep state level of each user, and adjusting the brightness and the color temperature of the lamplight of the environment where each user is located.
According to the invention, through monitoring physiological indexes such as heart rate, skin resistance and the like in real time, the system can accurately evaluate the sleep state of the user, so that environmental factors are better adjusted to promote good sleep, and through timely adjusting the brightness and color temperature of lamplight, the user is helped to fall asleep more quickly, the proportion of deep sleep is improved, the mental state in the daytime is improved, and the working efficiency and the quality of life are improved.
S3, environment temperature and humidity regulation, namely extracting the wake-up time, the wake-up times at night, the sleep-on time and the sleep-on time of each user on each set historical day from the historical sleep data of each user, acquiring the actual maximum sleep time, the shortest sleep-on time and the temperature and humidity of the sleep environment of each user on the historical day corresponding to the minimum wake-up times at night, determining the temperature and humidity of the preference sleep environment of each user, and regulating the temperature and humidity of the sleep environment of each user.
Further, the acquiring the temperature and humidity of the sleeping environment of the history days corresponding to the actual longest sleeping time, the shortest sleeping time and the minimum night awakening times of each user comprises extracting the history sleeping data of each user, and extracting the awakening time, the night awakening times, the sleeping time and the sleeping time of each user in the set history days from the history sleeping data of each user.
As a preferred embodiment, the wake-up time, the number of times of night wake-up, the sleep-on time and the sleep-on time are specifically the time point when the user no longer enters the sleep state, the number of times the user wakes up at night, the time required for the user to go to bed until entering the sleep state and the time point when the user enters the sleep state.
The historical sleep data of each user are collected through an intelligent watch, an intelligent bracelet, an intelligent mattress and the like.
Subtracting the sleeping time from the wake-up time of each user on each set historical day to obtain the actual sleeping time of each user on each set historical day.
The temperature and humidity of the sleeping environment of each user at each monitoring time point of each set historical day are collected.
As a preferred embodiment, the temperature and humidity of the sleeping environment of each user at each monitoring time point of each set historical day are collected by a temperature and humidity sensor.
Substituting the temperature of the sleeping environment of each user at each monitoring time point of each set historical day into an average calculation formula to obtain the temperature of the sleeping environment of each user at each set historical day.
Based on the analysis mode of the temperature of the sleeping environment of each user on each set history day, the humidity of the sleeping environment of each user on each set history day is obtained in the same way.
And screening the actual longest sleeping time of each user from the set actual sleeping time of each historical day, thereby obtaining the temperature and humidity of the sleeping environment of the historical day corresponding to the actual longest sleeping time of each user.
And screening the shortest sleeping time length of each user from the sleeping time length of each user in each set historical day, and further obtaining the temperature and humidity of the sleeping environment of the historical day corresponding to the shortest sleeping time length of each user.
And screening the minimum night awakening times of each user from the set night awakening times of each user on each historical day, and further obtaining the temperature and humidity of the sleeping environment of the historical day corresponding to the minimum night awakening times of each user.
Further, the determining the temperature and humidity of the preferential sleeping environment of each user comprises respectively recording the actual sleeping environment temperatures of the history days corresponding to the longest sleeping time, the shortest sleeping time and the least night awakening times of each user as、And。
Determining the temperature of a preferred sleep environment for each user,Wherein、AndWeights corresponding to the temperatures of the sleeping environments of the history days corresponding to the actual longest sleeping time, the shortest falling sleeping time and the minimum night awakening times of the user are respectively represented, and。
As a preferred embodiment, the、AndThe temperature preference of the user in the state reflects the most comfortable temperature requirement of the user for sleeping all night, the user can fall asleep more easily in the history days with the shortest sleep time, and the user usually means higher sleep quality in the days with the least awakening times at night, so that the weight corresponding to the temperature of the history day corresponding to the actual longest sleep time of the user is larger than the weight corresponding to the temperature of the history day corresponding to the shortest sleep time and the least awakening times at night.
And similarly obtaining the humidity of the preferential sleep environment of each user based on the analysis mode of the temperature of the preferential sleep environment of each user.
Further, the temperature and humidity of the sleeping environment of each user are regulated and controlled, including collecting the temperature and humidity of the sleeping environment of each user in real time, comparing the temperature of the sleeping environment of each user with the temperature of the sleeping environment of the preference corresponding to the user, and if the temperature of the sleeping environment of a certain user is different from the temperature of the sleeping environment of the preference corresponding to the user, regulating the temperature of the sleeping environment of the user to the temperature of the sleeping environment of the preference corresponding to the user, and further regulating the temperature of the sleeping environment of each user.
Based on the regulation and control mode of the temperature of the sleeping environment of each user, the humidity of the sleeping environment of each user is regulated and controlled in the same way.
According to the invention, the temperature and humidity of the sleep environment of each user, which are the actual longest sleep time, the shortest sleep time and the historical day corresponding to the minimum night awakening times, are obtained, the temperature and humidity of the sleep environment of each user are determined, the temperature and humidity of the sleep environment of each user are regulated and controlled, the temperature and humidity conditions are optimized, the night awakening times are reduced, the sleep time is shortened, the deep sleep time is possibly prolonged, environmental parameters can be accurately regulated to promote better sleep, more accurate and personalized sleep support is provided for the user, the sleep quality and the life quality of the user are obviously improved, the overall health condition of the user is improved, the health problem caused by insufficient sleep or poor sleep quality is reduced, and unnecessary energy consumption can be avoided based on the temperature and humidity regulation of the actual demands of the user.
S4, recommending the music types, namely collecting the environmental noise of the environment where each user is located at each set monitoring time point, analyzing to obtain the similarity of the environmental noise of the environment where each user is located at each set monitoring time point and the frequency spectrum feature vector corresponding to each environmental noise type, further analyzing the environmental noise type of the environment where each user is located at the set monitoring time point, and further recommending the music types for each user according to the preset music type matching rule.
Further, analyzing the environmental noise type of the environment where each user is located includes collecting environmental noise of the environment where each user is located at each set monitoring time point, obtaining each spectrum characteristic of the environmental noise of each set monitoring time point of the environment where each user is located through spectrum analysis software, and further obtaining a spectrum characteristic vector of the environmental noise of each set monitoring time point of the environment where each user is located.
Spectral feature vectors corresponding to each ambient noise type are extracted from the database.
Substituting the frequency spectrum feature vector of the environmental noise of the environment where each user is located at each set monitoring time point and the frequency spectrum feature vector corresponding to each environmental noise type into a cosine similarity calculation formula to obtain the similarity of the frequency spectrum feature vector corresponding to each environmental noise type and the environmental noise of the environment where each user is located at each set monitoring time point.
And sequencing the similarity of the environmental noise of the environment where each user is located at each set monitoring time point and the frequency spectrum feature vector corresponding to each environmental noise type to obtain the environmental noise type with the first similarity ranking, and taking the environmental noise type as the environmental noise type of the environment where each user is located at each set monitoring time point.
And correlating the environmental noise types of the environments of the users at the set monitoring time points with preset music type matching rules, and recommending the music types for the users.
The specific process of recommending the music types for each user includes substituting the environmental noise types of the environments of each user at the set monitoring time points into a preset music type matching rule to obtain the corresponding music types of the environmental noise types of the environments of each user at the set monitoring time points, collecting the corresponding music types to obtain the number of the music types, and screening the music types with the largest number from the number of the music types as recommended music types of each user.
The environmental noise types include traffic noise, social life noise, and mechanical noise.
The preset music types include easy jazz, classical music and natural sound.
The specific process related to the preset music type matching rule is that the environment noise types and the frequency of the music types are extracted from a database.
And matching the frequencies of each environmental noise type and each music type to obtain the frequency similarity of each environmental noise type and each music type, comparing the frequency similarity with a preset similarity threshold, and matching the environmental noise type with the music type if the frequency similarity of a certain environmental noise type and a certain music type is larger than the preset similarity threshold.
For example, when social life noise is detected, natural sound is recommended.
S5, recommending music, namely acquiring the ratio of the clicking times of the music in the recommended music types of the users, and recommending the music which the users listen to during sleeping.
Further, the method for recommending the music which each user listens to during sleeping comprises the steps of extracting historical data of music listened to by each user from a database, extracting the clicking times of each music in the recommended music types of each user from the historical data of music listened to by each user, dividing the clicking times of each music in the recommended music types of each user by the total clicking times of the corresponding music types, and obtaining the ratio of the clicking times of each music in the recommended music types of each user.
The music with the largest click frequency ratio is selected from the click frequency ratios of the music in the recommended music types of the users and is used as the music which is recommended to be listened to by the users during sleeping.
S6, adjusting the music volume, namely collecting the environmental noise decibels of the environment where each user is located in real time, and adjusting the music volume of each user during sleeping.
Further, analyzing the music volume of each user during sleeping comprises collecting the environmental noise decibels of the environment where each user is located in real time, and adjusting the music volume of the corresponding user during sleeping based on the preset adjusting proportion of the environmental noise decibels to the music volume.
As a preferred embodiment, the preset adjustment ratio of the ambient noise db to the music volume may be specifically set to 3:4, for example, the music volume will automatically increase by 4 units every time the ambient noise db increases by 3 units.
According to the invention, through analyzing the environmental noise types and monitoring the environmental noise decibels in real time, corresponding music is recommended and the music volume is automatically adjusted to mask or neutralize bad noise, a more calm and comfortable sleep environment can be created for the user, noise interference is reduced, the sleep quality of the user is improved, deep sleep is promoted, different users have different preferences and responses to the music, the music favored by the user can be recommended more accurately based on the click frequency ratio of the music in the music types of the users, and the personalized recommendation not only improves the satisfaction degree of the user, but also can help the user relax the mind and body and enter the sleep state more effectively.
The foregoing is merely illustrative and explanatory of the principles of this invention, as various modifications and additions may be made to the specific embodiments described, or similar arrangements may be substituted by those skilled in the art, without departing from the principles of this invention or beyond the scope of this invention as defined in the claims.