Musical song recommendation system and method based on machine learning

By integrating multi-platform data and deeply mining comment information, combined with machine learning technology, a personalized music recommendation system is built, which solves the problem of insufficient reflection of user preferences in the existing system and realizes high-quality personalized recommendations.

CN120744167AInactive Publication Date: 2025-10-03SHIJIAZHUANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510847899.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing music recommendation system relies on data from a single platform and cannot fully reflect users' music preferences. It also makes insufficient use of review information, resulting in recommendation results that cannot meet users' personalized needs and reduce user satisfaction.

Method used

By integrating users' historical searches and collection records on different music platforms, we construct a personality vector, use comment information to build a feature matrix, combine machine learning technology to analyze the matching probability between songs and user reviews, and determine the recommendation value by integrating multi-dimensional data.

Benefits of technology

Provide personalized, high-quality music recommendations to significantly improve user experience and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744167A_ABST
    Figure CN120744167A_ABST
Patent Text Reader

Abstract

The invention provides a music song recommendation system and method based on machine learning, and belongs to the technical field of intelligent recommendation, and the system comprises a personality vector construction module which is used for constructing historical personality vectors; the matching determination module is used for calling a comment information set of each song to be recommended from the information database, determining a feature matrix of the songs to be recommended to be matched with the historical personality vectors, and obtaining a song matching value of each column of vectors in the feature matrix; the probability analysis module is used for mining historical evaluations of users corresponding to each row of vectors in the feature matrix on different songs based on a machine learning technology to obtain an evaluation matching probability set; the final determination module is used for determining a final recommendation value of the song to be recommended according to the evaluation matching probability set and the song matching value; and the song recommendation module is used for forming a recommendation list and pushing the recommendation list to the user side of the user for display. Personalized and high-quality music recommendation is provided for the user, and the music experience of the user and the satisfaction degree of the recommendation service are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent recommendation technology, and in particular to a music song recommendation system and method based on machine learning. Background Art

[0002] In the field of music recommendation, as users' demand for personalized music services continues to increase, traditional recommendation technologies have gradually exposed their limitations, making it difficult to achieve accurate and efficient music recommendations. This is specifically reflected in the following aspects: Single data source: Most existing music recommendation systems rely solely on user behavior data such as playback and favorites from a single music platform, lacking the integration and utilization of users' historical search and favorite records across different music platforms. User behavior data on different platforms often varies, and data from a single platform cannot fully and accurately reflect a user's music preferences. This leads to biased user profiles and personality vectors, reducing the accuracy of recommendations. Insufficient utilization of review information: Although music reviews contain rich insights into user emotions, preferences, and understanding of songs, current systems handle this information in a simplistic manner. Some systems simply count reviews or extract a small number of keywords, failing to delve deeper into the semantic meaning of reviews or effectively integrate them with the characteristics of the songs themselves. This makes it difficult to accurately determine the degree of match between users and songs based on review information, wasting the potential value of review data. In summary, existing recommendation systems often only rely on single-dimensional data when determining the final recommended songs, such as the popularity of the song and the number of times the user has collected it, and lack comprehensive consideration of multi-dimensional data and comment information. This one-sided recommendation decision-making method results in the recommendation results being unable to fully meet the user's diverse and personalized music needs, reducing the user's satisfaction and usage experience with the recommendation service. Therefore, the present invention proposes a music song recommendation system and method based on machine learning. Summary of the Invention

[0003] The present invention provides a music song recommendation system and method based on machine learning to solve the above-mentioned technical problems.

[0004] The present invention provides a music song recommendation system based on machine learning, comprising: The personality vector construction module is used to crawl the user's historical search records and historical collection records from different music platforms to obtain the historical personality vector; A matching determination module is used to retrieve a comment information set of each song to be recommended from the information database, and determine a feature matrix of the song to be recommended to match it with the historical personality vector, and obtain a song matching value for each column vector in the feature matrix; A probability analysis module is used to mine the historical evaluations of different songs by users corresponding to each row vector in the feature matrix based on machine learning technology, and obtain a set of matching probabilities between the historical evaluations and the meaning conveyed by the corresponding songs themselves; A final determination module, configured to determine a final recommendation value of the song to be recommended based on the evaluation matching probability set and the song matching value; The song recommendation module is used to regard the songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values ​​as the final recommended songs, and to form a recommendation list, which is pushed to the user terminal for display.

[0005] Preferably, the personality vector construction module includes: The first definition unit is used to define the user's historical search record set on the music platform p ,in, represents the jth historical search record of the user on the music platform p, Contains search keywords and search timestamps , m represents the total number of historical search records; The second definition unit is used to define the user's historical collection record set on the music platform p ,in, represents the user's i-th historical collection record on the music platform p, Contains song ID, singer, music style label and collection timestamp ; n represents the total number of historical collection records; A feature determination unit configured to search the record set based on the historical search Determine the search feature set, and at the same time, based on the historical collection record set determining a set of musical features; a normalization unit, configured to perform normalization processing on the search feature set and the music feature set to obtain a plurality of normalized features, and assign a dynamic weight to each normalized feature; Vector construction unit, used to construct historical personality vectors based on normalized features and dynamic weights ,in, Represents the total number of normalized features; represents the dynamic weight of the k1th normalized feature; represents the k1th normalized feature.

[0006] Preferably, the normalization unit is used to:

[0007]

[0008] in, represents the dynamic weight of the k1th normalized feature; represents the collection enhancement factor of the k1th normalized feature; represents the time decay function of the k1th normalized feature; Indicates the present time; represents the potential occurrence time of the k1th normalized feature; represents the number of platforms involved in the k1th normalized feature; Indicates the total number of music platforms based on the user.

[0009] Preferably, the matching determination module includes: a matrix construction unit, configured to preprocess each comment in the comment information set to obtain a standardized text, and sequentially obtain a sentiment coefficient, a topic coefficient, and a time sensitivity based on a sentiment analysis model, a topic extraction model, and a time analysis function to obtain a feature matrix; The matching calculation unit is used to calculate the song matching value with the historical personality vector based on the mapping relationship between the comment dimension and the normalized feature.

[0010] Preferably, the probability analysis module includes: A first encoding unit is used to extract the core semantic elements of each historical evaluation and the melody of the evaluation song, and to perform semantic encoding on the core semantic elements to obtain a first code; A second encoding unit is used to extract the parsed semantic elements that convey the meaning of each song and the core melody of the song, and perform semantic encoding on the parsed semantic elements to obtain a second code; a first determining unit, configured to determine a first matching degree between the first code and the second code; A second determining unit is configured to perform cluster analysis on all evaluated song melodies under the same song, and determine a second matching degree between each cluster and the core melody of the song; A probability determination unit, configured to determine an evaluation matching probability Pr based on each cluster analysis result; A guidance analysis unit is used to input each cluster into the emotion guidance model to obtain guided emotions; The probability set determination unit is used to obtain an evaluation matching probability set according to the evaluation matching probability Pr of each cluster analysis result and the guided emotion.

[0011] Preferably, the probability determination unit is used to:

[0012] in, represents the evaluation matching probability of the rth cluster analysis result; Indicates the second matching degree of the rth cluster analysis result; represents the number of evaluations present in the rth cluster analysis result; Indicates the total number of reviews for the song to be recommended; Indicates the first matching degree of the g1th evaluation in the rth cluster analysis result.

[0013] Preferably, the final determination module includes: a probability updating unit, configured to weaken the probability of matching the evaluation with the guiding emotion according to the guiding emotion to obtain a new probability;

[0014] in, Indicates the corresponding new probability; Indicates the weakened emotion value based on the guided emotion; represents the emotion guidance threshold; The final determination unit is used to determine the final recommendation value of the song to be recommended according to the new probability and the song matching value.

[0015] Preferably, the song recommendation module includes: The list building unit is used to build a recommendation list by sorting the final recommendation value of each final recommended song.

[0016] The present invention provides a music song recommendation method based on machine learning, comprising: Step 1: Crawl the user's historical search records and historical collection records from different music platforms to obtain a historical personality vector; Step 2: Retrieve the comment information set of each song to be recommended from the information database, and determine the feature matrix of the song to be recommended to match it with the historical personality vector, and obtain the song matching value of each column vector in the feature matrix; Step 3: Based on machine learning technology, the historical evaluation of different songs by users corresponding to each row vector in the feature matrix is ​​mined to obtain a set of matching probabilities between the historical evaluation and the meaning conveyed by the corresponding song itself; Step 4: Determine the final recommendation value of the song to be recommended based on the evaluation matching probability set and the song matching value; Step 5: The songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values ​​are regarded as the final recommended songs, and a recommendation list is formed and pushed to the user terminal of the user for display.

[0017] Preferably, step 1 comprises: Define the user's historical search record set on the music platform p ,in, represents the jth historical search record of the user on the music platform p, Contains search keywords and search timestamps , m represents the total number of historical search records; Define the user's historical collection record set on the music platform p ,in, represents the user's i-th historical collection record on the music platform p, Contains song ID, singer, music style label and collection timestamp ; n represents the total number of historical collection records; Based on the historical search record set Determine the search feature set, and at the same time, based on the historical collection record set determining a set of musical features; Normalizing the search feature set and the music feature set to obtain a plurality of normalized features, and assigning a dynamic weight to each normalized feature; Construct historical personality vector based on normalized features and dynamic weights ,in, Represents the total number of normalized features; represents the dynamic weight of the k1th normalized feature; represents the k1th normalized feature.

[0018] Compared with the prior art, the present invention has the following advantages: By integrating users' historical searches and collections across various music platforms, we comprehensively capture their music preferences and generate accurate historical personality vectors. We leverage review information from the songs to be recommended to construct a feature matrix, deeply exploring the matching relationship between song features and user preferences. Machine learning techniques are then used to analyze the probability of matching historical reviews with song meanings, and multi-dimensional data is used to determine the final recommendation value. This provides users with personalized, high-quality music recommendations, significantly improving their music experience and satisfaction with the recommendation service.

[0019] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0020] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1This is a structural diagram of a music song recommendation system based on machine learning in an embodiment of the present invention; Figure 2 This is a flowchart of a music song recommendation method based on machine learning in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0023] The present invention provides a music song recommendation system based on machine learning. Figure 1 As shown, including: The personality vector construction module is used to crawl the user's historical search records and historical collection records from different music platforms to obtain the historical personality vector; A matching determination module is used to retrieve a comment information set of each song to be recommended from the information database, and determine a feature matrix of the song to be recommended to match it with the historical personality vector, and obtain a song matching value for each column vector in the feature matrix; A probability analysis module is used to mine the historical evaluations of different songs by users corresponding to each row vector in the feature matrix based on machine learning technology, and obtain a set of matching probabilities between the historical evaluations and the meaning conveyed by the corresponding songs themselves; A final determination module, configured to determine a final recommendation value of the song to be recommended based on the evaluation matching probability set and the song matching value; The song recommendation module is used to regard the songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values ​​as the final recommended songs, and to form a recommendation list, which is pushed to the user terminal for display.

[0024] Preferably, the song recommendation module includes: The list building unit is used to build a recommendation list by sorting the final recommendation value of each final recommended song.

[0025] In this embodiment, the music platform is software or a website that provides services such as music playback, search, and collection, such as NetEase Cloud Music, QQ Music, and Kugou Music.

[0026] In this embodiment, the historical search record set is a collection of all keywords and related information that a user has searched for on a music platform in the past. Legal and compliant web crawler technology, such as the Python-based Scrapy framework, is used to develop a crawler program based on the API interface specifications or web page structure of each music platform. For example, if a user searches for keywords such as "blue and white porcelain" and "popular song charts" on NetEase Cloud Music, these search records constitute their historical search record set on the platform.

[0027] In this embodiment, the historical collection record set is a collection of all music works (such as songs, playlists, etc.) that a user has collected on the music platform. For example, if a user has collected songs such as "Rice Fragrance" and "Qilixiang" on QQ Music, as well as a playlist of "Classic Chinese Love Songs," these collections constitute their historical collection record set.

[0028] In this embodiment, the historical personality vector is a multidimensional vector that can reflect the user's music preference, which is generated by analyzing and processing the user's historical search record sets and historical collection record sets on different music platforms.

[0029] In this embodiment, the information database is a database system that stores music-related data (such as song information, comment information, etc.).

[0030] Songs to be recommended: Every song in the collection of all songs that the system considers recommending to users, such as songs newly launched on the platform, popular songs, etc. The comment information set is a collection of all user comment content, comment time, commenter information, etc. corresponding to each song to be recommended in the information database.

[0031] Song matching value: The value obtained by matching each column vector in the feature matrix with the user's historical personality vector. It is used to measure the degree of match between a certain feature of the recommended song and the user's music preference. Historical reviews are feedback information such as comments and ratings that users have made on different songs in the past.

[0032] The meaning conveyed by a song itself refers to the emotions, themes, and ideas it conveys through its lyrics, melody, and arrangement. For example, the song "The Brightest Star in the Night Sky" encourages people to hold on to their dreams. The evaluation matching probability set is a set consisting of the matching probability between the historical evaluation of each song to be recommended and the meaning conveyed by the song itself. In this embodiment, the final recommendation value is a value obtained by a specific calculation method based on a comprehensive consideration of the evaluation matching probability and song matching value of each song to be recommended, and is used to measure whether the song is suitable for recommendation to the user. The preset recommendation value is a threshold value pre-set by the system and is used to determine whether the song to be recommended is suitable for recommendation to the user. For example, the preset recommendation value is 0.6. The final recommended songs are the songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values. These songs are considered to have a high degree of match with the user's music preferences. The recommendation list is a list of the final recommended songs, arranged in a certain order (such as the final recommendation value from high to low). The user end is the device or application through which the user receives recommended songs, such as the music app on the mobile phone, the music software on the computer, etc. The beneficial effects of this technical solution are as follows: by integrating users' historical searches and collection records across different music platforms, we can comprehensively capture their music preferences and generate an accurate historical personality vector; we use the review information of the songs to be recommended to construct a feature matrix, deeply exploring the matching relationship between song features and user preferences; and we use machine learning technology to analyze the probability of matching historical reviews with the meaning of the songs, and comprehensively integrate multi-dimensional data to determine the final recommendation value. This provides users with personalized, high-quality music recommendations, significantly improving their music experience and satisfaction with the recommendation service.

[0033] The present invention provides a music song recommendation system based on machine learning, wherein the personality vector construction module includes: The first definition unit is used to define the user's historical search record set on the music platform p ,in, represents the jth historical search record of the user on the music platform p, Contains search keywords and search timestamps , m represents the total number of historical search records; The second definition unit is used to define the user's historical collection record set on the music platform p ,in, represents the user's i-th historical collection record on the music platform p, Contains song ID, singer, music style label and collection timestamp ; n represents the total number of historical collection records; A feature determination unit configured to search the record set based on the historical search Determine the search feature set, and at the same time, based on the historical collection record set determining a set of musical features; a normalization unit, configured to perform normalization processing on the search feature set and the music feature set to obtain a plurality of normalized features, and assign a dynamic weight to each normalized feature; Vector construction unit, used to construct historical personality vectors based on normalized features and dynamic weights ,in, Represents the total number of normalized features; represents the dynamic weight of the k1th normalized feature; represents the k1th normalized feature.

[0034] Preferably, the normalization unit is used to:

[0035]

[0036] in, represents the dynamic weight of the k1th normalized feature; represents the collection enhancement factor of the k1th normalized feature; represents the time decay function of the k1th normalized feature; Indicates the present time; represents the potential occurrence time of the k1th normalized feature; represents the number of platforms involved in the k1th normalized feature; Indicates the total number of music platforms based on the user.

[0037] In this embodiment, the search keyword is the search content input by the user, such as "new song of a certain singer" and "Chinese pop golden song", which reflects the user's active need to explore music.

[0038] Search timestamp Record the specific time when the search behavior occurs for subsequent calculation of "time decay". Recent search behavior usually has a greater impact on user preferences.

[0039] In this embodiment, the music style label is a classification annotation of the style of a song or playlist, such as "pop", "folk", and "pure music", which can be generated by platform algorithms or manual annotation to reflect the style attributes of the song.

[0040] Collection timestamp Record the specific time when the collection behavior occurs for subsequent calculation of "time decay". Songs collected recently usually better reflect the user's current preferences.

[0041] In this embodiment, search feature extraction: keyword extraction: use NLP algorithms (such as TF-IDF, TextRank) to analyze the search keyword text and extract high-frequency, high-weight keywords.

[0042] Time feature extraction: Statistically analyze the distribution patterns of search timestamps (such as recent search frequency and time period preference) to generate time dimension features.

[0043] Music feature extraction: Singer / style statistics: Perform word frequency statistics on singer and style tags in the collection records and extract the top N singers and styles.

[0044] Time series analysis: Use time series algorithms (such as ARIMA) to analyze favorite timestamps and explore trends in preferences over time (e.g., "Summer preference for pure music").

[0045] In this embodiment, It is the cross-platform scarcity factor.

[0046] In this embodiment, the feature encoding converts text features (such as singer names and style tags) into numerical vectors through a word embedding model (such as Word2Vec or BERT), ensuring that the features can participate in mathematical calculations.

[0047] The beneficial effects of the above technical solution are as follows: integrating multi-source behavioral data with dynamic weights to accurately depict the stability, dynamics, and uniqueness of users' music preferences, providing a solid user profile foundation for subsequent recommendation systems.

[0048] The present invention provides a music song recommendation system based on machine learning. The matching determination module includes: A matrix construction unit for preprocessing each comment in the comment information set to obtain a standardized text, and successively obtaining an emotion coefficient, a theme coefficient, and a time sensitivity based on a sentiment analysis model, a theme extraction model, and a time analysis function to obtain a feature matrix; A matching calculation unit for calculating the song matching value with the historical personality vector according to the mapping relationship between the comment dimension and the normalized feature.

[0049] In this embodiment, the comment information set is a set composed of all user comments on the song to be recommended. For example, the comment information set R = {r1, r2, r3} of the song "Fighting Alone", where: The comment of user r1: "It made me cry! The lyrics really hit the heart of the wage earners. I want to listen every time I work overtime" (user A, 2025-06-01 10:00).

[0050] The comment of user r2: "The melody is average, but the lyrics are powerful. Give it four stars" (user B, 2025-06-03 15:30).

[0051] The comment of user r3: "Who understands! This song is getting more and more addictive. I'm on loop" (user C, 2025-06-05 20:15).

[0052] Each comment is a single comment in the set, such as r1 and r2, containing information such as text content, user, and timestamp.

[0053] Preprocessing is an operation to clean and standardize the comment text, removing noise data and unifying the format. Word segmentation is to use an NLP tool (such as jieba) to split it into words → ["Listened to tears", "Lyrics", "Too", "Hit", "Wage earners", "Heart", "Every time", "Overtime", "Want to listen"].

[0054] Stop word filtering is to delete meaningless words ("了", "的", "都") → ["Listened to tears", "Lyrics", "Too", "Hit", "Wage earners", "Heart", "Every time", "Overtime", "Want to listen"].

[0055] Part-of-speech tagging / normalization is to unify the lexical forms (e.g., "being moved to tears while listening" → "being moved to tears while listening", "worker" → "worker"), and finally obtain the standardized text: "being moved to tears while listening, lyrics, too, hitting home, worker, inner voice, every time, working overtime, wanting to listen".

[0056] In this embodiment, the sentiment analysis model is an algorithm model for judging the sentiment tendency (positive, neutral, negative) of the text, such as the BERT-sentiment classification model. For example, when the input is: "being moved to tears while listening, lyrics, too, hitting home, worker, inner voice, every time, working overtime, wanting to listen", at this time, the sentiment tendency judged by the output model is "positive", and the emotion coefficient e1 = 0.8 (strongly positive) In this embodiment, the topic extraction model is an algorithm for mining the potential topics of the text, such as the LDA (latent Dirichlet allocation) topic model. The topic coefficient is a numerical value quantifying the association strength between the comment and a certain topic, usually in the range of [0, 1] (the higher the value, the stronger the association).

[0057] In this embodiment, the time analysis function is a function for measuring the distance between the comment time and the current time.

[0058] In this embodiment, the construction of the feature matrix is to integrate the emotion coefficient, topic coefficient, and time sensitivity of each comment into a matrix, with the rows being comments and the columns being feature dimensions.

[0059] In this embodiment, the normalized features are the features in the historical personality vector (such as "singer preference", "style preference", etc.), which have been processed by normalization and carry dynamic weights.

[0060] The mapping relationship is the association rule between comment dimensions (such as "positive emotion") and the corresponding features in the historical personality vector (such as "the user prefers positive emotion songs"), usually established through cosine similarity or a pre-trained model. <00神仙道0268>The beneficial effects of the above technical solutions are: extracting three-dimensional features of emotion (user emotional feedback), topic (core connotation of the song), and time (freshness of the comment) from the text content, solving the shallowness problem of traditional recommendations, and deeply associating the user's feedback on the song with the user's long-term preferences through the mapping between the comment feature matrix and the historical personality vector, thereby improving the dynamics and accuracy of the recommendation.

[0062] The present invention provides a music song recommendation system based on machine learning. The probability analysis module includes: A first encoding unit for extracting the core semantic elements of each historical evaluation and evaluating the song melody, and performing semantic encoding on the core semantic elements to obtain a first encoding; A second encoding unit is used to extract the parsed semantic elements that convey the meaning of each song and the core melody of the song, and perform semantic encoding on the parsed semantic elements to obtain a second code; a first determining unit, configured to determine a first matching degree between the first code and the second code; A second determining unit is configured to perform cluster analysis on all evaluated song melodies under the same song, and determine a second matching degree between each cluster and the core melody of the song; A probability determination unit, configured to determine an evaluation matching probability Pr based on each cluster analysis result; A guidance analysis unit is used to input each cluster into the emotion guidance model to obtain guided emotions; The probability set determination unit is used to obtain an evaluation matching probability set according to the evaluation matching probability Pr of each cluster analysis result and the guided emotion.

[0063] Preferably, the probability determination unit is used to:

[0064] in, represents the evaluation matching probability of the rth cluster analysis result; Indicates the second matching degree of the rth cluster analysis result; represents the number of evaluations present in the rth cluster analysis result; Indicates the total number of reviews for the song to be recommended; Indicates the first matching degree of the g1th evaluation in the rth cluster analysis result.

[0065] In this embodiment, the core semantic elements are key semantic information extracted from the review text, reflecting the core meaning of the evaluation. For example, the core semantic elements = ["wanderer", "lonely", "catchy melody"] (extracted through the NLP algorithm, focusing on the core emotions and themes of the evaluation).

