CN110147463A - A music pushing method, system, device and storage medium - Google Patents

A music pushing method, system, device and storage medium Download PDF

Info

Publication number
CN110147463A
CN110147463A CN201910266748.9A CN201910266748A CN110147463A CN 110147463 A CN110147463 A CN 110147463A CN 201910266748 A CN201910266748 A CN 201910266748A CN 110147463 A CN110147463 A CN 110147463A
Authority
CN
China
Prior art keywords
music
age
similarity
music player
information
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
Application number
CN201910266748.9A
Other languages
Chinese (zh)
Inventor
高英
龙信文
罗雄文
胡希平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201910266748.9A priority Critical patent/CN110147463A/en
Publication of CN110147463A publication Critical patent/CN110147463A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/63Querying
    • G06F16/635Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/65Clustering; Classification

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 music push method, device and storage medium. The method includes acquiring first music playing history information and first age information from a first music player, acquiring second music playing history information from a second music player, and calculating the first music player and the second music playing history information. interest similarity between players, calculate the age similarity between the first music player and the second music player, calculate user similarity, use an unsupervised clustering algorithm to score and play the second music The part with the highest score in each piece of music corresponding to the historical information is pushed to the first music player and other steps. The present invention screens out the second music player by calculating interest similarity and age similarity, and uses an unsupervised clustering algorithm to score each piece of music, which can achieve a more accurate push effect and improve user experience. The invention is widely used in the technical field of Internet.

Description

一种音乐推送方法、系统、装置和存储介质A music pushing method, system, device and storage medium

技术领域technical field

本发明涉及互联网技术领域,尤其是一种音乐推送方法、装置和存储介质。The invention relates to the technical field of the Internet, in particular to a music push method, device and storage medium.

背景技术Background technique

音乐播放软件的使用者在播放音乐时,除了选择自己设定的播放清单中的音乐之外,还希望被推送到合适的音乐。现有的音乐推送技术是基于使用者的播放历史进行分析,通过统计使用者经常播放的歌曲所具有的风格类型以及歌手等信息,分析出使用者的喜好,从而向使用者推送与其喜好相似的歌曲。现有的音乐推送技术缺点主要在于:第一,在使用者经常播放某一类型的歌曲的情况下,将被推送相同或相似类型的歌曲,只有使用者主动去播放其他类型的歌曲在情况下才能被推送到其他类型的歌曲,但这已违背了音乐推送的意义;第二,现有的音乐推送技术是完全基于使用者的播放历史进行分析的,但使用者的播放历史是使用者在过去某一段时间内的播放记录,而同一使用者在一段时间内的不同时间点的情绪都是有细微差别的,这导致使用者在不同时间点对音乐的喜好以及所播放的音乐类型都有差别,因此现有的音乐推送技术的分析结果实际上是过去一段时间使用者喜好的“平均值”,但人的情绪总是处于波动的状态,使用者对音乐的喜好和需求也是处于变动的状态,因此现有的音乐推送技术无法针对当下使用者对音乐的喜好和需求进行精准推动。综上所述,现有的音乐推送技术带来的使用者体验较差。When playing music, users of music playing software hope to be pushed to suitable music in addition to selecting the music in the playlist set by themselves. The existing music push technology is based on the analysis of the user's playback history, and analyzes the user's preferences by counting the genres and singers of the songs that the user often plays, so as to push the user similar preferences. song. The main disadvantages of the existing music push technology are as follows: First, when the user often plays a certain type of song, the same or similar type of song will be pushed, and only the user actively plays other types of songs. Only then can it be pushed to other types of songs, but this has violated the meaning of music push; second, the existing music push technology is completely based on the analysis of the user's play history, but the user's play history is the user's play history. The playback records of a certain period of time in the past, and the emotions of the same user at different time points in a period of time are slightly different, which leads to the user's preference for music and the type of music played at different time points. Therefore, the analysis results of the existing music push technology are actually the "average value" of users' preferences in the past period of time, but people's emotions are always in a state of fluctuation, and users' preferences and needs for music are also changing. Therefore, the existing music push technology cannot accurately promote the current user's preferences and needs for music. To sum up, the existing music push technology brings poor user experience.

发明内容Contents of the invention

为了解决上述技术问题,本发明的目的在于提供一种音乐推送方法、装置和存储介质。In order to solve the above technical problems, the object of the present invention is to provide a music pushing method, device and storage medium.

一方面,本发明实施例包括一种音乐推送方法,包括以下步骤:On the one hand, the embodiment of the present invention includes a music push method, comprising the following steps:

从第一音乐播放器获取第一音乐播放历史信息和第一年龄信息;所述第一音乐播放历史信息为第一音乐播放器在第一天气状况下播放过的音乐的记录;所述第一年龄信息为第一音乐播放器的使用者的年龄;Obtain the first music playing history information and the first age information from the first music player; The first music playing history information is the record of the music played by the first music player under the first weather condition; the first The age information is the age of the user of the first music player;

从第二音乐播放器获取第二音乐播放历史信息;所述第二音乐播放历史信息为第二音乐播放器在第一天气状况下播放过的音乐的记录;所述第二年龄信息为第二音乐播放器的使用者的年龄;Obtain the second music playing history information from the second music player; The second music playing history information is the record of the music played by the second music player under the first weather conditions; The second age information is the second the age of the user of the music player;

根据所述第一音乐播放历史信息和第二音乐播放历史信息计算所述第一音乐播放器与第二音乐播放器之间的兴趣相似度;Calculate the interest similarity between the first music player and the second music player according to the first music playing history information and the second music playing history information;

根据所述第一年龄信息和第二年龄信息计算所述第一音乐播放器与第二音乐播放器之间的年龄相似度;calculating the age similarity between the first music player and the second music player according to the first age information and the second age information;

根据所述兴趣相似度与年龄相似度计算用户相似度;所述用户相似度为所述兴趣相似度与年龄相似度的加权平均数;Calculate the user similarity according to the interest similarity and age similarity; the user similarity is a weighted average of the interest similarity and age similarity;

当检测到所述用户相似度满足预设的阈值条件,使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分;When it is detected that the user similarity meets a preset threshold condition, an unsupervised clustering algorithm is used to score each piece of music corresponding to the second music playback history information;

将所述第二音乐播放历史信息对应的各首音乐中得分最高的部分推送至第一音乐播放器。Pushing the part with the highest score among the pieces of music corresponding to the second music playing history information to the first music player.

进一步地,所述根据所述第一音乐播放历史信息和第二音乐播放历史信息计算所述第一音乐播放器与第二音乐播放器之间的兴趣相似度这一步骤,具体包括:Further, the step of calculating the interest similarity between the first music player and the second music player according to the first music playing history information and the second music playing history information specifically includes:

使用无监督聚类算法分别对所述第一音乐播放历史信息和第二音乐播放历史信息对应的各首音乐进行分类;所述分类用于将各首音乐分别归为相应的类别;Using an unsupervised clustering algorithm to classify each piece of music corresponding to the first music playback history information and the second music playback history information; the classification is used to classify each piece of music into a corresponding category;

生成第一兴趣向量;所述第一兴趣向量中的元素分别为第一音乐播放历史信息中被分类为各类别的音乐数量占第一音乐播放历史信息对应的音乐总数的比例;Generate a first interest vector; the elements in the first interest vector are respectively the ratio of the number of music classified as each category in the first music playback history information to the total number of music corresponding to the first music playback history information;

生成第二兴趣向量;所述第二兴趣向量中的元素分别为第二音乐播放历史信息中被分类为各类别的音乐数量占第二音乐播放历史信息对应的音乐总数的比例;Generate a second interest vector; the elements in the second interest vector are respectively the ratio of the number of music classified as each category in the second music playback history information to the total number of music corresponding to the second music playback history information;

根据所述第一兴趣向量、第二兴趣向量和类别总数计算所述兴趣相似度。The interest similarity is calculated according to the first interest vector, the second interest vector and the total number of categories.

进一步地,所述根据所述第一兴趣向量、第二兴趣向量和类别总数计算所述兴趣相似度这一步骤所用的公式为:Further, the formula used in the step of calculating the interest similarity according to the first interest vector, the second interest vector and the total number of categories is:

式中,A表示第一音乐播放器,X表示第二音乐播放器,SimIC(A,X)为第一音乐播放器与第二音乐播放器之间的兴趣相似度,vA为第一兴趣向量,vX为第二兴趣向量,distance(vA,vX)为第一兴趣向量与第二兴趣向量之间的距离,K为类别总数。In the formula, A represents the first music player, X represents the second music player, Sim IC (A, X) is the interest similarity between the first music player and the second music player, v A is the first Interest vector, v X is the second interest vector, distance(v A , v X ) is the distance between the first interest vector and the second interest vector, and K is the total number of categories.

进一步地,所述根据所述第一年龄信息和第二年龄信息计算所述第一音乐播放器与第二音乐播放器之间的年龄相似度这一步骤所用的公式为:Further, the formula used in the step of calculating the age similarity between the first music player and the second music player according to the first age information and the second age information is:

式中,A表示第一音乐播放器,X表示第二音乐播放器,SimSC(A,X)为第一音乐播放器与第二音乐播放器之间的年龄相似度,αA为第一年龄信息,αX为第二年龄信息,α为预设的阈值。In the formula, A represents the first music player, X represents the second music player, Sim SC (A, X) is the age similarity between the first music player and the second music player, α A is the first Age information, α X is the second age information, and α is a preset threshold.

进一步地,所述使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分这一步骤,具体包括:Further, the step of using an unsupervised clustering algorithm to score each piece of music corresponding to the second music playback history information specifically includes:

对第二音乐播放历史信息对应的各首音乐进行解析,从而获得所述各首音乐的特征向量;Analyzing each piece of music corresponding to the second music playback history information, thereby obtaining a feature vector of each piece of music;

使用无监督聚类算法根据所述各首音乐的特征向量计算出中心特征向量,并将各首音乐的特征向量归类至对应的中心特征向量;Using an unsupervised clustering algorithm to calculate a central feature vector according to the feature vectors of each piece of music, and classify the feature vectors of each piece of music into the corresponding central feature vector;

分别计算所述各首音乐的特征向量与对应中心特征向量之间的欧氏距离;所述欧氏距离作为相应音乐的得分。Euclidean distances between the eigenvectors of the respective pieces of music and the corresponding center eigenvectors are calculated respectively; the Euclidean distances are used as the score of the corresponding music.

进一步地,所述使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分这一步骤,具体包括:Further, the step of using an unsupervised clustering algorithm to score each piece of music corresponding to the second music playback history information specifically includes:

对第二音乐播放历史信息对应的各首音乐进行解析,从而获得所述各首音乐的特征向量;Analyzing each piece of music corresponding to the second music playback history information, thereby obtaining a feature vector of each piece of music;

使用无监督聚类算法根据所述各首音乐的特征向量计算出中心特征向量,并将各首音乐的特征向量归类至对应的中心特征向量;Using an unsupervised clustering algorithm to calculate a central feature vector according to the feature vectors of each piece of music, and classify the feature vectors of each piece of music into the corresponding central feature vector;

分别计算所述各首音乐的特征向量与对应中心特征向量之间的欧氏距离;Calculate the Euclidean distance between the eigenvectors of each piece of music and the corresponding center eigenvectors respectively;

分别统计所述各首音乐的累计被播放次数;Statistically count the accumulative times played of each piece of music;

计算所述各首音乐对应的欧氏距离与累计被播放次数的商作为相应音乐的得分。Calculate the quotient of the Euclidean distance corresponding to each piece of music and the cumulative number of played times as the score of the corresponding music.

进一步地,所述特征向量的元素包括过零率、单位功率、低能率、拍子、频谱中心和音调类型。Further, the elements of the feature vector include zero crossing rate, unit power, low energy rate, beat, spectrum center and tone type.

另一方面,本发明实施例包括一种音乐推送系统,包括:On the other hand, the embodiment of the present invention includes a music push system, comprising:

第一信息获取模块,用于从第一音乐播放器获取第一音乐播放历史信息和第一年龄信息;所述第一音乐播放历史信息为第一音乐播放器在第一天气状况下播放过的音乐的记录;所述第一年龄信息为第一音乐播放器的使用者的年龄;The first information acquisition module is used to obtain the first music playing history information and the first age information from the first music player; the first music playing history information is played by the first music player under the first weather conditions Music records; the first age information is the age of the user of the first music player;

第二信息获取模块,用于从第二音乐播放器获取第二音乐播放历史信息;所述第二音乐播放历史信息为第二音乐播放器在第一天气状况下播放过的音乐的记录;所述第二年龄信息为第二音乐播放器的使用者的年龄;The second information acquisition module is used to obtain the second music playing history information from the second music player; the second music playing history information is a record of the music played by the second music player under the first weather condition; the The second age information is the age of the user of the second music player;

兴趣相似度计算模块,用于根据所述第一音乐播放历史信息和第二音乐播放历史信息计算所述第一音乐播放器与第二音乐播放器之间的兴趣相似度;An interest similarity calculation module, configured to calculate the interest similarity between the first music player and the second music player according to the first music playback history information and the second music playback history information;

年龄相似度计算模块,用于根据所述第一年龄信息和第二年龄信息计算所述第一音乐播放器与第二音乐播放器之间的年龄相似度;an age similarity calculation module, configured to calculate the age similarity between the first music player and the second music player according to the first age information and the second age information;

用户相似度计算模块,用于根据所述兴趣相似度与年龄相似度计算用户相似度;所述用户相似度为所述兴趣相似度与年龄相似度的加权平均数;The user similarity calculation module is used to calculate the user similarity according to the interest similarity and age similarity; the user similarity is a weighted average of the interest similarity and age similarity;

评分模块,用于当检测到所述用户相似度满足预设的阈值条件,使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分;A scoring module, configured to use an unsupervised clustering algorithm to score each piece of music corresponding to the second music playback history information when it is detected that the user similarity meets a preset threshold condition;

推送模块,用于将所述第二音乐播放历史信息对应的各首音乐中得分最高的部分推送至第一音乐播放器。A push module, configured to push the part with the highest score among the pieces of music corresponding to the second music playback history information to the first music player.

另一方面,本发明实施例还包括一种音乐推送装置,包括存储器和处理器,所述存储器用于存储至少一个程序,所述处理器用于加载所述至少一个程序以执行本发明音乐推送方法。On the other hand, the embodiment of the present invention also includes a music push device, including a memory and a processor, the memory is used to store at least one program, and the processor is used to load the at least one program to execute the music push method of the present invention .

另一方面,本发明实施例还包括一种存储介质,其中存储有处理器可执行的指令,所述处理器可执行的指令在由处理器执行时用于执行本发明音乐推送方法。On the other hand, the embodiment of the present invention further includes a storage medium, which stores processor-executable instructions, and the processor-executable instructions are used to execute the music push method of the present invention when executed by the processor.

本发明的有益效果是:通过计算第一音乐播放器和第二音乐播放器之间的兴趣相似度和年龄相似度,可以为第一音乐播放器筛选出在相同天气状况下具有相同音乐偏好和相同年龄阶段的第二音乐播放器;通过使用无监督聚类算法对各首音乐进行评分,可以对被筛选出的第二音乐播放器中第二音乐播放历史信息对应的各首音乐进行进一步筛选;通过将进一步筛选出的音乐推送至第一音乐播放器,可以取得精确度更高的推送效果,提高使用体验。The beneficial effects of the present invention are: by calculating the interest similarity and age similarity between the first music player and the second music player, the first music player can be screened out for the first music player with the same music preference and music preference under the same weather conditions. The second music player at the same age stage; by using an unsupervised clustering algorithm to score each piece of music, each piece of music corresponding to the second music playing history information in the screened out second music player can be further screened ; By pushing the further filtered music to the first music player, a push effect with higher accuracy can be obtained and user experience can be improved.

附图说明Description of drawings

图1为本发明音乐推送方法的实施例的流程图。Fig. 1 is a flowchart of an embodiment of the music push method of the present invention.

具体实施方式Detailed ways

实施例1Example 1

本实施例包括一种音乐推送方法,参照图1,所述方法包括以下步骤:The present embodiment comprises a kind of music pushing method, with reference to Fig. 1, described method comprises the following steps:

S1.从第一音乐播放器获取第一音乐播放历史信息和第一年龄信息;所述第一音乐播放历史信息为第一音乐播放器在第一天气状况下播放过的音乐的记录;所述第一年龄信息为第一音乐播放器的使用者的年龄;S1. Obtain the first music playing history information and the first age information from the first music player; the first music playing history information is a record of music played by the first music player under the first weather conditions; the The first age information is the age of the user of the first music player;

S2.从第二音乐播放器获取第二音乐播放历史信息;所述第二音乐播放历史信息为第二音乐播放器在第一天气状况下播放过的音乐的记录;所述第二年龄信息为第二音乐播放器的使用者的年龄;S2. Obtain the second music playback history information from the second music player; the second music playback history information is a record of the music played by the second music player under the first weather conditions; the second age information is the age of the user of the second music player;

S3.根据所述第一音乐播放历史信息和第二音乐播放历史信息计算所述第一音乐播放器与第二音乐播放器之间的兴趣相似度;S3. Calculate the interest similarity between the first music player and the second music player according to the first music playing history information and the second music playing history information;

S4.根据所述第一年龄信息和第二年龄信息计算所述第一音乐播放器与第二音乐播放器之间的年龄相似度;S4. Calculate the age similarity between the first music player and the second music player according to the first age information and the second age information;

S5.根据所述兴趣相似度与年龄相似度计算用户相似度;所述用户相似度为所述兴趣相似度与年龄相似度的加权平均数;S5. Calculate the user similarity according to the interest similarity and age similarity; the user similarity is a weighted average of the interest similarity and age similarity;

S6.当检测到所述用户相似度满足预设的阈值条件,使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分;S6. When it is detected that the user similarity meets the preset threshold condition, use an unsupervised clustering algorithm to score each piece of music corresponding to the second music playback history information;

S7.将所述第二音乐播放历史信息对应的各首音乐中得分最高的部分推送至第一音乐播放器。S7. Push the part with the highest score among the pieces of music corresponding to the second music playback history information to the first music player.

步骤S1和S2中,所述音乐播放器是指台式电脑、笔记本电脑、平板电脑或手机等可以运行音乐播放软件、读取音乐数据并进行解码、驱动扬声器进行音乐播放的装置;本实施例后,所述音乐播放器除了单独指装置硬件之外,也可以单独指装置硬件上运行的程序软件,还可以指由装置硬件及其运行的程序软件所构成的整体。In steps S1 and S2, the music player refers to a device such as a desktop computer, a notebook computer, a tablet computer or a mobile phone that can run music playing software, read music data and decode it, and drive a speaker to play music; , the music player may refer to not only the device hardware, but also the program software running on the device hardware, or the whole composed of the device hardware and the program software running on it.

步骤S1和S2中,所述音乐播放器的使用者是指操作音乐播放器的人。使用者可以通过账号和密码登录音乐播放器所运行的音乐播放软件,从而控制音乐播放器。本实施例中,音乐播放器与其使用者具有一一对应关系,即一个音乐播放器只被一个使用者使用,一个使用者只使用一个音乐播放器,因此本实施例中不对音乐播放器及其使用者进行区分。In steps S1 and S2, the user of the music player refers to the person who operates the music player. The user can log in to the music player software run by the music player through the account number and password, so as to control the music player. In this embodiment, there is a one-to-one correspondence between music players and their users, that is, one music player is only used by one user, and one user only uses one music player. users to distinguish.

本实施例中,第一音乐播放器是所要进行的音乐推送的目标,第二音乐播放器是所推送的音乐的来源,即本实施例中的步骤S1-S7的目的是将符合要求的第二音乐播放器播放过的音乐推送至第一音乐播放器。所述播放,可以指运行音乐播放软件来驱动扬声器发出声音,也可以指仅将音乐数据文件从互联网下载到音乐播放器。In this embodiment, the first music player is the target of the music to be pushed, and the second music player is the source of the pushed music, that is, the purpose of steps S1-S7 in this embodiment is to push the music that meets the requirements. The music played by the second music player is pushed to the first music player. Said playing may refer to running music playing software to drive the speaker to emit sound, or it may refer to only downloading music data files from the Internet to the music player.

本实施例中的步骤S1-S7是通过运行在服务器上的服务端程序来执行的。所述第一音乐播放器和第二音乐播放器均接入到互联网,使得第一音乐播放器和第二音乐播放器上运行的音乐播放软件能够访问互联网,并与服务器上的服务端程序进行通信。所述第一音乐播放器和第二音乐播放器向音乐播放软件开放了访问权限,使得音乐播放程序可以读取第一音乐播放器和第二音乐播放器上存储的任何数据并上传到服务端程序。Steps S1-S7 in this embodiment are executed by a server program running on the server. Both the first music player and the second music player are connected to the Internet, so that the music player software running on the first music player and the second music player can access the Internet and communicate with the server program on the server. communication. The first music player and the second music player open access rights to the music player software, so that the music player program can read any data stored on the first music player and the second music player and upload it to the server program.

本实施例中,所述第一音乐播放器和第二音乐播放器还通过操作系统自带的天气预报模块或所安装的第三方天气预报软件来获取使用者所在地的实时天气情况信息。In this embodiment, the first music player and the second music player also obtain the real-time weather information of the user's location through the weather forecast module built in the operating system or the installed third-party weather forecast software.

本实施例中,当检测到触发条件后,开始执行步骤S1。所述触发条件,可以是指第一音乐播放器的使用者执行的特定操作,例如第一音乐播放器的使用者通过第一音乐播放器上运行的音乐播放软件发出获取音乐推送的请求,或者第一音乐播放器的使用者启动了第一音乐播放器上运行的音乐播放软件,或者天气预报软件实时更新了当前天气条件(例如由晴天切换至雨天)等。In this embodiment, when a trigger condition is detected, step S1 starts to be executed. The trigger condition may refer to a specific operation performed by the user of the first music player, for example, the user of the first music player sends a request to obtain a music push through the music player software running on the first music player, or The user of the first music player starts the music player software running on the first music player, or the weather forecast software updates the current weather conditions in real time (such as switching from sunny to rainy) and the like.

本实施例中,音乐播放器上运行的音乐播放软件在每次进行音乐播放时都会对所播放的音乐的歌名、播放起止时间、累计播放次数以及当时的天气状况进行记录,从而形成音乐播放历史信息。所述音乐播放历史信息可以通过清单列表或表格等形式进行存储和显示。所述天气状况是音乐播放软件从天气预报软件获得的。In this embodiment, the music playing software running on the music player will record the title of the played music, the start and end time of playing, the cumulative number of times of playing, and the weather conditions at that time every time the music is played, thereby forming a music playing software. history information. The music playing history information can be stored and displayed in the form of list or table. The weather conditions are obtained by the music player software from the weather forecast software.

步骤S1中,第一音乐播放历史信息是指第一音乐播放器在第一天气状况下播放过的音乐的记录。所述第一天气状况可以由使用者进行设定,例如设定为雨天、晴天或阴天等;所述第一天气状况也可以通过从天气预报软件的实时天气状况信息得到。In step S1, the first music playing history information refers to records of music played by the first music player under the first weather condition. The first weather condition can be set by the user, such as rainy day, sunny day or cloudy day; the first weather condition can also be obtained from real-time weather condition information from weather forecast software.

所述第一年龄信息是一组数据,其存储了第一音乐播放器的使用者的年龄,第一年龄信息可以在使用者注册音乐播放软件的账号时进行登记,当使用者使用账号登录音乐播放软件时,音乐播放软件即可读取第一年龄信息。The first age information is a set of data, which stores the age of the user of the first music player. The first age information can be registered when the user registers the account of the music player software. When playing the software, the music playing software can read the first age information.

步骤S2中的第二音乐播放器可以是一个集合概念,即所述第二音乐播放器是指一个或多个音乐播放器。The second music player in step S2 may be a collective concept, that is, the second music player refers to one or more music players.

