CN113836401B - Playlist recommendation method, device and readable storage medium - Google Patents
Playlist recommendation method, device and readable storage medium Download PDFInfo
- Publication number
- CN113836401B CN113836401B CN202111047831.0A CN202111047831A CN113836401B CN 113836401 B CN113836401 B CN 113836401B CN 202111047831 A CN202111047831 A CN 202111047831A CN 113836401 B CN113836401 B CN 113836401B
- Authority
- CN
- China
- Prior art keywords
- user
- song
- vector
- playlist
- historical
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 239000013598 vector Substances 0.000 claims abstract description 174
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 description 11
- 230000006870 function Effects 0.000 description 8
- 239000011159 matrix material Substances 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
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/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- 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/638—Presentation of query results
- G06F16/639—Presentation of query results using playlists
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Computational Linguistics (AREA)
- Multimedia (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域Technical field
本发明涉及内容推荐技术领域,尤其涉及一种歌单推荐方法、装置及可读存储介质。The present invention relates to the technical field of content recommendation, and in particular to a song list recommendation method, device and readable storage medium.
背景技术Background technique
现有的歌单推荐方式是通过用户输入搜索指令,歌单推荐装置根据用户输入的搜索指令在歌曲库中查找与搜索指令相匹配的歌曲。若查找到与搜索指令相匹配的歌曲,则将查找到的歌曲作为待选歌曲,并根据待选歌曲生成推荐歌单推荐给用户;若未查找到与搜索指令相匹配的歌曲,则对歌曲库包括的所有歌曲进行协同过滤处理,以获取符合用户偏好的多个歌曲作为待选歌曲,然后根据待选歌曲生成推荐歌单推荐给用户。但是,这种歌单推荐方式完全基于用户的搜索指令,推荐歌单中推荐的歌曲比较单一,多样性较差。The existing playlist recommendation method is that the user inputs a search command, and the playlist recommendation device searches the song library for songs that match the search command according to the search command input by the user. If a song matching the search instruction is found, the found song will be used as a candidate song, and a recommended song list will be generated and recommended to the user based on the candidate song; if no song matching the search instruction is found, the song will be All songs included in the library are subjected to collaborative filtering processing to obtain multiple songs that meet the user's preferences as candidate songs, and then a recommended playlist is generated and recommended to the user based on the candidate songs. However, this playlist recommendation method is completely based on the user's search instructions. The songs recommended in the recommended playlist are relatively single and have poor diversity.
发明内容Contents of the invention
本发明的主要目的在于提供一种歌单推荐方法、装置及可读存储介质,旨在提高推荐歌单中推荐的歌曲的多样性。The main purpose of the present invention is to provide a playlist recommendation method, device and readable storage medium, aiming to improve the diversity of recommended songs in the recommended playlist.
为实现上述目的,本发明提供一种歌单推荐方法,所述歌单推荐方法包括:In order to achieve the above object, the present invention provides a song list recommendation method. The song list recommendation method includes:
获取用户的历史歌单,并分别获取所述历史歌单的特征数据、所述历史歌单中所包含的各历史歌曲的特征数据以及所述用户的特征数据;Obtain the user's historical playlist, and obtain the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user;
根据各所述历史歌曲的特征数据、所述历史歌单的特征数据以及所述用户的特征数据确定所述用户的用户向量;Determine the user vector of the user based on the characteristic data of each historical song, the characteristic data of the historical playlist, and the characteristic data of the user;
根据所述用户向量以及预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好;Determine the user's target user preference for the songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
根据所述目标用户偏好确定所述用户的推荐歌单。Determine the user's recommended playlist according to the target user's preferences.
可选地,所述根据各所述历史歌曲的特征数据、所述历史歌单的特征数据以及所述用户的特征数据确定所述用户的用户向量的步骤包括:Optionally, the step of determining the user vector of the user based on the characteristic data of each historical song, the characteristic data of the historical playlist, and the characteristic data of the user includes:
根据各所述历史歌曲的特征数据确定各所述历史歌曲的第一向量,根据所述历史歌单的特征数据确定所述历史歌单的第二向量以及根据所述用户的特征数据确定所述用户的第三向量;The first vector of each historical song is determined according to the characteristic data of each historical song, the second vector of the historical playlist is determined according to the characteristic data of the historical playlist, and the second vector of the historical playlist is determined according to the characteristic data of the user. User’s third vector;
获取各所述历史歌曲对所述历史歌单的第一权重值,并根据所述第一向量,第二向量以及第一权重值确定所述历史歌单的歌单向量;Obtain the first weight value of each historical song to the historical play list, and determine the song list vector of the historical play list based on the first vector, the second vector and the first weight value;
获取所述历史歌单对所述用户的第二权重值,并根据所述歌单向量、第三向量以及第二权重值确定所述用户的用户向量。Obtain the second weight value of the historical playlist for the user, and determine the user vector of the user based on the playlist vector, the third vector and the second weight value.
可选地,所述根据所述用户向量以及预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好的步骤包括:Optionally, the step of determining the user's target user preference for the songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph includes:
根据所述用户向量以及所述预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的待选用户偏好;Determine the user's candidate user preferences for songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
获取所述歌曲在所述待选用户偏好下的偏好得分;Obtain the preference score of the song under the user preference to be selected;
根据所述偏好得分确定所述歌曲的目标用户偏好。A target user preference for the song is determined based on the preference score.
可选地,所述获取所述歌曲在所述待选用户偏好下的偏好得分的步骤包括:Optionally, the step of obtaining the preference score of the song under the user preferences to be selected includes:
获取所述歌曲的歌曲向量以及所述待选用户偏好的偏好向量;Obtain the song vector of the song and the preference vector of the candidate user preference;
将所述用户向量与所述歌曲向量相加;Add the user vector and the song vector;
对相加后得到的向量与所述待选用户偏好的偏好向量进行相似性计算,以得到所述歌曲在所述待选用户偏好下的偏好得分。Similarity calculation is performed between the vector obtained after the addition and the preference vector of the candidate user preference, to obtain the preference score of the song under the candidate user preference.
可选地,所述获取所述待选用户偏好的偏好向量的步骤包括:Optionally, the step of obtaining the preference vector of the candidate user's preferences includes:
根据所述预设歌曲知识图谱确定所述待选用户偏好对应的关系;Determine the relationship corresponding to the user preferences to be selected according to the preset song knowledge graph;
根据所述关系的关系向量确定所述待选用户偏好的偏好向量。The preference vector of the candidate user preference is determined according to the relationship vector of the relationship.
可选地,所述根据所述目标用户偏好确定所述用户的推荐歌单的步骤包括:Optionally, the step of determining the user's recommended playlist according to the target user's preferences includes:
获取所述用户对所述歌曲在所述目标用户偏好下的推荐得分;Obtain the user's recommendation score for the song under the target user's preferences;
根据所述推荐得分确定所述用户的推荐歌单。The user's recommended playlist is determined based on the recommendation score.
可选地,所述获取所述用户对所述歌曲在所述目标用户偏好下的推荐得分的步骤包括:Optionally, the step of obtaining the user's recommendation score for the song under the target user's preferences includes:
根据所述目标用户偏好的偏好向量确定所述目标用户偏好的偏好增强向量;Determine the preference enhancement vector preferred by the target user according to the preference vector preferred by the target user;
根据所述歌曲的歌曲向量确定所述歌曲的歌曲增强向量;determining a song enhancement vector for the song based on the song vector of the song;
根据所述用户向量、所述偏好增强向量以及所述歌曲增强向量确定所述用户对所述歌曲在所述目标用户偏好下的推荐得分。The user's recommendation score for the song under the target user's preference is determined according to the user vector, the preference enhancement vector and the song enhancement vector.
此外,为实现上述目的,本发明还提供一种歌单推荐装置,所述歌单推荐装置包括:In addition, in order to achieve the above object, the present invention also provides a song list recommendation device. The song list recommendation device includes:
获取模块,用于获取用户的历史歌单,并分别获取所述历史歌单的特征数据、所述历史歌单中所包含的各历史歌曲的特征数据以及所述用户的特征数据;The acquisition module is used to obtain the user's historical playlist, and obtain the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user;
第一确定模块,用于根据各所述历史歌曲的特征数据、所述历史歌单的特征数据以及所述用户的特征数据确定所述用户的用户向量;A first determination module, configured to determine the user vector of the user based on the characteristic data of each historical song, the characteristic data of the historical playlist, and the characteristic data of the user;
第二确定模块,用于根据所述用户向量以及预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好;a second determination module, configured to determine the user's target user preference for the songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
推荐模块,用于根据所述目标用户偏好确定所述用户的推荐歌单。A recommendation module, configured to determine the user's recommended playlist according to the target user's preferences.
此外,为实现上述目的,本发明还提供一种歌单推荐装置,所述歌单推荐装置包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的歌单推荐程序,所述歌单推荐程序被所述处理器执行时实现上述任一项所述的歌单推荐方法的步骤。In addition, to achieve the above object, the present invention also provides a playlist recommendation device. The playlist recommendation device includes a memory, a processor, and a playlist recommendation program stored in the memory and operable on the processor. , when the playlist recommendation program is executed by the processor, the steps of any of the above playlist recommendation methods are implemented.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有歌单推荐程序,所述歌单推荐程序被处理器执行时实现上述任一项所述的歌单推荐方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium. A playlist recommendation program is stored on the computer-readable storage medium. When the playlist recommendation program is executed by a processor, any of the above items can be implemented. The steps of the playlist recommendation method.
本发明提出了一种歌单推荐方法、装置及可读存储介质,通过获取用户的历史歌单,并分别获取历史歌单的特征数据、历史歌单中所包含的各历史歌曲的特征数据以及用户的特征数据,根据各历史歌曲的特征数据、历史歌单的特征数据以及用户的特征数据确定用户的用户向量,根据用户向量以及预设歌曲知识图谱确定用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好,根据目标用户偏好确定用户的推荐歌单。本方案基于歌曲知识图谱进行歌单推荐,可以准确捕捉到用户对歌曲的偏好,根据用户对歌曲的偏好进行歌单推荐有效提高了推荐歌单中推荐的歌曲的多样性。The present invention proposes a song list recommendation method, device and readable storage medium. By obtaining the user's historical play list, the characteristic data of the historical song list, the characteristic data of each historical song included in the historical song list and the The user's characteristic data is determined based on the characteristic data of each historical song, the characteristic data of historical playlists and the user's characteristic data, and the user's response to the preset song knowledge graph is determined based on the user vector and the preset song knowledge graph. Target user preferences for songs, and determine the user's recommended playlist based on the target user preferences. This solution recommends playlists based on the song knowledge graph, which can accurately capture the user's preferences for songs. Recommending playlists based on the user's preferences for songs effectively increases the diversity of recommended songs in the recommended playlists.
附图说明Description of drawings
图1是本发明实施例方案涉及的歌单推荐装置的硬件架构示意图;Figure 1 is a schematic diagram of the hardware architecture of a playlist recommendation device involved in an embodiment of the present invention;
图2是本发明歌单推荐方法的第一实施例的流程示意图;Figure 2 is a schematic flow chart of the first embodiment of the playlist recommendation method of the present invention;
图3是本发明歌单推荐方法的第二实施例的流程示意图;Figure 3 is a schematic flow chart of the second embodiment of the playlist recommendation method of the present invention;
图4是本发明歌单推荐方法的第三实施例的流程示意图;Figure 4 is a schematic flow chart of the third embodiment of the playlist recommendation method of the present invention;
图5是本发明实施例方案涉及的歌单推荐装置的模块结构示意图。Figure 5 is a schematic module structure diagram of a playlist recommendation device according to an embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.
作为一种实现方案,请参照图1,图1是本发明实施例方案涉及的歌单推荐装置的硬件架构示意图,如图1所示,该歌单推荐装置可以包括处理器101,例如CPU,存储器102,通信总线103,其中,通信总线103用于实现这些模块之间的连接通信。As an implementation solution, please refer to Figure 1. Figure 1 is a schematic diagram of the hardware architecture of a playlist recommendation device involved in an embodiment of the present invention. As shown in Figure 1, the playlist recommendation device may include a processor 101, such as a CPU. Memory 102, communication bus 103, wherein the communication bus 103 is used to realize connection communication between these modules.
存储器102可以是高速RAM存储器,也可以是稳定的存储器(non-volatilememory),例如磁盘存储器。如图1所示,作为一种计算机可读存储介质的存储器102中可以包括歌单推荐程序;而处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. As shown in Figure 1, the memory 102, which is a computer-readable storage medium, may include a playlist recommendation program; and the processor 101 may be used to call the playlist recommendation program stored in the memory 102 and perform the following operations:
获取用户的历史歌单,并分别获取所述历史歌单的特征数据、所述历史歌单中所包含的各历史歌曲的特征数据以及所述用户的特征数据;Obtain the user's historical playlist, and obtain the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user;
根据各所述历史歌曲的特征数据、所述历史歌单的特征数据以及所述用户的特征数据确定所述用户的用户向量;Determine the user vector of the user based on the characteristic data of each historical song, the characteristic data of the historical playlist, and the characteristic data of the user;
根据所述用户向量以及预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好;Determine the user's target user preference for the songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
根据所述目标用户偏好确定所述用户的推荐歌单。Determine the user's recommended playlist according to the target user's preferences.
进一步地,处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:Further, the processor 101 can be used to call the playlist recommendation program stored in the memory 102, and perform the following operations:
根据各所述历史歌曲的特征数据确定各所述历史歌曲的第一向量,根据所述历史歌单的特征数据确定所述历史歌单的第二向量以及根据所述用户的特征数据确定所述用户的第三向量;The first vector of each historical song is determined according to the characteristic data of each historical song, the second vector of the historical playlist is determined according to the characteristic data of the historical playlist, and the second vector of the historical playlist is determined according to the characteristic data of the user. User’s third vector;
获取各所述历史歌曲对所述历史歌单的第一权重值,并根据所述第一向量,第二向量以及第一权重值确定所述历史歌单的歌单向量;Obtain the first weight value of each historical song to the historical play list, and determine the song list vector of the historical play list based on the first vector, the second vector and the first weight value;
获取所述历史歌单对所述用户的第二权重值,并根据所述歌单向量、第三向量以及第二权重值确定所述用户的用户向量。Obtain the second weight value of the historical playlist for the user, and determine the user vector of the user based on the playlist vector, the third vector and the second weight value.
进一步地,处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:Further, the processor 101 can be used to call the playlist recommendation program stored in the memory 102, and perform the following operations:
根据所述用户向量以及所述预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的待选用户偏好;Determine the user's candidate user preferences for songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
获取所述歌曲在所述待选用户偏好下的偏好得分;Obtain the preference score of the song under the user preference to be selected;
根据所述偏好得分确定所述歌曲的目标用户偏好。A target user preference for the song is determined based on the preference score.
进一步地,处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:Further, the processor 101 can be used to call the playlist recommendation program stored in the memory 102, and perform the following operations:
获取所述歌曲的歌曲向量以及所述待选用户偏好的偏好向量;Obtain the song vector of the song and the preference vector of the candidate user preference;
将所述用户向量与所述歌曲向量相加;Add the user vector and the song vector;
对相加后得到的向量与所述待选用户偏好的偏好向量进行相似性计算,以得到所述歌曲在所述待选用户偏好下的偏好得分。Similarity calculation is performed between the vector obtained after the addition and the preference vector of the candidate user preference, to obtain the preference score of the song under the candidate user preference.
进一步地,处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:Further, the processor 101 can be used to call the playlist recommendation program stored in the memory 102, and perform the following operations:
根据所述预设歌曲知识图谱确定所述待选用户偏好对应的关系;Determine the relationship corresponding to the user preferences to be selected according to the preset song knowledge graph;
根据所述关系的关系向量确定所述待选用户偏好的偏好向量。The preference vector of the candidate user preference is determined according to the relationship vector of the relationship.
进一步地,处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:Further, the processor 101 can be used to call the playlist recommendation program stored in the memory 102, and perform the following operations:
获取所述用户对所述歌曲在所述目标用户偏好下的推荐得分;Obtain the user's recommendation score for the song under the target user's preferences;
根据所述推荐得分确定所述用户的推荐歌单。The user's recommended playlist is determined based on the recommendation score.
进一步地,处理器101可以用于调用存储器102中存储的歌单推荐程序,并执行以下操作:Further, the processor 101 may be used to call the song list recommendation program stored in the memory 102, and perform the following operations:
根据所述目标用户偏好的偏好向量确定所述目标用户偏好的偏好增强向量;Determine the preference enhancement vector preferred by the target user according to the preference vector preferred by the target user;
根据所述歌曲的歌曲向量确定所述歌曲的歌曲增强向量;determining a song enhancement vector for the song based on the song vector of the song;
根据所述用户向量、所述偏好增强向量以及所述歌曲增强向量确定所述用户对所述歌曲在所述目标用户偏好下的推荐得分。The user's recommendation score for the song under the target user's preference is determined according to the user vector, the preference enhancement vector and the song enhancement vector.
当前,歌单推荐往往是通过用户输入搜索指令,歌单推荐装置根据用户输入的搜索指令在歌曲库中查找与搜索指令相匹配的歌曲。若查找到与搜索指令相匹配的歌曲,则将查找到的歌曲作为待选歌曲,并根据待选歌曲生成推荐歌单推荐给用户;若未查找到与搜索指令相匹配的歌曲,则对歌曲库包括的所有歌曲进行协同过滤处理,以获取符合用户偏好的多个歌曲作为待选歌曲,然后根据待选歌曲生成推荐歌单推荐给用户。由于这种歌单推荐方式完全针对用户输入的搜索指令,无法捕捉到用户选择歌曲的内在偏好,但是,用户很可能是因为其他一些细粒度的因素才喜欢一首歌曲,比如,歌曲的演唱者、流派以及专辑等原因,因此,通过用户输入的搜索指令得到的推荐歌单中推荐的歌曲比较单一,甚至有重复,多样性较差。Currently, playlist recommendation is often based on the user inputting a search command. The playlist recommendation device searches the song library for songs that match the search command according to the search command input by the user. If a song matching the search instruction is found, the found song will be used as a candidate song, and a recommended song list will be generated and recommended to the user based on the candidate song; if no song matching the search instruction is found, the song will be All songs included in the library are subjected to collaborative filtering processing to obtain multiple songs that meet the user's preferences as candidate songs, and then a recommended playlist is generated and recommended to the user based on the candidate songs. Since this playlist recommendation method is completely based on the search instructions entered by the user, it cannot capture the user's inherent preference for selecting songs. However, the user is likely to like a song because of other fine-grained factors, such as the singer of the song. , genres, albums, etc. Therefore, the recommended songs in the recommended playlist obtained through the search instructions entered by the user are relatively single, even repeated, and the diversity is poor.
基于上述现有技术存在的问题,本发明提出的歌单推荐方法通过嵌入用户向量以及歌曲知识图谱,基于用户向量在歌曲知识图谱上根据相似性得分进行歌曲的用户偏好推导,推导出用户选择歌曲背后的用户偏好,根据推导出的用户偏好为用户推荐歌单。通过用户向量以及歌曲知识图谱可以捕捉到用户选择歌曲的内在偏好,基于用户偏好推荐歌单可以有效提高推荐歌单中歌曲的多样性。下面,通过具体的实施例对本发明歌单推荐方法作进一步地解释说明。Based on the problems existing in the above-mentioned existing technologies, the song list recommendation method proposed by the present invention embeds user vectors and song knowledge graphs, and deduces the user preferences of songs based on the similarity scores on the song knowledge graph based on the user vectors, deducing the user's choice of songs. The user preferences behind it are used to recommend playlists to users based on the derived user preferences. User vectors and song knowledge graphs can capture users' intrinsic preferences for selecting songs, and recommending playlists based on user preferences can effectively increase the diversity of songs in the recommended playlists. Below, the song list recommendation method of the present invention will be further explained through specific embodiments.
请参照图2,图2是本发明歌单推荐方法的第一实施例的流程示意图,所述歌单推荐方法包括:Please refer to Figure 2. Figure 2 is a schematic flow chart of the first embodiment of the playlist recommendation method of the present invention. The playlist recommendation method includes:
步骤S10,获取用户的历史歌单,并分别获取所述历史歌单的特征数据、所述历史歌单中所包含的各历史歌曲的特征数据以及所述用户的特征数据;Step S10, obtain the user's historical playlist, and obtain the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user;
在本实施例中,执行主体是歌单推荐装置,其中,歌单推荐装置可以是终端设备,例如计算机、手机以及平板电脑等,当然,在其他实施例中,歌单推荐装置也可以根据实际需要确定,本实施例对此不作限定。In this embodiment, the execution subject is a playlist recommendation device, where the playlist recommendation device may be a terminal device, such as a computer, a mobile phone, a tablet, etc. Of course, in other embodiments, the playlist recommendation device may also be based on actual conditions. It needs to be determined, and this embodiment does not limit this.
在本实施例中,歌单推荐装置获取用户的历史歌单、并分别获取历史歌单的特征数据、历史歌单中所包含的各历史歌曲的特征数据以及用户的特征数据,其中,历史歌曲可以是用户听过的所有歌曲,也可以是用户在预设时段内听过的歌曲,例如,用户近3个月听过的歌曲,当然,预设时段可以根据实际需要设定,本实施例对此不作限定;历史歌单是历史歌曲的集合;历史歌曲的特征数据可以包括历史歌曲的名称、歌词信息、作词者、作曲者、演唱者、流派以及专辑等信息;历史歌单的特征数据可以包括歌单包含的歌曲数量、歌曲类型等信息;用户的特征数据可以包括用户的身份信息以及与用户的身份信息相关联的其他信息。In this embodiment, the playlist recommendation device obtains the user's historical playlist, and obtains the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user, where the historical songs It can be all the songs that the user has listened to, or it can be the songs that the user has listened to within a preset period, for example, the songs that the user has listened to in the past three months. Of course, the preset period can be set according to actual needs. In this embodiment There is no limit to this; the historical playlist is a collection of historical songs; the characteristic data of historical songs can include the name of the historical song, lyric information, lyricist, composer, singer, genre, album and other information; the characteristic data of the historical song list It may include information such as the number of songs contained in the playlist, song types, etc.; the user's characteristic data may include the user's identity information and other information associated with the user's identity information.
步骤S20,根据各所述历史歌曲的特征数据、所述历史歌单的特征数据以及所述用户的特征数据确定所述用户的用户向量;Step S20, determine the user vector of the user based on the characteristic data of each historical song, the characteristic data of the historical playlist, and the characteristic data of the user;
在本实施例中,歌单推荐装置获取到历史歌曲的特征数据、历史歌单的特征数据以及用户的特征数据后,根据历史歌曲的特征数据、历史歌单的特征数据以及用户的特征数据生成用户向量,其中,用户向量是指反映用户历史听歌特征的嵌入式表示。In this embodiment, after obtaining the characteristic data of historical songs, the characteristic data of historical playlists, and the characteristic data of users, the playlist recommendation device generates a User vector, where user vector refers to an embedded representation that reflects the user’s historical listening characteristics.
具体地,根据各历史歌曲的特征数据确定各历史歌曲的第一向量,根据历史歌单的特征数据确定历史歌单的第二向量以及根据用户的特征数据确定用户的第三向量,其中,第一向量是歌曲的初始化嵌入式表示、第二向量是歌单的初始化嵌入式表示,第三向量是用户的初始化嵌入式表示,通过将历史歌曲的特征数据、历史歌单的特征数据以及用户的特征数据输入到非线性网络,得到统一维度的第一向量m,第二向量l0以及第三向量u0,其中,m,l0,u0 ,d是嵌入维度。Specifically, the first vector of each historical song is determined according to the characteristic data of each historical song, the second vector of the historical playlist is determined according to the characteristic data of the historical song list, and the third vector of the user is determined according to the characteristic data of the user, wherein the th The first vector is the initialized embedded representation of the song, the second vector is the initialized embedded representation of the playlist, and the third vector is the initialized embedded representation of the user. By combining the characteristic data of historical songs, the characteristic data of historical playlists and the user's The feature data is input to the nonlinear network to obtain the first vector m, the second vector l 0 and the third vector u 0 of unified dimensions, where m, l 0 , u 0 , d is the embedding dimension.
歌单推荐装置在获取到第一向量、第二向量以及第三向量后,获取各历史歌曲对历史歌单的第一权重值,并根据第一向量,第二向量以及第一权重值确定历史歌单的歌单向量,其中,第一权重值是指历史歌曲对所在历史歌单的重要性。对于历史歌单l,用表示历史歌单l包含的历史歌曲集合,一个历史歌单中不同历史歌曲的重要性是不同的,例如,某些历史歌曲可能是这个历史歌单的代表性歌曲。采用注意力机制为不同的历史歌曲分配权重值/>,权重值/>即为第一权重值,其代表历史歌曲m在历史歌单l中的重要性。第一权重值可以使用前向神经网络确定,并通过softmax函数进行归一化。第一权重值的计算过程如下:After acquiring the first vector, the second vector and the third vector, the song list recommendation device acquires the first weight value of each historical song to the historical song list, and determines the history based on the first vector, the second vector and the first weight value. The playlist vector of the playlist, where the first weight value refers to the importance of historical songs to the historical playlist where they are located. For the historical playlist l, use Represents a collection of historical songs included in the historical song list l. The importance of different historical songs in a historical song list is different. For example, some historical songs may be representative songs of this historical song list. Use attention mechanism to assign weight values to different historical songs/> , weight value/> That is the first weight value, which represents the importance of historical song m in historical song list l. The first weight value can be determined using a forward neural network and normalized by the softmax function. The calculation process of the first weight value is as follows:
其中,m是历史歌曲m的嵌入式表示,是权重矩阵,/>是偏置向量,是权重向量,/>是偏置值。然后聚合历史歌单l中历史歌曲的第一向量,并结合历史歌单的第二向量,得到历史歌单的歌单向量l,历史歌单的歌单向量的计算过程如下:where m is the embedded representation of historical song m, is the weight matrix,/> is the bias vector, is the weight vector,/> is the offset value. Then aggregate the first vector of historical songs in the historical playlist l and combine it with the second vector of the historical playlist to obtain the songlist vector l of the historical playlist. The calculation process of the songlist vector of the historical playlist is as follows:
歌单推荐装置在得到历史歌单的歌单向量后,获取历史歌单对用户的第二权重值,并根据歌单向量、第三向量以及第二权重值确定用户的用户向量,其中,第二权重值是历史歌单对用户的重要性。用表示用户u收听过的历史歌单集合,不同的历史歌单对用户的重要性也不同。采用注意力机制为不同的历史歌单分配权重值/>,权重值/>即为第二权重值,其代表历史歌单l对用户u的重要性,第二权重值可以使用前向神经网络确定,并通过softmax函数进行归一化。第二权重值的计算过程如下:After obtaining the playlist vector of the historical playlist, the playlist recommendation device obtains the second weight value of the historical playlist for the user, and determines the user vector of the user based on the playlist vector, the third vector and the second weight value, where the The second weight value is the importance of the historical playlist to the user. use Represents a collection of historical playlists that user u has listened to. Different historical playlists have different importance to the user. Use attention mechanism to assign weight values to different historical playlists/> , weight value/> That is the second weight value, which represents the importance of the historical song list l to the user u. The second weight value can be determined using the forward neural network and normalized through the softmax function. The calculation process of the second weight value is as follows:
其中,l是历史歌单l的歌单向量,是权重矩阵,/>是偏置向量,是权重向量,/>是偏置值。然后聚合用户u收听过的历史歌单的歌单向量,并结合用户的第三向量,得到用户u的用户向量u,用户向量u的计算过程如下:Among them, l is the song list vector of the historical song list l, is the weight matrix,/> is the bias vector, is the weight vector,/> is the offset value. Then the playlist vectors of the historical playlists listened to by user u are aggregated, and combined with the user's third vector, the user vector u of user u is obtained. The calculation process of user vector u is as follows:
步骤S30,根据所述用户向量以及预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好;Step S30: Determine the user's target user preference for the songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
步骤S40,根据所述目标用户偏好确定所述用户的推荐歌单。Step S40: Determine the user's recommended playlist according to the target user's preferences.
歌单推荐装置获取到用户向量后,根据用户向量和预设歌曲知识图谱确定用户对预设歌曲知识图谱中歌曲的目标用户偏好,其中,目标用户偏好是指用户选择歌曲的具体偏好原因。After the song list recommendation device obtains the user vector, it determines the user's target user preference for the songs in the preset song knowledge map based on the user vector and the preset song knowledge map, where the target user preference refers to the specific preference reason for the user to select the song.
歌单推荐装置预先构建并嵌入有歌曲知识图谱,歌曲知识图谱是利用歌曲的特征数据组织成的知识图谱,其中,歌曲的特征数据可以包括歌曲的名称、歌曲的作词者、歌曲的演唱者、歌曲所在的专辑。歌单推荐装置可以根据歌曲的特征数据建立事实三元组,基于事实三元组构建并嵌入歌曲知识图。将歌曲知识图谱表示为,其中,/>表示实体集,/>表示关系集。可以采用DISTMULT进行知识图谱的嵌入,事实三元组(h,r,t)得分函数如下:The song list recommendation device is pre-constructed and embedded with a song knowledge graph. The song knowledge graph is a knowledge graph organized using the characteristic data of the song. The characteristic data of the song may include the name of the song, the lyricist of the song, the singer of the song, The album the song is in. The song list recommendation device can establish fact triples based on the song's characteristic data, and build and embed the song knowledge graph based on the fact triples. Represent the song knowledge graph as , where,/> Represents an entity set,/> Represents a relationship set. DISTMULT can be used to embed the knowledge graph. The score function of the fact triplet (h, r, t) is as follows:
其中,是头实体h的嵌入式表示,/>是关系r的嵌入式表示,/>表示对角元素是/>中对应元素的对角阵,/>是尾实体t的嵌入式表示。歌曲知识图谱嵌入部分的损失函数采用基于阈值的排序损失。损失函数的计算过程如下:in, Is the embedded representation of the head entity h,/> is the embedded representation of relation r,/> Indicates that the diagonal element is/> diagonal matrix of corresponding elements in ,/> is the embedded representation of the tail entity t. The loss function of the embedding part of the song knowledge graph adopts a threshold-based ranking loss. The calculation process of the loss function is as follows:
其中,,/>包括随机替换正确事实三元组中的头实体或尾实体构成的非正确三元组,/>控制正确三元组和错误三元组之间的阈值。in, ,/> Including incorrect triples formed by randomly replacing the head entity or tail entity in the correct fact triplet,/> Controls the threshold between correct triples and incorrect triples.
需要说明的是,在嵌入歌曲知识图谱的同时,建模用户偏好,其中,将歌曲知识图谱中的实体间的关系与用户对歌曲的用户偏好一一对应,通过建立歌曲知识图谱中关系与用户偏好的一一对应关系,实现根据歌曲知识图谱中的关系推导用户对歌曲各种可能的用户偏好,这样,通过歌曲知识图谱中的关系向量可以确定用户对歌曲的用户偏好的偏好向量。It should be noted that while embedding the song knowledge graph, user preferences are modeled ,in , one-to-one correspondence between the relationships between entities in the song knowledge graph and the user's user preferences for songs. By establishing a one-to-one correspondence between the relationships in the song knowledge graph and user preferences, it is possible to deduce the user's preferences for songs based on the relationships in the song knowledge graph. Various possible user preferences, in this way, the preference vector of the user's user preference for the song can be determined through the relationship vector in the song knowledge graph.
进一步地,根据用户向量以及歌曲知识图谱可以在歌曲各种可能的用户偏好中推导出用户对歌曲的目标用户偏好,在确定歌曲知识图谱中歌曲的目标用户偏好后,根据用户对歌曲的目标用户偏好向用户推荐歌单。Furthermore, based on the user vector and the song knowledge graph, the user's target user preference for the song can be derived from various possible user preferences for the song. After determining the target user preference for the song in the song knowledge graph, based on the user's target user preference for the song Prefers to recommend playlists to users.
本实施例提供的技术方案中,通过获取用户的历史歌单,并分别获取历史歌单的特征数据、历史歌单中所包含的各历史歌曲的特征数据以及用户的特征数据,根据历史歌曲的特征数据、历史歌单的特征数据以及用户的特征数据确定用户的用户向量,根据用户向量以及预设歌曲知识图谱确定用户对预设歌曲知识图谱中的歌曲的目标用户偏好,根据目标用户偏好确定用户的推荐歌单。本方案基于歌曲知识图谱进行歌单推荐,可以准确的捕捉到用户对歌曲的内在偏好,根据用户对歌曲的偏好进行歌单推荐有效提高了推荐歌单中推荐的歌曲的多样性。In the technical solution provided by this embodiment, by obtaining the user's historical playlist, and respectively obtaining the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user, according to the characteristics of the historical song The characteristic data, the characteristic data of historical playlists and the user's characteristic data determine the user's user vector. Based on the user vector and the preset song knowledge graph, the user's target user preference for the songs in the preset song knowledge graph is determined. The target user preference is determined based on the target user's preference. Recommended playlists from users. This solution recommends playlists based on the song knowledge graph, which can accurately capture the user's inherent preference for songs. Recommending playlists based on the user's preferences for songs effectively increases the diversity of recommended songs in the recommended playlist.
请参照图3,图3是本发明歌单推荐方法的第二实施例的流程示意图,基于第一实施例,上述S30的步骤包括:Please refer to Figure 3. Figure 3 is a schematic flow chart of the second embodiment of the playlist recommendation method of the present invention. Based on the first embodiment, the above-mentioned steps of S30 include:
步骤S31,根据所述用户向量以及所述预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的待选用户偏好;Step S31: Determine the user's candidate user preferences for the songs in the preset song knowledge map according to the user vector and the preset song knowledge map;
在本实施例中,歌单推荐装置获取到用户向量后,基于歌曲知识图谱中的关系与用户偏好的一一对应关系,根据用户向量以及歌曲知识图谱确定用户对歌曲知识图谱中歌曲的待选用户偏好,其中,待选用户偏好是用户选择该歌曲可能的偏好原因,例如,待选用户偏好可以包括该歌曲的作词者、演唱者、流派以及所在专辑等。In this embodiment, after the song list recommendation device obtains the user vector, based on the one-to-one correspondence between the relationship in the song knowledge graph and the user preference, it determines the user's candidate songs in the song knowledge graph based on the user vector and the song knowledge graph. User preferences, where the user preferences to be selected are the possible reasons for the user to select the song. For example, the user preferences to be selected may include the lyricist, singer, genre, and album of the song.
步骤S32,获取所述歌曲在所述待选用户偏好下的偏好得分;Step S32: Obtain the preference score of the song under the preference of the user to be selected;
在本实施例中,歌单推荐装置确定歌曲的待选用户偏好后,获取歌曲在待选用户偏好下的偏好得分。具体地,歌单推荐装置通过预设歌曲知识图谱获取歌曲的歌曲向量以及根据预设歌曲知识图谱确定待选用户偏好对应的关系,根据待选用户偏好对应的关系的关系向量确定待选用户偏好的偏好向量,然后用户向量与歌曲向量相加,对相加后得到的向量与待选用户偏好的偏好向量进行相似性计算,以得到歌曲在待选用户偏好下的偏好得分。偏好得分的计算过程如下:In this embodiment, after determining the user preference of the song to be selected, the song list recommendation device obtains the preference score of the song under the user preference of the song to be selected. Specifically, the song list recommendation device obtains the song vector of the song through the preset song knowledge graph and determines the relationship corresponding to the preference of the candidate user according to the preset song knowledge graph, and determines the preference of the candidate user according to the relationship vector of the relationship corresponding to the preference of the candidate user. The preference vector is then added to the user vector and the song vector, and the similarity between the added vector and the preference vector of the user to be selected is calculated to obtain the preference score of the song under the preference of the user to be selected. The preference score is calculated as follows:
其中,u是用户u的嵌入式表示,m是歌曲m的嵌入式表示,p是偏好p的嵌入式表示,使用点积操作。where u is the embedded representation of user u, m is the embedded representation of song m, p is the embedded representation of preference p, Use dot product operation.
可选地,歌单推荐装置可以使用Gumbel SoftMax对用户偏好进行离散抽样,该方法利用反向传播的重参数化技巧,使得可以在端到端训练期间计算模型参数的连续梯度。ST-Gumbel-SoftMax从一个多分类分布中近似地抽取一个独热向量。假设在P-way分类分布中属于p类的概率可以被定义为:Optionally, the playlist recommendation device can use Gumbel SoftMax to discretely sample user preferences. This method utilizes the re-parameterization technique of backpropagation so that continuous gradients of model parameters can be calculated during end-to-end training. ST-Gumbel-SoftMax approximates a one-hot vector from a multi-class distribution. Assume that the probability of belonging to class p in the P-way classification distribution can be defined as:
之后,从上述分布采样一个one-hot向量如下:After that, sample a one-hot vector from the above distribution as follows:
其中,是Gumbel噪声,u由一个特定的噪声分布产生。in, is Gumbel noise, u is generated by a specific noise distribution.
步骤S33,根据所述偏好得分确定所述歌曲的目标用户偏好。Step S33: Determine the target user preference of the song according to the preference score.
在本实施例中,歌单推荐装置在确定歌曲在其待选用户偏好下的偏好得分后,可以根据歌曲在待选用户偏好下的偏分得分进行排序,将偏好得分最高的待选用户偏好确定用户对歌曲的目标用户偏好。重复上述过程,可以确定歌曲知识图谱中所有歌曲的目标用户偏好。In this embodiment, after determining the preference scores of the songs under the preferences of the users to be selected, the song list recommendation device can sort the songs according to the partial scores of the songs under the preferences of the users to be selected, and select the songs with the highest preference scores according to the preferences of the users to be selected. Determine target user preferences for songs. By repeating the above process, the target user preferences of all songs in the song knowledge graph can be determined.
本实施例提供的技术方案中,根据用户向量以及预设歌曲知识图谱确定用户对预设歌曲知识图谱中的歌曲的待选用户偏好,然后获取歌曲在待选用户偏好下的偏好得分,根据偏好得分确定歌曲的目标用户偏好,本方案通过用户向量以及预设歌曲知识图谱可以准确推导出用户选择歌曲的目标用户偏好,进而根据目标用户偏好向用户推荐歌单,可以提高推荐歌单中推荐的歌曲的多样性。In the technical solution provided by this embodiment, the user's candidate user preference for the song in the preset song knowledge map is determined based on the user vector and the preset song knowledge map, and then the preference score of the song under the candidate user preference is obtained. According to the preference The score determines the target user preference of the song. This solution can accurately deduce the target user preference of the song selected by the user through the user vector and the preset song knowledge map, and then recommends the song list to the user based on the target user preference, which can improve the recommended song list. Variety of songs.
请参照图4,图4是本发明歌单推荐方法的第三实施例的流程示意图,基于第一实施例,上述S40的步骤包括:Please refer to Figure 4. Figure 4 is a schematic flow chart of the third embodiment of the playlist recommendation method of the present invention. Based on the first embodiment, the above-mentioned steps of S40 include:
步骤S41,获取所述用户对所述歌曲在所述目标用户偏好下的推荐得分;Step S41: Obtain the user's recommendation score for the song under the target user's preferences;
在本实施例中,歌单推荐装置在确定预设歌曲知识图谱中所有歌曲的目标用户偏好后,获取用户对歌曲在其目标用户偏好下的推荐得分,通过计算用户对歌曲在其目标用户偏好下的推荐得分可以知道用户对该歌曲的喜好程度,进而确定将该歌曲推荐给用户的可能性大小。In this embodiment, after determining the target user preferences of all songs in the preset song knowledge map, the song list recommendation device obtains the user's recommendation score for the song under its target user preference, and calculates the user's recommendation score for the song under its target user preference. The recommendation score below can know how much the user likes the song, and then determine the possibility of recommending the song to the user.
具体地,根据目标用户偏好的偏好向量确定目标用户偏好的偏好增强向量,根据歌曲的歌曲向量确定歌曲的歌曲增强向量,根据用户向量、偏好增强向量以及歌曲增强向量确定用户对歌曲在目标用户偏好下的推荐得分。推荐得分的计算过程如下:Specifically, the preference enhancement vector of the target user's preference is determined based on the preference vector of the target user's preference, the song enhancement vector of the song is determined based on the song's song vector, and the user's preference for the song in the target user's preference is determined based on the user vector, preference enhancement vector and song enhancement vector. recommendation score below. The calculation process of recommendation score is as follows:
计算偏好p,歌曲m的增强向量、/>:Calculate preference p, enhancement vector of song m ,/> :
其中,r是与偏好p对应的关系r的嵌入式表示,e是与歌曲m对应的实体e的嵌入式表示。可以参考DISTMULT中计算事实三元组得分的方法,计算用户u对音乐m,在目标用户偏好p下的推荐得分:Among them, r is the embedded representation of the relationship r corresponding to the preference p, and e is the embedded representation of the entity e corresponding to the song m. You can refer to the method of calculating the fact triple score in DISTMULT to calculate the recommendation score of user u for music m under the target user preference p:
其中,表示对角元素是/>中对应元素的对角阵。推荐模块的损失函数为:in, Indicates that the diagonal element is/> diagonal matrix of corresponding elements in . The loss function of the recommendation module is:
步骤S42,根据所述推荐得分确定所述用户的推荐歌单。Step S42: Determine the user's recommended playlist based on the recommendation score.
在本实施例中,通过上述方式可以确定预设歌曲知识图谱中所有歌曲的推荐得分,即用户对所有歌曲在其对应的目标用户偏好下的推荐得分,歌单推荐装置在得到歌曲知识图谱中所有歌曲的推荐得分后,可以将推荐得分进行排序,将推荐得分排在前面的预设数量的歌曲作为待推荐歌曲,将待推荐歌曲组成推荐歌单推荐给用户,其中,预设数量可以根据实际需要确定,本实施例对此不作限定。In this embodiment, the recommendation scores of all songs in the preset song knowledge graph can be determined through the above method, that is, the user's recommendation scores for all songs under their corresponding target user preferences. The song list recommendation device obtains the song knowledge graph. After the recommendation scores of all songs are obtained, the recommendation scores can be sorted, and the preset number of songs with the highest recommendation scores will be used as the songs to be recommended, and the songs to be recommended will be composed into a recommended play list and recommended to the user. The preset number can be based on Actual needs are determined, and this embodiment does not limit this.
可选地,歌单推荐装置还可以联合优化知识图谱嵌入模块的损失函数和歌单推荐模块的损失函数,优化方式如下:Optionally, the playlist recommendation device can also jointly optimize the loss function of the knowledge graph embedding module and the loss function of the playlist recommendation module. The optimization method is as follows:
其中,是平衡歌曲知识图谱嵌入模块和推荐模块的超参数。in, It is a hyperparameter that balances the song knowledge graph embedding module and the recommendation module.
本实施例提供的技术方案中,通过获取用户对歌曲在目标用户偏好下的推荐得分,根据推荐得分确定用户的推荐歌单。本方案通过用户对歌曲的目标用户偏好确定推荐得分,根据推荐得分推荐歌单,提高了推荐歌单中推荐的歌曲的多样性。In the technical solution provided by this embodiment, the user's recommendation score for songs under the target user's preferences is obtained, and the user's recommended song list is determined based on the recommendation score. This solution determines the recommendation score through the user's target user preference for songs, and recommends playlists based on the recommendation scores, which improves the diversity of recommended songs in the recommended playlist.
基于上述实施例,请参照图5,本发明还提供了一种歌单推荐装置,所述歌单推荐装置包括:Based on the above embodiments, please refer to Figure 5. The present invention also provides a song list recommendation device. The song list recommendation device includes:
获取模块100,用于获取用户的历史歌单,并分别获取所述历史歌单的特征数据、所述历史歌单中所包含的各历史歌曲的特征数据以及所述用户的特征数据;The acquisition module 100 is used to obtain the user's historical playlist, and obtain the characteristic data of the historical playlist, the characteristic data of each historical song included in the historical playlist, and the characteristic data of the user;
第一确定模块200,用于根据各所述历史歌曲的特征数据、所述历史歌单的特征数据以及所述用户的特征数据确定所述用户的用户向量;The first determination module 200 is configured to determine the user vector of the user based on the characteristic data of each historical song, the characteristic data of the historical playlist, and the characteristic data of the user;
第二确定模块300,用于根据所述用户向量以及预设歌曲知识图谱确定所述用户对所述预设歌曲知识图谱中的歌曲的目标用户偏好;The second determination module 300 is configured to determine the user's target user preference for the songs in the preset song knowledge graph according to the user vector and the preset song knowledge graph;
推荐模块400,用于根据所述目标用户偏好确定所述用户的推荐歌单。The recommendation module 400 is configured to determine the user's recommended playlist according to the target user's preferences.
基于上述实施例,本发明还提供了一种歌单推荐装置,上述歌单推荐装置可以包括存储器、处理器及存储在上述存储器上并可在上述处理器上运行的歌单推荐程序,上述处理器执行上述歌单推荐程序时,实现如上述任一实施例所述的歌单推荐方法的步骤。Based on the above embodiments, the present invention also provides a playlist recommendation device. The playlist recommendation device may include a memory, a processor, and a playlist recommendation program stored in the memory and runable on the processor. The above processing When the device executes the above playlist recommendation program, the steps of the playlist recommendation method described in any of the above embodiments are implemented.
基于上述实施例,本发明还提供一种计算机可读存储介质,其上存储有歌单推荐程序,上述歌单推荐程序被处理器执行时实现如上述任一实施例所述的歌单推荐方法的步骤。Based on the above embodiments, the present invention also provides a computer-readable storage medium on which a playlist recommendation program is stored. When the above playlist recommendation program is executed by a processor, the playlist recommendation method as described in any of the above embodiments is implemented. A step of.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the terms "include", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or system that includes a list of elements not only includes those elements, but It also includes other elements not expressly listed or that are inherent to the process, method, article or system. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是智能电视、手机、计算机等)执行本发明各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM) as mentioned above. , magnetic disk, optical disk), including several instructions to cause a terminal device (which can be a smart TV, a mobile phone, a computer, etc.) to execute the method described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the description and drawings of the present invention may be directly or indirectly used in other related technical fields. , are all similarly included in the scope of patent protection of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111047831.0A CN113836401B (en) | 2021-09-07 | 2021-09-07 | Playlist recommendation method, device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111047831.0A CN113836401B (en) | 2021-09-07 | 2021-09-07 | Playlist recommendation method, device and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113836401A CN113836401A (en) | 2021-12-24 |
CN113836401B true CN113836401B (en) | 2024-03-22 |
Family
ID=78958680
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111047831.0A Active CN113836401B (en) | 2021-09-07 | 2021-09-07 | Playlist recommendation method, device and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113836401B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108021568A (en) * | 2016-10-31 | 2018-05-11 | 北京酷我科技有限公司 | One kind song is single to recommend method and device |
CN108874998A (en) * | 2018-06-14 | 2018-11-23 | 华东师范大学 | A kind of dialog mode music recommended method indicated based on composite character vector |
US10713289B1 (en) * | 2017-03-31 | 2020-07-14 | Amazon Technologies, Inc. | Question answering system |
CN112417203A (en) * | 2020-11-18 | 2021-02-26 | 腾讯音乐娱乐科技(深圳)有限公司 | A song recommendation method, terminal and storage medium |
CN112559795A (en) * | 2020-11-03 | 2021-03-26 | 广州酷狗计算机科技有限公司 | Song playing method, song recommending method, device and system |
CN112765398A (en) * | 2021-01-04 | 2021-05-07 | 珠海格力电器股份有限公司 | Information recommendation method and device and storage medium |
CN113032618A (en) * | 2021-03-26 | 2021-06-25 | 齐鲁工业大学 | Music recommendation method and system based on knowledge graph |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11070879B2 (en) * | 2017-06-21 | 2021-07-20 | Microsoft Technology Licensing, Llc | Media content recommendation through chatbots |
US10945012B2 (en) * | 2018-06-28 | 2021-03-09 | Pandora Media, Llc | Cold-start podcast recommendations |
-
2021
- 2021-09-07 CN CN202111047831.0A patent/CN113836401B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108021568A (en) * | 2016-10-31 | 2018-05-11 | 北京酷我科技有限公司 | One kind song is single to recommend method and device |
US10713289B1 (en) * | 2017-03-31 | 2020-07-14 | Amazon Technologies, Inc. | Question answering system |
CN108874998A (en) * | 2018-06-14 | 2018-11-23 | 华东师范大学 | A kind of dialog mode music recommended method indicated based on composite character vector |
CN112559795A (en) * | 2020-11-03 | 2021-03-26 | 广州酷狗计算机科技有限公司 | Song playing method, song recommending method, device and system |
CN112417203A (en) * | 2020-11-18 | 2021-02-26 | 腾讯音乐娱乐科技(深圳)有限公司 | A song recommendation method, terminal and storage medium |
CN112765398A (en) * | 2021-01-04 | 2021-05-07 | 珠海格力电器股份有限公司 | Information recommendation method and device and storage medium |
CN113032618A (en) * | 2021-03-26 | 2021-06-25 | 齐鲁工业大学 | Music recommendation method and system based on knowledge graph |
Non-Patent Citations (3)
Title |
---|
Imen Ben Sassi 等.MORec: At the crossroads of context-aware and multi-criteria decision making for online music recommendation.《Expert Systems With Applications》.2021,第183卷1-20. * |
周纯伊.对话式音乐推荐技术及系统实现.《中国优秀硕士学位论文全文数据库 信息科技辑》.2020,(第12期),I138-516. * |
饶子昀 等.应用知识图谱的推荐方法与系统.《自动化学报》.2020,第47卷(第9期),2061-2077. * |
Also Published As
Publication number | Publication date |
---|---|
CN113836401A (en) | 2021-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109189991B (en) | Duplicate video identification method, device, terminal and computer readable storage medium | |
CN108241745B (en) | Sample set processing method and device and sample query method and device | |
Yuan et al. | LambdaFM: Learning optimal ranking with factorization machines using lambda surrogates | |
US11966419B2 (en) | Systems and methods for combining data analyses | |
US8843470B2 (en) | Meta classifier for query intent classification | |
CN109783671B (en) | Method for searching picture by picture, computer readable medium and server | |
CN101685458A (en) | Recommendation method and system based on collaborative filtering | |
TWI721374B (en) | Recommendation method, device and electronic equipment based on multiple classifiers | |
CN103299293A (en) | Classifying a set of content items | |
WO2017067156A1 (en) | Playlist list determining method, device, electronic device and storage medium | |
CN111723289B (en) | Information recommendation method and device | |
US8686272B2 (en) | Method and system for music recommendation based on immunology | |
CN103488766A (en) | Application program searching method and device | |
CN102959539B (en) | Item recommendation method during a kind of repeat in work and system | |
US11314802B2 (en) | Automatic image selection for visual consistency | |
CN111176578B (en) | Object aggregation method, apparatus, device and readable storage medium | |
CN115129915B (en) | Duplicate image retrieval method, device, equipment and storage medium | |
CN111263241A (en) | Method, device, device and storage medium for generating media data | |
CN113742578A (en) | Data recommendation method and device, electronic equipment and storage medium | |
CN117473167A (en) | Recommendation method and recommendation device for learning user preferences by utilizing multiple views | |
CN100568231C (en) | Conversational Recommendation System and Its Retrieval Method | |
CN113836401B (en) | Playlist recommendation method, device and readable storage medium | |
CN102411584B (en) | Data searching method and system | |
CN115375394B (en) | Recommendation method, recommendation device, electronic device and computer-readable storage medium | |
CN113094542B (en) | Set ordering music recommendation method for implicit feedback data of user |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |