Music recommendation method and device, computer equipment and storage medium

By integrating the target user's emotional information, environmental scene type, and user profile from the audio equipment, music with high comprehensive similarity is selected, solving the problem of inappropriate recommendations under the single emotional modality of traditional audio equipment and improving the user experience.

CN121858801APending Publication Date: 2026-04-14SHENZHEN AIRSMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional audio equipment's music recommendation schemes rely on a single emotional modality, making it difficult to recommend suitable music content to users in different environments, thus affecting the user experience.

Method used

By acquiring the target user's emotional information, environmental scene type, and user profile, music with high similarity in various feature information is selected from a preset music library. The comprehensive similarity is calculated by combining weighted relationships, and n music tracks are recommended.

Benefits of technology

It enables accurate music recommendations based on different moods and environments, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121858801A_ABST
    Figure CN121858801A_ABST
Patent Text Reader

Abstract

The invention relates to a music recommendation method and device, computer equipment and a storage medium. The method comprises the steps that emotion information of a target user at the current moment, a scene type of an environment where the target user is located at the current moment and a user portrait of the target user are acquired; based on the emotion information, the scene type and the user portrait, screening n pieces of music from a preset music library; and recommending n pieces of music to the target user. Therefore, according to the method, the emotion information of the target user at the current moment, the scene type of the environment where the target user is located at the current moment and the user portrait are fused, and n pieces of music are screened from the preset music library. Wherein the scene type performs supplementary limitation on emotion information of the target user; the user portrait represents the music preference of the target user. By combining the three types of information, the music content meeting the requirement can be accurately recommended to the target user, the technical problem that it is difficult to recommend appropriate music content to the user in a single emotion mode is effectively solved, and then the use experience of the user is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio equipment, and more particularly to a music recommendation method, apparatus, computer device, and storage medium. Background Technology

[0002] With the development of the internet, audio equipment has been widely used in various scenarios such as conference rooms, living rooms, classrooms, and stages. Users can use audio equipment to amplify sound, enhance stage atmosphere, and perform other functions. As its popularity increases, users' demands for audio equipment experiences are constantly upgrading, with "accurate music recommendations" becoming a key requirement. Audio equipment can sense the user's emotional state in real time and automatically recommend music that matches their current mood, thus accurately matching the auditory needs under different emotional states.

[0003] Currently, traditional audio equipment's music recommendation schemes mostly rely on a single emotional modality. Specifically, traditional audio equipment collects the user's voice data through a microphone. Next, it extracts voice features and semantic features from the voice data. Then, it combines these voice and semantic features to determine the user's emotion. Finally, it recommends music to the user based on their emotion.

[0004] However, recommendation methods based on a single emotional modality have significant limitations. Even when users are in the same emotional state, their music preferences can vary significantly depending on the environment. This mechanism struggles to recommend suitable music content, thus impacting the user experience. Summary of the Invention

[0005] This application provides a music recommendation method, apparatus, computer device, and storage medium, aiming to solve the technical problem of difficulty in recommending suitable music content to users under a single emotional modality.

[0006] In a first aspect, embodiments of this application provide a music recommendation method, the method being applied to an audio device, comprising:

[0007] Obtain the target user's emotional information at the current moment, the scene type of the environment in which the target user is at the current moment, and the user profile of the target user;

[0008] Based on the emotional information, the scene type, and the user profile, n music tracks are selected from a preset music library, where n is an integer greater than or equal to 1.

[0009] Recommend the n music tracks to the target user.

[0010] Optionally, the step of selecting n songs from a preset music library based on the emotion information, the scene type, and the user profile includes:

[0011] Extract emotional feature information from the emotional information;

[0012] Extract scene feature information from the scene type;

[0013] Extract user feature information from the user profile;

[0014] Based on the emotional feature information, the scene feature information, and the user feature information, the n music tracks are selected from the preset music library.

[0015] Optionally, the step of selecting the n songs from the preset music library based on the emotional feature information, the scene feature information, and the user feature information includes:

[0016] Calculate the first similarity between each piece of music in the preset music library and the emotional feature information;

[0017] Calculate the second similarity between each piece of music in the preset music library and the scene feature information;

[0018] Calculate the third similarity between each piece of music in the preset music library and the user feature information;

[0019] Based on the first similarity, second similarity, and third similarity of each piece of music in the preset music library, the n pieces of music are selected from the preset music library.

[0020] Optionally, the step of selecting the n songs from the preset music library based on the first similarity, second similarity, and third similarity corresponding to each song in the preset music library includes:

[0021] According to a preset weighting relationship, the comprehensive similarity of the music is calculated based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library;

[0022] The n songs are selected from the preset music library in descending order of their overall similarity.

[0023] Optionally, before calculating the comprehensive similarity of the music based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library according to a preset weighted relationship, the method further includes:

[0024] The playback duration of each of the top k most recently played songs by the target user is calculated, where k is an integer greater than or equal to 1.

[0025] Calculate the ratio between the user playback duration of each of the first k songs and the actual playback duration of the song to obtain the playback percentage of the song.

[0026] The first number is obtained by counting the number of songs in the first k songs whose playback percentage is less than a preset playback percentage threshold;

[0027] Calculate the ratio of the first quantity to the total quantity of the first k songs to obtain the first proportion value;

[0028] The preset weight relationship is adjusted according to the first percentage value.

[0029] The step of calculating the comprehensive similarity of the music according to a preset weighted relationship, based on the first similarity, second similarity, and third similarity of each piece of music in the preset music library, includes:

[0030] According to the adjusted preset weight relationship, the comprehensive similarity of the music is calculated based on the first similarity, second similarity and third similarity corresponding to each piece of music in the preset music library.

[0031] Optionally, the preset weighting relationship includes the weight of the first similarity. Before calculating the comprehensive similarity of the music according to the preset weighting relationship and based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library, the method further includes:

[0032] Get the first i playback entries of the latest playback record of the target user, where i is an integer greater than 1;

[0033] Determine whether each of the first i playback entries is the same;

[0034] If so, increase the weight value of the first similarity.

[0035] Optionally, the user profile includes a warning label, and before calculating the first similarity between each piece of music in the preset music library and the emotional feature information, the method further includes:

[0036] Remove music with the lightning protection tag from the preset music library to obtain j music tracks, where j is an integer greater than or equal to n;

[0037] The calculation of the first similarity between each piece of music in the preset music library and the emotional feature information includes:

[0038] Calculate the first similarity between each of the j pieces of music and the emotional feature information;

[0039] The calculation of the second similarity between each piece of music in the preset music library and the scene feature information includes:

[0040] Calculate the second similarity between each of the j pieces of music and the scene feature information;

[0041] The calculation of the third similarity between each piece of music in the preset music library and the user feature information includes:

[0042] Calculate the third similarity between each of the j music tracks and the user feature information;

[0043] The step of selecting the n songs from the preset music library based on the first similarity, second similarity, and third similarity of each song in the preset music library includes:

[0044] Based on the first similarity, second similarity, and third similarity of each of the j songs, the n songs are selected from the j songs.

[0045] Secondly, embodiments of this application also provide a music recommendation device, which includes a unit for performing the above-described method.

[0046] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0047] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0048] This application provides a music recommendation method, apparatus, computer device, and storage medium. The method, applied to an audio device, includes: acquiring the target user's current emotional information, the scene type of the target user's environment at the current moment, and the target user's user profile; selecting n music tracks from a preset music library based on the emotional information, scene type, and user profile, where n is an integer greater than or equal to 1; and recommending the n music tracks to the target user. Therefore, this application's technical solution acquires the target user's current emotional information, the scene type of the target user's environment at the current moment, and the target user's user profile. Then, based on the emotional information, scene type, and user profile, n music tracks are selected from a preset music library, where n is an integer greater than or equal to 1. Finally, n music tracks are recommended to the target user. Thus, this application's technical solution integrates three types of information—the target user's current emotional information, the scene type of the current environment, and the user profile—to select n music tracks from a preset music library. Among these elements, the scenario type supplements and limits the target user's emotional information; the user profile represents the target user's music preferences. This application's technical solution combines these three types of information to accurately recommend music content that matches the target user's needs, effectively solving the technical problem of recommending suitable music content to users under a single emotional modality, thereby significantly improving the user experience. Attached Figure Description