步骤S3中,通过对第一音乐播放历史信息和第二音乐播放历史信息中所包含的歌曲进行分析,可以计算出第一音乐播放器与第二音乐播放器之间的兴趣相似度SimIC(A,X)。所述兴趣相似度越高,表明第一音乐播放器与第二音乐播放器所播放过的音乐越相似,即第一音乐播放器的使用者与第二音乐播放的使用者之间对音乐喜好的相似程度越高。由于第一音乐播放历史信息和第二音乐播放历史信息都是相同天气状况下播放过的音乐的记录,因此步骤S3中计算得到的兴趣相似度考虑了天气状况对使用者情绪的影响所产生的对使用者音乐偏好的影响,可以更加精准地进行音乐推送。In step S3, by analyzing the songs contained in the first music playing history information and the second music playing history information, the interest similarity SimIC ( A, X). The higher the similarity of interest, the more similar the music played by the first music player and the second music player is, that is, the music preference between the user of the first music player and the user of the second music player. The higher the degree of similarity. Since the first music playback history information and the second music playback history information are records of music played under the same weather conditions, the interest similarity calculated in step S3 takes into account the impact of weather conditions on user emotions. The impact on the user's music preference can make music push more accurate.

步骤S4中计算得到的年龄相似度SimSC(A,X)反映了第一音乐播放器的使用者与第二音乐播放器的使用者之间的年龄差异程度。所述年龄相似度越高,表明第一音乐播放器的使用者与第二音乐播放器的使用者的年龄差异越小。由于使用者对音乐的偏好与其年龄有关,因此所述年龄相似度越高,第一音乐播放器的使用者与第二音乐播放的使用者之间对音乐偏好的相似程度越高。The age similarity Sim SC (A,X) calculated in step S4 reflects the degree of age difference between the users of the first music player and the users of the second music player. The higher the age similarity, the smaller the age difference between the users of the first music player and the users of the second music player. Since the user's preference for music is related to his age, the higher the age similarity, the higher the similarity in music preference between the user of the first music player and the user of the second music player.

步骤S5中计算得到的用户相似度是兴趣相似度与年龄相似度的加权平均数,即Sim(A,X)=WICSimIC(A,X)+WSCSimSC(A,X),其中权重WIC和WSC可以自定义设置。所述用户相似度综合考虑了兴趣相似度与年龄相似度的影响,即综合考虑了歌曲播放历史、天气状况和年龄所反映出的使用者对音乐的偏好。The user similarity calculated in step S5 is the weighted average of interest similarity and age similarity, that is Sim(A,X)=W IC Sim IC (A,X)+W SC Sim SC (A,X), Among them, the weights W IC and W SC can be customized. The user similarity comprehensively considers the influence of interest similarity and age similarity, that is, comprehensively considers the user's preference for music reflected by song playing history, weather conditions and age.

步骤S6中,将第一音乐播放器与第二音乐播放器之间的用户相似度Sim(A,X)与预设的阈值λ进行比较,当Sim(A,X)>λ时将该第二音乐播放器设为第一音乐播放器的邻居。所述邻居是指网上连接关系。在步骤S7中,将第一音乐播放器的每一邻居的第二音乐播放历史信息中符合条件的音乐推送至第一音乐播放器。例如,满足Sim(A,X)>λ条件的第二音乐播放器共有N个,则将这N个第二音乐播放器均作为第一音乐播放器的邻居,将这N个第二音乐播放器的第二音乐播放历史信息中符合条件的音乐推送至第一音乐播放器。In step S6, the user similarity Sim(A,X) between the first music player and the second music player is compared with a preset threshold λ, and when Sim(A,X)>λ, the first The second music player is set as a neighbor of the first music player. The neighbor refers to an online connection relationship. In step S7, the music that meets the conditions in the second music playing history information of each neighbor of the first music player is pushed to the first music player. For example, if there are N second music players satisfying the condition of Sim(A,X)>λ, these N second music players are all regarded as neighbors of the first music player, and the N second music players are played The qualified music in the second music playing history information of the player is pushed to the first music player.

步骤S6中还使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分,然后选出得分最高的那一首或多首,在步骤S7中推送至第一音乐播放器。本实施例中,步骤S7中所推送的音乐的数量是可以自定义设置的,例如将推送的音乐的数量设定为3时,步骤S7将推送通过步骤S6计算得到的得分最高的3首歌曲。In step S6, an unsupervised clustering algorithm is also used to score each piece of music corresponding to the second music playing history information, and then the one or more songs with the highest score are selected, and pushed to the first music playing in step S7 device. In this embodiment, the number of music pushed in step S7 can be customized. For example, when the number of music pushed is set to 3, step S7 will push the 3 songs with the highest scores calculated in step S6. .

步骤S7中所述推送是指将歌曲的歌名、歌手或编号等信息发送至第一音乐播放器,或者将歌曲的数据文件发送至第一音乐播放器。Pushing in step S7 refers to sending information such as the song title, singer or serial number of the song to the first music player, or sending the data file of the song to the first music player.

通过执行步骤S1-S5,可以为第一音乐播放器筛选出在相同天气状况下具有相同音乐偏好和相同年龄阶段的第二音乐播放器;通过执行步骤S6,可以对被筛选出的第二音乐播放器中第二音乐播放历史信息对应的各首音乐进行进一步筛选;通过执行步骤S7,将进一步筛选出的音乐推送至第一音乐播放器,可以取得精确度更高的推送效果,提高使用体验。By performing steps S1-S5, the second music player with the same music preference and the same age group under the same weather conditions can be screened out for the first music player; by performing step S6, the screened out second music player can Each piece of music corresponding to the second music playback history information in the player is further screened; by performing step S7, the further screened music is pushed to the first music player, which can achieve a more accurate push effect and improve user experience .

进一步作为优选的实施方式,所述步骤S3,即根据所述第一音乐播放历史信息和第二音乐播放历史信息计算所述第一音乐播放器与第二音乐播放器之间的兴趣相似度这一步骤,具体包括:Further as a preferred embodiment, the step S3 is to calculate the interest similarity between the first music player and the second music player according to the first music playback history information and the second music playback history information. One step, including:

S301.使用无监督聚类算法分别对所述第一音乐播放历史信息和第二音乐播放历史信息对应的各首音乐进行分类;所述分类用于将各首音乐分别归为相应的类别;S301. Use an unsupervised clustering algorithm to classify the pieces of music corresponding to the first music playback history information and the second music playback history information; the classification is used to classify each piece of music into a corresponding category;

S302.生成第一兴趣向量;所述第一兴趣向量中的元素分别为第一音乐播放历史信息中被分类为各类别的音乐数量占第一音乐播放历史信息对应的音乐总数的比例;S302. Generate a first interest vector; the elements in the first interest vector are the ratio of the number of music classified into each category in the first music playback history information to the total number of music corresponding to the first music playback history information;

S303.生成第二兴趣向量;所述第二兴趣向量中的元素分别为第二音乐播放历史信息中被分类为各类别的音乐数量占第二音乐播放历史信息对应的音乐总数的比例;S303. Generate a second interest vector; the elements in the second interest vector are the ratio of the number of music classified into each category in the second music playback history information to the total number of music corresponding to the second music playback history information;

S304.根据所述第一兴趣向量、第二兴趣向量和类别总数计算所述兴趣相似度。S304. Calculate the interest similarity according to the first interest vector, the second interest vector and the total number of categories.

本实施例中,步骤S3具体是由步骤S301-S304组成的。In this embodiment, step S3 is specifically composed of steps S301-S304.

步骤S301中,使用无监督聚类算法分别对所述第一音乐播放历史信息和第二音乐播放历史信息对应的各首音乐进行分类。通过对无监督聚类算法进行设置,可以设定所要分成的类别的总数。本实施例中所使用的无监督聚类算法为K-means算法,通过对K-means算法进行设置,可以将音乐分类成类别1、类别2、类别3……类别K中的一种,即此时类别总数为K。In step S301, use an unsupervised clustering algorithm to classify the pieces of music corresponding to the first music playing history information and the second music playing history information. By setting the unsupervised clustering algorithm, you can set the total number of categories to be divided into. The unsupervised clustering algorithm used in the present embodiment is the K-means algorithm, by setting the K-means algorithm, music can be classified into one of category 1, category 2, category 3...category K, namely At this point the total number of categories is K.

通过步骤S301,第一音乐播放历史信息和第二音乐播放历史信息对应的各首音乐均被分类为类别1、类别2、类别3……类别K中的一种,即各首音乐均被标记上了与类别1、类别2、类别3……类别K中的一种对应的标签。Through step S301, each piece of music corresponding to the first music playback history information and the second music playback history information is classified into one of category 1, category 2, category 3...category K, that is, each piece of music is marked A label corresponding to one of category 1, category 2, category 3...category K is attached.

