CN-122002088-A - Video recommendation method and device, electronic equipment and medium
Abstract
The embodiment of the application discloses a video recommendation method, a video recommendation device, electronic equipment and a video recommendation medium, which relate to the technical field of computers, and one specific implementation mode of the method comprises the steps of acquiring user video watching data in a first preset period; the method comprises the steps of determining whether a video type of a first video is a popular video based on user watching data of the first video in user video watching data, carrying out sampling pairing processing on a watching user set in the user watching data to obtain a watching user pair when the video type of the first video is the popular video, determining similarity scores between the first video and a second video based on the watching video set of the watching user pair, and obtaining candidate recommended videos from a video library based on the similarity scores to generate video recommendation information by utilizing the candidate recommended videos. The efficient landing of the recall algorithm under the scene of millions of users and millions of video candidate sets is realized, and the instantaneity and the reliability of video recommendation are improved.
Inventors
- Lv panlong
- LIU ZHONGSONG
- ZHANG CONG
- LIU QING
Assignees
- 咪咕视讯科技有限公司
- 咪咕文化科技有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251230
Claims (10)
- 1. A video recommendation method, the method comprising: Acquiring user video watching data in a first preset period; determining whether the video type of a first video in the user video watching data is a popular video or not based on the user watching data of the first video in the user video watching data, wherein the first video is any video in a video set in the user video watching data; Under the condition that the video type of the first video is the popular video, sampling and pairing processing is carried out on a watching user set in the user watching data to obtain a watching user pair, and a similarity score between the first video and a second video is determined based on the watching video set of the watching user pair, wherein the second video is a video except the first video in the watching video set; And acquiring candidate recommended videos from a video library based on the similarity score so as to generate video recommendation information by utilizing the candidate recommended videos.
- 2. The method of claim 1, wherein the performing a sampling pairing process on the set of users in the user viewing data to obtain a viewing user pair includes: generating a random grouping identifier for a user set in the user viewing data; Dividing the user set according to a video identifier and the random grouping identifier to obtain a first grouping set; copying and expanding the user set to obtain an expanded user set after expansion; Distributing continuous grouping identifiers for the extended users in the extended user set to obtain a second grouping set; matching the first grouping set with users with the same video identification and grouping identification in the second grouping set to obtain candidate user pairs; and carrying out de-duplication processing on the candidate user pairs to obtain the watching user pairs.
- 3. The method of claim 1, wherein the determining whether the video type of the first video is a hot video is preceded by the determining based on user viewing data of the first video of the user video viewing data, the method comprising: Based on an original user identification set of at least one user in the user video watching data and a second preset period, carrying out shaping mapping on the original user identification set to obtain a target user identification set; and correlating the target user identification set with the user video viewing data to obtain structured user video viewing data.
- 4. The method of claim 3, wherein the shapping the original set of user identities based on the original set of user identities of at least one user in the user video viewing data and a second predetermined period of time to obtain the set of target user identities comprises: extracting a first original user identifier corresponding to a first user in the user video watching data, wherein the first user is any user in the user watching data; based on the first original user identification, the second preset time period and a preset aggregation rule, aggregating the user video watching data to obtain a first aggregation record of the first user in the second preset time period; based on a random ordering result corresponding to the first aggregation record, a first integer serial number is allocated to the first aggregation record, and the first integer serial number is determined to be a first updated user identifier of the first user; Counting first user video watching data of the first user in the second preset period; And under the condition that the first user video watching data meets a preset reservation condition, determining the updated user identification of the first user as a first target user identification.
- 5. The method of claim 1, wherein the determining whether the video type of the first video is a trending video based on user viewing data of the first video in the user video viewing data comprises: Determining a number of viewing users of a set of viewing users in the user viewing data; and under the condition that the number of the watched users is larger than or equal to a preset watching threshold value, determining that the video type of the first video is a hot video.
- 6. The method of claim 1, wherein the obtaining candidate recommended videos from a video library based on the similarity score comprises: Performing aggregation optimization on the similarity scores to obtain target similarity scores between the first video and the second video; And acquiring candidate recommended videos from the video library based on the target similarity score.
- 7. A video recommendation device, the device comprising: an acquisition unit, configured to acquire user video viewing data within a first preset period; The determining unit is used for determining whether the video type of the first video is a hot video or not based on user viewing data of the first video in the user video viewing data, wherein the first video is any video in a video set in the user video viewing data; the processing unit is used for carrying out sampling pairing processing on a watching user set in the user watching data under the condition that the video type of the first video is the popular video to obtain a watching user pair, and determining a similarity score between the first video and a second video based on the watching video set of the watching user pair, wherein the second video is a video except the first video in the watching video set; And the recommending unit is used for acquiring candidate recommended videos from a video library based on the similarity score so as to generate video recommendation information by utilizing the candidate recommended videos.
- 8. An electronic device comprising a processor and a memory for storing a computer program capable of running on the processor, Wherein the processor is adapted to perform the method of any of claims 1 to 6 when the computer program is run.
- 9. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 6.
- 10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Description
Video recommendation method and device, electronic equipment and medium Technical Field The embodiment of the application relates to the technical field of computers, in particular to a video recommendation method, a video recommendation device, electronic equipment and a medium. Background With the continuous development of the internet industry, the scale of users and the magnitude of objects continuously rise, and the interactive data of users and objects has increased to the billions of millions. In typical scenes such as video recommendation, the matching requirements of millions of users and millions of video candidate sets are met, the interaction relationship between the users and the videos is more complex, and higher requirements are put on the efficiency and suitability of a recommendation algorithm. In the current video recommendation scene, the related technology usually adopts a recall algorithm (such as a Swing algorithm) to calculate the similarity between videos so as to support recommendation decisions, and the core logic of the method is to quantify the association degree of the videos based on the common interaction behavior of users by constructing user combination pairs so as to generate a recommendation candidate set. However, the temporal and spatial complexity of the recall algorithm in the related art increases exponentially with the data size, and it is difficult to adapt to a large-scale data scene. Especially in the scene of millions of users and millions of video candidate sets, the magnitude of the user combination pairs can be increased in an explosive manner, so that the problems of abnormal memory, overtime calculation and the like are easily caused, effective video similarity scores and recommendation results cannot be normally output, and the floor requirements of actual services cannot be met. Disclosure of Invention The application provides a video recommendation method, a video recommendation device, electronic equipment and a video recommendation medium, which are used for solving the problems that in the related art, a recall algorithm grows exponentially in time and space complexity under a large-scale data scene, memory abnormality is easy to cause, calculation is overtime, and an effective recommendation result cannot be output. In a first aspect, an embodiment of the present application provides a video recommendation method, which includes obtaining user video viewing data in a first preset period, determining whether a video type of a first video is a popular video based on user viewing data of the first video in the user video viewing data, where the first video is any video in a video set in the user video viewing data, performing sampling pairing processing on a viewing user set in the user viewing data if the video type of the first video is the popular video, obtaining a viewing user pair, determining a similarity score between the first video and a second video based on the viewing video set of the viewing user pair, where the second video is a video other than the first video in the viewing video set, and obtaining candidate recommended videos from a video library based on the similarity score to generate video recommendation information by using the candidate recommended videos. In some embodiments, sampling pairing processing is carried out on a user set in user watching data to obtain a watching user pair, wherein the watching user pair comprises the steps of generating random grouping identifications for the user set in the user watching data, dividing the user set according to the video identifications and the random grouping identifications to obtain a first grouping set, copying and expanding the user set to obtain an expanded user set after expansion, distributing continuous grouping identifications for the expanded users in the expanded user set to obtain a second grouping set, matching the first grouping set with users with the same video identifications and grouping identifications in the second grouping set to obtain candidate user pairs, and carrying out de-duplication processing on the candidate user pairs to obtain the watching user pairs. In some embodiments, before determining whether the video type of the first video is a popular video based on user viewing data of the first video in the user video viewing data, the method includes performing a shaping mapping on an original user identification set based on an original user identification set of at least one user in the user video viewing data and a second preset period to obtain a target user identification set, and associating the target user identification set with the user video viewing data to obtain structured user video viewing data. In some embodiments, the shaping mapping is performed on the original user identification set based on the original user identification set and the second preset period of at least one user in the user video viewing data to obtain the target user ide