Music recommendation method and server

文档序号:1042903 发布日期:2020-10-09 浏览:3次 中文

阅读说明:本技术 一种音乐推荐方法及服务器 (Music recommendation method and server ) 是由 张常华 罗建平 余广民 李凌浩 于 2019-03-29 设计创作,主要内容包括:本发明适用于音乐推荐技术领域,提供了一种音乐推荐方法、装置及服务器,其中所述方法包括:获取所有用户的用户行为数据,并根据所述用户行为数据中的各种用户行为对应的权重对所述用户行为进行评分;其中,所述用户行为数据是用户收听歌曲时所产生的数据;根据所述用户行为的评分计算第一赞成率,并计算所述第一赞成率的置信区间,得到每首歌曲的得分;获取目标用户与所有用户中与目标用户具有相同行为的各个用户的相似度;根据所述相似度以及所述每首歌曲的得分,计算所述目标用户对每首歌曲的兴趣度,并按照所述兴趣度推荐歌曲给所述目标用户。本发明能够提高给目标用户推荐音乐的准确性。(The invention is suitable for the technical field of music recommendation, and provides a music recommendation method, a device and a server, wherein the method comprises the following steps: acquiring user behavior data of all users, and grading the user behaviors according to weights corresponding to various user behaviors in the user behavior data; wherein the user behavior data is data generated when a user listens to a song; calculating a first approval rate according to the scores of the user behaviors, and calculating a confidence interval of the first approval rate to obtain the score of each song; acquiring the similarity between a target user and each user with the same behavior as the target user in all users; and calculating the interest degree of the target user for each song according to the similarity and the score of each song, and recommending the song to the target user according to the interest degree. The method and the device can improve the accuracy of recommending the music to the target user.)

1. A music recommendation method, comprising:

acquiring user behavior data of all users, and grading the user behaviors according to weights corresponding to various user behaviors in the user behavior data; wherein the user behavior data is data generated when a user listens to a song;

calculating a first approval rate according to the scores of the user behaviors, and calculating a confidence interval of the first approval rate to obtain the score of each song;

acquiring the similarity between a target user and each user with the same behavior as the target user in all users;

and calculating the interest degree of the target user for each song according to the similarity and the score of each song, and recommending the song to the target user according to the interest degree.

2. The music recommendation method of claim 1, wherein the user behavior data comprises a combination of any one or more of the following user behaviors: collecting, downloading, sharing, adding to a song list, purchasing, commenting, identifying, searching, listening to songs for a long time, clicking uninteresting, removing a song list and cutting songs.

3. The music recommendation method of claim 2, wherein the user behavior comprises a forward behavior and a reverse behavior;

the forward behavior comprises at least one of collection, downloading, sharing, adding in a song list, purchasing, commenting, identifying, searching, listening to songs and listening to songs, and the reverse behavior comprises at least one of no interest in clicking, removing the song list and cutting songs.

4. The music recommendation method according to claim 2 or 3, wherein the scoring the user behavior according to the weights corresponding to the various user behaviors in the user behavior data specifically includes one or more of the following:

if the user behavior is collection and the corresponding weight is M1Then score as M1S; where s is a time decay factor, M1Is a number greater than 1;

if the user behavior is at least one of downloading, sharing and adding the song list and the corresponding weight is 1, the score is s;

if the user behavior is at least one of purchase, praise, comment, tune identification and search, and the corresponding weight is N1Then score is N1*s,N1Is a number less than 1;

if the user behavior is the song listening times and the song listening duration, scoring according to the following formula:

in the above formula, score is the score of the user behavior, e is a mathematical constant, n is the number of songs listened to, i is the ith song listened to by the user, tiThe song listening time of the ith time of the user, and t is the song listening time;

if the user lineIs not interested in click and the corresponding weight is M2Then score as M2*s,M2Is a number greater than 1;

if the user behavior is to move out of the song list and the corresponding weight is 1, the score is s;

if the user behavior is song cutting and the corresponding weight is N2Then score is N2*s,N2Is a value less than 1.

5. The music recommendation method according to claim 4, wherein said calculating a first approval rate based on the rating of the user behavior comprises:

calculating a first vote count of approval according to the score of the forward behavior:

calculating a first anti-vote from the score of the reverse behavior:

and calculating a first approval rate according to the obtained first approval ticket number and the first objection ticket number.

6. The music recommendation method of any of claims 1-3, further comprising:

acquiring an existing song list of the target user;