步骤S302中,生成第一兴趣向量vA。所述第一兴趣向量vA由多个元素组成,每个元素分别为第一音乐播放历史信息中被分类为各类别的音乐数量占第一音乐播放历史信息对应的音乐总数的比例,即其中,s1类别K为第一音乐播放历史信息中被分类为类别K的音乐数量,total1为第一音乐播放历史信息对应的音乐总数。In step S302, a first interest vector v A is generated. The first interest vector v A is composed of a plurality of elements, and each element is the ratio of the number of music classified into various categories in the first music playback history information to the total number of music corresponding to the first music playback history information, namely Wherein, s1 category K is the number of music classified as category K in the first music playback history information, and total1 is the total number of music corresponding to the first music playback history information.

步骤S303中,生成第二兴趣向量vX。所述第二兴趣向量vX由多个元素组成,每个元素分别为第二音乐播放历史信息中被分类为各类别的音乐数量占第二音乐播放历史信息对应的音乐总数的比例,即其中,s2类别K为第二音乐播放历史信息中被分类为类别K的音乐数量,total2为第一音乐播放历史信息对应的音乐总数。In step S303, a second interest vector v X is generated. The second interest vector v X is composed of a plurality of elements, and each element is respectively the ratio of the number of music classified into various categories in the second music playback history information to the total number of music corresponding to the second music playback history information, namely Wherein, s2 category K is the number of music classified as category K in the second music playback history information, and total2 is the total number of music corresponding to the first music playback history information.

步骤S304所用的公式为:The formula used in step S304 is:

式中,A表示第一音乐播放器,X表示第二音乐播放器,SimIC(A,X)为第一音乐播放器与第二音乐播放器之间的兴趣相似度,vA为第一兴趣向量,vX为第二兴趣向量,distance(vA,vX)为第一兴趣向量与第二兴趣向量之间的距离,K为类别总数。In the formula, A represents the first music player, X represents the second music player, Sim IC (A, X) is the interest similarity between the first music player and the second music player, v A is the first Interest vector, v X is the second interest vector, distance(v A , v X ) is the distance between the first interest vector and the second interest vector, and K is the total number of categories.

进一步作为优选的实施方式,所述根据所述第一年龄信息和第二年龄信息计算所述第一音乐播放器与第二音乐播放器之间的年龄相似度这一步骤所用的公式为:As a further preferred embodiment, the formula used in the step of calculating the age similarity between the first music player and the second music player according to the first age information and the second age information is:

式中,A表示第一音乐播放器,X表示第二音乐播放器,SimSC(A,X)为第一音乐播放器与第二音乐播放器之间的年龄相似度,αA为第一年龄信息即第一音乐播放器的使用者的年龄,αX为第二年龄信息即第二音乐播放器的使用者的年龄,α为预设的阈值。In the formula, A represents the first music player, X represents the second music player, Sim SC (A, X) is the age similarity between the first music player and the second music player, α A is the first The age information is the age of the user of the first music player, α X is the second age information, that is the age of the user of the second music player, and α is a preset threshold.

进一步作为优选的实施方式,所述步骤S6,即使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分这一步骤,具体包括:Further as a preferred embodiment, the step S6, that is, the step of scoring each piece of music corresponding to the second music playback history information using an unsupervised clustering algorithm, specifically includes:

S601A.对第二音乐播放历史信息对应的各首音乐进行解析,从而获得所述各首音乐的特征向量;S601A. Analyze each piece of music corresponding to the second music playback history information, so as to obtain the feature vector of each piece of music;

S602A.使用无监督聚类算法根据所述各首音乐的特征向量计算出中心特征向量,并将各首音乐的特征向量归类至对应的中心特征向量;S602A. Using an unsupervised clustering algorithm to calculate a central feature vector according to the feature vectors of each piece of music, and classify the feature vectors of each piece of music into the corresponding central feature vector;

S603A.分别计算所述各首音乐的特征向量与对应中心特征向量之间的欧氏距离;所述欧氏距离作为相应音乐的得分。S603A. Calculate the Euclidean distance between the eigenvectors of each piece of music and the corresponding central eigenvector; the Euclidean distance is used as the score of the corresponding music.

步骤S601A-S603A是步骤S6的第一种具体实施方法。Steps S601A-S603A are the first specific implementation method of step S6.

步骤S601A中,对第二音乐播放历史信息对应的各首音乐的音乐数组进行解析,可以获得由过零率、单位功率、低能率、拍子、频谱中心和音调类型等参量作为元素组成的6维特征向量。In step S601A, analyze the music array of each piece of music corresponding to the second music playback history information, and obtain a 6-dimensional data set composed of parameters such as zero-crossing rate, unit power, low energy rate, tempo, spectrum center, and tone type as elements. Feature vector.

所述音乐数组是指音乐的声音波形文件被加载后转换形成的数据格式,音乐数组中的每元素表示音乐在某一时刻的声音振幅值,由于声音波形文件的加载过程中可能进行了采样操作,音乐数组中各元素的下标不等于音频的实际时刻。音乐数组是一个浮点时间序列,本实施例中,音乐数组中每一个浮点值的元素都是float32类型,存储占4Byte共32bit。The music array refers to the data format converted after the sound wave file of the music is loaded, and each element in the music array represents the sound amplitude value of the music at a certain moment, because a sampling operation may be performed during the loading process of the sound wave file , the subscript of each element in the music array is not equal to the actual moment of the audio. The music array is a floating-point time series. In this embodiment, each element of the floating-point value in the music array is of type float32, and the storage occupies 4Byte and a total of 32 bits.

所述过零率的计算公式为式中,x[n]为音乐数组x中第n个元素,N为音乐数组的长度。The formula for calculating the zero-crossing rate is In the formula, x[n] is the nth element in the music array x, and N is the length of the music array.

所述单位功率的计算公式为 The formula for calculating the unit power is

所述低能率的计算公式为式中,M为音乐数组x[n]中满足x[k]2<单位功率条件的元素x[k]的数量。The formula for calculating the low energy rate is In the formula, M is the number of elements x[k] in the music array x[n] that satisfy the condition of x[k] 2 < unit power.

所述拍子的计算流程包括:The calculation process of the beat includes:

(1)使用以下公式将音乐数组的每一个元素取绝对值,进行下采样,采样率为32;(1) Use the following formula to take the absolute value of each element of the music array and perform downsampling with a sampling rate of 32;

y=downsample(|x|,32)y=downsample(|x|,32)

(2)对于下采样后的数组,计算其自相关性,限制其最小值为0:(2) For the downsampled array, calculate its autocorrelation and limit its minimum value to 0:

(3)然后在上面计算结果的基础上取大概4秒的分区,其中fs是原始线性间隔,元素下标间隔:(3) Then, based on the above calculation results, take a partition of about 4 seconds, where fs is the original linear interval, and the element subscript interval:

(4)对数据采用峰值选取方法,以最小峰值0.5,最小峰距作为约束。使用缩放因子将当前比例转换为每分钟节拍比例,每分钟节拍比例的第一个峰值就是要求的拍子。(4) Use the peak selection method for the data, with the minimum peak value of 0.5 and the minimum peak distance as a constraint. Converts the current scale to a beats-per-minute scale using a scaling factor, with the first peak of the beats-per-minute scale being the requested beat.

所述频谱中心的计算流程包括:The calculation process of the spectrum center includes:

(1)使用以下公式将音乐数组从时间域转化到频率域,对音乐进行傅立叶变换,得到振幅频谱:(1) Use the following formula to transform the music array from the time domain to the frequency domain, perform Fourier transform on the music, and obtain the amplitude spectrum:

其中,式中,xn为音乐数组x中第n个元素,N为音乐数组的长度。N=2t,t∈Z,2t-1<x数组长度≤2t;通过对前半部分振幅频谱取绝对值计算单边振幅谱中心:Among them, in the formula, x n is the nth element in the music array x, and N is the length of the music array. N=2 t , t∈Z, 2 t-1 <x array length ≤2 t ; calculate the center of the unilateral amplitude spectrum by taking the absolute value of the first half of the amplitude spectrum:

(2)将线性间隔更新为频率间隔:(2) Update linear intervals to frequency intervals:

(3)使用以下公式计算频谱中心:(3) Calculate the spectral center using the following formula:

所述音调类型的计算流程包括:The calculation process of the tone type includes:

(1)使用以下公式切割音乐数组中频率低于20Hz振幅频谱区间,将剩下的所有区间的频率维度映射到MIDI数维度:(1) Use the following formula to cut the frequency range below 20Hz in the music array, and map the frequency dimension of all the remaining ranges to the MIDI number dimension:

其中,69是A在中央C(440赫兹)上的MIDI数;Among them, 69 is the MIDI number of A on middle C (440 Hz);

(2)通过对12取模来将MIDI数映射到MIDI音高类别上(MPC):(2) Map MIDI numbers to MIDI pitch categories (MPC) by taking modulo 12:

MPCk=mod(Mk,12)MPC k = mod(M k ,12)

(3)将类别相同的MPC进行叠加得到音色图;相应地,对应Major、Minor和None三种音调类型:(3) Superimpose MPCs of the same category to obtain a timbre map; correspondingly, corresponding to the three tone types of Major, Minor and None:

major[k]=chroma[k]+chroma[(k+2)%12]+chroma[(k+4)%12]+chroma[(k+5)%12]+chroma[(k+7)%12]+chroma[(k+9)%12]+chroma[(k+11)%12]major[k]=chroma[k]+chroma[(k+2)%12]+chroma[(k+4)%12]+chroma[(k+5)%12]+chroma[(k+7) %12]+chroma[(k+9)%12]+chroma[(k+11)%12]

minor[k]=chroma[k]+chroma[(k+2)%12]+chroma[(k+3)%12]+chroma[(k+5)%12]+chroma[(k+7)%12]+chroma[(k+8)%12]+chroma[(k+10)%12]minor[k]=chroma[k]+chroma[(k+2)%12]+chroma[(k+3)%12]+chroma[(k+5)%12]+chroma[(k+7) %12]+chroma[(k+8)%12]+chroma[(k+10)%12]

其中,chroma是音色图,满足major[(k+3)%12]=minor[k]。当chroma[(k+3)%12]>chroma[k]时,音调类型是Major;当chroma[(k+3)%12]<chroma[k]时,音调类型是Minor;否则,音调类型是None。Wherein, chroma is a timbre map, which satisfies major[(k+3)%12]=minor[k]. When chroma[(k+3)%12]>chroma[k], the tone type is Major; when chroma[(k+3)%12]<chroma[k], the tone type is Minor; otherwise, the tone type is None.

步骤S602A中,执行无监督聚类算法,从第二音乐播放历史信息对应的各首音乐中选出聚类中心并进行聚类,即根据所述各首音乐的特征向量计算出中心特征向量,并将各首音乐的特征向量归类至对应的中心特征向量。通过执行步骤S602A,从第二音乐播放历史信息对应的各首音乐中一共选出了K个聚类中心,其中第k个聚类中心对应的特征向量即中心特征向量为fkc。其余未被选定为聚类中心的音乐则被分类至各聚类中心,其中被分类至第k个聚类中心的第i首音乐的特征向量为fkiIn step S602A, execute an unsupervised clustering algorithm, select a cluster center from each piece of music corresponding to the second music playback history information and perform clustering, that is, calculate the center feature vector according to the feature vector of each piece of music, And classify the eigenvectors of each piece of music into the corresponding central eigenvectors. By executing step S602A, a total of K cluster centers are selected from the pieces of music corresponding to the second music playing history information, wherein the feature vector corresponding to the kth cluster center, that is, the center feature vector is f kc . The rest of the music not selected as the cluster center is classified into each cluster center, and the feature vector of the i-th music classified into the k-th cluster center is f ki .

步骤S603A中,分别计算所述各首音乐的特征向量与对应中心特征向量之间的欧氏距离;所述欧氏距离作为相应音乐的得分。即步骤S603A中,被分类至第k个聚类中心的第i首音乐的得分为:Ski=Sk·distance(fkc,fki),k∈[1,K],其中distance(fkc,fki)为第k个聚类中心对应的中心特征向量fkc与被分类至第k个聚类中心的第i首音乐的特征向量fki之间的距离,Sk为自定义系数。In step S603A, the Euclidean distances between the feature vectors of the respective pieces of music and the corresponding center feature vectors are respectively calculated; the Euclidean distances are used as the scores of the corresponding music. That is, in step S603A, the score of the i-th piece of music classified into the k-th cluster center is: S ki =S k ·distance(f kc ,f ki ), k∈[1,K], where distance(f kc ,f ki ) is the distance between the center feature vector f kc corresponding to the kth cluster center and the feature vector fki of the i-th music classified to the kth cluster center, and S k is a custom coefficient .

进一步作为优选的实施方式,所述步骤S6,即使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分这一步骤,具体包括:Further as a preferred embodiment, the step S6, that is, the step of scoring each piece of music corresponding to the second music playback history information using an unsupervised clustering algorithm, specifically includes:

S601B.对第二音乐播放历史信息对应的各首音乐进行解析,从而获得所述各首音乐的特征向量;S601B. Analyze each piece of music corresponding to the second music playing history information, so as to obtain the feature vector of each piece of music;

S602B.使用无监督聚类算法根据所述各首音乐的特征向量计算出中心特征向量,并将各首音乐的特征向量归类至对应的中心特征向量;S602B. Using an unsupervised clustering algorithm to calculate the central feature vector according to the feature vectors of each piece of music, and classify the feature vectors of each piece of music into the corresponding central feature vector;

S603B分别计算所述各首音乐的特征向量与对应中心特征向量之间的欧氏距离;S603B respectively calculates the Euclidean distance between the feature vectors of each piece of music and the corresponding central feature vector;

S604B分别统计所述各首音乐的累计被播放次数;S604B respectively counts the accumulative times played by each piece of music;

S605B.计算所述各首音乐对应的欧氏距离与累计被播放次数的商作为相应音乐的得分。S605B. Calculate the quotient of the Euclidean distance corresponding to each piece of music and the cumulative number of played times as the score of the corresponding music.

步骤S601B-S605B是步骤S6的第二种具体实施方法。Steps S601B-S605B are the second specific implementation method of step S6.

步骤S601B-S603B的效果与步骤S601A-S603A的效果相同,即计算出为第k个聚类中心对应的中心特征向量fkc与被分类至第k个聚类中心的第i首音乐的特征向量fki之间的距离distance(fkc,fki)。The effect of steps S601B-S603B is the same as that of steps S601A-S603A, that is, the center feature vector f kc corresponding to the k-th cluster center and the feature vector of the i-th music classified to the k-th cluster center are calculated The distance between f ki is distance(f kc ,f ki ).

在步骤S6的第二种具体实施方法中,还执行步骤S604B,即统计所述第二音乐播放历史信息对应的各首音乐的累计被播放次数。通过执行步骤S604B,可以得到被分类至第k个聚类中心的第i首音乐的累计被播放次数NkiIn the second specific implementation method of step S6, step S604B is also performed, that is, counting the cumulative number of times each piece of music corresponding to the second music playing history information is played. By executing step S604B, the accumulative number of times N ki of the i-th music classified into the k-th cluster center can be obtained.

在步骤S6的第二种具体实施方法中,还执行步骤S605B,即计算所述各首音乐对应的欧氏距离与累计被播放次数的商,通过步骤S605B计算得到的商就是相应音乐的得分。即步骤S605B中,被分类至第k个聚类中心的第i首音乐的得分为:k∈[1,K]。In the second specific implementation method of step S6, step S605B is also performed, that is, calculating the quotient of the Euclidean distance corresponding to each piece of music and the cumulative number of times played, and the quotient calculated by step S605B is the score of the corresponding music. That is, in step S605B, the score of the i-th piece of music classified into the k-th cluster center is: k∈[1,K].