[0066] The melody of a song is evaluated based on the melody features described in user reviews, such as text descriptions such as "catchy melody", "light rhythm", and "brainwashing chorus", or melody features extracted through audio analysis (such as pitch sequence and rhythm pattern).

[0067] Semantic encoding is the process of converting the core semantic elements of text into numerical vectors (for ease of mathematical calculation), such as encoding through models such as Word2Vec and BERT.

[0068] The first encoding is the numerical vector after encoding the core semantic elements. For example, using the BERT model to encode "The lonely melody of the wanderer is catchy", we get a 768-dimensional vector E1=[0.12,0.34,-0.56,...] (the dimension value is for example and is actually output by the model).

[0069] In this embodiment, text description extraction is to match melody-related descriptions (such as "melody.", "rhythm.") using regular expressions.

[0070] Audio feature extraction involves calling an audio processing library (such as Librosa) to extract melodic features (such as MFCC and pitch sequences) from song audio files. If the review is associated with the audio (such as a user comment corresponding to a song clip), it can be directly obtained.

[0071] Semantic encoding is to load a pre-trained BERT model (such as Chinese BERT-wwm), input the core semantic element text into the model, and output the sentence vector as the first encoding.

[0072] In this embodiment, the meaning transmitted by the song itself is the core idea, emotion, and theme conveyed by the song through lyrics, melody, arrangement, etc. For example, "Floating to the North" conveys "the loneliness and struggle of a wandering wanderer."

[0073] Parsed semantic elements are the structured analysis results of the meaning conveyed by the song and are the core semantic description of the song itself. For example, parsed semantic elements = [“wanderer”, “loneliness”, “struggle”, “urban wandering”] (through lyrics analysis, professional music reviews, and topic model mining).

[0074] The core melody of a song is the most representative melodic segment (such as the chorus or classic riff), and its features are extracted through audio analysis. The second encoding is the numerical vector obtained by parsing the semantic elements. This vector aligns with the first encoding dimension (for ease of matching calculations). For example, using the same BERT model to encode the phrase "A wanderer struggling alone in the city" yields the vector E2 = [0.15, 0.31, -0.52, ...].

[0075] In this embodiment, the first matching degree is calculated using a cosine similarity function.

[0076] In this embodiment, all evaluated song melodies under the same song are melody descriptions mentioned in all user evaluations of the song, or a set of melody features extracted through audio analysis.

[0077] Cluster analysis uses clustering algorithms (such as K-Means) to group similar melodic features into one category (cluster). For example, after K-Means clustering, three melodic features are clustered into two clusters: Cluster 1: {M1, M3} (focused on “exciting / brainwashing chorus”).

[0078] Cluster 2: {M2} (focusing on “soothing verse + explosive chorus”).

[0079] The cluster is each category obtained after clustering, representing a class of similar melody evaluations.

[0080] In this embodiment, the second matching degree is calculated using a cosine similarity function.

[0081] In this embodiment, the emotion guidance model is a model that predicts what kind of emotion a melody segment or semantic content can trigger, such as a neural network based on emotion classification.

[0082] The guided emotion is the emotion that the model predicts may be triggered by the melody / semantics of the cluster, such as "excited", "sad", and "healing". For example, the melody feature vector Mcluster1 of cluster 1 is input to the emotion guidance model, and the output guided emotion = "excited".

[0083] The beneficial effects of the above technical solution are: through the dual-dimensional matching of semantics and melody, the semantic understanding and melody perception of user evaluations are simultaneously mined, solving the problem that traditional recommendations only look at text keywords or a single dimension, predicting the emotions caused by the melody through the emotion guidance model, combining the probability value with the emotion label, and providing richer decision-making basis for recommendation. By clustering the evaluation melodies of the same song, the consensus feedback of users on the melody is discovered, thereby improving the group resonance of the recommendation.

[0084] The present invention provides a music song recommendation system based on machine learning, wherein the final determination module includes: a probability updating unit, configured to weaken the probability of matching the evaluation with the guiding emotion according to the guiding emotion to obtain a new probability;

[0085] in, Indicates the corresponding new probability; Indicates the weakened emotion value based on the guided emotion; represents the emotion guidance threshold; The final determination unit is used to determine the final recommendation value of the song to be recommended according to the new probability and the song matching value.

[0086] In this embodiment, the weakening process is to reduce the matching probability of evaluations that do not match the target guiding emotion according to the guiding emotion, so that the recommendation is more in line with the emotional guidance direction expected by the system.

[0087] The weakened emotion value E1 is a numerical value that quantifies the difference between the guiding emotion and the current evaluation emotion, and the range is usually [0,1].

