Sleep-aiding music recommendation method and device based on sleep environment and electronic equipment

By integrating sleep environment data and historical music data through a prediction model, the method and device provide personalized sleep-aiding music recommendations that address the limitations of user preference-based systems, ensuring better sleep quality.

CN119202303APending Publication Date: 2024-12-27DONGGUAN DERUCCI BEDDING CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411241086.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Current sleep-aiding music recommendations primarily rely on user preferences, failing to consider the real-time sleep environment, leading to a mismatch between recommended music and user needs.

Method used

A method and device that utilize a sleep-aiding effect prediction model to analyze sleep environment data and historical music data, predicting the most effective music categories based on factors like weather, user work status, and sleep quality to recommend music tailored to the user's current needs.

Benefits of technology

Enhances the effectiveness of sleep-aiding music recommendations by adapting to real-time environmental factors, improving sleep quality and meeting user needs more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202303A_ABST
    Figure CN119202303A_ABST
Patent Text Reader

Abstract

The invention discloses a sleep-aiding music recommendation method and device based on a sleep environment and electronic equipment. The method comprises the following steps: acquiring sleep environment data and historical sleep-aiding music data of a target user; inputting the sleep environment data and the at least two preset music categories into a target sleep aiding effect prediction model, wherein the target sleep aiding effect prediction model outputs sleep quality data corresponding to each preset music category; and determining to-be-recommended sleep-aiding music corresponding to the target user based on the historical sleep-aiding music data and the sleep quality data. According to the technical scheme, the technical problem that the recommended sleep-aiding music cannot meet the sleep requirement of the user due to the fact that current sleep-aiding music recommendation is mainly based on user preferences and does not consider the real-time sleep environment where the user is located is solved, the sleep environment data of the user is obtained, the corresponding sleep-aiding music is matched and recommended to the user, and the user experience is improved. The current sleep requirement of the user is better met, and the optimal sleep aiding effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sleep music recommendation, and in particular to a sleep-aiding music recommendation method, device and electronic equipment based on a sleep environment. Background Art

[0002] Studies have shown that sleep music can help lower heart rate and breathing rate, reduce brain activity, and help people fall asleep faster. Especially for those who have trouble falling asleep due to anxiety, stress, etc., sleep music can relieve tension and make it easier for them to fall asleep.

[0003] At present, the recommendation of sleep-aiding music is mainly based on user preferences, but considering preferences alone cannot meet the sleep-aiding needs of users. Therefore, it is necessary to improve the current recommendation method of sleep-aiding music. Summary of the invention

[0004] The present invention provides a sleep-aiding music recommendation method, device and electronic device based on the sleeping environment, so as to better adapt to the user's current sleep needs and achieve the best sleep-aiding effect.

[0005] According to one aspect of the present invention, a method for recommending sleep-aiding music based on a sleep environment is provided, comprising:

[0006] Obtain the target user's sleeping environment data and historical sleep-aiding music data;

[0007] Inputting the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, wherein the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories;

[0008] Based on the historical sleep-aiding music data and the sleep quality data, sleep-aiding music to be recommended corresponding to the target user is determined.

[0009] According to another aspect of the present invention, a sleep-aiding music recommendation device based on a sleep environment is provided, comprising:

[0010] A data acquisition module is used to obtain the target user's sleep environment data and historical sleep-aiding music data;

[0011] A model prediction module, used for inputting the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, wherein the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories;

[0012] The music recommendation module is used to determine the sleep-aiding music to be recommended corresponding to the target user based on the historical sleep-aiding music data and the sleep quality data.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor;