[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0052] Figure 1 A flowchart illustrating a music recommendation method provided in an embodiment of this application;

[0053] Figure 2 A schematic block diagram of a music recommendation device provided in an embodiment of this application;

[0054] Figure 3 A computer device provided in an embodiment of this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0057] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0058] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0059] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0060] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0061] To address the technical problem of recommending suitable music content to users under a single emotional modality in existing technologies, this application provides a music recommendation device that can accurately recommend suitable music content to users.

[0062] Figure 1 This is a flowchart illustrating a music recommendation method provided in an embodiment of this application. In one embodiment, the method is applied to an audio device, and the method includes steps S101-S103.

[0063] S101. Obtain the target user's emotional information at the current moment, the scene type of the target user's environment at the current moment, and the target user's user profile.

[0064] It should be noted that this application embodiment obtains the target user's emotional information at the current moment through multimodal data fusion. Specifically, firstly, it collects the target user's voice data, facial expression data, or physiological data at the current moment. Next, it preprocesses the collected voice data, facial expression data, and physiological data to remove some interfering data. Then, it extracts features from the preprocessed voice data, facial expression data, and physiological data to obtain multiple feature vectors. Finally, it fuses the extracted feature vectors and combines them with an AI intelligent model to obtain the target user's emotional information. This emotional information includes, but is not limited to, emotion category and emotion intensity.

[0065] Scene types include, but are not limited to, conference rooms, living rooms, bedrooms, plazas, and parks. In this embodiment, by identifying the size and shape of the surrounding environment and combining this with information such as noise levels (decibels), the environmental type of the target user at any given moment can be accurately determined.

[0066] User profiles of target users represent the music signals of the target users. Preferably, user profiles of target users can be represented using tags. For example, tags used for user profiles include, but are not limited to, rock, upbeat, and 90s generation.

[0067] S102. Based on emotional information, scene type and user profile, select n music tracks from the preset music library.

[0068] Where n is an integer greater than or equal to 1.

[0069] This application's technical solution integrates three types of information: the target user's current emotional state, the scene type of their current environment, and their user profile, to select n songs from a preset music library. The preset music library contains multiple songs, and the total number of songs in the preset music library is greater than n.

[0070] S103. Recommend n songs to the target user.

[0071] This embodiment of the application recommends music to the target user in real time. It should be noted that in this embodiment of the application, S101-S103 can be executed periodically to update the music recommendation list in real time, thereby recommending music content that matches the user's needs.

[0072] This application provides a music recommendation method. The method is applied to an audio device and includes: acquiring the target user's current emotional information, the scene type of the target user's environment at the current moment, and the target user's user profile; selecting n music tracks from a preset music library based on the emotional information, the scene type, and the user profile, where n is an integer greater than or equal to 1; and recommending the n music tracks to the target user. Therefore, this application's technical solution acquires the target user's current emotional information, the scene type of the target user's environment at the current moment, and the target user's user profile. Then, based on the emotional information, scene type, and user profile, n music tracks are selected from a preset music library, where n is an integer greater than or equal to 1. Finally, n music tracks are recommended to the target user. Thus, this application's technical solution integrates three types of information: the target user's current emotional information, the scene type of the current environment, and the user profile, to select n music tracks from a preset music library. The scene type further defines the target user's emotional information; the user profile represents the target user's music preferences. The technical solution of this application combines the above three types of information to accurately recommend music content that matches the needs of target users, effectively solving the technical problem that it is difficult to recommend suitable music content to users under a single emotional modality, thereby significantly improving the user experience.

[0073] In one embodiment, S102 specifically includes the following steps: S1021-S1024.

[0074] S1021. Extract emotional feature information from emotional information.

[0075] Among them, emotional characteristics include, but are not limited to, pleasure, excitement, calmness, satisfaction, depression, anxiety, irritability, depression, focus, indifference, and numbness.

[0076] S1022. Extract scene feature information from scene type.