[0088] In this embodiment, the emotion guidance threshold It is a hyperparameter that controls the weakening amplitude, usually set manually (such as =0.2), the larger the value, the higher the sensitivity of the weakening to E1.

[0089] The beneficial effect of the above technical solution is: by weakening the emotion value E1 and the emotion guidance threshold , accurately adjust the matching probability of evaluations that do not match the target emotion, and integrate the historical personality vector matching value (user's long-term preference) and the new probability after emotion guidance (current scenario requirements), so that the recommendation fits the user's past preferences and current emotional goals.

[0090] The present invention provides a music song recommendation method based on machine learning. Figure 2 Shown, including: Step 1: Crawl the user's historical search records and historical collection records from different music platforms to obtain a historical personality vector; Step 2: Retrieve the comment information set of each song to be recommended from the information database, and determine the feature matrix of the song to be recommended to match it with the historical personality vector, and obtain the song matching value of each column vector in the feature matrix; Step 3: Based on machine learning technology, the historical evaluation of different songs by users corresponding to each row vector in the feature matrix is ​​mined to obtain a set of matching probabilities between the historical evaluation and the meaning conveyed by the corresponding song itself; Step 4: Determine the final recommendation value of the song to be recommended based on the evaluation matching probability set and the song matching value; Step 5: The songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values ​​are regarded as the final recommended songs, and a recommendation list is formed and pushed to the user terminal of the user for display.

[0091] Preferably, step 1 comprises: Define the user's historical search record set on the music platform p ,in, represents the jth historical search record of the user on the music platform p, Contains search keywords and search timestamps , m represents the total number of historical search records; Define the user's historical collection record set on the music platform p ,in, represents the user's i-th historical collection record on the music platform p, Contains song ID, singer, music style label and collection timestamp ; n represents the total number of historical collection records; Based on the historical search record set Determine the search feature set, and at the same time, based on the historical collection record set determining a set of musical features; Normalizing the search feature set and the music feature set to obtain a plurality of normalized features, and assigning a dynamic weight to each normalized feature; Construct historical personality vector based on normalized features and dynamic weights ,in, Represents the total number of normalized features; represents the dynamic weight of the k1th normalized feature; represents the k1th normalized feature.

[0092] The beneficial effects of this technical solution are as follows: by integrating users' historical searches and collection records across different music platforms, users' music preferences are comprehensively captured and an accurate historical personality vector is generated; comment information on the songs to be recommended is used to construct a feature matrix, which deeply explores the matching relationship between song features and user preferences; and machine learning techniques are used to analyze the probability of matching historical reviews with song meanings, integrating multi-dimensional data to determine the final recommendation value. This provides users with personalized, high-quality music recommendations, significantly improving their music experience and satisfaction with the recommendation service.

[0093] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A music song recommendation system based on machine learning, characterized in that: include: The personality vector construction module is used to crawl the user's historical search records and historical collection records from different music platforms to obtain the historical personality vector; A matching determination module is used to retrieve a comment information set of each song to be recommended from the information database, and determine a feature matrix of the song to be recommended to match it with the historical personality vector, and obtain a song matching value for each column vector in the feature matrix; A probability analysis module is used to mine the historical evaluations of different songs by users corresponding to each row vector in the feature matrix based on machine learning technology, and obtain a set of matching probabilities between the historical evaluations and the meaning conveyed by the corresponding songs themselves; A final determination module, configured to determine a final recommendation value of the song to be recommended based on the evaluation matching probability set and the song matching value; The song recommendation module is used to regard the songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values ​​as the final recommended songs, and to form a recommendation list, which is pushed to the user terminal for display.

2. The music song recommendation system based on machine learning according to claim 1 is characterized in that: The personality vector building module includes: The first definition unit is used to define the user's historical search record set on the music platform p ,in, represents the jth historical search record of the user on the music platform p, Contains search keywords and search timestamps , m represents the total number of historical search records; The second definition unit is used to define the user's historical collection record set on the music platform p ,in, represents the user's i-th historical collection record on the music platform p, Contains song ID, singer, music style label and collection timestamp ; n represents the total number of historical collection records; A feature determination unit configured to search the record set based on the historical search Determine the search feature set, and at the same time, based on the historical collection record set determining a set of musical features; a normalization unit, configured to perform normalization processing on the search feature set and the music feature set to obtain a plurality of normalized features, and assign a dynamic weight to each normalized feature; Vector construction unit, used to construct historical personality vectors based on normalized features and dynamic weights ,in, Represents the total number of normalized features; represents the dynamic weight of the k1th normalized feature; represents the k1th normalized feature.

3. The music song recommendation system based on machine learning according to claim 2 is characterized in that: The normalization unit is used to: in, represents the dynamic weight of the k1th normalized feature; represents the collection enhancement factor of the k1th normalized feature; represents the time decay function of the k1th normalized feature; Indicates the present time; represents the potential occurrence time of the k1th normalized feature; represents the number of platforms involved in the k1th normalized feature; Indicates the total number of music platforms based on the user.

4. The music song recommendation system based on machine learning according to claim 1, characterized in that: The matching determination module includes: a matrix construction unit, configured to preprocess each comment in the comment information set to obtain a standardized text, and sequentially obtain a sentiment coefficient, a topic coefficient, and a time sensitivity based on a sentiment analysis model, a topic extraction model, and a time analysis function to obtain a feature matrix; The matching calculation unit is used to calculate the song matching value with the historical personality vector based on the mapping relationship between the comment dimension and the normalized feature.

5. The music song recommendation system based on machine learning according to claim 1 is characterized in that: The probability analysis module includes: A first encoding unit is used to extract the core semantic elements of each historical evaluation and the melody of the evaluation song, and to perform semantic encoding on the core semantic elements to obtain a first code; A second encoding unit is used to extract the parsed semantic elements that convey the meaning of each song and the core melody of the song, and perform semantic encoding on the parsed semantic elements to obtain a second code; a first determining unit, configured to determine a first matching degree between the first code and the second code; A second determining unit is configured to perform cluster analysis on all evaluated song melodies under the same song, and determine a second matching degree between each cluster and the core melody of the song; A probability determination unit, configured to determine an evaluation matching probability Pr based on each cluster analysis result; A guidance analysis unit is used to input each cluster into the emotion guidance model to obtain guided emotions; The probability set determination unit is used to obtain an evaluation matching probability set according to the evaluation matching probability Pr of each cluster analysis result and the guided emotion.

6. The music song recommendation system based on machine learning according to claim 5 is characterized in that: The probability determination unit is configured to: in, represents the evaluation matching probability of the rth cluster analysis result; Indicates the second matching degree of the rth cluster analysis result; represents the number of evaluations present in the rth cluster analysis result; Indicates the total number of reviews for the song to be recommended; Indicates the first matching degree of the g1th evaluation in the rth cluster analysis result.

7. The music song recommendation system based on machine learning according to claim 5 is characterized in that: The final determination module includes: a probability updating unit, configured to weaken the probability of matching the evaluation with the guiding emotion according to the guiding emotion to obtain a new probability; in, Indicates the corresponding new probability; Indicates the weakened emotion value based on the guided emotion; represents the emotion guidance threshold; The final determination unit is used to determine the final recommendation value of the song to be recommended according to the new probability and the song matching value.

8. The music song recommendation system based on machine learning according to claim 1 is characterized in that: The song recommendation module includes: The list building unit is used to build a recommendation list by sorting the final recommendation value of each final recommended song.

9. A music song recommendation method based on machine learning, characterized in that: include: Step 1: Crawl the user's historical search records and historical collection records from different music platforms to obtain a historical personality vector; Step 2: Retrieve the comment information set of each song to be recommended from the information database, and determine the feature matrix of the song to be recommended to match it with the historical personality vector, and obtain the song matching value of each column vector in the feature matrix; Step 3: Based on machine learning technology, the historical evaluation of different songs by users corresponding to each row vector in the feature matrix is ​​mined to obtain a set of matching probabilities between the historical evaluation and the meaning conveyed by the corresponding song itself; Step 4: Determine the final recommendation value of the song to be recommended based on the evaluation matching probability set and the song matching value; Step 5: The songs to be recommended whose final recommendation values ​​are greater than the preset recommendation values ​​are regarded as the final recommended songs, and a recommendation list is formed and pushed to the user terminal of the user for display.

10. The music song recommendation method based on machine learning according to claim 9, characterized in that: Step 1 includes: Define the user's historical search record set on the music platform p ,in, represents the jth historical search record of the user on the music platform p, Contains search keywords and search timestamps , m represents the total number of historical search records; Define the user's historical collection record set on the music platform p ,in, represents the user's i-th historical collection record on the music platform p, Contains song ID, singer, music style label and collection timestamp ; n represents the total number of historical collection records; Based on the historical search record set Determine the search feature set, and at the same time, based on the historical collection record set determining a set of musical features; Normalizing the search feature set and the music feature set to obtain a plurality of normalized features, and assigning a dynamic weight to each normalized feature; Construct historical personality vector based on normalized features and dynamic weights ,in, Represents the total number of normalized features; represents the dynamic weight of the k1th normalized feature; represents the k1th normalized feature.