CN113868462A - Song recommendation system and method based on matrix decomposition - Google Patents
Song recommendation system and method based on matrix decomposition Download PDFInfo
- Publication number
- CN113868462A CN113868462A CN202111065891.5A CN202111065891A CN113868462A CN 113868462 A CN113868462 A CN 113868462A CN 202111065891 A CN202111065891 A CN 202111065891A CN 113868462 A CN113868462 A CN 113868462A
- Authority
- CN
- China
- Prior art keywords
- matrix
- song
- user
- data
- songs
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 107
- 238000000354 decomposition reaction Methods 0.000 title claims abstract description 47
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000004458 analytical method Methods 0.000 claims abstract description 10
- 230000006399 behavior Effects 0.000 claims description 40
- 238000007781 pre-processing Methods 0.000 claims description 9
- 238000011478 gradient descent method Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 claims description 6
- 238000007405 data analysis Methods 0.000 abstract description 2
- 238000007476 Maximum Likelihood Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 238000012549 training Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 230000033764 rhythmic process Effects 0.000 description 2
- 101001000676 Homo sapiens Polyamine-modulated factor 1 Proteins 0.000 description 1
- 102100035922 Polyamine-modulated factor 1 Human genes 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000010219 correlation analysis Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
- G06F16/63—Querying
- G06F16/635—Filtering based on additional data, e.g. user or group profiles
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a song recommending system and method based on matrix decomposition, and relates to the technical field of data analysis; the preprocessed song characteristic data and the user behavior data are subjected to matrix decomposition by using a matrix decomposition model, preference indexes of the user on songs are obtained by using a Bernoulli probability distribution model according to the decomposed data matrix, and the songs are recommended to the user according to the preference indexes, so that analysis on massive real user behavior data is realized, the data range of the service is covered, the result is reliable and comprehensive, and the songs desired to be listened can be recommended to the user.
Description
Technical Field
The invention discloses a system and a method, relates to the technical field of data analysis, and particularly relates to a song recommendation system and a song recommendation method based on matrix decomposition.
Background
With the increasing complexity of internet user information and target information, recommending information which the users want to see to the users can greatly accelerate the conversion rate of internet products, improve the satisfaction degree of the users, attract potential customers and save old customers. However, the current music platform song recommendation method cannot accurately recommend songs that users like.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a song recommendation system and method based on matrix decomposition, which can predict the preference degree of a client to unknown songs by analyzing historical data, thereby improving the satisfaction degree and the adhesion degree of the client to the internet products.
The specific scheme provided by the invention is as follows:
a song recommending method based on matrix decomposition carries out matrix decomposition on preprocessed song characteristic data and user behavior data by utilizing a matrix decomposition model,
and obtaining the preference degree of the user to the songs by utilizing a Bernoulli probability distribution model according to the decomposed data matrix, and recommending the songs to the user according to the preference degree.
Further, in the song recommendation method based on matrix decomposition, song feature data and user behavior data are acquired, the song feature data includes index data describing music, and the user behavior data includes operation behavior data performed by a user for a song.
Preferably, in the song recommendation method based on matrix decomposition, the matrix decomposition model is used for decomposing the target matrixes into U and V, U is the user matrix, V is the song matrix, the probability that the user likes the songs is determined by the Bernoulli probability distribution model according to UV, the preference degree is obtained according to the probability that the user likes the songs,
and obtaining an optimal target matrix by using a gradient descent method, and obtaining the preference degree which is closest to the user preference by using the optimal target matrix.
Preferably, in the song recommendation method based on matrix decomposition, the matrix decomposition model is used for decomposing the target matrix into U and V, U is the user matrix, V is the song matrix, and the song matrix V is defined asT is a song feature matrix, Theta is a song feature parameter,
determining probability of the user liking the songs by using a Bernoulli probability distribution model according to UV, obtaining preference degree according to the probability of the user liking the songs,
and optimizing the target matrix by using a gradient descent method, and obtaining the preference degree which is closest to the user preference by using the optimized target matrix.
Preferably, in the song recommendation method based on matrix decomposition, a matrix decomposition model is used for decomposing a target matrix into U, U is a comprehensive matrix of song characteristics and user behaviors,
determining probability of the user liking the songs by using a Bernoulli probability distribution model according to the song characteristics and the user behavior comprehensive matrix, obtaining preference degree according to the probability of the user liking the songs,
and optimizing the target matrix by using a gradient descent method, and obtaining the preference degree which is closest to the user preference by using the optimized target matrix.
A song recommending system based on matrix decomposition comprises a preprocessing module, an analyzing module and a recommending module,
the pre-processing module pre-processes song characteristic data and user behavior data,
the analysis module carries out matrix decomposition on the preprocessed song characteristic data and the user behavior data by using a matrix decomposition model, obtains the preference degree of the user to the songs by using a Bernoulli probability distribution model according to the decomposed data matrix,
and the recommending module recommends songs for the user according to the preference.
Further, the song recommendation system based on matrix decomposition further comprises an acquisition module, wherein the acquisition module acquires song characteristic data and user behavior data, the song characteristic data comprises index data describing music, and the user behavior data comprises operation behavior data of a user for songs.
A song recommendation apparatus based on matrix decomposition, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine readable program to perform the matrix factorization based song recommendation method.
The invention has the advantages that:
the invention provides a song recommending method based on matrix decomposition, which is characterized in that preprocessed song characteristic data and user behavior data are subjected to matrix decomposition by using a matrix decomposition model, a preference index of a user to songs is obtained by using a Bernoulli probability distribution model according to a decomposed data matrix, and the songs are recommended to the user according to the preference index, so that analysis of massive real user behavior data is realized, the data range of the service is covered, the result is reliable and comprehensive, and the songs desired to be listened can be recommended to the user.
Drawings
FIG. 1 is a schematic diagram of a matrix factorization model-training effect data in the method of the present invention.
FIG. 2 is a schematic diagram of the training effect data of the matrix decomposition model II in the method of the present invention.
FIG. 3 is a schematic diagram of three training effect data of a matrix decomposition model in the method of the present invention.
FIG. 4 is a diagram illustrating ROC indices of matrix factorization models one to three in the method of the present invention.
FIG. 5 is a schematic flow chart of the method of the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
The invention provides a song recommending method based on matrix decomposition, which carries out matrix decomposition on preprocessed song characteristic data and user behavior data by utilizing a matrix decomposition model,
and obtaining a preference index of the user to the songs by using a Bernoulli probability distribution model according to the decomposed data matrix, and recommending the songs to the user according to the preference index.
The method of the invention realizes the analysis of mass real user behavior data, covers the data range of the service, has reliable and comprehensive results, and can recommend songs desired to be listened to by the user.
In a specific application, in some embodiments of the present invention, the obtained original data is music stream segment data of a sport, including song feature data and user operation behavior data. For example, the entire data set contains 150 sessions and 370 ten thousand tracks, with 10000 different subsets of singing segments and 50704 tracks selected for studying user behavior to simplify training time. Each segment is a continuous track (no more than 20) with a listening interval of 60 seconds with no activity by the user. The song feature data includes smoothness, jumping, rhythm, reverberation degree and other index data describing music. The user behavior data includes the user's song start reason, song cutting behavior, pause behavior, fast forward and fast backward behavior, and the like.
And during data preprocessing, performing visualization analysis on user behavior data, performing correlation analysis on sound track data, performing song data feature extraction on song feature data, performing T-SEN dimension reduction and the like.
Decomposing the song characteristic data and the user behavior data into target matrixes U and V by utilizing a matrix decomposition model I, wherein U is a user matrix, V is a song matrix,
obtaining probability P of user favorite song by using Bernoulli probability distribution model according to UVijWherein
The preference of the user to the songs follows Bernoulli distribution, and whether the user skips the songs after listening to the songs for a period of time (Skip2) can be used as an index for evaluating the preference of the user, wherein the Skip is disliked and the Skip is disliked. The observation matrix a of the preference metric can be expressed as:
and aij~Ber(pij)pij=P(aij=1)
and then obtaining the maximum likelihood expression and the log maximum likelihood of the target matrix:
preventing overfitting of the model, adding a regularization parameter term in an objective function:
lambda is a regularization parameter. The objective function is maximized using a gradient descent method:
the optimal UV is obtained:
and further obtaining the preference degree closest to the user. Wherein P isijThe interaction probability of the user i to the song j, namely the favorite probability, is explained, the set probability is greater than 0.6, and the song can be recommended to the user according to the preference index formula.
In other embodiments of the method of the present invention, the data acquisition and preprocessing are performed in the same manner as in the previous embodiment, with a matrix decomposition model, the two decomposed target matrices are U and V, U is the user matrix, V is the song matrix, and the song matrix V is defined asT is a song characteristic matrix T, Theta is a song characteristic parameter, and the song characteristic matrix T is added into the model, specifically, index data describing music, including smoothness, jumping, rhythm, reverberation degree and the like.
The corresponding probability matrix:
and the log maximum likelihood value is:
gradient descent is used to learn U and beta, the partial derivatives of user i and song parameters:
the optimal UV can be further obtained, and the preference degree closest to the user preference can be further obtained. Wherein P isijThe interaction probability of the user i to the song j, namely the favorite probability, is explained, the set probability is greater than 0.6, and the song can be recommended to the user according to the preference index formula.
In other embodiments of the method of the present invention, the data obtaining mode and the preprocessing mode are the same as those of the previous embodiment, a matrix decomposition model is used to decompose a target matrix into U, and U is a comprehensive matrix of the song characteristics and the user behaviors, and the interaction information of the user and the song is added into the model, that is, the song characteristic parameters of the user behaviors are added into the model. The corresponding probability matrix:
and the log maximum likelihood value is:
gradient descent is used to learn U and beta, the partial derivatives and global parameters of user i:
in iteration t, first fix beta and update Ui, then fix Ui and update beta. In the update, beta and
the formula for Ui is as follows:
the optimal UV can be further obtained, and the preference degree closest to the user preference can be further obtained. Wherein Pij indicates the interaction probability of the user i to the song j, namely the liked probability, and the set probability is greater than 0.6, so that the song can be recommended to the user according to the preference index formula.
For the above embodiment, index evaluation is performed, where precision is indicated for the prediction result, which indicates how many of the samples predicted to be positive are true positive samples.
The recall indicates for the original sample how many positive examples in the sample were predicted correctly.
The true positive class rate is used for measuring the correctly predicted positive class proportion.
The false positive class rate measures the proportion of "negative classes" that are mistaken for "positive classes". The following were used:
in which the samples are divided into positive and negative samples, the result has four cases:
TP: the positive class is predicted to be the positive class;
FP: the positive class is predicted as a negative class;
TN: the negative class is predicted to be a negative class;
FN: the negative class predicts a positive class.
The x-axis of the ROC curve is the false positive class rate and the y-axis is the true positive class rate, describing the change in the number of correctly classified positive samples with the number of incorrectly classified negative samples. The closer the curve to the upper left indicates better prediction performance. The area under the curve is an important index for measuring the effect of the model, and the larger the area is, the more positive and negative samples can be better classified by the model.
Fig. 1-3 show model training curves for model one to model three, respectively, where model one: the learning rate γ is 1, the regular λ is 0.6, the number of iterations is 100, the maximum likelihood is illustrated as 1-100, and the maximum value is-5606.18.
Model two: the learning rate γ is 0.8, the regular λ is 0.6, the number of iterations is 100, the maximum likelihood is illustrated as 1-100, and the maximum value is-5616.47.
And (3) model III: η is 0.00001 and λ is 0.6, -6377.17.
FIG. 4 is a ROC index curve for model one through model three, with the following results:
Probabilistic Matrix Factorisation PMF1 0.5258
PMF2 0.7336
PMF3 0.7347
the description models one through three can each be further implemented to recommend favorite songs for the user. And the performance of the model II and the model III is more excellent than that of the model I.
Meanwhile, the invention also provides a song recommending system based on matrix decomposition, which comprises a preprocessing module, an analyzing module and a recommending module,
the pre-processing module pre-processes song characteristic data and user behavior data,
the analysis module carries out matrix decomposition on the preprocessed song characteristic data and the user behavior data by using a matrix decomposition model, obtains a preference index of a user to the song by using a Bernoulli probability distribution model according to a decomposed data matrix,
and the recommending module recommends songs for the user according to the preference index.
The information interaction, execution process and other contents between the modules in the system are based on the same concept as the method embodiment of the present invention, and specific contents can be referred to the description in the method embodiment of the present invention, and are not described herein again. Similarly, the system can realize the analysis of mass real user behavior data, cover the data range of the service, have reliable and comprehensive results, and can recommend songs desired to be listened to for the user.
A song recommendation apparatus based on matrix decomposition, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine readable program to perform the matrix factorization based song recommendation method.
The contents of information interaction, readable program process execution and the like of the processor in the device are based on the same concept as the method embodiment of the present invention, and specific contents can be referred to the description in the method embodiment of the present invention, and are not described herein again. Similarly, the device can realize the analysis of mass real user behavior data, cover the data range of the service, have reliable and comprehensive results, and can recommend songs desired to be listened to by the user.
It should be noted that not all steps and modules in the processes and system structures of the above preferred embodiments are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.
Claims (8)
1. A song recommending method based on matrix decomposition is characterized in that preprocessed song characteristic data and user behavior data are subjected to matrix decomposition of the data by a matrix decomposition model,
and obtaining the preference degree of the user to the songs by utilizing a Bernoulli probability distribution model according to the decomposed data matrix, and recommending the songs to the user according to the preference degree.
2. The method of claim 1, wherein song characteristic data and user behavior data are obtained, the song characteristic data comprises index data describing music, and the user behavior data comprises operation behavior data performed by a user for a song.
3. The method of claim 1 or 2, wherein the objective matrix is decomposed into U and V by a matrix decomposition model, U is a user matrix, and V is a song matrix, and the probability that the user likes a song is determined by a Bernoulli probability distribution model according to UV, and the preference degree is obtained by the probability that the user likes a song,
and obtaining an optimal target matrix by using a gradient descent method, and obtaining the preference degree which is closest to the user preference by using the optimal target matrix.
4. The method as claimed in claim 1 or 2, wherein a matrix decomposition model is used to decompose the object matrix into U and V, U is the user matrix, V is the song matrix, and the song matrix V is defined asT is a song feature matrix, Theta is a song feature parameter,
determining probability of the user liking the songs by using a Bernoulli probability distribution model according to UV, obtaining preference degree according to the probability of the user liking the songs,
and optimizing the target matrix by using a gradient descent method, and obtaining the preference degree which is closest to the user preference by using the optimized target matrix.
5. The method of claim 1 or 2, wherein a matrix decomposition model is used to decompose the target matrix into U, U being a comprehensive matrix of song characteristics and user behavior,
determining probability of the user liking the songs by using a Bernoulli probability distribution model according to the song characteristics and the user behavior comprehensive matrix, obtaining preference degree according to the probability of the user liking the songs,
and optimizing the target matrix by using a gradient descent method, and obtaining the preference degree which is closest to the user preference by using the optimized target matrix.
6. A song recommendation system based on matrix decomposition is characterized by comprising a preprocessing module, an analysis module and a recommendation module,
the pre-processing module pre-processes song characteristic data and user behavior data,
the analysis module carries out matrix decomposition on the preprocessed song characteristic data and the user behavior data by using a matrix decomposition model, obtains the preference degree of the user to the songs by using a Bernoulli probability distribution model according to the decomposed data matrix,
and the recommending module recommends songs for the user according to the preference.
7. The system of claim 6, further comprising a collection module, wherein the collection module obtains song feature data and user behavior data, the song feature data comprises index data describing music, and the user behavior data comprises user behavior data for a song.
8. A song recommending device based on matrix decomposition is characterized by comprising the following components: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor configured to invoke the machine readable program to perform a matrix factorization based song recommendation method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111065891.5A CN113868462A (en) | 2021-09-13 | 2021-09-13 | Song recommendation system and method based on matrix decomposition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111065891.5A CN113868462A (en) | 2021-09-13 | 2021-09-13 | Song recommendation system and method based on matrix decomposition |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113868462A true CN113868462A (en) | 2021-12-31 |
Family
ID=78995550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111065891.5A Pending CN113868462A (en) | 2021-09-13 | 2021-09-13 | Song recommendation system and method based on matrix decomposition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113868462A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114881689A (en) * | 2022-04-26 | 2022-08-09 | 驰众信息技术(上海)有限公司 | Building recommendation method and system based on matrix decomposition |
-
2021
- 2021-09-13 CN CN202111065891.5A patent/CN113868462A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114881689A (en) * | 2022-04-26 | 2022-08-09 | 驰众信息技术(上海)有限公司 | Building recommendation method and system based on matrix decomposition |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111078994B (en) | Portrait-based medical science popularization article recommendation method and system | |
CN107491432B (en) | Low-quality article identification method and device based on artificial intelligence, equipment and medium | |
WO2019028279A1 (en) | Methods and systems for optimizing engine selection using machine learning modeling | |
US20200043475A1 (en) | System and method for neural network orchestration | |
CN114757432A (en) | Future execution activity and time prediction method and system based on flow log and multi-task learning | |
Deepika et al. | Relief-F and Budget Tree Random Forest Based Feature Selection for Student Academic Performance Prediction. | |
CN112015779A (en) | Method, system and device for predicting preference of students | |
Mishra et al. | Reliable local explanations for machine listening | |
CN116756688A (en) | Public opinion risk discovery method based on multi-mode fusion algorithm | |
CN117216419B (en) | Data analysis method based on AI technology | |
CN109460474B (en) | User preference trend mining method | |
CN113868462A (en) | Song recommendation system and method based on matrix decomposition | |
CN111444383B (en) | Audio data processing method and device and computer readable storage medium | |
CN117476215A (en) | Medical auxiliary judging method and system based on AI | |
CN116450848B (en) | Method, device and medium for evaluating computing thinking level based on event map | |
CN117312562A (en) | Training method, device, equipment and storage medium of content auditing model | |
Araya‐Salas et al. | ohun: An R package for diagnosing and optimizing automatic sound event detection | |
CN115292167A (en) | Life cycle prediction model construction method, device, equipment and readable storage medium | |
CN115758218A (en) | Three-modal emotion analysis method based on long-time and short-time feature and decision fusion | |
CN115934996A (en) | Recommendation model training method, song recommendation method and related device | |
CN113407808A (en) | Method and device for judging applicability of graph neural network model and computer equipment | |
KR102135098B1 (en) | Policy advisory systems using the annals of king sejong | |
CN114676341B (en) | Determination method, medium, device and computing equipment of recommended object | |
CN112925924B (en) | Recommendation method and device for multimedia files, electronic equipment and storage medium | |
Shaik | Fault Diagnosis of Engine Knocking Using Deep Learning Neural Networks with Acoustic Input Processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |