Multi-source data intelligent music recommendation method and system, storage medium and equipment
By constructing music knowledge graphs and introducing context perception technology, the existing music recommendation systems faced by data fragmentation and lack of deep music knowledge understanding of recommendation algorithms, more personalized and accurate music recommendations are achieved, breaking the traditional system limitation.
Patent Information
- Application Number
- CN202411674173.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-07
AI Technical Summary
The existing music recommendation system faces problems such as data fragmentation, lack of deep music knowledge understanding of recommendation algorithms, limited user situation perception ability, difficulty in cold start, and copyright barriers, making it difficult for users to obtain an ideal music experience.
By building a comprehensive music knowledge graph, cross-platform data integration is realized, context-aware technology is introduced, multi-source music data is collected for fusion processing, user portraits are built, and personalized recommendations are made through weighted fusion of various recommendation algorithms.
It improves the personalization and accuracy of music recommendations, solves the recommendation problems of new users and niche music, breaks the limitations of traditional music recommendation systems, and provides more accurate data analysis tools.
Smart Images

Figure CN119397104A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of music recommendation, and in particular to a multi-source data intelligent music recommendation method, system, storage medium and device. Background Art
[0002] With the continuous development and application of digital multimedia technology, digital music has been appreciated and loved by the public. People can easily obtain music resources through online listening, online downloading and other methods. However, as the music library becomes larger and larger, and the music resources become more and more abundant, how to enable users to efficiently obtain the songs they are interested in in the vast world of music has become a difficult problem. In response to this phenomenon, various music recommendation systems have emerged.
[0003] At present, mainstream music recommendation systems face multiple challenges. First, data fragmentation is serious. Each music platform operates independently, and user data is scattered in different services, making it difficult to form a unified user portrait. Second, existing recommendation algorithms are mostly based on simple collaborative filtering or content feature matching, lacking an understanding of deep music knowledge such as music creation, style evolution, and artist relationships, resulting in superficial recommendation results. Third, the system has limited perception of the user's current situation and cannot dynamically adjust the recommendation strategy according to the user's real-time status and needs. In addition, for new users or niche music, due to the lack of sufficient user behavior data, the existing system often falls into the "cold start" dilemma. Finally, with the increasing complexity of music copyright, cross-platform recommendations are often hindered by copyright barriers. These problems seriously restrict the possibility of users obtaining an ideal music experience, and a new solution is urgently needed. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings of the above-mentioned prior art and to provide a multi-source data intelligent music recommendation method, system, storage medium and device, which comprehensively improves the personalization and accuracy of music recommendations by constructing a comprehensive music knowledge graph, realizing cross-platform data integration, introducing context-aware technology and other innovative means.
[0005] On the one hand, a multi-source data intelligent music recommendation method is provided, comprising: Collecting multi-source music data, and performing fusion processing on the collected multi-source music data, wherein the fusion processing includes data standardization and data quality control; Construct a music knowledge graph, including: Identify music-related entities and their relationships in the fused data, construct a music domain ontology, and perform reasoning on music knowledge; Build user portraits, including: Extract users’ explicit features, build users’ implicit behavior models, mine time series patterns, and integrate cross-platform data; Personalized recommendations are made through context awareness and weighted fusion of multiple recommendation algorithms, including: Extract user context features, identify user emotional states, and adjust recommendation strategies in real time based on changes in user emotions and contexts; Integrate collaborative filtering recommendation algorithm, content-based recommendation algorithm, and music knowledge graph enhanced recommendation algorithm for music recommendation.
[0006] Furthermore, the collecting of multi-source music data specifically includes: Obtain music-related data from online music platforms and music metadata providers through API interfaces; Get local music metadata by scanning local music files.
[0007] Furthermore, in the fusion process, The data standardization process specifically includes: Build a unified data model, including representations of music entities and relationships; Transform multi-source data into a unified format through ETL pipelines; The data quality control process specifically includes: De-duplication and merging of cross-source data is performed through the locality-sensitive hashing algorithm; Outliers are detected and processed through clustering algorithms, and missing values are processed by building training models based on rules and machine learning algorithms.
[0008] Furthermore, the identifying of music-related entities and their relationships in the fused data further includes: Identify music-related entities and the relationships between them from unstructured text using named entity recognition tools; The relationships between music entities, including cooperation, influence and subordination, are identified through relationship extraction algorithms.
[0009] Preferably, the construction of the music domain ontology further comprises: Establish a namespace to uniquely identify classes, attributes, and individuals in the ontology, and define the core concepts in the music field and their attributes and relationships; Implement a semi-automatic ontology expansion mechanism.
[0010] Preferably, the semi-automatic ontology expansion mechanism includes: S201: extracting newly added music information and performing comparative analysis with the existing music ontology structure; S202: Automatically generate ontology expansion suggestions based on the results of information extraction and analysis; S203: Manually review the automatically generated expansion suggestions, and dynamically update the music domain ontology according to the expansion suggestions that have passed the manual review.
[0011] Furthermore, the reasoning of the music knowledge specifically includes: A rule-based reasoning engine deduces artist influence relationships and style evolution; Complex high-order relationships are captured through a multi-hop propagation mechanism based on graph neural networks.
[0012] Furthermore, the constructing of the user portrait further includes: S31: Collect basic user information and analyze user music preference information; S32: Tracking the user's music playing behavior, including the number of plays, jump rate and complete listening rate, and analyzing the user's social behavior, including sharing, commenting and collecting; S33: Capture the evolution trend of users’ music tastes through time series analysis technology and identify users’ listening preferences in different time periods; S34: Integrate cross-platform user behavior data through user identity mapping algorithm.
[0013] Furthermore, the personalized recommendation through context awareness further includes: S41: Collect user device information and usage scenarios, and integrate external data sources to obtain user context information; S42: Analyze the user's operation behavior and the biosensor data of the smart device to infer the user's emotional state; S43: The scene transition detection algorithm is used to timely capture changes in user context and emotions, and the recommendation strategy is adjusted in real time through dynamic scene adaptation of the Markov decision process.
[0014] Furthermore, the personalized recommendation by weighted fusion of multiple recommendation algorithms further includes: S51: Obtain similar user groups and music works through user-based and item-based collaborative filtering; S52: Extract the acoustic and semantic features of music and perform similarity music recommendation; S53: Perform relationship-based recommendations through music knowledge graphs, and mine semantic associations between user interests and potential recommendation items through path mining algorithms; S54: Adopt a weighted fusion mechanism to integrate the recommended strategies in steps S51 to S53, and dynamically adjust the weights of each strategy.
[0015] Preferably, the method further includes a cold start process, specifically comprising: Build an initial user profile through interest questionnaires to implement an initial content-based recommendation strategy; Analyze the metadata and acoustic features of new music to match it with known music, and predict the potential audience of the new music based on the artist's historical data and social network influence; Set novelty and diversity metrics to balance the recommended content.
[0016] Preferably, the method further includes evaluation and optimization of the recommendation system, specifically including: S100: Setting recommendation system evaluation indicators and an A / B testing framework, wherein the recommendation system evaluation indicators include accuracy, recall, and ranking quality NDCG, and the A / B testing framework is used to compare the performance of different algorithms; S200: Establish a user feedback collection mechanism including explicit and implicit feedback, and track changes in key indicators through real-time performance monitoring; S300: Setting an incremental update mechanism to achieve online learning and incremental update of the system model.
[0017] On the other hand, a multi-source data intelligent music recommendation system is provided, comprising: A multi-source data collection and fusion module is used to collect multi-source music data and perform fusion processing on the collected multi-source music data, wherein the fusion processing includes data standardization and data quality control; Music knowledge graph construction module, used to construct music knowledge graph, including: Identify music-related entities and their relationships in the fused data, construct a music domain ontology, and perform reasoning on music knowledge; User portrait building module, used to build user portraits, including: Extract users’ explicit features, build users’ implicit behavior models, mine time series patterns, and integrate cross-platform data; The personalized recommendation module includes a context perception unit and a recommendation algorithm fusion unit, where: The context perception unit is used to extract user situational features, identify user emotional states, and adjust recommendation strategies in real time according to changes in user emotions and situations; The recommendation algorithm fusion unit is used to integrate collaborative filtering recommendation algorithm, content-based recommendation algorithm, and music knowledge graph enhanced recommendation algorithm for music recommendation.
[0018] In addition, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the multi-source data intelligent music recommendation method described in any one of the above items is implemented.
[0019] At the same time, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any of the multi-source data intelligent music recommendation methods described above.
[0020] Compared with the prior art, the present invention has the following beneficial effects: The present invention innovatively constructs a comprehensive music knowledge graph, integrating commercial metadata, crowdsourcing data, and expert audience data, and achieves comprehensive modeling of complex relationships between music entities; The present invention dynamically captures the user's listening scene and emotional state by introducing advanced context-aware technology; The present invention effectively solves the problem of recommending new users and niche music by setting a cold start strategy based on multi-dimensional features; The present invention breaks the limitations of traditional music recommendation systems by seamlessly integrating cross-platform data. 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 1 This is a flow chart of a multi-source data intelligent music recommendation method of the present invention; Figure 2 This is a flow chart of a multi-source music data fusion processing method of the present invention; Figure 3 A schematic diagram of a process for defining a music domain ontology according to the present invention; Figure 4 A flow chart of a method for implementing a semi-automatic ontology expansion mechanism of the present invention; Figure 5 This is a flow chart of a method for constructing a user portrait according to the present invention; Figure 6 A schematic diagram of a process of timely capturing user emotions and situations through context perception in the present invention; Figure 7 This is a flow chart of a personalized recommendation method of the present invention; Figure 8 This is a flow chart of an evaluation and optimization method of the present invention; Fig. 9 This is a structural block diagram of a multi-source data intelligent music recommendation system of the present invention; Fig.10 The figure is a schematic diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] Through a comprehensive music knowledge graph, the system of the present invention can deeply understand the user's music taste and make recommendations more accurate and diversified; context-aware technology enables recommendation results to adapt to the user's mood and scene requirements in real time; cross-platform data integration allows users to enjoy comprehensive music services in a unified interface; for the music industry, this system provides more accurate data analysis tools to help discover emerging artists and potential markets.
[0024] The specific implementation of the present invention is described below with reference to the accompanying drawings and embodiments.
[0025] This embodiment provides a technical solution for a multi-source data intelligent music recommendation method, such as Figure 1 As shown, including: S1: Collect multi-source music data, and perform fusion processing on the collected multi-source music data, wherein the fusion processing includes data standardization and data quality control; S2: Construct a music knowledge graph, including: Identify music-related entities and their relationships in the fused data, construct a music domain ontology, and perform reasoning on music knowledge; S3: Build user profiles, including: Extract users’ explicit features, build users’ implicit behavior models, mine time series patterns, and integrate cross-platform data; S4: Personalized recommendations through context awareness and weighted fusion of multiple recommendation algorithms, including: Extract user context features, identify user emotional states, and adjust recommendation strategies in real time based on changes in user emotions and contexts; Integrate collaborative filtering recommendation algorithm, content-based recommendation algorithm, and music knowledge graph enhanced recommendation algorithm for music recommendation.
[0026] Wherein, in step S1, the collecting of multi-source music data specifically includes: Obtain music-related data from online music platforms and music metadata providers through API interfaces; Get local music metadata by scanning local music files.
[0027] Specifically, in this embodiment, we access the API provided by the music streaming platform and the music metadata provider through a key to access the database, send an HTTP request to call the API according to the interface and request method provided by the API document, and obtain music-related data; By defining a local music scanning function to scan and obtain local music files, the local music scanning function supports the identification and acquisition of multiple audio formats. The function receives the local folder path as a parameter, traverses all the files in the folder and its subfolders, and determines whether it is a supported audio format based on the extension of each file. If so, the file path is added to the audio list, and its metadata is read. The metadata and the file path are stored together in a dictionary form, and finally the entire audio list is returned.
[0028] Realize API access to mainstream music streaming platforms (such as Spotify, Apple Music, Amazon Music, etc.), access to music metadata providers (such as MusicBrainz, Discogs, etc.), and obtain data feeds.
[0029] Take Spotify API access as an example, use OAuth 2.0 protocol for authorization, and obtain user play history, favorite playlists and other data through REST API. API call example: GET https: / / api.spotify.com / v1 / me / player / recently-played Authorization: Bearer {access_token}.
[0030] In addition, a local music file scanning module is developed to support multiple audio formats (such as MP3, FLAC, WAV, etc.). The scan_music_files function accepts a local folder path as a parameter, and traverses all files in the folder and its subfolders through os.walk. For each file, it determines whether it is a supported audio format based on its extension. If so, the file path is added to the music_files list, and its metadata (such as song name, artist, album, etc.) is tried to be read, and the metadata is stored in a dictionary together with the file path, and finally the entire music_files list is returned.
[0031] like Figure 2 As shown, in the fusion process of step S1, The data standardization process specifically includes: Build a unified data model, including representations of music entities and relationships; Transform multi-source data into a unified format through ETL pipelines; The data quality control process specifically includes: De-duplication and merging of cross-source data is performed through the locality-sensitive hashing algorithm; Outliers are detected and processed through clustering algorithms, and missing values are processed by building training models based on rules and machine learning algorithms.
[0032] Specifically, the data standardization process includes: Build a unified data model, including representations of music entities and relationships; Input multi-source data into the ETL pipeline to unify the data format. The ETL pipeline includes three stages: extraction, transformation, and loading. The raw data is extracted from different sources, cleaned, transformed, and aggregated to meet the requirements of target storage and subsequent analysis, and the transformed data is loaded into the target storage system. In addition, the data quality control process includes deduplication and merging of cross-source data, and data cleaning based on rules and machine learning. The data cleaning includes the processing of outliers and missing values, specifically including: Generate a MinHash signature for each music entity across sources, use the locality sensitive hashing algorithm to group similar music entities, if two music entities completely match in any band, they are considered to have a high probability of duplication, and perform a detailed comparison on the entities with a high probability of duplication. If the comparison result confirms that they are duplicates, they are merged; The data is clustered into different clusters through clustering algorithms, and whether each data point is an outlier is determined based on the distance from the center of the cluster to which it belongs. If the distance exceeds the set threshold, it is considered an outlier. The data set is divided into a part with missing values and a complete part. The complete part is used to build a training model. The part with missing values is input into the built model to predict the missing values. When new data is accessed, the missing values are automatically predicted and filled.
[0033] In this example, we design a unified data model, including the representation of music entities (such as songs, albums, artists) and relationships (such as collaborations and covers), develop an ETL (extract, transform, load) pipeline, convert data from different sources into a unified format, and design a unified model example for song entities as follows: { "id": "unique_identifier", "title": "song_title", "artists": ["artist1", "artist2"], "album": "album_name", "release_date": "YYYY-MM-DD", "genres": ["genre1", "genre2"], "duration_ms": 123456, "popularity": 0.85 }.
[0034] In addition, MinHash and Locality Sensitive Hashing (LSH) algorithms are used for large-scale data deduplication.
[0035] First, generate a MinHash signature for each entity. This example is as follows: S(e) = [min(h1(e)), min(h2(e)), ..., min(hk(e))], Among them, hi is an independent hash function, and e is the feature set of the entity; Then use LSH to group similar entities. This example is as follows: Divide the MinHash signature into b bands, each of which contains r hash values (k = b * r). If two entities completely match in any band, they are considered to be possible duplicates; Finally, possible duplicate entity pairs are compared in detail to determine whether to merge them.
[0036] In step S2, the identifying of music-related entities and their relationships in the fused data further includes: Identify music-related entities and the relationships between them from unstructured text using named entity recognition tools; The relationships between music entities, including cooperation, influence and subordination, are identified through relationship extraction algorithms.
[0037] Specifically, we input unstructured text (such as artist profiles and album reviews) into the named entity recognition tool to obtain the named entity recognition results, traverse all named entities, determine whether they are music-related entities based on predefined tags and text content, and determine their specific types, and add the qualified entity information to the music entity list in the form of a dictionary; The music-related entities in the music entity list are traversed through two layers of loops, compared two by two, and various types of relationships between music entities are identified through a relationship extraction algorithm, including cooperative relationships, influential relationships, and subordinate relationships.
[0038] In this embodiment, a BERT-based NER model is used for entity recognition: First, the input text is segmented and BERT encoded; Then, a fully connected layer is used to map the BERT output to the entity label space; Next, the CRF layer is used to capture the dependencies between labels and obtain the optimal label sequence.
[0039] The model structure of this example is as follows: Input -> BERT -> Dense -> CRF -> Output, The loss function is expressed as: L = -log(P(y|x)) + λ||θ||2, where P(y|x) is the probability of the conditional random field and λ||θ||2 is the L2 regularization term.
[0040] Furthermore, in step S2, constructing the music domain ontology includes: Establish a namespace to uniquely identify classes, attributes, and individuals in the ontology, and define the core concepts in the music field and their attributes and relationships; Implement a semi-automatic ontology expansion mechanism.
[0041] Specifically, the construction of the music ontology includes the definition of the music domain ontology and the implementation of the semi-automatic ontology expansion mechanism, wherein the definition of the music domain ontology includes the definition of core concepts (such as Genre, Artist, Album, etc.) and their attributes and relationships, such as Figure 3 As shown, including: S21: Establishing a namespace for the music domain ontology, wherein the namespace is used to uniquely identify various elements in the ontology, including classes, attributes, and individuals; S22: Declare the class of each core concept, define object attributes, associate the classes of each core concept, and define the creation relationship and relationship attributes between the core concepts.
[0042] Specifically, in this embodiment, OWL (Web Ontology Language) is used to define part of the music ontology, and the specific example is as follows: <owl:class rdf:about=""Artist""> <rdfs:subclassof rdf:resource=""Person" / "> < / rdfs:subclassof> < / owl:class> <owl:objectproperty rdf:about=""hasCollaborated""> <rdfs:domain rdf:resource=""Artist" / "> <rdfs:range rdf:resource=""Artist" / "> < / rdfs:range> < / rdfs:domain> < / owl:objectproperty> <owl:datatypeproperty rdf:about=""genre""> <rdfs:domain rdf:resource=""Artist" / "> <rdfs:range rdf:resource=""http: / / www.w3.org / 2001 / XMLSchemastring" / "> < / rdfs:range> < / rdfs:domain> < / owl:datatypeproperty> .
[0043] Furthermore, if Figure 4 As shown, the semi-automatic ontology expansion mechanism includes: S201: extracting newly added music information and performing comparative analysis with the existing music ontology structure; S202: Automatically generate ontology expansion suggestions based on the results of information extraction and analysis; S203: Manually review the automatically generated expansion suggestions, and dynamically update the music domain ontology according to the expansion suggestions that have passed the manual review.
[0044] Specifically, in this embodiment, we use knowledge graph-related technologies, combined with specific rules in the music field, to extract relevant information from the fused data, compare and analyze the extracted information with the existing music ontology structure, and check whether the newly emerged entities match the existing classes and whether the new relationships conform to the defined attribute relationships; Then, based on the results of information extraction and analysis, suggestions for ontology extension are automatically generated, and a manual review process is introduced to review the extension suggestions generated by the system; Finally, the music domain ontology is dynamically updated using OWL editing tools or programming methods in accordance with the grammatical rules of OWL and the extension suggestions that have been manually reviewed. At the same time, after the ontology is updated, the updated ontology is verified and tested.
[0045] In step S2, the reasoning of the music knowledge specifically includes: A rule-based reasoning engine deduces artist influence relationships and style evolution; Complex high-order relationships are captured through a multi-hop propagation mechanism based on graph neural networks.
[0046] Specifically, according to the rules of artist influence relationship and style evolution, implicit music knowledge (such as artist influence relationship, style evolution, etc.) is derived through a rule-based reasoning engine, and music knowledge is represented in a structured form; The existing music knowledge graph is used as training data to train the graph neural network model, and the complex high-order relationships are captured through the multi-hop propagation mechanism based on the graph neural network.
[0047] In this embodiment, the TransE algorithm is used to learn the embedding representation of the knowledge graph, where for the triple (h, r, t): (1) First, map the head entity h, relation r, and tail entity t into low-dimensional vectors; (2) Optimization goal: h + r ≈ t; (3) Loss function: L = Σ(h,r,t)∈S Σ(h',r,t')∈S' max(0, γ + d(h+r, t) - d(h'+r,t')), where S is the positive sample set, S' is the negative sample set, d is the distance function, and γ is the marginal hyperparameter; Optimize the embedding vectors of entities and relations using stochastic gradient descent.
[0048] Furthermore, if Figure 5 As shown, the comprehensive construction of the user portrait in step S3 includes: S31: extract explicit features, collect basic user information (such as age, gender, geographic location, etc.), and analyze music preference information actively provided by the user (such as favorite genres, artists, etc.); S32: Implicit behavior modeling, tracking users’ music playing behavior, including play count, beat rate, and complete listening rate, and analyzing users’ social behaviors, including sharing, commenting, and collecting; S33: Mining time series patterns, capturing the evolution trend of users’ music tastes through time series analysis technology, and identifying users’ listening preferences in different time periods (e.g., weekdays vs. weekends, mornings vs. evenings); S34: Cross-platform data fusion, identifying user account associations on different platforms through user identity mapping algorithms, and integrating cross-platform user behavior data.
[0049] In step S32, the example of calculating the user's preference score for a specific artist is as follows: preference_score = w1 * play_count + w2 * skip_rate + w3 * complete_listen_rate + w4 * social_interaction_score, Among them, w1, w2, w3, w4 are weight parameters, which can be optimized by machine learning algorithms.
[0050] In step S33, we use the long short-term memory network (LSTM) to model the user's long-term and short-term interests. First, the user's historical behavior sequence is encoded into a vector sequence: X = [ , , ..., ], LSTM layer calculation: , , , , , Output layer calculation: , in, , , They are forget gate, input gate and output gate respectively. is the cell state, and ht is the hidden state.
[0051] In step S34, the joint probability distribution is used to estimate the association probability of accounts on different platforms. The joint probability distribution algorithm used in this embodiment is as follows: P(match|f1, f2, ..., fn) = P(f1, f2, ..., fn|match) * P(match) / P(f1, f2, ..., fn), Among them, fi is different features (such as user name similarity, music taste similarity, etc.), P (match) is the prior probability, Then use the naive Bayes assumption to simplify the calculation: P(match|f1, f2, ..., fn) ∝ P(match) * Π P(fi|match).
[0052] Further, in step S4, the personalized recommendation is performed through context perception, such as Figure 6 As shown, including: S41: Collect user device information and usage scenarios, and integrate external data sources to obtain user context information; S42: Analyze the user's operation behavior and the biosensor data of the smart device to infer the user's emotional state; S43: The scene transition detection algorithm is used to timely capture changes in user context and emotions, and the recommendation strategy is adjusted in real time through dynamic scene adaptation of the Markov decision process.
[0053] Specifically, extract contextual features, collect user device information (such as mobile phones, smart speakers, etc.) and usage scenarios (such as home, car, fitness, etc.), and integrate external data sources (such as weather APIs, calendar events, etc.) to enrich contextual information; Identify emotional states, analyze user operations (such as volume adjustment, playlist switching frequency, etc.) to infer emotional states, and use biosensor data from smart devices (such as smart watches) to assist in emotion recognition and classify emotional states; The scene transition detection algorithm can timely capture changes in user context and emotions, and the recommendation strategy can be adjusted in real time to adapt to the dynamic needs of users through dynamic scene adaptation based on the Markov decision process.
[0054] In step S42, this embodiment uses an ensemble learning method (such as random forest) to classify emotional states. First, a decision tree set is constructed: {T1, T2, ..., Tm}. Each tree Ti is trained on a feature subset and a sample subset. The final classification result is obtained by voting or averaging: y_pred = mode({Ti(x) for i in 1..m}) (classification problem), y_pred = 1 / m * Σ Ti(x) (regression problem).
[0055] In step S43, the dynamic scene adaptation based on Markov decision process (MDP) includes the following steps: Step 1: Define the state space S: including the user's current situation characteristics (such as location, time, activity type, etc.); Step 2: Define the action space A: different recommendation strategies (such as preferred genres, emotion matching, exploring new music, etc.); Step 3: Transition function P(s'|s,a): describes the probability of transitioning to state s' after taking action a in state s; Step 4: Reward function R(s,a): Define the immediate reward (such as user satisfaction) obtained by taking action a in state s; Step 5: Goal: Find the optimal strategy π* to maximize the expected cumulative reward. We use the Q-learning algorithm to learn the optimal strategy: Q(s,a) ← Q(s,a) + α[R(s,a) + γ max(Q(s',a')) - Q(s,a)], where α is the learning rate and γ is the discount factor.
[0056] Furthermore, in step S4, personalized recommendation is performed by weighted fusion of multiple recommendation algorithms, such as Figure 7 As shown, further comprising: S51: Obtain similar user groups and music works through user-based and item-based collaborative filtering; S52: Extract the acoustic and semantic features of music and perform similarity music recommendation; S53: Perform relationship-based recommendations through music knowledge graphs, and mine semantic associations between user interests and potential recommendation items through path mining algorithms; S54: Adopt a weighted fusion mechanism to integrate the recommended strategies in steps S51 to S53, and dynamically adjust the weights of each strategy.
[0057] Specifically, in this embodiment, step S51 uses matrix decomposition technology (such as SVD++) for collaborative filtering, and the steps are as follows: (1) User-item interaction matrix: R ∈ R^(m×n), where m is the number of users and n is the number of items; (2) Decompose R into low-dimensional latent factors: R ≈ PQ^T, P ∈ R^(m×k), Q ∈ ℝ^(n×k), k is the number of potential factors; (3) Optimization objectives: min Σ(u,i)∈K (rui - pu^T qi)^2 + λ(||pu||^2 + ||qi||^2), Where K is the known rating set and λ is the regularization parameter; (4) Use stochastic gradient descent (SGD) to optimize: pu ← pu + η(euiqi - λpu), qi ← qi + η(euipu - λqi), Where eui = rui - pu^T qi, η is the learning rate.
[0058] Step S52 uses a deep convolutional neural network (CNN) to extract music acoustic features. The steps of this embodiment are as follows: (1) Convert audio to Mel-spectrogram; (2) CNN structure: Input → Conv2D → MaxPool → Conv2D → MaxPool → ... → Dense →Output; (3) Loss function: Use triplet loss (Triplet Loss), L = max(0, ||f(a) - f(p)||^2 - ||f(a) - f(n)||^2 + margin), Where a is the anchor sample, p is the positive sample, n is the negative sample, and f(·) is the feature vector output by CNN.
[0059] Step S53 is based on the similarity calculation of the meta-path (PathSim) in this embodiment as follows: (1) Define the meta-path P: such as "user-artist-genre-artist"; (2) Calculate the PathSim similarity between two entities x and y: PathSim(x,y) = 2 * |Px→y| / (|Px→x| + |Py→y|), Where Px→y represents the set of paths from x to y; The candidates are ranked based on their PathSim scores.
[0060] Step S54 uses Thompson Sampling to perform online learning of the multi-armed bandit (MAB) problem. The steps are as follows: (1) Maintain a Beta distribution for each strategy i: Beta(αi, βi); (2) Each time you make a recommendation: a. Sample from the Beta distribution of each strategy: θi ~ Beta(αi, βi), b. Choose the strategy with the largest θi; (3) Observe user feedback (e.g. click 1, no click 0), and update the corresponding αi or βi. (4) Repeat steps (2) to (3).
[0061] Furthermore, the method of this embodiment also includes a cold start process, which specifically includes: When there is no historical behavior data, design interest questionnaires to quickly build initial user portraits and implement content-based initial recommendation strategies; Analyze the metadata and acoustic features of new music to match it with similar known music, and predict the potential audience of the new work through the historical data and social network influence of the artist of the new music; Set novelty and diversity metrics to balance the recommendation of popular and niche content, implement a recommendation strategy based on the trade-off between exploration and exploitation, and encourage users to discover new content.
[0062] In this embodiment, a decision tree is used to classify new users, for example: 1. Build a decision tree with nodes as survey questions (such as "Do you like rock music?"); 2. Traverse the tree according to the user's answer and reach the leaf node; 3. The leaf node stores the predefined recommendation list as the initial recommendation; 4. The user's listening sequence is regarded as a "sentence" and the music items are "words"; 5. Train the Skip-gram model: For the center word c and the context word o, maximize: P(o|c) = exp(uo^T vc) / Σ exp(uw^T vc); 6. Use the learned vector representation to calculate the similarity between new music and known music.
[0063] Among them, the ε-greedy strategy is used for long-tail content promotion. The steps are as follows: (1) Select the current best recommendation item with a probability of 1-ε; (2) Randomly select a recommendation item with probability ε; (3) Dynamically adjust the ε value: ε = ε0 / (1 + kt), Where ε0 is the initial exploration rate, k is the decay parameter, and t is the time step.
[0064] The method also includes evaluation and optimization of recommendations, such as Figure 8 As shown, specifically including: S100: Setting recommendation system evaluation indicators and an A / B testing framework, wherein the recommendation system evaluation indicators include accuracy, recall, and ranking quality NDCG, and the A / B testing framework is used to compare the performance of different algorithms; S200: Establish a user feedback collection mechanism, including explicit and implicit feedback, and track changes in key indicators through real-time performance monitoring; S300: Set up an incremental update mechanism to achieve online learning and incremental updates of the system model, and improve the efficiency of large-scale data processing and model training through a distributed computing framework.
[0065] In this embodiment, the steps for calculating NDCG (Normalized Discounted Cumulative Gain) in step S100 are as follows: (1) For the recommendation list: calculate DCG, DCG@k = Σ(i=1 to k) (2^reli - 1) / log2(i+1), Where reli is the relevance score of the i-th item; (2) Calculate the ideal sorted DCG (IDCG); (3) NDCG@k = DCG@k / IDCG@k.
[0066] In step S300, stochastic gradient descent (SGD) is used to perform online update of the model. The specific steps are as follows: (1) For the newly observed sample (x, y); (2) Calculate the loss: L(θ) = loss(f(x;θ), y); (3) Calculate the gradient: g = ∇θ L(θ); (4) Update parameters: θ = θ - η * g, Where η is the learning rate, which can be adjusted using adaptive methods such as Adam.
[0067] Through the above detailed technical solutions, this system can comprehensively solve the various challenges faced by existing music recommendation systems and provide users with highly personalized and context-aware music recommendation services. The modular design of the system and the application of advanced algorithms ensure its efficient operation and continuous optimization capabilities under massive data and complex scenarios.
[0068] On the other hand, this embodiment provides a multi-source data intelligent music recommendation system based on the above method, such as Fig. 9 As shown, including: A multi-source data collection and fusion module is used to collect multi-source music data and perform fusion processing on the collected multi-source music data, wherein the fusion processing includes data standardization and data quality control; Music knowledge graph construction module, used to construct music knowledge graph, including: Identify music-related entities and their relationships in the fused data, construct a music domain ontology, and perform reasoning on music knowledge; User portrait building module, used to build user portraits, including: Extract users’ explicit features, build users’ implicit behavior models, mine time series patterns, and integrate cross-platform data; The personalized recommendation module includes a context perception unit and a recommendation algorithm fusion unit, where: The context perception unit is used to extract user situational features, identify user emotional states, and adjust recommendation strategies in real time according to changes in user emotions and situations; The recommendation algorithm fusion unit is used to integrate collaborative filtering recommendation algorithm, content-based recommendation algorithm, and music knowledge graph enhanced recommendation algorithm for music recommendation.
[0069] in, Fig. 9 The functional implementation of each module and unit in the multi-source data intelligent music recommendation system corresponds to the steps in the above-mentioned embodiment of the intelligent audio playback control method, and its functions and implementation processes will not be repeated here one by one.
[0070] This embodiment also provides an electronic device, such as Fig.10 As shown, the electronic device includes a processor 14 and a memory 13. The memory 13 stores machine executable instructions that can be executed by the processor 14. The processor 14 executes the machine executable instructions to implement the above audio control method.
[0071] Further, Fig.10 The electronic device shown further includes a bus 12 and a communication interface 11 , and the processor 14 , the communication interface 11 and the memory 13 are connected via the bus 12 .
[0072] The memory 13 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 11 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 12 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, Fig.10 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.
[0073] The processor 14 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 14. The above processor 14 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-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in this embodiment can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be combined and executed. The software module can be located in a mature storage medium in the field 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 1001, and the processor 1000 reads the information in the memory 1001 and completes the steps of the audio control method in combination with its hardware.
[0074] The present disclosure also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer executes the steps of the audio control method.
[0075] Finally, it should be noted that the above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
[0076] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A multi-source data intelligent music recommendation method, characterized in that: include: Collecting multi-source music data, and performing fusion processing on the collected multi-source music data, wherein the fusion processing includes data standardization and data quality control; Construct a music knowledge graph, including: Identify music-related entities and their relationships in the fused data, construct a music domain ontology, and perform reasoning on music knowledge; Build user portraits, including: Extract users’ explicit features, build users’ implicit behavior models, mine time series patterns, and integrate cross-platform data; Personalized recommendations are made through context awareness and weighted fusion of multiple recommendation algorithms, including: Extract user context features, identify user emotional states, and adjust recommendation strategies in real time based on changes in user emotions and contexts; Integrate collaborative filtering recommendation algorithm, content-based recommendation algorithm, and music knowledge graph enhanced recommendation algorithm for music recommendation.
2. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The collecting of multi-source music data specifically includes: Obtain music-related data from online music platforms and music metadata providers through API interfaces; Get local music metadata by scanning local music files.
3. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: In the fusion process, The data standardization process specifically includes: Build a unified data model, including representations of music entities and relationships; Transform multi-source data into a unified format through ETL pipelines; The data quality control process specifically includes: De-duplication and merging of cross-source data is performed through the locality-sensitive hashing algorithm; Outliers are detected and processed through clustering algorithms, and missing values are processed by building training models based on rules and machine learning algorithms.
4. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The identifying of music-related entities and their relationships in the fused data further comprises: Identify music-related entities and the relationships between them from unstructured text using named entity recognition tools; The relationships between music entities, including cooperation, influence and subordination, are identified through relationship extraction algorithms.
5. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The construction of the music domain ontology further includes: Establish a namespace to uniquely identify classes, attributes, and individuals in the ontology, and define the core concepts in the music field and their attributes and relationships; Implement a semi-automatic ontology expansion mechanism.
6. The multi-source data intelligent music recommendation method according to claim 5, characterized in that: The semi-automatic ontology expansion mechanism includes: S201: extracting newly added music information and performing comparative analysis with the existing music ontology structure; S202: Automatically generate ontology expansion suggestions based on the results of information extraction and analysis; S203: Manually review the automatically generated expansion suggestions, and dynamically update the music domain ontology according to the expansion suggestions that have passed the manual review.
7. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The reasoning of the music knowledge specifically includes: A rule-based reasoning engine deduces artist influence relationships and style evolution; Complex high-order relationships are captured through a multi-hop propagation mechanism based on graph neural networks.
8. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The constructing of the user portrait further includes: S31: Collect basic user information and analyze user music preference information; S32: Tracking the user's music playing behavior, including the number of plays, jump rate and complete listening rate, and analyzing the user's social behavior, including sharing, commenting and collecting; S33: Capture the evolution trend of users’ music tastes through time series analysis technology and identify users’ listening preferences in different time periods; S34: Integrate cross-platform user behavior data through user identity mapping algorithm.
9. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The personalized recommendation through context awareness further includes: S41: Collect user device information and usage scenarios, and integrate external data sources to obtain user context information; S42: Analyze the user's operation behavior and the biosensor data of the smart device to infer the user's emotional state; S43: The scene transition detection algorithm is used to timely capture changes in user context and emotions, and the recommendation strategy is adjusted in real time through dynamic scene adaptation of the Markov decision process.
10. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: The personalized recommendation by weighted fusion of multiple recommendation algorithms further includes: S51: Obtain similar user groups and music works through user-based and item-based collaborative filtering; S52: Extract the acoustic and semantic features of music and perform similarity music recommendation; S53: Perform relationship-based recommendations through music knowledge graphs, and mine semantic associations between user interests and potential recommendation items through path mining algorithms; S54: Adopt a weighted fusion mechanism to integrate the recommended strategies in steps S51 to S53, and dynamically adjust the weights of each strategy.
11. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: It also includes cold start processing, including: Build an initial user profile through interest questionnaires to implement an initial content-based recommendation strategy; Analyze the metadata and acoustic features of new music to match it with known music, and predict the potential audience of the new music based on the artist's historical data and social network influence; Set novelty and diversity metrics to balance the recommended content.
12. The multi-source data intelligent music recommendation method according to claim 1, characterized in that: It also includes the evaluation and optimization of the recommendation system, including: S100: Setting recommendation system evaluation indicators and an A / B testing framework, wherein the recommendation system evaluation indicators include accuracy, recall, and ranking quality NDCG, and the A / B testing framework is used to compare the performance of different algorithms; S200: Establish a user feedback collection mechanism including explicit and implicit feedback, and track changes in key indicators through real-time performance monitoring; S300: Setting an incremental update mechanism to achieve online learning and incremental update of the system model.
13. A multi-source data intelligent music recommendation system based on the method of claims 1 to 12, characterized in that: include: A multi-source data collection and fusion module is used to collect multi-source music data and perform fusion processing on the collected multi-source music data, wherein the fusion processing includes data standardization and data quality control; Music knowledge graph construction module, used to construct music knowledge graph, including: Identify music-related entities and their relationships in the fused data, construct a music domain ontology, and perform reasoning on music knowledge; User portrait building module, used to build user portraits, including: Extract users’ explicit features, build users’ implicit behavior models, mine time series patterns, and integrate cross-platform data; The personalized recommendation module includes a context perception unit and a recommendation algorithm fusion unit, where: The context perception unit is used to extract user situational features, identify user emotional states, and adjust recommendation strategies in real time according to changes in user emotions and situations; The recommendation algorithm fusion unit is used to integrate collaborative filtering recommendation algorithm, content-based recommendation algorithm, and music knowledge graph enhanced recommendation algorithm for music recommendation.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the multi-source data intelligent music recommendation method as described in any one of claims 1-12 is implemented.
15. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the multi-source data intelligent music recommendation method as described in any one of claims 1-12.
Citation Information
Cited By
Content display method and device, display equipment and storage medium
CN120434444A
Financial article recommendation method and device and readable storage medium
CN120508660A
Personalized service pushing device and method for open source operation special area
CN120763383A