[0077] Scene feature information includes, but is not limited to, environmental state feature information and scene activity feature information. Environmental state feature information includes, but is not limited to, quiet environments, enclosed spaces, natural light environments, and strong light environments. Scene activity feature information includes, but is not limited to, resting in a bedroom, gathering in a living room, working in a study, cooking in a kitchen, holding meetings in a conference room, and taking a walk in a park.

[0078] S1023. Extract user feature information from user profiles.

[0079] User characteristics include, but are not limited to, music genre preferences, singer preferences, band preferences, and music attribute preferences.

[0080] S1024. Based on emotional feature information, scene feature information and user feature information, select the n music tracks from the preset music library.

[0081] In one embodiment, S1024 specifically includes the following steps: S10241-S10244.

[0082] S10241. Calculate the first similarity between each piece of music in the preset music library and the emotional feature information.

[0083] Among them, the first similarity for each piece of music is the similarity between each piece of music and the emotional feature information.

[0084] It should be noted that in this embodiment, each piece of music in the preset music library needs to be pre-annotated based on emotional feature information, scene feature information, and user feature information. Preferably, this embodiment uses a 512-dimensional music feature vector to annotate each piece of music. This 512-dimensional music feature vector includes feature information in three dimensions: emotional feature information, scene feature information, and user feature information. In this embodiment, the similarity calculation between each piece of music and the emotional feature information is transformed into a similarity calculation between two vectors. Finally, the similarity between each piece of music in the preset music library and the emotional feature information can be calculated.

[0085] S10242. Calculate the second similarity between each piece of music in the preset music library and the scene feature information.

[0086] Among them, the second similarity for each piece of music is the similarity between each piece of music and the scene feature information.

[0087] Similarly, as in step S10241, this embodiment transforms the similarity calculation between each piece of music and scene feature information into a similarity calculation between two vectors. Ultimately, the similarity between each piece of music in the preset music library and the scene feature information can be calculated.

[0088] S10243. Calculate the third similarity between each piece of music in the preset music library and the user's feature information.

[0089] Among them, the third similarity for each piece of music is the similarity between each piece of music and the user's feature information.

[0090] Similarly, as in step S10243, this embodiment transforms the similarity calculation between each piece of music and user feature information into a similarity calculation between two vectors. Ultimately, the similarity between each piece of music in the preset music library and the user feature information can be calculated.

[0091] S10244. Based on the first similarity, second similarity and third similarity of each song in the preset music library, select n songs from the preset music library.

[0092] In one embodiment, S10244 specifically includes the following steps: S102441-S102442.

[0093] S102441. According to the preset weight relationship, calculate the comprehensive similarity of the music based on the first similarity, second similarity and third similarity of each music in the preset music library.

[0094] For example, the similarity between music a and emotional feature information is 0.88, the similarity between music a and scene feature information is 0.92, and the similarity between music a and user feature information is 0.86. In the preset weighted relationship, the weight of the first similarity is 0.3, the weight of the second similarity is 0.3, and the weight of the third similarity is 0.4. Then the comprehensive similarity of music a is 0.88*0.3+0.92*0.3+0.86*0.4=0.884.

[0095] It should be noted that the greater the overall similarity of the music, the more likely the music is to meet the auditory needs of the target users.

[0096] S102442. Select n music tracks from the preset music library in descending order of overall similarity.

[0097] In this embodiment, the overall similarity of each piece of music in the preset music library is calculated. Then, n pieces of music are selected in descending order of their overall similarity values.

[0098] In one embodiment, prior to step S102441, the method further includes steps S102443-S102447.

[0099] S102443. Calculate the user playback time for each of the top k most recently played songs by the target user.

[0100] Where k is an integer greater than or equal to 1. Preferably, k is 20.

[0101] It should be noted that, under normal circumstances, the target user's emotions and surrounding environment will not fluctuate significantly within half an hour. Furthermore, the complete playback time of a song is typically 3-5 minutes. In this embodiment, the playback time of each of the target user's most recently played 20 songs is statistically analyzed to quickly determine whether the currently recommended music meets the target user's auditory needs.