通过执行步骤S6的第二种具体实施方法即步骤S601B-S605B,在考虑无监督聚类算法的分类结果的基础上,还考虑了各首歌曲的累计被播放次数的影响,即歌曲的累计被播放次数越小,该歌曲的得分越高,在其他条件不变的情况下被推送到第一音乐播放器的可能性越大,避免第二音乐播放历史信息中的一些歌曲被反复推送,从而保障推送结果的新颖性和覆盖率。By executing the second specific implementation method of step S6, that is, steps S601B-S605B, on the basis of considering the classification results of the unsupervised clustering algorithm, the influence of the cumulative number of times each song is played is also considered, that is, the cumulative number of times the song is played The smaller the number of plays, the higher the score of the song, and the greater the possibility of being pushed to the first music player when other conditions remain unchanged, so as to avoid that some songs in the second music playing history information are repeatedly pushed, thereby Guarantee the novelty and coverage of the push results.

本实施例中,在执行步骤S301-S304后,第二音乐播放历史信息对应的各首音乐分别被分类为类别1、类别2、类别3……类别K中的一种。在执行步骤S6后,第二音乐播放历史信息对应的各首音乐都具有了相应的得分。在执行步骤S7时,可以对第二音乐播放历史信息对应的各首音乐进行同一类别的内部排序,然后按照设定,将被分类为类别1、类别2、类别3……类别K的音乐中类别内部得分最高的那一首或多首推送至第一音乐播放器。In this embodiment, after steps S301-S304 are performed, each piece of music corresponding to the second music playing history information is classified into one of category 1, category 2, category 3...category K. After step S6 is executed, each piece of music corresponding to the second music playback history information has a corresponding score. When step S7 is executed, the music corresponding to the second music playback history information can be sorted internally in the same category, and then according to the setting, the music classified into category 1, category 2, category 3...category K The one or more songs with the highest score in the category are pushed to the first music player.

实施例2Example 2

本实施例中一种音乐推送系统,包括:A kind of music pushing system in the present embodiment, comprises:

第一信息获取模块,用于从第一音乐播放器获取第一音乐播放历史信息和第一年龄信息;所述第一音乐播放历史信息为第一音乐播放器在第一天气状况下播放过的音乐的记录;所述第一年龄信息为第一音乐播放器的使用者的年龄;The first information acquisition module is used to obtain the first music playing history information and the first age information from the first music player; the first music playing history information is played by the first music player under the first weather conditions Music records; the first age information is the age of the user of the first music player;

第二信息获取模块,用于从第二音乐播放器获取第二音乐播放历史信息;所述第二音乐播放历史信息为第二音乐播放器在第一天气状况下播放过的音乐的记录;所述第二年龄信息为第二音乐播放器的使用者的年龄;The second information acquisition module is used to obtain the second music playing history information from the second music player; the second music playing history information is a record of the music played by the second music player under the first weather condition; the The second age information is the age of the user of the second music player;

兴趣相似度计算模块,用于根据所述第一音乐播放历史信息和第二音乐播放历史信息计算所述第一音乐播放器与第二音乐播放器之间的兴趣相似度;An interest similarity calculation module, configured to calculate the interest similarity between the first music player and the second music player according to the first music playback history information and the second music playback history information;

年龄相似度计算模块,用于根据所述第一年龄信息和第二年龄信息计算所述第一音乐播放器与第二音乐播放器之间的年龄相似度;an age similarity calculation module, configured to calculate the age similarity between the first music player and the second music player according to the first age information and the second age information;

用户相似度计算模块,用于根据所述兴趣相似度与年龄相似度计算用户相似度;所述用户相似度为所述兴趣相似度与年龄相似度的加权平均数;The user similarity calculation module is used to calculate the user similarity according to the interest similarity and age similarity; the user similarity is a weighted average of the interest similarity and age similarity;

评分模块,用于当检测到所述用户相似度满足预设的阈值条件,使用无监督聚类算法对所述第二音乐播放历史信息对应的各首音乐进行评分;A scoring module, configured to use an unsupervised clustering algorithm to score each piece of music corresponding to the second music playback history information when it is detected that the user similarity meets a preset threshold condition;

推送模块,用于将所述第二音乐播放历史信息对应的各首音乐中得分最高的部分推送至第一音乐播放器。A push module, configured to push the part with the highest score among the pieces of music corresponding to the second music playback history information to the first music player.

本实施例中的第一信息获取模块、第二信息获取模块、兴趣相似度计算模块、年龄相似度计算模块、用户相似度计算模块、评分模块和推送模块可以是连接到互联网的服务器上具有相应功能的软件或硬件模块。In this embodiment, the first information acquisition module, the second information acquisition module, the interest similarity calculation module, the age similarity calculation module, the user similarity calculation module, the scoring module and the push module can be connected to the Internet server with corresponding Functional software or hardware modules.

本实施例中还包括一种音乐推送装置,包括存储器和处理器,所述存储器用于存储至少一个程序,所述处理器用于加载所述至少一个程序以执行实施例1所述方法。This embodiment also includes a music push device, including a memory and a processor, the memory is used to store at least one program, and the processor is used to load the at least one program to execute the method described in Embodiment 1.

本实施例中还包括一种存储介质,其中存储有处理器可执行的指令,所述处理器可执行的指令在由处理器执行时用于执行实施例1所述方法。This embodiment also includes a storage medium, which stores processor-executable instructions, and the processor-executable instructions are used to execute the method described in Embodiment 1 when executed by a processor.

本实施例中的音乐推送系统、装置和存储介质,可以执行本发明的音乐推送方法,可执行方法实施例的任意组合实施步骤,具备该方法相应的功能和有益效果。The music push system, device, and storage medium in this embodiment can execute the music push method of the present invention, can execute any combination of implementation steps of the method embodiments, and have the corresponding functions and beneficial effects of the method.

以上是对本发明的较佳实施进行了具体说明,但对本发明创造并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments, and those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present invention. , these equivalent modifications or replacements are all within the scope defined by the claims of the present application.

Claims (10)