[0015] and a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the sleep-aid music recommendation method based on the sleep environment described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for recommending sleep-aid music based on a sleep environment as described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention includes: obtaining the target user's sleep environment data and historical sleep-aiding music data; inputting the sleep environment data and at least two preset music categories into the target sleep-aiding effect prediction model, the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each preset music category; based on the historical sleep-aiding music data and the sleep quality data, determining the sleep-aiding music to be recommended corresponding to the target user. The technical solution of the present invention solves the technical problem that the current recommendation of sleep-aiding music is mainly based on user preferences, and does not take into account the user's real-time sleep environment, resulting in the recommended sleep-aiding music not being able to meet the user's sleep needs. By obtaining the user's sleep environment data, the sleep-aiding music category that enables the user to achieve the best sleep-aiding effect in the current sleep environment is predicted, and then based on the user's music preferences, the corresponding sleep-aiding music is matched and recommended to the user, so as to better meet the user's current sleep needs and achieve the best sleep-aiding effect.

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

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1A flowchart of a sleep-aiding music recommendation method based on a sleep environment provided in Embodiment 1 of the present invention;

[0022] Figure 2 A flowchart of a sleep-aiding music recommendation method based on a sleep environment provided in Embodiment 2 of the present invention;

[0023] Figure 3 A flowchart of another method for recommending sleep-aiding music based on a sleep environment provided in Embodiment 2 of the present invention;

[0024] Figure 4 A schematic diagram of the structure of a sleep-aiding music recommendation device based on a sleep environment provided in Embodiment 3 of the present invention;

[0025] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Embodiment 1

[0029] Figure 1 This is a flowchart of a sleep-aiding music recommendation method based on a sleep environment provided in the first embodiment of the present invention. This embodiment is applicable to the case of recommending sleep-aiding music to a target user. The method can be performed by a sleep-aiding music recommendation device based on a sleep environment. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device, for example, an audio device for playing sleep-aiding music. Figure 1 As shown, the method includes:

[0030] S110: Acquire the target user's sleeping environment data and historical sleep-aiding music data.

[0031] The target user may be a user who needs sleep-aiding music recommendation; the sleep environment data may be data related to the environment in which the target user sleeps, such as weather, temperature, etc. The historical sleep-aiding music data may be the sleep-aiding music used by the target user during sleep in a historical time period.

[0032] Specifically, data related to the target user's sleeping environment can be monitored by some environmental monitoring devices as sleeping environment data, and historical sleeping music data can be obtained by obtaining historical playback data in the target user's sleep-aid music player. The historical playback data includes but is not limited to the frequency and duration of music playback.

[0033] In an embodiment of the present invention, obtaining the sleeping environment data of the target user includes: obtaining the to-be-processed environmental data of the target user in real time; and performing feature extraction on the to-be-processed environmental data according to preset environmental data classification categories to obtain the sleeping environment data of the target user.

[0034] The environmental data to be processed includes at least one of weather condition data, user work data, a sleep score of the previous night, and the current time.

[0035] In order to ensure that the recommended sleep-aiding music is more suitable for the user's current sleep needs, various data related to the target user's sleep environment can be collected in real time, that is, the environmental data to be processed. Among them, weather condition data can be obtained by accessing the weather forecast API or meteorological services, including temperature, humidity, weather type and other information; user work data can be obtained through user input or other methods; the sleep score of the previous night can be obtained through sleep monitoring equipment, such as smart bracelets; the current time can be obtained through the network time service.

[0036] In an optional implementation, extracting features from the to-be-processed environmental data according to preset environmental data classification categories to obtain the sleep environment data of the target user includes:

[0037] If the environmental data to be processed is weather condition data, a target weather category corresponding to the weather condition data is determined according to a preset weather classification category; and the target weather category and the temperature corresponding to the weather condition data are used as the sleeping environment data.

[0038] Among them, the preset weather classification categories may include non-rainy days, rainy days, thunderstorm days, etc.

[0039] Specifically, if the environmental data to be processed is weather condition data, the target weather category corresponding to the data can be determined according to the preset weather classification rules. For example, if the weather condition data shows that it is currently raining and there is no thunder and lightning, the target weather category can be determined as rainy. In addition, temperature is also an important factor affecting the sleeping environment, and the current temperature value can be extracted from the weather condition data; then, the target weather category and the temperature value are combined to form the sleeping environment data of the target user.

[0040] In another optional implementation, feature extraction is performed on the to-be-processed environmental data according to the preset environmental data classification category to obtain the sleep environment data of the target user, including:

[0041] If the to-be-processed environment data is user work data, feature extraction is performed on the user work data according to preset work categories to obtain feature data corresponding to each preset work category, so as to use the feature data as the sleep environment data;

[0042] The preset work category may be a pre-set category related to the user's work, and the preset work category includes at least one of the current consecutive working days, whether the next day is a working day, and the working hours of the day.

[0043] Specifically, if the environmental data to be processed is user work data, features of the user work data can be extracted according to the preset work category. For example, by extracting the number of consecutive working days of the user, the user's work fatigue level can be understood, and the number of working days may affect the user's sleep quality; data such as the work plan for the next day in the user's work data can also be extracted to determine whether the next day is the user's working day; the working hours of the day can also be calculated based on the work start time and end time in the user's work data. Then, the extracted number of consecutive working days, whether the next day is a working day, and the working hours are used as sleep environment data. The beneficial effect of this is that information reflecting the user's working status and fatigue level is extracted to provide a data basis for subsequent sleep-aid music recommendations, thereby improving the suitability of sleep-aid music recommendations.

[0044] In another optional implementation, feature extraction is performed on the to-be-processed environmental data according to the preset environmental data classification category to obtain the sleep environment data of the target user, including:

[0045] If the environmental data to be processed is the sleep score of the previous night, the target score level corresponding to the sleep score of the previous night is determined based on the preset score level; if the environmental data to be processed is the current time, the target time category of the current time is determined based on the preset time division category; the target score level and the target time category are used as the sleep environment data.

[0046] Specifically, if the environmental data to be processed is the sleep score of the previous night, the target score level corresponding to the sleep score of the previous night can be determined based on the preset score level. For example, four levels are divided: very poor (0-60), poor (60-70), good (70-80), and excellent (80-100). The target score level reflects the sleep quality of the user the previous night and is important for evaluating the user's current sleep needs.

[0047] Among them, the preset time division categories include four categories: early (before 22:00), normal (22:00-23:00), late (23:00-12:00), and very late (after 12:00).

[0048] If the environmental data to be processed is the current time, you can classify it according to the current time and the preset time to determine the category corresponding to the current time as the target time category. This helps to understand the time period when the user is preparing to fall asleep, and comprehensively considers the user's historical sleep quality and the current time to provide the user with more accurate sleep-aid music recommendations.

[0049] S120: Input the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, and the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories.

[0050] The preset music category may be a pre-classified type of sleep-aiding music, for example, divided into six categories according to the type and style of sleep-aiding music: light music, classical music, natural sounds, ambient music, yoga music, and Buddhist music. The target sleep-aiding effect prediction model may be a pre-trained machine learning model, and the target sleep-aiding effect prediction model is used to predict sleep quality data; the sleep quality data may be data that measures the user's sleep quality, for example, total sleep time, deep sleep time, etc.

[0051] Specifically, the sleep environment data and the preset music categories are used as inputs to the target sleep-aiding effect prediction model, which can predict the sleep quality data corresponding to various preset music categories. For example, the sleep quality data corresponding to light music is 8 hours, and the sleep quality data corresponding to classical music is 6 hours. According to the output results of the target sleep-aiding effect prediction model, it can be determined which type of music is most likely to help users improve their sleep quality in the current sleep environment.

[0052] S130: Determine the sleep-aiding music to be recommended corresponding to the target user based on the historical sleep-aiding music data and the sleep quality data.

[0053] Specifically, based on historical sleep-aiding music data and sleep quality data, music that is effective in helping users sleep and that users like is determined as the sleep-aiding music to be recommended. Currently, the recommendation of sleep-aiding music is mainly based on user preferences, without considering the real-time sleep environment of the user, and ignoring the impact of the real-time sleep environment such as weather conditions, user fatigue level, mood, etc. on user needs. The technical solution of the embodiment of the present invention can better adapt to the user's current sleep needs and achieve the best sleep-aiding effect.

[0054] The technical solution of the embodiment of the present invention includes: obtaining the target user's sleep environment data and historical sleep-aiding music data; inputting the sleep environment data and at least two preset music categories into the target sleep-aiding effect prediction model, the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each preset music category; based on the historical sleep-aiding music data and the sleep quality data, determining the sleep-aiding music to be recommended corresponding to the target user. The technical solution of the present invention solves the technical problem that the current recommendation of sleep-aiding music is mainly based on user preferences, and does not take into account the user's real-time sleep environment, resulting in the recommended sleep-aiding music not being able to meet the user's sleep needs. By obtaining the user's sleep environment data, the sleep-aiding music category that enables the user to achieve the best sleep-aiding effect in the current sleep environment is predicted, and then based on the user's music preferences, the corresponding sleep-aiding music is matched and recommended to the user, so as to better meet the user's current sleep needs and achieve the best sleep-aiding effect.

[0055] Embodiment 2

[0056] Figure 2 This is a flowchart of a sleep-aiding music recommendation method based on a sleep environment provided in the second embodiment of the present invention. This embodiment optimizes the training process of the target sleep-aiding effect prediction model based on the above embodiment. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 2 As shown, the method includes:

[0057] S210: Acquire sample sleeping environment data, determine at least two sample music categories, and determine sample sleeping quality data corresponding to each of the sample music categories.

[0058] Among them, the sample sleep environment data may be data related to the sleep environment of a batch of sample users acquired in advance, and the sample sleep environment data may contain the same item content as the target user's sleep environment data; the sample music categories may include light music, classical music, natural sounds, ambient music, yoga music, Buddhist music, etc.; the sample sleep quality data may be data representing the sleep quality of the sample user, for example, it may be the sleep duration of the sample user corresponding to various sample music categories in the sample sleep environment.

[0059] Specifically, the sample sleeping environment data of multiple sample users and the sample sleeping quality data corresponding to various music categories can be obtained in advance, and the acquisition method is similar to the acquisition method of the target user. For example, let the subjects fall asleep under different music categories, and obtain the sleeping environment data and the corresponding sleeping quality data.

[0060] S220: Input the sample sleep environment data and at least two of the sample music categories into an initial sleep-aiding effect prediction model, and the initial sleep-aiding effect prediction model outputs predicted sleep quality data corresponding to each of the sample music categories.

[0061] Specifically, an initial sleep-aiding effect prediction model can be trained based on sample sleep environment data, sample music categories, and sample sleep quality data. The sample sleep environment data and sample music categories can be used as input features to obtain the predicted value of the model output, that is, the predicted sleep quality data.

[0062] S230: Based on the predicted sleep quality data and the sample sleep quality data, modify the model parameters of the initial sleep-aiding effect prediction model to obtain the target sleep-aiding effect prediction model.

[0063] Specifically, the sample sleep quality data refers to the measured value, and the predicted sleep quality data refers to the predicted value. Therefore, the loss value can be calculated based on the measured value, the predicted value and the corresponding loss function, and then the model parameters of the initial sleep aid effect prediction model can be iterated and corrected according to the loss value to obtain the trained target sleep aid effect prediction model.

[0064] S240: Obtain the target user's sleeping environment data and historical sleep-aiding music data.

[0065] S250: Input the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, and the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories.

[0066] S260: Sort the sleep quality data, determine target sleep quality data based on the sorting result, and use the preset music category corresponding to the target sleep quality data as the music category to be recommended.

[0067] It is understandable that the target sleep-aiding effect prediction model can predict the target sleep quality data corresponding to various preset music categories, that is, predict the sleep-aiding effects of different types of sleep-aiding music. The sleep quality data are sorted, that is, a preset music category with the best sleep-aiding effect is selected as the music category to be recommended, so as to recommend sleep-aiding music according to the category.

[0068] S270: Determine the sleep-aiding music to be recommended based on the category of the music to be recommended and the historical sleep-aiding music data.

[0069] In an embodiment of the present invention, determining the sleep-aid music to be recommended based on the category of music to be recommended and the historical sleep-aid music data includes: processing the historical sleep-aid music data through a collaborative filtering algorithm to obtain a preference value corresponding to each candidate sleep-aid music corresponding to the category of music to be recommended; and determining the sleep-aid music to be recommended from the candidate sleep-aid music based on the preference value.

[0070] The historical sleep-aiding music data may be the sleep-aiding music playing records of the target user.

[0071] Specifically, the target user's playback record can be obtained, including each user's historical playback of sleep-aiding music, the corresponding playback times, and the corresponding playback duration. Then, based on the collaborative filtering recommendation algorithm, the playback records of different users are compared to find users with similar music preferences. For example, if user A and user B often listen to light music and classical music, and their playback times and playback durations are also similar, then it can be considered that user A and user B have a high degree of similarity in music preferences. Then, other users who are similar to the target user are determined, and the music that the target user may like is predicted based on the music preferences of similar other users, that is, the candidate sleep-aiding music and the preference value; finally, based on the preference value, one or more candidate sleep-aiding music with a larger preference value is selected from the candidate sleep-aiding music corresponding to the music category to be recommended as the sleep-aiding music to be recommended.

[0072] like Figure 3 As shown, it is a flow chart of another method for recommending sleep-aiding music based on the sleep environment provided in the second embodiment of the present invention. Through the collaborative filtering recommendation algorithm, sleep-aiding music that meets the user's personal preferences can be recommended to the user more accurately, so as to better adapt to the user's sleep needs and enhance the sleep-aiding effect.

[0073] The technical solution of the embodiment of the present invention includes: obtaining sample sleep environment data, determining at least two sample music categories, and determining sample sleep quality data corresponding to each of the sample music categories; inputting the sample sleep environment data and at least two of the sample music categories into an initial sleep-aid effect prediction model, and the initial sleep-aid effect prediction model outputs predicted sleep quality data corresponding to each of the sample music categories; based on the predicted sleep quality data and the sample sleep quality data, correcting the model parameters of the initial sleep-aid effect prediction model to obtain the target sleep-aid effect prediction model. Obtain the sleep environment data and historical sleep-aid music data of the target user; inputting the sleep environment data and at least two preset music categories into the target sleep-aid effect prediction model, and the target sleep-aid effect prediction model outputs sleep quality data corresponding to each preset music category; based on the historical sleep-aid music data and the sleep quality data, determine the sleep-aid music to be recommended corresponding to the target user. The technical solution of the present invention solves the technical problem that the current recommendation of sleep-aid music is mainly based on user preferences without considering the user's real-time sleeping environment, resulting in the recommended sleep-aid music being unable to adapt to the user's sleep needs. By obtaining the user's sleeping environment data, the sleep-aid music category that can enable the user to achieve the best sleep-aid effect in the current sleeping environment is predicted, and then based on the user's music preferences, the corresponding sleep-aid music is matched and recommended to the user, thereby better adapting to the user's current sleep needs and achieving the best sleep-aid effect.

[0074] Embodiment 3

[0075] Figure 4 This is a schematic diagram of the structure of a sleep-aiding music recommendation device based on a sleep environment provided by Embodiment 3 of the present invention. Figure 4 As shown, the device comprises:

[0076] The data acquisition module 310 is used to acquire the target user's sleeping environment data and historical sleep-aiding music data;

[0077] A model prediction module 320, configured to input the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, wherein the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories;

[0078] The music recommendation module 330 is used to determine the sleep-aiding music to be recommended corresponding to the target user based on the historical sleep-aiding music data and the sleep quality data.

[0079] The technical solution of the embodiment of the present invention includes: obtaining the target user's sleep environment data and historical sleep-aiding music data; inputting the sleep environment data and at least two preset music categories into the target sleep-aiding effect prediction model, the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each preset music category; based on the historical sleep-aiding music data and the sleep quality data, determining the sleep-aiding music to be recommended corresponding to the target user. The technical solution of the present invention solves the technical problem that the current recommendation of sleep-aiding music is mainly based on user preferences, and does not take into account the user's real-time sleep environment, resulting in the recommended sleep-aiding music not being able to meet the user's sleep needs. By obtaining the user's sleep environment data, the sleep-aiding music category that enables the user to achieve the best sleep-aiding effect in the current sleep environment is predicted, and then based on the user's music preferences, the corresponding sleep-aiding music is matched and recommended to the user, so as to better meet the user's current sleep needs and achieve the best sleep-aiding effect.

[0080] Optionally, the data acquisition module 310 includes:

[0081] A real-time acquisition submodule, used for acquiring the target user's to-be-processed environmental data in real time, wherein the to-be-processed environmental data includes at least one of weather condition data, user work data, a sleep score of the previous night, and the current time;

[0082] The data processing submodule is used to extract features of the to-be-processed environmental data according to the preset environmental data classification categories to obtain the sleeping environment data of the target user.

[0083] Optionally, the data processing submodule is specifically used to:

[0084] If the environmental data to be processed is weather condition data, determining a target weather category corresponding to the weather condition data according to a preset weather classification category;

[0085] The target weather category and the temperature corresponding to the weather condition data are used as the sleeping environment data.

[0086] Optionally, the data processing submodule is further used to:

[0087] If the to-be-processed environment data is user work data, feature extraction is performed on the user work data according to preset work categories to obtain feature data corresponding to each preset work category, so as to use the feature data as the sleep environment data;

[0088] The preset work category includes at least one of the current consecutive working days, whether the next day is a working day, and the working hours of the day.

[0089] Optionally, the data processing submodule is further used to:

[0090] If the environmental data to be processed is the sleep score of the previous night, determining a target score level corresponding to the sleep score of the previous night based on a preset score level;

[0091] If the environmental data to be processed is the current time, determining the target time category of the current time based on the preset time division category;

[0092] The target score level and the target time category are used as the sleep environment data.

[0093] Optionally, the device further comprises a training module, which is used to:

[0094] Acquire sample sleeping environment data, determine at least two sample music categories, and determine sample sleeping quality data corresponding to each of the sample music categories;

[0095] Inputting the sample sleep environment data and at least two of the sample music categories into an initial sleep-aiding effect prediction model, the initial sleep-aiding effect prediction model outputting predicted sleep quality data corresponding to each of the sample music categories;

[0096] Based on the predicted sleep quality data and the sample sleep quality data, the model parameters of the initial sleep-aiding effect prediction model are corrected to obtain the target sleep-aiding effect prediction model.

[0097] Optionally, the music recommendation module 330 includes:

[0098] A submodule for determining the category of music to be recommended, for sorting the sleep quality data, determining the target sleep quality data based on the sorting result, and taking the preset music category corresponding to the target sleep quality data as the category of music to be recommended;

[0099] The sleep-aiding music to be recommended determining submodule is used to determine the sleep-aiding music to be recommended based on the category of the music to be recommended and the historical sleep-aiding music data.

[0100] Optionally, the sleep-aiding music to be recommended determining submodule is specifically used for:

[0101] The historical sleep-aiding music data is processed by a collaborative filtering algorithm to obtain a preference value corresponding to each candidate sleep-aiding music corresponding to the music category to be recommended;

[0102] Based on the preference level value, the sleep-aiding music to be recommended is determined from the candidate sleep-aiding music.

[0103] The sleep-aiding music recommendation device based on the sleep environment provided in the embodiment of the present invention can execute the sleep-aiding music recommendation method based on the sleep environment provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0104] Embodiment 4

[0105] Figure 5 A schematic diagram of the structure of an electronic device provided for Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0106] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0107] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0108] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a sleep-aid music recommendation method based on a sleep environment.

[0109] In some embodiments, the sleep-aiding music recommendation method based on the sleep environment may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the sleep-aiding music recommendation method based on the sleep environment described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the sleep-aiding music recommendation method based on the sleep environment in any other appropriate manner (e.g., by means of firmware).

[0110] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

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

[0112] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0113] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0114] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0115] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0116] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0117] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A sleep-aiding music recommendation method based on a sleep environment, characterized in that: include: Obtain the target user's sleeping environment data and historical sleep-aiding music data; Inputting the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, wherein the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories; Based on the historical sleep-aiding music data and the sleep quality data, sleep-aiding music to be recommended corresponding to the target user is determined.