[0102] It should be noted that the user playback duration for music refers to the total time spent by the target user listening to the music. The user playback duration for music will not exceed the actual playback duration of the music. The actual playback duration is the music's original playback time and is unaffected by user input.

[0103] S102444. Calculate the ratio between the user playback time of each of the first k songs and the actual playback time of the songs to obtain the playback percentage of the songs.

[0104] Generally, the smaller the percentage of music played, the lower the level of interest the target users have in that music.

[0105] S102445. Count the number of songs in the first k songs whose playback percentage is less than the preset playback percentage threshold, and obtain the first number.

[0106] The first preset playback percentage threshold was set by the applicant based on practical experience. This application will not elaborate further here.

[0107] S102446. Calculate the ratio of the first quantity to the total quantity of the first k songs to obtain the first proportion value.

[0108] The larger the first percentage value, the less the currently recommended content meets the auditory needs of the target user.

[0109] S102447. Adjust the preset weight relationship according to the first proportion value.

[0110] Specifically, when the first percentage value exceeds the first percentage threshold, the weight value corresponding to the item with the largest weight in the weighted relationship is reduced, and the weight values ​​corresponding to the other items in the weighted relationship are increased. The first percentage threshold was set by the applicant based on practical experience. This application does not impose any restrictions on it.

[0111] The above S102441 specifically includes the following steps: A.

[0112] A. According to the adjusted preset weight relationship, calculate the comprehensive similarity of the music based on the first similarity, second similarity and third similarity corresponding to each piece of music in the preset music library.

[0113] It should be noted that step A is the same as or similar to S102441 described above. Therefore, this application will not repeat the details here.

[0114] In one embodiment, the preset weight relationship includes the weight of the first similarity, and before step S102441 above, the method further includes: ad.

[0115] a. Obtain the first i playback entries of the target user's latest playback history.

[0116] Where i is an integer greater than 1.

[0117] b. Determine if each of the first i playback items is the same; if yes, proceed to c; otherwise, proceed to d.

[0118] c. Increase the weight value of the first similarity.

[0119] d. Keep the preset weight relationship unchanged.

[0120] It should be noted that steps a-d will be explained in detail below.

[0121] When a target user's auditory needs are driven by emotion, they often listen to the same piece of music multiple times consecutively. Therefore, in this embodiment, if multiple consecutive listenings of the same piece of music are detected, the weight value corresponding to the first similarity can be appropriately increased, and the weight values ​​corresponding to other weights can be appropriately decreased. As can be seen from the above embodiments, the first similarity is calculated based on the user's emotional characteristic information.

[0122] In one embodiment, the user profile includes a lightning protection tag, and prior to S10241 above, the method further includes: e.

[0123] e. Remove music with the lightning protection tag from the preset music library to obtain j music tracks.

[0124] Where j is an integer greater than or equal to n.

[0125] It should be noted that in this embodiment, the number of music tracks to be screened is first reduced based on the lightning protection tag, which effectively improves the efficiency of music recommendation.

[0126] The aforementioned S10241 specifically includes: S102411.

[0127] S102411 calculates the first similarity between each of the j songs and the emotional feature information;

[0128] It should be noted that S102411 is similar to S10241. This application will not repeat the details here.

[0129] The above-mentioned S10242 specifically includes: S102421.

[0130] S102421. Calculate the second similarity between each piece of music and the scene feature information in j pieces of music.

[0131] It should be noted that S102421 and S10242 are similar. Therefore, this application will not repeat them here.

[0132] The above S10243 specifically includes the following steps: S102431.

[0133] S102431. Calculate the third similarity between each of the j music tracks and the user's feature information.

[0134] It should be noted that S102431 is similar to S10243. This application will not repeat the details here.

[0135] The above S10244 specifically includes the following steps: S102448.

[0136] S102448. Based on the first similarity, second similarity, and third similarity of each of the j songs, select n songs from the j songs.

[0137] It should be noted that S102448 is similar to S10244. Therefore, this application will not elaborate further.

[0138] See Figure 2 , Figure 2 This is a schematic block diagram of a music recommendation device provided in an embodiment of this application. Corresponding to the above music recommendation method, this application also provides a music recommendation device. The music recommendation device includes a unit for performing the above music recommendation method, and the music recommendation device can be configured in an audio device. Specifically, the music recommendation device includes:

[0139] The acquisition unit 201 is used to acquire the target user's emotional information at the current moment, the scene type of the environment in which the target user is located at the current moment, and the user profile of the target user;

[0140] The filtering unit 202 is used to filter n songs from a preset music library based on the emotion information, the scene type and the user profile, where n is an integer greater than or equal to 1;

[0141] Recommendation unit 203 is used to recommend the n music tracks to the target user.

[0142] In one embodiment, the filtering unit 202 is specifically used for:

[0143] Extract emotional feature information from the emotional information;

[0144] Extract scene feature information from the scene type;

[0145] Extract user feature information from the user profile;

[0146] Based on the emotional feature information, the scene feature information, and the user feature information, the n music tracks are selected from the preset music library.

[0147] In one embodiment, the filtering unit 202 is specifically used for:

[0148] Calculate the first similarity between each piece of music in the preset music library and the emotional feature information;

[0149] Calculate the second similarity between each piece of music in the preset music library and the scene feature information;

[0150] Calculate the third similarity between each piece of music in the preset music library and the user feature information;

[0151] Based on the first similarity, second similarity, and third similarity of each piece of music in the preset music library, the n pieces of music are selected from the preset music library.

[0152] In one embodiment, the filtering unit 202 is specifically used for:

[0153] According to a preset weighting relationship, the comprehensive similarity of the music is calculated based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library;

[0154] The n songs are selected from the preset music library in descending order of their overall similarity.

[0155] In one embodiment, the filtering unit 202 is specifically used for:

[0156] The playback duration of each of the top k most recently played songs by the target user is calculated, where k is an integer greater than or equal to 1.

[0157] Calculate the ratio between the user playback duration of each of the first k songs and the actual playback duration of the song to obtain the playback percentage of the song.

[0158] The first number is obtained by counting the number of songs in the first k songs whose playback percentage is less than a preset playback percentage threshold;

[0159] Calculate the ratio of the first quantity to the total quantity of the first k songs to obtain the first proportion value;

[0160] The preset weight relationship is adjusted according to the first percentage value.

[0161] According to the adjusted preset weight relationship, the comprehensive similarity of the music is calculated based on the first similarity, second similarity and third similarity corresponding to each piece of music in the preset music library.

[0162] In one embodiment, the preset weight relationship includes the weight of the first similarity, and the filtering unit 202 is specifically used for:

[0163] Get the first i playback entries of the latest playback record of the target user, where i is an integer greater than 1;

[0164] Determine whether each of the first i playback entries is the same;

[0165] If so, increase the weight value of the first similarity.

[0166] In one embodiment, the user profile includes a lightning avoidance tag, and the filtering unit 202 is specifically used for:

[0167] Remove music with the lightning protection tag from the preset music library to obtain j music tracks, where j is an integer greater than or equal to n;

[0168] The calculation of the first similarity between each piece of music in the preset music library and the emotional feature information includes:

[0169] Calculate the first similarity between each of the j pieces of music and the emotional feature information;

[0170] Calculate the second similarity between each of the j pieces of music and the scene feature information;

[0171] Calculate the third similarity between each of the j music tracks and the user feature information;

[0172] Based on the first similarity, second similarity, and third similarity of each of the j songs, the n songs are selected from the j songs.

[0173] like Figure 3 As shown, this application provides a computer device including a processor 31, a communication interface 32, a memory 33, and a communication bus 34. The processor 31, the communication interface 32, and the memory 33 communicate with each other through the communication bus 34. The memory 33 is used to store computer programs.

[0174] In one embodiment of this application, when the processor 31 executes the program stored in the memory 33, it implements the music recommendation control method provided in any of the foregoing method embodiments.

[0175] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0176] Therefore, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the music recommendation method provided in any of the foregoing method embodiments.

[0177] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0178] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0179] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0180] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0181] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0182] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0183] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.