for each song in the existing menu, calculating a second approval rate according to the scores of the user behaviors of all the users and the positions of the songs in the existing menu, and calculating a confidence interval of the second approval rate to obtain the score of each song in the existing menu;

and adjusting the song sequence in the existing song list according to the score of each song in the existing song list.

7. The music recommendation method of claim 6, wherein for each song in the existing menu, calculating a second approval rate based on the scores of the user behaviors of all users and the location of the song in the existing menu specifically comprises:

calculating a second approval vote and a second objection vote according to the corrected time attenuation factor and the scores of the user behaviors of all the users;

calculating a location score based on the location of the song in the existing menu;

and calculating a second approval rate according to the obtained second approval votes, second objection votes and position scores.

8. The music recommendation method of claim 7, wherein said calculating a location score based on a location of said song in said existing menu comprises:

obtaining the position ranking of the song in the existing song list;

if the location of the song ranks first 80% of the existing song list, then the location score is M3,M3Is a number greater than 1;

a location score of 1 if the location ranking of the song is between 30% and 80% of the existing song list;

if the location of the song is ranked 30% of the existing song list, then the location score is N3,N3Is a value less than 1.

9. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 8 are implemented when the computer program is executed by the processor.

10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.

Technical Field

The invention belongs to the technical field of music recommendation, and particularly relates to a music recommendation method and a server.

Background

The collaborative filtering recommendation algorithm is one of the recommendation algorithms which are widely applied at present, and is divided into three subclasses, namely, collaborative filtering recommendation based on user-based (user-based), collaborative filtering recommendation based on item-based (item-based), and collaborative filtering recommendation based on model-based (model-based). In music recommendations, a user-based collaborative filtering recommendation is used more. The main consideration of the collaborative filtering based on the users is the similarity between the users, and as long as the articles liked by the similar users are found out and the scores of the target users for the corresponding articles are predicted, a plurality of articles with the highest scores can be found out and recommended to the users.

However, in the conventional user-based collaborative filtering music recommendation algorithm, there are two problems: the first is that the adopted user behaviors have few dimensions and single weight; secondly, the user's preference degree of a certain song is directly calculated by using the user behavior, when the number of users is large, the reliability of the user's preference degree of a certain song obtained according to the algorithm is high, but if the number of users is small, the user's preference degree of a certain song cannot be accurately obtained by using the algorithm, so that the music recommended to the target user is not accurate enough.

Disclosure of Invention

In view of this, embodiments of the present invention provide a music recommendation method and a server, so as to solve the problem in the prior art that music recommended to a target user is not accurate enough.

A first aspect of an embodiment of the present invention provides a music recommendation method, including:

acquiring user behavior data of all users, and grading the user behaviors according to weights corresponding to various user behaviors in the user behavior data; wherein the user behavior data is data generated when a user listens to a song;

calculating a first approval rate according to the scores of the user behaviors, and calculating a confidence interval of the first approval rate to obtain the score of each song;

acquiring the similarity between a target user and each user with the same behavior as the target user in all users;

and calculating the interest degree of the target user for each song according to the similarity and the score of each song, and recommending the song to the target user according to the interest degree.

A second aspect of embodiments of the present invention provides a server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to the first aspect when executing the computer program.

A third aspect of embodiments of the present invention provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, performs the steps of the method according to the first aspect.

Compared with the prior art, the embodiment of the invention has the following beneficial effects: in the embodiment of the invention, the user behaviors are scored according to the weights corresponding to various user behaviors in the user behavior data, and compared with single-dimensional scoring in the prior art, the multi-dimensional scoring in the embodiment of the invention can more accurately reflect the favorite degree of a user on a certain song; and calculating a first approval rate according to the scores of the user behaviors, and calculating a confidence interval of the first approval rate, so that the confidence level of the first approval rate is improved, the user preference degree of a certain song can be accurately given even by the number of users of a small sample, and the song is recommended to the target user according to the calculated interest level of the target user in each song, so that the favorite song is recommended to the target user, and the accuracy of music recommendation is improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

Fig. 1 is a flowchart illustrating a music recommendation method according to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating another music recommendation method according to an embodiment of the present invention;

fig. 3 is a flowchart illustrating specific implementation steps for calculating the second approval rate according to an embodiment of the present invention

FIG. 4 is a flowchart illustrating steps for calculating a location score according to the location of the song in the existing menu according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a music recommendation apparatus according to an embodiment of the present invention;

fig. 6 is a schematic diagram of a server according to an embodiment of the present invention.

Detailed Description

In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

In order to explain the technical means of the present invention, the following description will be given by way of specific examples.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:歌曲音频显示的方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!