2. The method according to claim 1, characterized in that The step of obtaining the target user's sleeping environment data includes: Acquire the target user's environmental data to be processed in real time, wherein the environmental data to be processed includes at least one of weather condition data, user work data, a sleep score of the previous night, and current time; Feature extraction is performed on the to-be-processed environmental data according to preset environmental data classification categories to obtain the sleeping environment data of the target user.

3. The method according to claim 2, characterized in that The step of extracting features of the to-be-processed environmental data according to the preset environmental data classification to obtain the sleep environment data of the target user includes: If the environmental data to be processed is weather condition data, determining a target weather category corresponding to the weather condition data according to a preset weather classification category; The target weather category and the temperature corresponding to the weather condition data are used as the sleeping environment data.

4. The method according to claim 2, characterized in that: The step of extracting features from the to-be-processed environmental data according to the preset environmental data classification to obtain the sleep environmental data of the target user includes: If the environmental data to be processed is user work data, feature extraction is performed on the user work data according to preset work categories to obtain feature data corresponding to each preset work category, so as to use the feature data as the sleeping environment data; The preset work category includes at least one of the current consecutive working days, whether the next day is a working day, and the working hours of the day.

5. The method according to claim 2, characterized in that: The step of extracting features of the to-be-processed environmental data according to the preset environmental data classification to obtain the sleep environment data of the target user includes: If the environmental data to be processed is the sleep score of the previous night, determining a target score level corresponding to the sleep score of the previous night based on a preset score level; If the environmental data to be processed is the current time, determining the target time category of the current time based on the preset time division category; The target score level and the target time category are used as the sleeping environment data.

6. The method according to claim 1, characterized in that The training process of the target sleep-aiding effect prediction model includes: Acquire sample sleeping environment data, determine at least two sample music categories, and determine sample sleeping quality data corresponding to each of the sample music categories; Inputting the sample sleep environment data and at least two of the sample music categories into an initial sleep-aiding effect prediction model, the initial sleep-aiding effect prediction model outputting predicted sleep quality data corresponding to each of the sample music categories; Based on the predicted sleep quality data and the sample sleep quality data, the model parameters of the initial sleep-aiding effect prediction model are corrected to obtain the target sleep-aiding effect prediction model.

7. The method according to claim 1, characterized in that The determining, based on the historical sleep-aiding music data and the sleep quality data, the sleep-aiding music to be recommended corresponding to the target user includes: sorting the sleep quality data, determining target sleep quality data based on the sorting result, and using the preset music category corresponding to the target sleep quality data as the music category to be recommended; The sleep-aiding music to be recommended is determined based on the category of the music to be recommended and the historical sleep-aiding music data.

8. The method according to claim 7, characterized in that The step of determining the sleep-aiding music to be recommended based on the category of the music to be recommended and the historical sleep-aiding music data includes: Processing the historical sleep-aiding music data by a collaborative filtering algorithm to obtain a preference value corresponding to each candidate sleep-aiding music corresponding to the music category to be recommended; Based on the preference level value, the sleep-aiding music to be recommended is determined from the candidate sleep-aiding music.

9. A sleep-aiding music recommendation device based on a sleep environment, characterized in that: include: A data acquisition module is used to obtain the target user's sleep environment data and historical sleep-aiding music data; A model prediction module, used for inputting the sleep environment data and at least two preset music categories into a target sleep-aiding effect prediction model, wherein the target sleep-aiding effect prediction model outputs sleep quality data corresponding to each of the preset music categories; The music recommendation module is used to determine the sleep-aiding music to be recommended corresponding to the target user based on the historical sleep-aiding music data and the sleep quality data.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for recommending sleep-aid music based on a sleep environment as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Intelligent hypnotic music recommendation method and apparatus

    CN107463646A

  • Music playing control method, device, household appliance, terminal and medium

    CN109492125A

  • Sleep aiding method and device, electronic equipment, terminal and storage medium

    CN117258111A

  • Personalized music recommendation method and device, equipment, medium and wearable equipment

    CN118013071A

  • Display device

    KR1020250021186A