Song recommendation method and device, electronic equipment and storage medium
By using real-time user interaction data and historical user usage data to create target models and features, dynamically adjusting the music playback queue, the problem of low accuracy in song recommendation in the prior art is solved, and a highly personalized and dynamically responsive music playback experience is achieved.
Patent Information
- Application Number
- CN202411469120.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-04-01
AI Technical Summary
The existing music playback platform uses random playback or collaborative filtering of recommended songs, resulting in low accuracy of song recommendations and poor user personalized experience.
By obtaining real-time user interaction data and historical user usage data, creating target models and target music characteristics, dynamically adjusting the music playback queue, and recommending candidate song collections similar to the currently played song.
It has enhanced the diversification of data analysis factors for song recommendations, realized intelligent dynamic adjustment of the music playback queue, provided users with a highly personalized and dynamic responsive music playback experience, and improved the accuracy of song recommendations and the user's personalized listening experience.
Smart Images

Figure CN119739888A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multimedia technology, and in particular to a song recommendation method, device, electronic device and storage medium. Background Art
[0002] With the increasing demand for listening to music by users, existing music playback platforms use a simple random playback method or a collaborative filtering-based recommendation method to play songs. However, due to factors such as the single or omitted data analysis object, the above-mentioned simple random playback method or collaborative filtering-based recommendation method results in low accuracy of the songs played, that is, low user personalization, resulting in a low personalized listening experience for users. Summary of the invention
[0003] In view of this, the purpose of the present disclosure is to provide a song recommendation method, device, electronic device and storage medium, which creates a dynamic queue of candidate song sets similar to the currently playing song by creating a target model and target music features based on real-time user interaction data and historical user usage data, thereby enhancing the diversification of data analysis factors for song recommendation, realizing intelligent dynamic adjustment of the music playback queue, providing users with a highly personalized and dynamically responsive music playback experience, improving the accuracy of the played songs, and thus improving the user's personalized listening experience.
[0004] In a first aspect, an embodiment of the present disclosure provides a song recommendation method, the song recommendation method comprising:
[0005] Obtain real-time user interaction data and historical user usage data based on songs;
[0006] Creating a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences;
[0007] Obtaining a target music feature and a set of candidate songs similar to the currently playing song, wherein the target music feature is a feature obtained by fusing multimodal music features;
[0008] A dynamic queue of the candidate song collection is created based on the target model and the target music features to obtain a song collection to be played.
[0009] In a second aspect, an embodiment of the present disclosure provides a song recommendation device, the song recommendation device comprising:
[0010] A first acquisition module, used to acquire real-time user interaction data and historical user usage data based on songs;
[0011] A first creation module, configured to create a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences;
[0012] A second acquisition module is used to acquire target music features and a set of candidate songs similar to the currently playing song, wherein the target music features are features obtained by fusion of multi-modal music features;
[0013] The second creation module is used to create a dynamic queue of the candidate song set based on the target model and the target music features to obtain the song set to be played.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned song recommendation method.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned song recommendation method.
[0016] The embodiments of the present disclosure bring the following beneficial effects:
[0017] The song recommendation method, device, electronic device and storage medium described above obtain real-time user interaction data and historical user usage data based on songs; create a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences; obtain target music features, and a candidate song set similar to the currently playing song, wherein the target music features are features after the fusion of multimodal music features; create a dynamic queue of the candidate song set based on the target model and the target music features, and obtain a song set to be played. In this method, by creating a dynamic queue of candidate song sets similar to the currently playing song based on the target model and target music features created according to the real-time user interaction data and the historical user usage data, the diversification of data analysis factors for song recommendation is enhanced, and intelligent dynamic adjustment of the music playing queue is realized, providing users with a highly personalized and dynamically responsive music playing experience, improving the accuracy of the played songs, and thus improving the personalized listening experience of users.
[0018] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0019] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of an embodiment of a song recommendation method provided by an embodiment of the present disclosure;
[0022] Figure 2 A schematic diagram of another embodiment of a song recommendation method provided by an embodiment of the present disclosure;
[0023] Figure 3 A schematic diagram of a song recommendation device provided by an embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of this embodiment clearer, the technical solution of this disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of this disclosure, rather than all the embodiments. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this disclosure.
[0026] This embodiment provides a song recommendation method, device, electronic device and storage medium, which can be applied to any song recommendation scenario, especially to the song recommendation scenario of a music playing platform.
[0027] The song recommendation method in one embodiment of the present disclosure may be run on a terminal device or a server. The terminal device may be a local terminal device. When the song recommendation method is run on a server, the method may be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0028] For ease of understanding, the specific process of this embodiment is described below. Figure 1 In this embodiment, an embodiment of the song recommendation method includes the following steps:
[0029] Step 101, obtaining real-time user interaction data and historical user usage data based on songs;
[0030] As an example but not a limitation, the real-time interactive data of the target user based on the song can be obtained in real time through a preset real-time transport protocol (wherein the real-time transport protocol is a protocol for realizing direct full-duplex communication between the client and the server, such as a message queue), and the real-time interactive data can be processed from a preset real-time database (wherein the real-time database is a database for processing a large amount of real-time written data) or a preset stream processing engine (wherein the stream processing engine is an engine for cleaning, aggregating and analyzing real-time data streams) to obtain real-time user interactive data. This ensures the real-time and reliability of the real-time user interactive data.
[0031] As an example but not a limitation, historical user usage data includes but is not limited to historical user behavior data and historical user interaction data. Historical user usage data is user usage data within a preset period before the time corresponding to the real-time user interaction data.
[0032] In one implementation, after obtaining the target user's real-time interaction data and historical usage data based on songs, the real-time interaction data and historical usage data can be quality-monitored through a preset data quality monitoring system, and the results of quality monitoring can be visualized through a preset monitoring tool in the data quality monitoring system. According to the results of quality monitoring, the real-time interaction data and historical usage data are determined as real-time user interaction data and historical user usage data, or the real-time interaction data and historical usage data are re-acquired until the results of quality monitoring meet preset conditions, so as to improve the accuracy and reliability of the real-time user interaction data and historical user usage data.
[0033] It should be noted that before obtaining the real-time user interaction data and historical user usage data based on songs, the user’s explicit authorization must be obtained, and the real-time user interaction data and historical user usage data obtained comply with relevant laws and regulations as well as the user’s privacy policy.
[0034] Step 102, creating a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences;
[0035] As an example but not limitation, the target model may be a multi-layered (multi-level) model, where the layers are directly connected through a weight matrix, and the target model is used to analyze user preferences based on multiple types of features; the target model may also include at least one model, each model is used to analyze user preferences based on one type of feature. The target model can be applicable to feature analysis of rich data types.
[0036] As an example but not a limitation, real-time user interaction data is classified to obtain classified real-time interaction data; feature extraction is performed on the classified real-time interaction data to obtain multi-category first features, and the multi-category first features are fused to obtain a first fused feature; historical user usage data is classified to obtain classified historical usage data; feature extraction is performed on the classified historical usage data to obtain multi-category second features; the multi-category second features are fused to obtain a second fused feature; and a target model is created based on the first fused feature and the second fused feature. By classifying and performing multi-category fusion, the accuracy of feature extraction is improved, thereby improving the reliability of the target model.
[0037] Step 103, obtaining a target music feature and a candidate song set similar to the currently playing song, wherein the target music feature is a feature obtained by fusing multi-modal music features;
[0038] As an example but not limitation, music feature extraction is performed on real-time user interaction data, historical user usage data and songs in a preset song database to obtain target music features; or, music feature extraction is performed on songs in a preset song database to obtain target music features.
[0039] In one implementation, when obtaining the target music features, the following can be done: based on multiple preset feature extraction models, music features are extracted for songs in a preset song database to obtain music features corresponding to the multiple feature extraction models, wherein the multiple feature extraction models correspond to different priorities; according to the priorities of the multiple feature extraction models, the music features corresponding to the multiple feature extraction models are verified, screened and merged at multiple levels to obtain the target music features, so as to improve the diversity and accuracy of the target music features.
[0040] In one implementation, when searching for a candidate song set similar to the currently playing song, the preset song database may be searched based on the currently playing song and a preset search algorithm to obtain a candidate song set. Specifically, as an example and not a limitation, keyword extraction is performed on the currently playing song to obtain a target keyword; music feature extraction is performed on the currently playing song to obtain a current music feature; keywords corresponding to the target keyword are matched from a preset song key database to obtain similar keywords; music features corresponding to the current music feature are matched from a preset music feature database to obtain similar music features; based on the target keyword, similar keyword, current music feature, similar music feature, a preset first search algorithm, and a preset second search algorithm, the preset song database is searched to obtain a candidate song set. Searching by using a variety of factors including target keywords, similar keywords, current music features, and similar music features improves the accuracy of the search, thereby improving the accuracy and reliability of the candidate song set.
[0041] Specifically, as an example but not limitation, when searching the preset song database based on target keywords, similar keywords, current music features, similar music features, a preset first search algorithm, and a preset second search algorithm to obtain a candidate song set, the following can be done: searching the preset song database based on the preset first search algorithm, target keywords, and similar keywords to obtain a first song set; searching the preset song database based on the preset second search algorithm, current music features, and similar music features to obtain a second song set; merging the first song set and the second song set to obtain a candidate song set. Searching by keywords and corresponding search algorithms, as well as music features and corresponding search algorithms, can effectively improve the efficiency and accuracy of the search to a great extent, thereby greatly improving the accuracy and reliability of the candidate song set.
[0042] Step 104, creating a dynamic queue of candidate song sets based on the target model and target music features to obtain a song set to be played.
[0043] Among them, as an example but not limitation, it is possible to: sort the candidate song set based on the target model and the target music features to obtain a sorted candidate song set; create a dynamic queue of the sorted candidate song set based on a preset queue structure to obtain a song set to be played.
[0044] In one implementation, when the candidate song set is sorted based on the target model and the target music feature to obtain the sorted candidate song set, the following can be done: calculate the similarity between the target music feature and each candidate song in the candidate song set; sort each candidate song in the candidate song set in descending order of similarity to obtain a first candidate song sequence; predict the score of each candidate song in the first candidate song sequence based on the target model to obtain the score of each candidate song; sort the first candidate song sequence in descending order of the score to obtain the sorted candidate song set. Through multi-level sorting, post-sorting verification is achieved, which improves the accuracy of sorting, thereby improving the accuracy, effectiveness and availability of the sorted candidate song set.
[0045] In one implementation, when a dynamic queue of sorted candidate song sets is created based on a preset queue structure and a song set to be played is obtained, the sorted candidate song sets can be selected based on the length of the preset queue structure to obtain a selected candidate song set and an unselected candidate song set; the selected candidate song set is written into the queue structure to obtain a song set to be played, and the unselected candidate song set is cached. By creating a dynamic sequence, effective playback of each song in the song set to be played is achieved, which can help to adjust the song set to be played in real time, improve the reliability of the song set to be played, and thus improve the user's personalized listening experience.
[0046] In one implementation, after creating a dynamic queue of sorted candidate song sets based on a preset queue structure and obtaining the song set to be played, the following can be done: obtaining a target song from the song set to be played, wherein the target song is a skipped song; matching songs similar to the target song from the cached unselected candidate song set to obtain a song set to be screened; removing the song set to be screened from the unselected candidate song set to obtain a screened unselected song set; and writing the screened unselected song set into the queue of the song set to be played in sequence based on the song sorting. By screening the unselected candidate song set according to the songs that were skipped when the song set to be played is played, the dynamic song queue is optimized based on user behavior, which can greatly improve the accuracy and reliability of the recommendation of the song set to be played, thereby greatly improving the user's personalized listening experience.
[0047] In this embodiment, a dynamic queue of candidate song sets similar to the currently playing song is created by creating target models and target music features based on real-time user interaction data and historical user usage data, thereby enhancing the diversification of data analysis factors for song recommendations, and realizing intelligent dynamic adjustment of the music playback queue, providing users with a highly personalized and dynamically responsive music playback experience, improving the accuracy of the played songs, and thus improving the user's personalized listening experience.
[0048] See also Figure 2 Another embodiment of the song recommendation method in this embodiment includes:
[0049] 201. Obtaining real-time user interaction data and historical user usage data based on songs;
[0050] In one implementation, when obtaining real-time user interaction data and historical user usage data based on songs, the following steps may be performed: obtaining the original real-time interaction data and original historical behavior data of the target user based on the song; performing data cleaning and standardization on the original real-time interaction data to obtain pre-processed original real-time interaction data; creating an interaction matrix based on the pre-processed original real-time interaction data, wherein the interaction matrix is used to indicate the target user's implicit rating of the song; performing data cleaning and standardization on the original historical behavior data to obtain historical user usage data.
[0051] Among them, in one implementation method, when the original real-time interaction data is cleaned and standardized to obtain the pre-processed original real-time interaction data, it is possible to: classify the original real-time interaction data to obtain the classified real-time interaction data, wherein the classified real-time interaction data includes but is not limited to playback history data, skip behavior data, dwell time data and operation behavior data, wherein the playback history data includes, for example, the song ID, playback time, playback order and other information played by the user, the skip behavior data includes, for example, the song ID, skip time point, playback time before skipping and other information skipped by the user, the dwell time data includes, for example, statistics on the number of complete playbacks of each song, the average listening time and other information, and the operation behavior data includes, for example, the user's likes, collections, and shares, etc. operation data; based on preset validation rules, outliers and duplicate data in the classified real-time interaction data are cleaned to obtain cleaned real-time interaction data, wherein the validation rules include but are not limited to format checking, range checking, data integrity and standardization, outliers may be abnormal data caused by network problems or unexpected operations, for example, recorded data with a playback time shorter than a preset time (for example, the preset time is 5 seconds); data of different dimensions in the cleaned real-time interaction data are unified to the same scale to obtain pre-processed original real-time interaction data to achieve standardized processing for subsequent analysis, for example, converting the playback time in the cleaned real-time interaction data into a complete playback rate: complete playback rate = actual playback time / total song time.
[0052] Therein, the number of users in the target user is at least one.
[0053] Wherein, as an example but not limitation, the size of the interaction matrix is M*N, M is the number of users, and N is the number of songs; an interaction matrix is created based on a preset calculation formula and the preprocessed original real-time interaction data, wherein the calculation formula is as follows: score(u,i)=α*play_count(u,i)+β*complete_rate(u,i)+γ*like_count(u,i), score(u,i) is the implicit score of the target user for the song, u is the target user, i is the song, α, β, γ are weight coefficients, which can be tuned through experiments, play_count(u,i) is the number of times the target user plays the song, complete_rate(u,i) is the completion rate of the target user for the song, and like_count(u,i) is the like rate of the target user for the song.
[0054] Among them, the execution process of data cleaning the original historical behavior data is similar to the above-mentioned execution process of cleaning the outliers and duplicate data in the classified real-time interaction data based on the preset verification rules to obtain the cleaned real-time interaction data. The execution process of standardizing the cleaned original historical behavior data is similar to the above-mentioned execution process of unifying the data of different dimensions in the cleaned real-time interaction data to the same scale to obtain the pre-processed original real-time interaction data, which will not be repeated here.
[0055] By cleaning and standardizing the original real-time interaction data and the original historical behavior data, and creating an interaction matrix based on the preprocessed original real-time interaction data, the data quality of real-time user interaction data and historical user usage data is improved, the computational complexity is reduced, and the efficiency of subsequent data analysis is enhanced. It can support complex machine learning models, enhance the generalization ability of the target model created subsequently, and is conducive to improving the accuracy of subsequent song recommendations.
[0056] 202. Creating a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences;
[0057] In one implementation, when creating a target model based on real-time user interaction data and historical user usage data, you can: create a first model based on real-time user interaction data, wherein the first model is used to indicate the distribution of song themes of user interest; create a second model based on historical user usage data, wherein the second model is used to predict songs preferred by the user; obtain song-based association data, wherein the association data is used to indicate factors that affect the user's interest in the song; create a third model based on the association data, wherein the third model is a model of contextual relevance that affects the interest in the song; and determine the target model based on the first model, the second model, and the third model.
[0058] As an example but not a limitation, when creating the first model based on real-time user interaction data, the following can be done: sliding processing (subsequence identification) is performed on the real-time user interaction data through a preset sliding window algorithm to obtain window-processed data; songs in the window of the window-processed data are clustered to obtain the theme distribution of songs of interest to the user; a theme model is created based on the theme distribution of songs of interest to the user to obtain the first model, wherein the first model can be a (Latent Dirichlet Allocation, LDA) theme model, and the first model can be specifically:
[0059] P(z|d)~Dir(α),P(w|z)~Dir(β), z is the theme, d is the user's play sequence, w is the song, α , β is a hyperparameter.
[0060] Among them, as an example but not limitation, when creating the second model based on historical user usage data, you can: build a user portrait based on the historical user usage data, wherein each user corresponds to a user portrait, and the user portrait includes but is not limited to user basic information, behavioral characteristics, interest preferences and time series behavior patterns; extract features of the interest preference information in the user portrait to obtain user preference features, wherein the user preference features include but are not limited to music style features, era features and language features; create a factorization machine (Factorization Machines) model based on the user preference features to obtain the second model.
[0061] As an example but not limitation, the associated data may be contextual factors such as time, place, and mood that affect the user's interest in the song; a third model is created based on the associated data, wherein the third model may be a context-aware matrix decomposition model, and the third model is specifically as follows: R(u,i,c)≈P(u) T *Q(i)*C(c), R(u,i,c) is the rating matrix, P is the user latent vector, Q is the song latent vector, C is the context latent vector, u is the user's ID, i is the song's ID, c is the index or attribute of the context, and T is the transposition operator. By creating a context-aware matrix decomposition model based on the associated data of the song, the accuracy and diversity of the target model recommendation can be improved.
[0062] As an example but not a limitation, the first model, the second model and the third model may be determined as the target model, or the first model, the second model and the third model may be connected according to a preset hierarchical structure to obtain the target model.
[0063] In one implementation, the speed layer in the pre-built real-time recommendation system architecture (e.g., Lambda architecture) can be used to process the real-time user interaction data based on songs in real time using a stream processing method (e.g., Apache Flink); the batch processing layer in the real-time recommendation system architecture can be used to perform offline analysis on historical user usage data, and update user portraits and model parameters; the service layer in the real-time recommendation system architecture can be used to merge the batch processing results of the batch processing layer and the stream processing results of the stream processing layer to provide a low-latency recommendation service. Through the real-time recommendation system architecture, a low-latency recommendation service is achieved.
[0064] By creating a first model based on real-time user interaction data, creating a second model based on historical user usage data, creating a third model based on associated data, and determining the target model based on the first model, the second model and the third model, it is possible to capture users' short-term interest changes and long-term preferences, achieve accurate modeling of user interests, improve the accuracy and diversity of target model recommendations, make the recommended songs more personalized to users, and improve user satisfaction.
[0065] 203. Perform multimodal music feature extraction on the real-time user interaction data, the historical user usage data and the preset song database to obtain multimodal music features;
[0066] In one implementation, when performing multimodal music feature extraction on real-time user interaction data, historical user usage data, and a preset song database to obtain multimodal music features, the following can be done: extracting audio features of the real-time user interaction data, historical user usage data, and songs in the preset song database through a preset feature extraction model to obtain target audio features, wherein the feature extraction model is composed of at least one extraction algorithm; extracting semantic features of lyrics of the real-time user interaction data, historical user usage data, and songs in the preset song database through a preset language model to obtain target lyrics semantic features; extracting metadata of the real-time user interaction data, historical user usage data, and songs in the preset song database through a preset data integration model and performing metadata integration to obtain target metadata; and determining the target audio features, target lyrics semantic features, and target metadata as multimodal music features.
[0067] In one implementation, the low-level acoustic features of songs in real-time user interaction data and historical user usage data can be extracted by a first feature extraction model in a preset feature extraction model (e.g., a perceptual linear prediction (PLP) model, a Mel frequency envelope (MFE) model) to obtain a first low-level acoustic feature, wherein the low-level acoustic features include but are not limited to Mel frequency cepstral coefficients (MFCC), chromaticity features, and rhythm features; the high-level music attributes of songs in real-time user interaction data and historical user usage data can be calculated by an attribute calculation model in the feature extraction model (e.g., a MuseBERT model) to obtain a first high-level music attribute, wherein the high-level music attributes include but are not limited to emotional attributes, energy attributes, and dance attributes; the songs in a preset song database can be feature extracted by a second feature extraction model in the feature extraction model (e.g., a librosa library) to obtain a database music feature, wherein the database music feature includes but is not limited to a first low-level acoustic feature and a first high-level music attribute; the low-level acoustic feature, the high-level music attribute, and the database music feature are determined as target audio features. By extracting audio features of various data through the feature extraction model, multi-dimensional feature extraction is achieved, which improves the effectiveness and reliability of the target audio features.
[0068] The target audio features can also be obtained through a preset feature extraction model (the feature extraction model only includes one algorithm, for example, the librosa library), real-time user interaction data, historical user usage data, and audio features of songs in a preset song database.
[0069] In one implementation, when extracting semantic features of lyrics of songs in real-time user interaction data, historical user usage data and a preset song database through a preset language model to obtain target lyrics semantic features, the following can be done: using a first language model in the preset language model, the real-time user interaction data, historical user usage data and lyrics content of songs in the preset song database are analyzed and extracted to obtain lyrics content, wherein the first language model can be a BERT pre-trained language model; using a second language model in the language model, the real-time user interaction data, historical user usage data and designated features of songs in the preset song database are analyzed and extracted to obtain designated features, wherein the designated features include but are not limited to lyrics themes, emotional tendencies and complexity; and the lyrics content and designated features are determined as target lyrics semantic features.
[0070] In one implementation, when extracting real-time user interaction data, historical user usage data, and metadata of songs in a preset song database through a preset data integration model and performing metadata integration to obtain target metadata, the following can be done: extracting real-time user interaction data, historical user usage data, and structured information of songs in a preset song database through a first integration model in the preset data integration model to obtain metadata, wherein the first integration model is a custom entity extraction model or a pregenerated entity extraction model, and the metadata includes entities and entity relationships; learning low-dimensional representations of entities and entity relationships based on metadata through a second integration model in the data integration model, and constructing a knowledge graph based on the low-dimensional representations of entities and entity relationships to perform metadata integration to obtain target metadata, wherein the low-dimensional representation can be: h+r≈t, where h is the vector representation of the head entity, r is the vector representation of the entity relationship, and t is the vector representation of the tail entity.
[0071] By extracting multimodal music features including target audio features, target lyrics semantic features and target metadata from a variety of data, it is beneficial to capture user preferences, achieve the synergy of multimodal features, and improve the accuracy and reliability of multimodal music features.
[0072] 204. Based on the preset attention mechanism, the multimodal music features are integrated to obtain the target music features;
[0073] As an example but not a limitation, the multimodal music features may be weighted based on a preset attention mechanism to obtain the target music features, wherein the attention mechanism may be specifically: α i is the attention weight of the ith feature modality, f i is the corresponding feature vector.
[0074] 205. Obtain the currently playing song, and search the preset song database based on the currently playing song and a preset search algorithm to obtain a candidate song set;
[0075] By fusing multimodal music features based on a preset attention mechanism and comprehensively considering a variety of information, the comprehensiveness of feature representation is improved, and the characteristics of music works (songs) are fully characterized, which can improve the accuracy and efficiency of song recommendations. By searching the preset song database based on the currently playing song and the preset retrieval algorithm, the accuracy of the candidate song set is improved, and personalized recommendations are supported.
[0076] In one implementation, when searching a preset song database based on a currently playing song and a preset retrieval algorithm to obtain a candidate song set, the following can be done: multimodal music feature extraction is performed on the currently playing song to obtain the current music feature; based on the current music feature, the preset song database is searched by a first retrieval algorithm and a second retrieval algorithm in the preset retrieval algorithm, respectively, to obtain a first song set and a second song set; based on the current music feature, the preset song database is searched by a third retrieval algorithm in the preset retrieval algorithm, to obtain a third song set; wherein the retrieval level of the third retrieval algorithm is higher than both the retrieval levels of the first retrieval algorithm and the second retrieval algorithm; the first song set and the second song set are merged to obtain a merged song set; the merged song set is screened by the third song set to obtain a candidate song set.
[0077] As an example but not a limitation, the first search algorithm may be a local sensitive hash algorithm, wherein the local sensitive hash algorithm is specifically: h(x) = floor((a·x+b) / r), a is a random vector, b is a random bias, and r is the bucket width. The second search algorithm may be a linear search algorithm, and the third search algorithm may be a depth-first search algorithm or a breadth-first search algorithm. The fact that the search level of the third search algorithm is higher than that of the first and second search algorithms can be understood as follows: the search efficiency and search accuracy of the third search algorithm are higher than those of the first and second search algorithms.
[0078] Among them, the first song collection and the second song collection are merged, and the merged song collection is deduplicated to merge the first song collection and the second song collection to obtain a merged song collection; the similarity between the songs in the third song collection and the songs in the merged song collection is calculated, and the songs in the merged song collection whose similarity is less than a preset similarity are deleted to obtain a candidate song collection.
[0079] By searching with multiple search algorithms and screening the search results, the recall and precision rates are improved, the diversity and comprehensiveness of the search results are enhanced, and the accuracy and reliability of the candidate song set are improved.
[0080] 206. Create a dynamic queue of candidate song sets based on the target model and target music features to obtain a song set to be played.
[0081] In one implementation, when a dynamic queue of candidate song sets is created based on a target model and target music features to obtain a song set to be played, the following can be done: based on the target model and target music features, a comprehensive score corresponding to each candidate song in the candidate song set is calculated; each candidate song in the candidate song set is arranged according to the comprehensive score to obtain a candidate song sequence; based on a preset selection algorithm, the candidate song sequence is screened to obtain a screened candidate song sequence; based on a preset recommendation algorithm, a dynamic queue of the screened candidate song sequence is created to obtain a song set to be played.
[0082] As an example but not a limitation, the comprehensive score corresponding to each candidate song in the candidate song set can be calculated based on the scoring function through the target model and the target music feature, wherein the scoring function is specifically as follows:
[0083] u is the user's ID, i is the song's ID, c is the context index or attribute, w1, w2, w3, w4 are weight coefficients, relevance is the relevance to the user's interest, diversity is the diversity with the historical playlist, novelty is the novelty to the user, and context_score is the context relevance; wherein the selection algorithm can be a lightweight online learning algorithm (bandit algorithm), for example, the Upper Confidence Bound (UCB) algorithm, the Thompson Sampling algorithm, UCB(i) = μi+sqrt(2*ln(n) / ni), μi is the average reward of arm i, n is the total number of attempts, and ni is the number of times arm i is selected.
[0084] In one implementation, when a dynamic queue of a screened candidate song sequence is created based on a preset recommendation algorithm to obtain a song collection to be played, the following steps may be performed: the screened candidate song sequence is written into a dynamic queue structure of a preset length to obtain an initial queue; a queue of a screened candidate song sequence is created through a preset recommendation algorithm to obtain a recommended queue, wherein, as an example but not limitation, the preset length may be 50 songs; a smoothing factor is defined, and the initial queue is configured through a preset sliding window algorithm and the smoothing factor to obtain a new queue structure to obtain a song collection to be played, so as to achieve local dynamic adjustment while maintaining overall coherence, wherein the new queue structure is specifically as follows: Q_new = λ*Q_old+(1-λ)*Q_recommended, Q_old is the initial queue, λ is the smoothing factor, 0<λ<1, and Q_recommended is the recommended queue.
[0085] By obtaining a screened candidate song sequence based on a comprehensive score calculated according to the target model and target music features, creating a dynamic queue of the screened candidate song sequence, and optimizing the queue structure, intelligent dynamic adjustment of the music playback queue is achieved. Real-time user feedback continuously optimizes the recommendation effect, accurately matches user needs, and provides a highly personalized and dynamically responsive music playback experience, which helps to improve the user's personalized listening experience.
[0086] In one implementation, after creating a dynamic queue of candidate song sets based on the target model and target music features and obtaining the song set to be played, it is also possible to: obtain feedback information based on the song set to be played; and update the recommendation strategy and model parameters of the target model in real time based on the feedback information and a preset learning algorithm.
[0087] In one implementation, when the recommendation strategy and the model parameters of the target model are updated in real time based on the feedback information and the preset learning algorithm, the feedback information may be learned through a preset online learning algorithm (e.g., Online Gradient Descent) algorithm, and the model parameters of the target model may be updated in real time according to the learned content and the preset parameter update rules, wherein the parameter update rules may be specifically as follows: θt is the model parameter of the target model, η is the learning rate, L is the loss function, xt is the input feature, and yt is the target value; through the preset transfer learning algorithm and the preset content-based recommendation strategy, the preference model of users similar to the new user is migrated to the recommendation system of the song of the new user, where, as an example but not limited to, the new user can be understood as: a user used later by the user corresponding to the current real-time user interaction data and the historical user usage data, or a user whose registration time is after the current moment, or a user who is active for the first time, etc. Through the parallel computing of the Map-Reduce mode, users similar to the new user are calculated, and the calculation of users similar to the new user is as follows: Map: (user_id, item_preferences)->[(item_id, (user_id, preference))], Reduce: (item_id, [(user_id1, pref1), (user_id2, pref2), ...])->[(user_id1, user_id2, similarity)]; where the transfer learning algorithm is as follows: L new =L old +λ*||W new -W old || 2 , L new is the loss function of the new task, L old is the loss function of the old task, λ is the regularization coefficient, Wnew is the new model parameter, W old Specifically, the gradient of the loss function relative to the model parameters of the target model can be calculated through the preset online learning algorithm and feedback information, and the parameters of the target model can be updated according to the gradient and the preset parameter update rules.
[0088] By updating the recommendation strategy and model parameters of the target model in real time based on feedback information and preset learning algorithms, the recommendation effect can be continuously optimized according to real-time user feedback, which helps to improve the accuracy of song recommendations, realize personalized recommendations and model optimization, and help improve users' personalized listening experience.
[0089] In one implementation, when obtaining feedback information based on the song set to be played, the following can be done: obtaining user evaluation information based on the song set to be played; monitoring user playback behavior data based on the song set to be played in real time; predicting the playback duration of the song set to be played based on the user playback behavior data using a preset analysis model; and determining the user evaluation information and playback duration as feedback information of the song set to be played.
[0090] Among them, as an example but not limitation, user evaluation information includes but is not limited to satisfaction scores, tag selections and user evaluation information on recommendation results; user playback behavior data includes but is not limited to skip rate and complete playback rate; the analysis model can be a survival analysis model (Survival Analysis Model), as follows: S(t) = exp(-λt), S(t) is the survival function, λ is the risk rate, and t is the duration of playback based on the song set to be played.
[0091] By obtaining user evaluation information and predicting the playback duration of the song set to be played based on user playback behavior data through a preset analysis model, feedback information on the song set to be played can be obtained. This can optimize the user experience while improving resource utilization efficiency, help enhance personalized experience, and help improve user retention and activity.
[0092] In one implementation, a user graphical interface is provided through a terminal device, and the user graphical interface includes multiple groups of components, and the multiple groups of components are used to obtain user evaluation information based on the song collection to be played; wherein the user evaluation information includes feedback information corresponding to multiple types, and a group of components corresponds to one type.
[0093] Among them, multiple groups of components are displayed in the user graphical interface according to a preset order and layout content. Multiple groups of components in the user graphical interface can be displayed in the form of floating windows or hidden in a specified area of the user experience interface. When responding to a trigger operation for component display, multiple groups of components are displayed in the user graphical interface. A group of components is used to obtain a type of feedback information, and the type of feedback information obtained by each group of components is different.
[0094] By obtaining user evaluation information based on the song collection to be played through multiple groups of components in the user graphical interface, the intuitiveness and interactivity of the user experience are improved, which helps to understand user preferences more finely and provide a rich data foundation for subsequent personalized recommendations.
[0095] In one implementation, the song recommendation method further includes: caching real-time user interaction data and historical user usage data based on songs through a preset multi-level cache mechanism, and managing the data in the cache through a preset management algorithm.
[0096] As an example but not limitation, the multi-level cache mechanism may be a local cache or a distributed cache (Redis); and the preset management algorithm may be a Least Recently Used (LRU) algorithm.
[0097] In one implementation, the storage status of data in the cache can be monitored in real time through a preset management algorithm. If the storage status indicates that the cache is full, the data in the cache that has been stored for the longest time and is unused is deleted. If the storage status indicates that the cache is not full, no operation is performed and real-time monitoring continues.
[0098] By caching song-based real-time user interaction data and historical user usage data through a multi-level caching mechanism and managing the data in the cache through a preset management algorithm, the access speed of real-time user interaction data and historical user usage data can be improved, resource utilization can be optimized, and subsequent data processing of real-time user interaction data and historical user usage data can be facilitated, thereby ensuring the security and stability of real-time user interaction data and historical user usage data and improving fault tolerance.
[0099] In one implementation, the song recommendation method also includes: managing and controlling real-time user interaction data, historical user usage data, target models, target music features and / or to-be-played song collections through a preset master-slave replication mechanism and a failover mechanism.
[0100] In one implementation, a preset consistent hashing algorithm is used to load balance real-time user interaction data, historical user usage data, target model, target music features and / or a collection of songs to be played to obtain processed data, wherein the consistent hashing algorithm is as follows: hash(key)=((a*key+b) / p) / m, a and b are random numbers, p is a large prime number, and m is the number of slots; the processed data is managed and controlled through a preset master-slave replication mechanism and a failover mechanism, wherein the master-slave replication mechanism includes but is not limited to an asynchronous replication mode, a semi-synchronous replication mode and a fully synchronous replication mode, and the corresponding master-slave replication mode can be selected according to the real-time nature of the data, and the implementation method of the failover mechanism includes but is not limited to redundant backup, heartbeat detection and containerized deployment.
[0101] Data management and control are achieved through master-slave replication and failover mechanisms, which improves data availability, fault tolerance and reading performance, improves data availability, ensures data consistency and enhances fault tolerance.
[0102] In one implementation, large-scale data may be processed by a distributed computing framework such as Apache Spark, wherein the large-scale data may include at least one of real-time user interaction data, historical user usage data, a target model, target music features, and a collection of songs to be played.
[0103] In this embodiment, a dynamic queue of candidate song sets similar to the currently playing song is created by creating a target model and target music features based on real-time user interaction data and historical user usage data, thereby enhancing the diversification of data analysis factors for song recommendation, and realizing intelligent dynamic adjustment of the music playback queue, providing users with a highly personalized and dynamically responsive music playback experience, improving the accuracy of the played songs, comprehensively considering user behavior, music features and contextual information, and being able to adjust the dynamic queue of the song set to be played in real time, thereby improving the user's personalized listening experience, helping to increase the user's usage time and interaction frequency on the music playback platform, and being able to intelligently predict the user's next best song, significantly improving user satisfaction and platform stickiness.
[0104] The song recommendation method in this embodiment is described above. The song recommendation device in this embodiment is described below. Figure 3 In this embodiment, an embodiment of the song recommendation device includes:
[0105] A first acquisition module 301 is used to acquire real-time user interaction data and historical user usage data based on songs;
[0106] A first creation module 302, for creating a target model based on real-time user interaction data and historical user usage data, wherein the target model is a model that characterizes user preferences;
[0107] The second acquisition module 303 is used to acquire target music features and a candidate song set similar to the currently playing song, wherein the target music features are features obtained by fusion of multi-modal music features;
[0108] The second creation module 304 is used to create a dynamic queue of candidate song sets based on the target model and target music features to obtain a song set to be played.
[0109] In this embodiment, a dynamic queue of candidate song sets similar to the currently playing song is created by creating target models and target music features based on real-time user interaction data and historical user usage data, thereby enhancing the diversification of data analysis factors for song recommendations, and realizing intelligent dynamic adjustment of the music playback queue, providing users with a highly personalized and dynamically responsive music playback experience, improving the accuracy of the played songs, and thus improving the user's personalized listening experience.
[0110] Optionally, the first acquisition module 301 may also be used for:
[0111] Obtain the original real-time interaction data and original historical behavior data of the target users based on songs;
[0112] Perform data cleaning and standardization on the original real-time interaction data to obtain the pre-processed original real-time interaction data;
[0113] Creating an interaction matrix based on the preprocessed raw real-time interaction data, wherein the interaction matrix is used to indicate the target user's implicit rating of the song;
[0114] The original historical behavior data is cleaned and standardized to obtain historical user usage data.
[0115] Optionally, the first creation module 302 may also be used to:
[0116] Creating a first model based on the real-time user interaction data, wherein the first model is used to indicate a distribution of song themes of interest to the user;
[0117] Creating a second model based on historical user usage data, wherein the second model is used to predict songs preferred by the user;
[0118] Acquire song-based associated data, wherein the associated data is used to indicate factors that influence a user's interest in the song;
[0119] Creating a third model based on the associated data, wherein the third model is a model of contextual relevance that affects the interest level of the song;
[0120] A target model is determined based on the first model, the second model, and the third model.
[0121] Optionally, the second acquisition module 303 may also be used for:
[0122] Perform multimodal music feature extraction on real-time user interaction data, historical user usage data and preset song database to obtain multimodal music features;
[0123] Based on the preset attention mechanism, multi-modal music features are integrated to obtain the target music features;
[0124] The currently playing song is obtained, and a preset song database is searched based on the currently playing song and a preset search algorithm to obtain a candidate song set.
[0125] Optionally, the second acquisition module 303 may also be used for:
[0126] Extracting audio features of real-time user interaction data, historical user usage data, and songs in a preset song database through a preset feature extraction model to obtain target audio features, wherein the feature extraction model is composed of at least one extraction algorithm;
[0127] The target lyrics semantic features are obtained by extracting the real-time user interaction data, historical user usage data and lyrics semantic features of songs in the preset song database through the preset language model;
[0128] Through a preset data integration model, real-time user interaction data, historical user usage data and metadata of songs in a preset song database are extracted and metadata is integrated to obtain target metadata;
[0129] Target audio features, target lyrics semantic features and target metadata are determined as multimodal music features.
[0130] Optionally, the second acquisition module 303 may also be used for:
[0131] Perform multimodal music feature extraction on the currently playing song to obtain the current music feature;
[0132] Using a first retrieval algorithm and a second retrieval algorithm in the preset retrieval algorithm, based on the current music features, respectively search the preset song database to obtain a first song collection and a second song collection;
[0133] The preset song database is searched based on the current music feature by a third search algorithm in the preset search algorithm to obtain a third song collection; wherein the search level of the third search algorithm is higher than the search levels of the first search algorithm and the second search algorithm;
[0134] Merging the first song collection and the second song collection to obtain a merged song collection;
[0135] The fused song set is screened through the third song set to obtain a candidate song set.
[0136] Optionally, the second creation module 304 may also be used to:
[0137] Based on the target model and the target music features, calculate the comprehensive score corresponding to each candidate song in the candidate song set;
[0138] Arrange the candidate songs in the candidate song set according to the comprehensive scores to obtain a candidate song sequence;
[0139] Based on a preset selection algorithm, the candidate song sequence is screened to obtain a screened candidate song sequence;
[0140] A dynamic queue of the screened candidate song sequences is created based on a preset recommendation algorithm to obtain a set of songs to be played.
[0141] Optionally, the song recommendation device also includes:
[0142] The third acquisition module 305 is used to obtain feedback information based on the song set to be played;
[0143] The updating module 306 is used to update the model parameters of the recommendation strategy and the target model in real time based on the feedback information and the preset learning algorithm.
[0144] Optionally, the third acquisition module 305 may also be used for:
[0145] Obtain user evaluation information based on the set of songs to be played;
[0146] Real-time monitoring of user playback behavior data based on the song set to be played;
[0147] Predict the duration of the song set to be played based on the user's playback behavior data through a preset analysis model;
[0148] The user evaluation information and the duration of the playback are determined as feedback information of the song set to be played.
[0149] Optionally, a user graphical interface is provided through the terminal device, and the user graphical interface includes multiple groups of components, and the multiple groups of components are used to obtain user evaluation information based on the song collection to be played; wherein the user evaluation information includes feedback information corresponding to multiple types, and a group of components corresponds to one type of feedback information.
[0150] Optionally, the song recommendation device also includes:
[0151] The cache module 307 is used to cache the real-time user interaction data and historical user usage data based on songs through a preset multi-level cache mechanism, and manage the data in the cache through a preset management algorithm.
[0152] Optionally, the song recommendation device also includes:
[0153] The management and control module 308 is used to manage and control real-time user interaction data, historical user usage data, target model, target music features and / or the set of songs to be played through a preset master-slave replication mechanism and a failover mechanism.
[0154] The functional implementation of each module and each unit in the above-mentioned song recommendation device corresponds to each step in the above-mentioned song recommendation method embodiment, and its functions and implementation processes will not be repeated here one by one.
[0155] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the song recommendation method. The electronic device can be a server or a terminal device.
[0156] See also Figure 4 As shown, the electronic device includes a processor 400 and a memory 401, wherein the memory 401 stores machine executable instructions that can be executed by the processor 400, and the processor 400 executes the machine executable instructions to implement the above-mentioned song recommendation method.
[0157] Further, Figure 4 The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 400 , the communication interface 403 and the memory 401 are connected via the bus 402 .
[0158] The memory 401 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0159] The processor 400 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 400. The above processor 400 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in this embodiment can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with this embodiment can be directly embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 401, and the processor 400 reads the information in the memory 401 and completes the steps of the song recommendation method in combination with its hardware.
[0160] This embodiment also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the above-mentioned song recommendation method.
[0161] The song recommendation method, device, electronic device and computer program product of the storage medium provided in this embodiment include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0163] In addition, in the description of this embodiment, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in this disclosure can be understood according to specific circumstances.
[0164] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0165] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0166] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art who is familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the present embodiments, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A song recommendation method, characterized in that: The method comprises: Obtain real-time user interaction data and historical user usage data based on songs; Creating a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences; Obtaining a target music feature and a set of candidate songs similar to the currently playing song, wherein the target music feature is a feature obtained by fusing multimodal music features; A dynamic queue of the candidate song collection is created based on the target model and the target music features to obtain a song collection to be played.
2. The method according to claim 1, characterized in that The step of obtaining real-time user interaction data and historical user usage data based on songs includes: Obtain the original real-time interaction data and original historical behavior data of the target users based on songs; Performing data cleaning and standardization processing on the original real-time interaction data to obtain pre-processed original real-time interaction data; Creating an interaction matrix based on the preprocessed original real-time interaction data, wherein the interaction matrix is used to indicate the target user's implicit rating of the song; The original historical behavior data is cleaned and standardized to obtain historical user usage data.
3. The method according to claim 1, characterized in that The step of creating a target model based on the real-time user interaction data and the historical user usage data includes: Creating a first model based on the real-time user interaction data, wherein the first model is used to indicate a distribution of song themes of interest to the user; creating a second model based on the historical user usage data, wherein the second model is used to predict songs preferred by the user; Acquire song-based association data, wherein the association data is used to indicate factors that affect the user's interest in the song; Creating a third model based on the association data, wherein the third model is a model of contextual relevance that affects the interest level of the song; A target model is determined based on the first model, the second model, and the third model.
4. The method according to claim 1, characterized in that: The step of obtaining target music features and a candidate song set similar to the currently playing song includes: Performing multimodal music feature extraction on the real-time user interaction data, the historical user usage data and the preset song database to obtain multimodal music features; The multimodal music features are integrated based on a preset attention mechanism to obtain target music features; The currently playing song is obtained, and the preset song database is searched based on the currently playing song and a preset search algorithm to obtain a candidate song set.
5. The method according to claim 4, characterized in that The step of extracting multimodal music features from the real-time user interaction data, the historical user usage data and the preset song database to obtain multimodal music features includes: Extracting the real-time user interaction data, the historical user usage data and the audio features of songs in a preset song database through a preset feature extraction model to obtain target audio features, wherein the feature extraction model is composed of at least one extraction algorithm; Extracting the real-time user interaction data, the historical user usage data and the lyrics semantic features of songs in a preset song database through a preset language model to obtain target lyrics semantic features; Extract the real-time user interaction data, the historical user usage data and metadata of songs in a preset song database through a preset data integration model and integrate the metadata to obtain target metadata; The target audio feature, the target lyrics semantic feature and the target metadata are determined as multimodal music features.
6. The method according to claim 4, characterized in that The step of searching the preset song database based on the currently playing song and a preset search algorithm to obtain a candidate song set includes: Performing multimodal music feature extraction on the currently playing song to obtain current music features; Using a first retrieval algorithm and a second retrieval algorithm in the preset retrieval algorithm, based on the current music feature, the preset song database is searched to obtain a first song collection and a second song collection; The preset song database is searched based on the current music feature by a third search algorithm in the preset search algorithm to obtain a third song collection; wherein the search level of the third search algorithm is higher than the search levels of the first search algorithm and the second search algorithm; Merging the first song collection and the second song collection to obtain a merged song collection; The fused song collection is screened through the third song collection to obtain a candidate song collection.
7. The method according to claim 1, characterized in that The step of creating a dynamic queue of the candidate song set based on the target model and the target music feature to obtain the song set to be played includes: Based on the target model and the target music feature, calculating the comprehensive score corresponding to each candidate song in the candidate song set; Arranging the candidate songs in the candidate song set according to the comprehensive score to obtain a candidate song sequence; Based on a preset selection algorithm, the candidate song sequence is screened to obtain a screened candidate song sequence; A dynamic queue of the screened candidate song sequences is created based on a preset recommendation algorithm to obtain a set of songs to be played.
8. The method according to any one of claims 1 to 7, characterized in that: After the step of creating the dynamic queue of the candidate song set based on the target model and the target music feature to obtain the song set to be played, the method further includes: Obtaining feedback information based on the song set to be played; Based on the feedback information and the preset learning algorithm, the recommendation strategy and the model parameters of the target model are updated in real time.
9. The method according to claim 8, characterized in that The step of obtaining feedback information based on the song set to be played includes: Obtaining user evaluation information based on the song collection to be played; Real-time monitoring of user playing behavior data based on the song set to be played; Predicting the duration of playing the song set to be played based on the user's playing behavior data through a preset analysis model; The user evaluation information and the playing duration are determined as feedback information of the song collection to be played.
10. The method according to claim 9, characterized in that A user graphical interface is provided through a terminal device, and the user graphical interface includes multiple groups of components, and the multiple groups of components are used to obtain user evaluation information based on the song collection to be played; wherein the user evaluation information includes feedback information corresponding to multiple types, and a group of components corresponds to one type of feedback information.
11. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: The real-time user interaction data and historical user usage data based on songs are cached through a preset multi-level cache mechanism, and the data in the cache is managed through a preset management algorithm.
12. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: The real-time user interaction data, the historical user usage data, the target model, the target music features and / or the set of songs to be played are managed and controlled through a preset master-slave replication mechanism and a failover mechanism.
13. A song recommendation device, characterized in that: The song recommendation device comprises: A first acquisition module, used to acquire real-time user interaction data and historical user usage data based on songs; A first creation module, configured to create a target model based on the real-time user interaction data and the historical user usage data, wherein the target model is a model that characterizes user preferences; A second acquisition module is used to acquire target music features and a set of candidate songs similar to the currently playing song, wherein the target music features are features obtained by fusion of multi-modal music features; The second creation module is used to create a dynamic queue of the candidate song set based on the target model and the target music features to obtain the song set to be played.
14. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the song recommendation method described in any one of claims 1-12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the song recommendation method described in any one of claims 1-12.
Citation Information
Cited By
Song requesting background recommendation method, device and equipment based on tablet terminal
CN120994866A
Method, device and equipment for background recommendation of song selection based on tablet terminal
CN120994866B
Object recommendation method and device, electronic equipment and storage medium
CN121614674A