[0184] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A music recommendation method, characterized in that, The method is applied to audio equipment, and the method includes: Obtain the target user's emotional information at the current moment, the scene type of the environment in which the target user is at the current moment, and the user profile of the target user; Based on the emotional information, the scene type, and the user profile, n music tracks are selected from a preset music library, where n is an integer greater than or equal to 1. Recommend the n music tracks to the target user.

2. The method according to claim 1, characterized in that, The step of selecting n songs from a preset music library based on the emotional information, the scene type, and the user profile includes: Extract emotional feature information from the emotional information; Extract scene feature information from the scene type; Extract user feature information from the user profile; Based on the emotional feature information, the scene feature information, and the user feature information, the n music tracks are selected from the preset music library.

3. The method according to claim 1, characterized in that, The step of selecting the n songs from the preset music library based on the emotional feature information, the scene feature information, and the user feature information includes: Calculate the first similarity between each piece of music in the preset music library and the emotional feature information; Calculate the second similarity between each piece of music in the preset music library and the scene feature information; Calculate the third similarity between each piece of music in the preset music library and the user feature information; Based on the first similarity, second similarity, and third similarity of each piece of music in the preset music library, the n pieces of music are selected from the preset music library.

4. The method according to claim 3, characterized in that, The step of selecting the n songs from the preset music library based on the first similarity, second similarity, and third similarity of each song in the preset music library includes: According to a preset weighting relationship, the comprehensive similarity of the music is calculated based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library; The n songs are selected from the preset music library in descending order of their overall similarity.

5. The method according to claim 4, characterized in that, Before calculating the comprehensive similarity of the music based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library according to a preset weighted relationship, the method further includes: The playback duration of each of the top k most recently played songs by the target user is calculated, where k is an integer greater than or equal to 1. Calculate the ratio between the user playback duration of each of the first k songs and the actual playback duration of the song to obtain the playback percentage of the song. The first number is obtained by counting the number of songs in the first k songs whose playback percentage is less than a preset playback percentage threshold; Calculate the ratio of the first quantity to the total quantity of the first k songs to obtain the first proportion value; The preset weight relationship is adjusted according to the first percentage value. The step of calculating the comprehensive similarity of the music according to a preset weighted relationship, based on the first similarity, second similarity, and third similarity of each piece of music in the preset music library, includes: According to the adjusted preset weight relationship, the comprehensive similarity of the music is calculated based on the first similarity, second similarity and third similarity corresponding to each piece of music in the preset music library.

6. The method according to claim 4, characterized in that, The preset weighting relationship includes the weight of the first similarity. Before calculating the comprehensive similarity of the music according to the preset weighting relationship and based on the first similarity, second similarity, and third similarity corresponding to each piece of music in the preset music library, the method further includes: Get the first i playback entries of the latest playback record of the target user, where i is an integer greater than 1; Determine whether each of the first i playback entries is the same; If so, increase the weight value of the first similarity.

7. The method according to claim 3, characterized in that, The user profile includes a warning tag. Before calculating the first similarity between each piece of music in the preset music library and the emotional feature information, the method further includes: Remove music with the lightning protection tag from the preset music library to obtain j music tracks, where j is an integer greater than or equal to n; The calculation of the first similarity between each piece of music in the preset music library and the emotional feature information includes: Calculate the first similarity between each of the j pieces of music and the emotional feature information; The calculation of the second similarity between each piece of music in the preset music library and the scene feature information includes: Calculate the second similarity between each of the j pieces of music and the scene feature information; The calculation of the third similarity between each piece of music in the preset music library and the user feature information includes: Calculate the third similarity between each of the j music tracks and the user feature information; The step of selecting the n songs from the preset music library based on the first similarity, second similarity, and third similarity of each song in the preset music library includes: Based on the first similarity, second similarity, and third similarity of each of the j songs, the n songs are selected from the j songs.

8. A music recommendation device, characterized in that, The device is used in audio equipment, and the device includes: The acquisition unit is used to acquire the target user's emotional information at the current moment, the scene type of the environment in which the target user is located at the current moment, and the user profile of the target user; The filtering unit is used to filter n songs from a preset music library based on the emotion information, the scene type, and the user profile, where n is an integer greater than or equal to 1; The recommendation unit is used to recommend the n music tracks to the target user.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1 to 7.