1. a kind of music method for pushing, which comprises the following steps:
First music play history information and the first age information are obtained from first music player;The first music broadcasting is gone through History information is the record for the music that first music player played under the first weather conditions;First age information is the The age of the user of one music player;
The second music historical information is obtained from the second music player;The second music historical information is the second sound The record for the music that happy player played under the first weather conditions;Second age information is the second music player The age of user;
The first music player is calculated according to the first music play history information and the second music historical information With the Interest Similarity between the second music player;
The first music player and the second music player are calculated according to first age information and the second age information Between age similarity;
According to the Interest Similarity and age similarity calculation user's similarity;User's similarity is that the interest is similar The weighted average of degree and age similarity;
When detecting that user's similarity meets preset threshold condition, using Unsupervised clustering algorithm to second music The corresponding each song of play history information scores;
The part of highest scoring in the corresponding each song of the second music historical information is pushed to first music to broadcast Put device.
2. a kind of music method for pushing according to claim 1, which is characterized in that described to be played according to the first music Historical information and the second music historical information calculate emerging between the first music player and the second music player The step for interesting similarity, specifically includes:
Using Unsupervised clustering algorithm respectively to the first music play history information and the second music historical information pair Each song answered is classified;The classification for being classified as corresponding classification for each song respectively;
Generate the first interest vector;Element in first interest vector is respectively to be divided in first music play history information Class is the ratio that music number of all categories accounts for the corresponding music sum of first music play history information;
Generate the second interest vector;Element in second interest vector is respectively to be divided in the second music historical information Class is the ratio that music number of all categories accounts for the corresponding music sum of the second music historical information;
The Interest Similarity is calculated according to first interest vector, the second interest vector and classification sum.
3. a kind of music method for pushing according to claim 2, which is characterized in that it is described according to first interest to The step for amount, the second interest vector and classification sum calculate Interest Similarity formula used are as follows:
In formula, A indicates that first music player, X indicate the second music player, SimIC(A, X) be first music player with Interest Similarity between second music player, vAFor the first interest vector, vXFor the second interest vector, distance (vA, vX) it is the distance between the first interest vector and the second interest vector, K is classification sum.
4. a kind of music method for pushing according to claim 1, which is characterized in that described according to first age information And the second age information the step for calculating the age similarity between the first music player and the second music player Formula used are as follows:
In formula, A indicates that first music player, X indicate the second music player, SimSC(A, X) be first music player with Age similarity between second music player, αAFor the first age information, αXFor the second age information, α is preset threshold Value.
5. a kind of music method for pushing according to claim 1, which is characterized in that described to use Unsupervised clustering algorithm pair The step for corresponding each song of the second music historical information is scored, specifically includes:
The corresponding each song of second music historical information is parsed, thus obtain the feature of each song to Amount;
Central feature vector is calculated according to the feature vector of each song using Unsupervised clustering algorithm, and by each first sound Happy feature vector is sorted out to corresponding central feature vector;
Calculate separately the Euclidean distance between the feature vector of each song and corresponding central feature vector;The Euclidean away from From the score as corresponding music.
6. a kind of music method for pushing according to claim 1, which is characterized in that described to use Unsupervised clustering algorithm pair The step for corresponding each song of the second music historical information is scored, specifically includes:
The corresponding each song of second music historical information is parsed, thus obtain the feature of each song to Amount;
Central feature vector is calculated according to the feature vector of each song using Unsupervised clustering algorithm, and by each first sound Happy feature vector is sorted out to corresponding central feature vector;
Calculate separately the Euclidean distance between the feature vector of each song and corresponding central feature vector;
The accumulative played number of each song is counted respectively;
Calculate score of the corresponding Euclidean distance of each song to the quotient of accumulative played number as corresponding music.
7. a kind of music method for pushing according to claim 5 or 6, which is characterized in that the element packet of described eigenvector Include zero-crossing rate, unit power, low energy rate, bat, spectral centroid and tone type.
8. a kind of music supplying system characterized by comprising
The first information obtains module, for obtaining first music play history information and the first age letter from first music player Breath;The first music play history information is the note for the music that first music player played under the first weather conditions Record;First age information is the age of the user of first music player;
Second data obtaining module, for obtaining the second music historical information from the second music player;Second sound Happy play history information is the record for the music that the second music player played under the first weather conditions;Second age Information is the age of the user of the second music player;
Interest Similarity computing module, for according to the first music play history information and the second music historical information Calculate the Interest Similarity between the first music player and the second music player;
Age similarity calculation module, for calculating the first music according to first age information and the second age information Age similarity between player and the second music player;
User's similarity calculation module, for according to the Interest Similarity and age similarity calculation user's similarity;It is described User's similarity is the weighted average of the Interest Similarity and age similarity;
Grading module, for using Unsupervised clustering algorithm when detecting that user's similarity meets preset threshold condition It scores the corresponding each song of the second music historical information;
Pushing module, for pushing the part of highest scoring in the corresponding each song of the second music historical information To first music player.
9. a kind of music driving means, which is characterized in that including memory and processor, the memory is for storing at least one A program, the processor require any one of 1-7 the method for loading at least one described program with perform claim.
10. a kind of storage medium, wherein being stored with the executable instruction of processor, which is characterized in that the processor is executable Instruction be used to execute such as any one of claim 1-7 the method when executed by the processor.
CN201910266748.9A 2019-04-03 2019-04-03 A music pushing method, system, device and storage medium Pending CN110147463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910266748.9A CN110147463A (en) 2019-04-03 2019-04-03 A music pushing method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910266748.9A CN110147463A (en) 2019-04-03 2019-04-03 A music pushing method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN110147463A true CN110147463A (en) 2019-08-20

Family

ID=67589442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910266748.9A Pending CN110147463A (en) 2019-04-03 2019-04-03 A music pushing method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN110147463A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968726A (en) * 2019-10-29 2020-04-07 哈尔滨师范大学 Music pushing system
CN114117224A (en) * 2021-11-29 2022-03-01 海信集团控股股份有限公司 Method, device and storage medium for determining mastery degree of knowledge point

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102650997A (en) * 2011-02-25 2012-08-29 腾讯科技(深圳)有限公司 Element recommending method and device
CN103559197A (en) * 2013-09-23 2014-02-05 浙江大学 Real-time music recommendation method based on context pre-filtering
CN103678388A (en) * 2012-09-19 2014-03-26 腾讯科技(深圳)有限公司 Online music recommendation method and device
CN106250545A (en) * 2016-08-10 2016-12-21 Tcl集团股份有限公司 A kind of multimedia recommendation method and system searching for content based on user
KR20170107868A (en) * 2016-03-16 2017-09-26 (주)멜로다임 Method and system to recommend music contents by database composed of user's context, recommended music and use pattern
CN107784066A (en) * 2017-08-25 2018-03-09 上海壹账通金融科技有限公司 Information recommendation method, device, server and storage medium
CN108197285A (en) * 2018-01-15 2018-06-22 腾讯科技(深圳)有限公司 A kind of data recommendation method and device
CN109150817A (en) * 2017-11-24 2019-01-04 新华三信息安全技术有限公司 A kind of web-page requests recognition methods and device
CN109684538A (en) * 2018-12-03 2019-04-26 重庆邮电大学 A kind of recommended method and recommender system based on individual subscriber feature

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102650997A (en) * 2011-02-25 2012-08-29 腾讯科技(深圳)有限公司 Element recommending method and device
CN103678388A (en) * 2012-09-19 2014-03-26 腾讯科技(深圳)有限公司 Online music recommendation method and device
CN103559197A (en) * 2013-09-23 2014-02-05 浙江大学 Real-time music recommendation method based on context pre-filtering
KR20170107868A (en) * 2016-03-16 2017-09-26 (주)멜로다임 Method and system to recommend music contents by database composed of user's context, recommended music and use pattern
CN106250545A (en) * 2016-08-10 2016-12-21 Tcl集团股份有限公司 A kind of multimedia recommendation method and system searching for content based on user
CN107784066A (en) * 2017-08-25 2018-03-09 上海壹账通金融科技有限公司 Information recommendation method, device, server and storage medium
CN109150817A (en) * 2017-11-24 2019-01-04 新华三信息安全技术有限公司 A kind of web-page requests recognition methods and device
CN108197285A (en) * 2018-01-15 2018-06-22 腾讯科技(深圳)有限公司 A kind of data recommendation method and device
CN109684538A (en) * 2018-12-03 2019-04-26 重庆邮电大学 A kind of recommended method and recommender system based on individual subscriber feature

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨媛媛 等: "融合上下文感知计算的协同过滤算法", 《天 津 师 范 大 学 学 报(自 然 科 学 版)》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968726A (en) * 2019-10-29 2020-04-07 哈尔滨师范大学 Music pushing system
CN110968726B (en) * 2019-10-29 2023-10-31 哈尔滨师范大学 Music push system
CN114117224A (en) * 2021-11-29 2022-03-01 海信集团控股股份有限公司 Method, device and storage medium for determining mastery degree of knowledge point

Similar Documents

Publication Publication Date Title
US8642872B2 (en) Music steering with automatically detected musical attributes
US12032620B2 (en) Identifying media content
JP4199097B2 (en) Automatic music classification apparatus and method
US7696427B2 (en) Method and system for recommending music
WO2017165823A1 (en) Media content items sequencing
KR20080030922A (en) Information processing apparatus and methods, programs, and recording media
GB2533654A (en) Analysing audio data
EP4270373B1 (en) Method for identifying a song
US20230409633A1 (en) Identification of media items for target groups
CN110147463A (en) A music pushing method, system, device and storage medium
WO2016102738A1 (en) Similarity determination and selection of music
Chordia et al. Extending Content-Based Recommendation: The Case of Indian Classical Music.
EP3096242A1 (en) Media content selection
US20230401254A1 (en) Generation of personality profiles
Lo et al. Homogeneous segmentation and classifier ensemble for audio tag annotation and retrieval
Schmitt et al. Recognising guitar effects-which acoustic features really matter?
Shen et al. Effective music tagging through advanced statistical modeling
Yang et al. Improving Musical Concept Detection by Ordinal Regression and Context Fusion.
Yeh et al. Improving music auto-tagging by intra-song instance bagging
WO2022096113A1 (en) Identification of users or user groups based on personality profiles
US20230236791A1 (en) Media content sequencing
Wang et al. Chinese opera genre classification based on multi-feature fusion and extreme learning machine
Liu et al. JoMP: a mobile music player agent for joggers based on user interest and pace
Garretsen Sound First, Labels Last: A Post-Genre Music Recommender Driven Purely by Sonic Features
Sneha et al. Recommending music by combining content-based and collaborative filtering with user preferences

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190820

RJ01 Rejection of invention patent application after publication