Video recommendation method, device and storage medium
By building a video recommendation model, using video maps and user behavior logs to determine the feature information of users and videos, the problem that existing video recommendation algorithms cannot effectively characterize the attributes of users and videos, and achieve higher recommendation accuracy and explanatory sex.
Patent Information
- Application Number
- CN202211599966.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Existing video recommendation algorithms cannot effectively characterize the correlation attributes between users and videos, resulting in low recommendation accuracy.
By obtaining video maps and user behavior logs, a video recommendation model is constructed to determine user preference characteristics and video feature information, thereby accurately locateing the target video of user preferences.
It improves the accuracy and interpretability of video recommendations, and provides data support for the optimization of post-production video recommendation methods.
Smart Images

Figure CN116017072B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a video recommendation method, device and storage medium. Background Art
[0002] Online streaming platforms have abundant video resources, and these massive videos are generally distributed automatically through recommendations. However, video is a content carrier with multi-dimensional features, such as video type, role, actor, etc. When users watch video content, they will express their liking for the video through different interactive behaviors, such as clicking, watching, and collecting. The existing video recommendation algorithms are basically based on learning a large amount of user behavior data, such as fitting the overall statistical distribution of user behavior data for recommendation. They cannot clearly characterize the correlation attributes between users and videos, which is not conducive to improving the accuracy of video recommendation methods. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a video recommendation method, device and storage medium to improve the interpretability and recommendation accuracy of video recommendations. The specific technical solution is as follows:
[0004] In a first aspect of the present invention, a video recommendation method is provided, the method comprising:
[0005] Obtain a video graph, wherein the video graph includes a plurality of nodes and a plurality of connection edges connecting two nodes, wherein the connection edges represent the associated attributes between two nodes that establish edge connection, and the nodes include identification nodes that identify different videos and attribute nodes that represent specific attribute features;
[0006] Obtaining behavior logs of a plurality of user terminals clicking on videos within a preset time interval, and determining a corresponding behavior sequence according to each behavior log, wherein the behavior sequence is determined according to video identifiers clicked in time sequence in the behavior log;
[0007] Inputting the video graph and several groups of behavior sequences into a video recommendation model to obtain several pieces of target feature information, wherein the target feature information includes preference feature information corresponding to each user terminal and video feature information corresponding to each video;
[0008] Determine the target video preferred by the corresponding user terminal according to each target feature information;
[0009] The video data corresponding to the target video is sent to the corresponding user terminal for making video recommendations in each user terminal.
[0010] Optionally, the video recommendation model includes a first aggregation network, a second aggregation network, and a third aggregation network, and the video graph and the plurality of groups of behavior sequences are input into the video recommendation model to obtain a plurality of target feature information, including:
[0011] Inputting the video graph into the first aggregation network to perform first feature aggregation to determine video feature information corresponding to each video;
[0012] Inputting the video graph and several groups of behavior sequences into the second aggregation network to perform second feature aggregation, and determining several pieces of intention feature information corresponding to each user terminal;
[0013] Each video feature information and each intention feature information is input into a third aggregation network to perform third feature aggregation, and determine the preference feature information corresponding to each user terminal.
[0014] Optionally, the step of inputting the video graph into the first aggregation network to perform first feature aggregation to determine video feature information corresponding to each video includes:
[0015] Determine the attribute association tree corresponding to each video according to the video graph, wherein the identification node in the video graph is used as the attribute root node in the attribute association tree, and the attribute node in the video graph is used as the attribute child node in the attribute association tree;
[0016] According to the association path formed by the attribute root node and the attribute child nodes adjacent to the attribute root node at L levels, node feature information of the video matching the attribute root node at each level is aggregated and generated respectively, where L is an integer greater than 0;
[0017] Aggregate the feature information of nodes at each order to obtain the video feature information corresponding to each video.
[0018] Optionally, the step of inputting the video graph and the plurality of groups of behavior sequences into the second aggregation network for second feature aggregation to determine a plurality of intention feature information corresponding to each user terminal includes:
[0019] According to the attribute association tree and several groups of behavior sequences, an intention association tree corresponding to each user terminal is determined, wherein the behavior intention is constructed as an intention root node in the intention association tree, the video identifier corresponding to the behavior sequence is used as a video subnode of the intention root node in the intention association tree, and the attribute subnode related to the video identifier corresponding to the behavior sequence in the attribute association tree is used as an attribute subnode of the video subnode in the intention association tree;
[0020] Determine a first intention weight of a behavior intention corresponding to each intention root node in the intention association tree;
[0021] Based on the first intention weight, a number of intention feature information corresponding to each user terminal is aggregated and generated.
[0022] Optionally, determining the target video preferred by the corresponding user terminal according to each target feature information includes:
[0023] Calculating information similarity between preference feature information corresponding to each user terminal and video feature information corresponding to each video;
[0024] Based on a number of information similarities, multiple target videos preferred by each user terminal are determined, and corresponding inverted index files are generated based on the multiple target videos, wherein the recommendation priorities of the multiple target videos are specified in the inverted index file.
[0025] Optionally, sending the video data corresponding to the target video to the corresponding user terminal for recommending the video in each user terminal includes:
[0026] The video data and inverted index files corresponding to the multiple target videos are sent to the corresponding user terminals, so that the user terminals can make video recommendations according to the inverted index files.
[0027] Optionally, obtaining a video atlas includes:
[0028] Obtain a website map, clean the website map, and obtain a video map corresponding to the long video;
[0029] or,
[0030] Label the attribute features of short videos according to the preset label generation model;
[0031] The video identifier corresponding to each short video is used as the identification node, and the corresponding marked specific attribute features are used as attribute nodes to create a video graph corresponding to the short video.
[0032] Optionally, determining a corresponding behavior sequence according to each behavior log includes:
[0033] Determine the corresponding target sequence based on each behavior log;
[0034] Filter out the behavior sequences corresponding to the long videos / short videos from each target sequence.
[0035] Optionally, the method further includes a step of training the video recommendation model, and the training step includes:
[0036] Obtain sample video graphs and several groups of behavior sequences;
[0037] The sample video graph and each group of behavior sequences are combined respectively, and input into a video recommendation model to obtain target feature information, wherein the target feature information includes preference feature information corresponding to the behavior sequence and video feature information of each video in the behavior sequence;
[0038] According to the predicted similarities between the video feature information and the preference feature information, and the difference between the corresponding labeled similarities, the model parameters of the video recommendation model are adjusted to determine a trained video recommendation model.
[0039] In a second aspect of the present invention, there is also provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0040] Memory, used to store computer programs;
[0041] The processor is used to implement any of the above-mentioned method steps when executing the program stored in the memory.
[0042] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes any of the above-mentioned video recommendation methods.
[0043] In yet another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned video recommendation methods.
[0044] A video recommendation method provided by an embodiment of the present invention first obtains a video graph with strong interpretability and obtains the behavior logs of several user terminals clicking on videos within a preset time interval, and determines the corresponding behavior sequence based on the behavior log. Then, the video graph and several groups of behavior sequences are comprehensively input into the video recommendation model to obtain target feature information. The target feature information includes the preference feature information corresponding to each user terminal and the video feature information corresponding to each video. Therefore, the target video preferred by the user terminal can be determined and the video can be pushed through the difference information between the preference feature information and the video feature information, which can solve the technical problem that the existing video recommendation algorithm makes recommendations based on the overall statistical distribution of fitting user behavior data, and the recommendation accuracy is low. In addition, the accuracy of video recommendations can be improved and the interpretability of video recommendations can be enhanced, and data support can be provided for the optimization of later video recommendation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0046] Figure 1 A schematic diagram of a step flow of a video recommendation method provided by an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of a process flow of another video recommendation method provided by an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of the structure of an attribute association graph provided by an embodiment of the present invention;
[0049] Figure 4 A schematic diagram of the structure of an intent association tree provided by an embodiment of the present invention;
[0050] Figure 5 A schematic diagram of the structure of a user association tree provided by an embodiment of the present invention;
[0051] Figure 6 A schematic diagram of a process flow of another video recommendation method provided by an embodiment of the present invention;
[0052] Figure 7 A schematic diagram of the structure of a sample video graph provided by an embodiment of the present invention;
[0053] Figure 8 A schematic diagram of the structure of a video recommendation device provided by an embodiment of the present invention;
[0054] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0056] Reference Figure 1 , an embodiment of the present invention provides a video recommendation method, which may include:
[0057] S101, obtaining a video graph.
[0058] In an embodiment of the present invention, a video graph in a website can be obtained, wherein the video graph includes a plurality of nodes and a plurality of connecting edges connecting two nodes, wherein the connecting edges represent the associated attributes of the two nodes that establish edge connections, and the nodes include identification nodes that identify different videos and attribute nodes that represent specific attribute features. The identification node is a video ID, and the associated attributes corresponding to the connecting edges include but are not limited to video type, content, role, actor, award, and region, etc. The specific attribute features corresponding to the attribute nodes are attribute entities that are further refined based on the associated attributes.
[0059] For example, for each video on the website, each video can be described in advance from multiple attribute dimensions, and based on the associated attributes of the video, each video can be described in detail using attribute entities. Therefore, after obtaining the video graph, the associated attributes between specific attribute features and video IDs can be queried from the video graph. The connecting edges in the video graph are directed arrows. For example, the specific attribute feature corresponding to an attribute node is star B, the video ID corresponding to the identification node connected to its edge is TV series A, and the associated attribute corresponding to the connecting edge is the actor. Then the arrow of the connecting edge in the video graph points from star B to TV series A, and the semantic information it represents is: star B is an actor who starred in TV series A.
[0060] S102: Obtain behavior logs of a plurality of user terminals clicking on videos within a preset time interval, and determine corresponding behavior sequences based on the plurality of behavior logs.
[0061] In an embodiment of the present invention, the behavior logs of several user terminals clicking on videos within a preset time interval can be obtained. For example, the behavior log can be determined based on the click operation on the displayed video in the waterfall flow of the home page of the user terminal. Therefore, in the behavior log of each user terminal, the time distribution of the user clicking on the video and the video ID (i.e., video identification) corresponding to the clicked video can be obtained, so that the video IDs can be arranged in chronological order to determine the behavior sequence corresponding to each behavior log. Among them, several can be understood as at least one.
[0062] In one example, the preset time interval can be selected by a person skilled in the art according to an actual application scenario, and the preset time interval can be 5 days, 6 days, 7 days, 8 days, etc., which are not limited here. For example, the video IDs corresponding to the videos clicked and watched by each user in the past 7 days can be used to construct a behavior sequence in chronological order.
[0063] S103: Input the video graph and several groups of behavior sequences into a video recommendation model to obtain several pieces of target feature information.
[0064] In an embodiment of the present invention, the video recommendation model is used to deeply fuse the semantic information in the video graph and several groups of behavior sequences, and perform feature aggregation based on the fused feature information to obtain target feature information. For example, the video graph can be combined with the behavior sequence corresponding to each user terminal in turn and input into the video recommendation model respectively. The target feature information includes the preference feature information corresponding to each user terminal and the video feature information corresponding to each video. Among them, the preference feature information can be understood as the attribute feature distribution corresponding to the videos that the user likes to watch, and the video feature information refers to the attribute feature distribution that each video has individually.
[0065] S104: Determine the target video preferred by the corresponding user terminal according to each target feature information.
[0066] S105: Send the video data corresponding to the target video to the corresponding user terminal for making video recommendations in each user terminal.
[0067] In an embodiment of the present invention, since the target feature information includes at least the preference feature information of the user terminal and the video feature information corresponding to the video, the target video preferred by each user terminal can be determined based on the information difference between the preference feature information and the video feature information. For example, the information difference can be evaluated by information similarity. After the target video is determined, the video data corresponding to the target video can be sent to the corresponding user terminal. After the user terminal receives the video data, the video recommendation can be made in the corresponding display page. Combining the video graph and the behavior sequence, the specific attribute feature distribution that meets the user's interest intention can be accurately determined, and the accuracy of recommending videos to the user terminal can be improved through the preference feature information. In addition, the introduction of the video graph can be visualized, thereby enhancing the interpretability of the video recommendation and providing data support for the optimization of the later video recommendation method.
[0068] In one example, the video types in a video website usually include the following two types: PPC (Professionally-produced Content) long videos and UGC (Use Generated Content) short videos. Since users have great differences in their intentions to prefer these two types of videos, we can obtain the video graphs corresponding to each video type according to the different video types, and input the video graphs of the two video types separately into the video recommendation model to obtain video recommendations of different video types.
[0069] Reference Figure 2 , an embodiment of the present invention provides another video recommendation method, which may include:
[0070] S201. Obtain a video graph corresponding to the long video.
[0071] In an embodiment of the present invention, the video graph in the website can be obtained. Among them, what is directly obtained from the website is often the website graph, and the website graph usually also includes other website related information in addition to the video related information. That is, in the website graph, other nodes and connection edges that are not related to the video are also included. Therefore, after obtaining the website graph, the website graph is first cleaned to determine the video graph. In one example, different categories of identifiers are usually used for different types of data. For example, there are differences between video IDs and other types of data IDs. Therefore, the video ID can be used to clean the nodes that have not established an associated connection with the nodes associated with the video ID, or the nodes whose number of connection edges between the nodes associated with the video ID is less than or equal to the cleaning threshold. Therefore, the cleaned website graph is determined as a video graph, and the video graph obtained after the above cleaning operation corresponds to the PPC long video.
[0072] S202: Obtain behavior logs of a plurality of user terminals clicking on videos within a preset time interval.
[0073] S203: Determine a corresponding target sequence according to each behavior log.
[0074] S204: Filter out behavior sequences corresponding to the long videos from each target sequence.
[0075] In an embodiment of the present invention, behavior logs of several user terminals clicking on videos within a preset time interval can be obtained. For example, the behavior log can be determined based on a click operation on a displayed video in a waterfall flow on the home page of the user terminal. Thus, in the behavior log of each user terminal, the time distribution of user clicks on the video and the video ID (i.e., video identifier) corresponding to the clicked video can be obtained, so that the video IDs can be arranged in chronological order, and the target sequence corresponding to each behavior log can be determined, wherein the difference information between long videos and short videos in video IDs can be used, for example, the video ID corresponding to the short video contained in the target sequence can be cleared according to the difference in video IDs, and the target sequence after the operation is performed can be determined as the behavior sequence corresponding to the long video.
[0076] In an optional embodiment of the invention, the video recommendation network may include a first aggregation network, a second aggregation network, and a third aggregation network. The step of inputting the video graph and a plurality of groups of behavior sequences into a video recommendation model to obtain a plurality of target feature information includes the following steps: S205-S207.
[0077] S205: Input the video graph into the first aggregation network to perform first feature aggregation to determine video feature information corresponding to each video.
[0078] In the embodiment of the present invention, the video graph is input into the model, and the video graph needs to be converted into a feature vector expression in advance to facilitate subsequent data processing. For example, two associated nodes and connecting edges in the video graph are used as a set of graph information. The format of the graph data can be a triple, and its expression can be (i, r, v). Among them, i represents the video identifier in the video graph, v represents the specific attribute feature in the video graph, and r represents the associated attribute between the two nodes. The above-mentioned feature vectors are all pre-set during the model training process. In addition, the feature vectors corresponding to different video IDs are different, and the feature vectors corresponding to different specific attribute features are also different. By analogy, all the graph information in the video graph is converted. For example, the identification node and attribute node selected from the video graph correspond to TV series A and star B respectively, and the connecting edge represents the actor. The corresponding graph semantic information is (TV series A, actor, star B), which can be converted into the corresponding triple form (i1, r1, v1). Among them, i1 represents TV series A; r1 represents actor; v1 represents star B.
[0079] By converting the video graph, an attribute association tree between each video and a specific attribute feature can be established. Therefore, the first feature aggregation can be performed based on each attribute association tree to obtain video feature information corresponding to different video identifiers i. In one example, in the process of establishing the attribute association tree, the identifier node in the video graph is used as the attribute root node in the attribute association tree, and the attribute node in the video graph is used as the attribute child node in the attribute association tree. The schematic structure of the attribute association tree can be referred to Figure 3 shown.
[0080] According to the association path formed by the attribute root node i and the attribute child nodes adjacent to the attribute root node L, the node feature information of the video matching the attribute root node at each level is aggregated and generated. For example, the node feature information e corresponding to each level i (L) The aggregation formula can be as follows:
[0081]
[0082] N i ={(r,v)(i,r,v)∈G} Formula (2)
[0083] In the above formulas (1) and (2), N i Indicates the attributes and first-order connectivity of the attribute root node. G represents the attribute association tree, and L is an integer greater than 0. That is, L can take values of 1, 2, 3, 4, ..., and the specific value of L is determined by the adjacent order corresponding to the detected attribute root node. v (L-1)Represents the feature vector corresponding to the specific attribute feature on the corresponding L-1th order.
[0084] For example, the attribute subnode directly associated with the attribute root node is called the attribute subnode adjacent to the attribute root node in the first order, where direct association means that there is only one connection edge between the attribute root node and the attribute subnode, and no other attribute subnodes exist; other attribute subnodes directly associated with the attribute subnode are called the attribute subnode adjacent to the attribute root node in the second order, that is, there are two connection edges and one attribute subnode between the attribute root node and the attribute subnode adjacent to the attribute root node in the second order. By analogy, the association path formed by the attribute root node and the attribute subnode adjacent to the attribute root node in the Lth order is determined.
[0085] In one example, when the value of L is 1, the specific attribute features corresponding to the multiple attribute child nodes directly associated with the attribute root node can be aggregated, and the node features obtained after aggregation are used as the description of the video feature information corresponding to the attribute root node. For example, the node feature information e at the first order can be calculated by the above formula (1): i (0) .
[0086] By analogy, we can obtain node feature information at different levels, and use attribute child nodes associated with attribute root nodes at different levels to represent the video feature information corresponding to the attribute root node. In this way, we can aggregate the node feature information at each level as the video feature information corresponding to the attribute root node. Repeat the above operation for the attribute association tree corresponding to other videos, and finally obtain the video feature information corresponding to each video. i (*) The calculation formula is as follows:
[0087]
[0088] The video feature information calculated according to formula (3) retains the relationship path between the attribute nodes in the video graph, which can improve the accuracy of subsequent video recommendations.
[0089] S206: Input the video graph and several groups of behavior sequences into the second aggregation network to perform second feature aggregation, and determine several pieces of intention feature information corresponding to each user terminal.
[0090] In an embodiment of the present invention, several groups of behavior sequences are input into the model, and the behavior sequences need to be expressed in the form of feature vectors in advance to facilitate subsequent data processing. In an example, each group of behavior sequences is also converted into a triple form, but the behavior log only reflects the click behavior of the user terminal on each video, and only two types of information, user identification and video identification, can be obtained from the behavior log. Considering from the user's perspective, the user often clicks on the corresponding video to watch it out of at least one behavior intention. At least one behavior intention is included in the specific attribute features related to the video, and may be composed of different degrees of influence of multiple specific attribute features. For example, taking a long video of the movie category as an example, the user's behavior intention to watch movie C may be caused by specific attribute features such as role-role D, actor-star E, etc. Therefore, the behavior intention can be introduced to convert each group of behavior sequences into a triple form. The corresponding expression behavior can be (p, i, v), where p represents the user's behavior intention. The behavior intention p is related to different associated attributes r and specific attribute features v. The feature vector corresponding to the behavior intention can be expressed by aggregating its associated associated attributes r and specific attribute features V.
[0091] Based on the above content, for the user sequence of the same user terminal, the information contained in the video map (which can also be understood as an attribute association tree) and the behavior sequence can be integrated, and different user behaviors can be predicted by constructing different behavioral intentions, thereby establishing an intention association tree between behavioral intentions and video viewing. In one example, in establishing an intention association tree, the behavioral intention can be constructed as the intent root node in the intent association tree, the video identifier corresponding to the behavior sequence can be used as the video sub-node of the intent root node in the intent association tree, and the attribute sub-node related to the video identifier corresponding to the behavior sequence in the attribute association tree can be used as the attribute sub-node of the video sub-node in the intent association tree. The schematic structure of the intention association tree after construction can be referred to. Figure 4 Therefore, the several intention feature information corresponding to each user terminal can be reflected by different associated attributes r and specific attribute features v. Among them, the number of intention feature information corresponding to each user terminal can be determined according to the number of types of associated attributes in the video graph.
[0092] In one example, based on the connection relationship between the video subnode and the attribute subnode in the intent key tree, the attention mechanism is used to determine the first intention weight of each associated attribute in the behavior intention. And based on the first intention weight, several intention feature information corresponding to each user terminal is aggregated and generated. The expression formula of the intention feature information can be as follows:
[0093]
[0094] Where: e prepresents the intention feature information, α(r, p) represents the first intention weight, and e r Indicates the associated feature information corresponding to the associated attribute, and the associated feature information is automatically generated.
[0095] S207: Input each video feature information and each intention feature information into a third aggregation network to perform third feature aggregation, and determine preference feature information corresponding to each user terminal.
[0096] In an embodiment of the present invention, considering that users with similar behavioral intentions will show similar preferences for videos, further aggregation operations can be performed on several intention feature information corresponding to each user terminal, so as to determine the common information of preferred videos in several similar behavioral intentions, and use this as the preference feature information of the user terminal. For example, a user association tree can be constructed based on the intention association tree. That is, the triple form of (p, i, v) is constructed into (u, i, v). Among them, u represents different user identifiers (i.e. user ID). Among them, the feature vectors corresponding to different user identifiers are pre-set during the model training process. The user feature vectors corresponding to different users are different. In this user association tree, the user identifier obtained from the behavior sequence is used as the user root node, the video identifier in the behavior sequence is used as the video subnode of the user root node, and the specific attribute features are used as the attribute subnode of the video subnode. The schematic structure of the user association tree can be referred to. Figure 5 As shown in the figure, since behavioral intention is highly correlated with associated attributes and specific attribute features, when the video feature information is represented by node feature information of different orders, the video feature information preferred by the corresponding user will also change accordingly. Therefore, the user feature information corresponding to each order can be determined based on the video feature information and intention feature information corresponding to each order, wherein the user feature information e u (L) It can be calculated by the following formula:
[0097]
[0098] Nu={(p,i)(u,p,i)∈G}
[0099] Formula (6)
[0100] In the above formulas (5) and (6), N u represents the intention attribute and first-order connectivity of the user root node; G is the user association tree; L is an integer greater than 0. Its specific value is determined according to the above description. Among them, β(u, p) represents the second intention weight, which can be determined by the attention mechanism, and the importance of different behavioral intentions is evaluated by the second intention weight.
[0101] By analogy, user characteristic information at different levels can be obtained, and the user characteristic information at each level can be aggregated to obtain the attribute characteristic information of the video preferred by the user, and used as the preference characteristic information of the user terminal. Repeating the above steps, the preference characteristic information of each user terminal can be obtained. u (*) The aggregation formula can be as follows:
[0102]
[0103] Through the continuous aggregation of users, videos, and specific attribute features, user behaviors and video attributes can be expressed in the form of deep semantics, thus enabling high-precision video recommendation capabilities and providing data support for the interpretability of recommendation services.
[0104] S208: Calculate the information similarity between the preference feature information corresponding to each user terminal and the video feature information corresponding to each video.
[0105] In the embodiment of the present invention, the preference feature information and video feature information are both multidimensional vectors, which can be regarded as vector representations of specific attribute features that meet the user's viewing interest intention. Therefore, the preference feature information corresponding to each user can be respectively calculated with the video feature information corresponding to each video. That is, the specific information similarity can be determined by calculating the vector inner product. For example, the calculation formula of the information similarity y can be as follows:
[0106]
[0107] S209: Determine multiple target videos preferred by each user terminal based on a number of information similarities, and generate corresponding inverted index files based on the multiple target videos.
[0108] S210: Send video data and inverted index files corresponding to multiple target videos to corresponding user terminals, so that the user terminals can make video recommendations according to the inverted index files.
[0109] In an embodiment of the present invention, the recommendation priority of multiple target videos is specified in the inverted index file. For each user terminal, screening can be performed based on the calculated information similarities. In one example, a video threshold of the target video can be preset for screening, and the video threshold can be determined based on the number of videos displayed in the waterfall flow of the homepage of the video recommendation interface in the user terminal. Therefore, several information similarities can be arranged in descending order, and multiple information similarities with the same video threshold can be selected in descending order from the several information similarities after descending arrangement. The target videos corresponding to the selected several information similarities are most in line with the user's viewing interest intention. Therefore, recommending multiple target videos on the user terminal can greatly increase the probability of users watching the target videos. Thereby, the user experience can be improved.
[0110] In one example, the recommendation priorities of several selected information similarities can be determined according to the similarity values. The higher the information similarity, the higher the corresponding recommendation priority, and the first recommendation is made. According to this recommendation logic, the mapping relationship between each recommendation priority and the video ID is determined. Based on this mapping relationship, the corresponding inverted index file is generated. The video data and inverted index files corresponding to the multiple target videos are sent to the corresponding user terminals. After receiving the video data and the inverted index file, the user terminal recommends the video according to the inverted index file in the target page, such as the waterfall flow of the home page.
[0111] Similarly, the corresponding recommended videos can be returned according to the behavior logs corresponding to each user terminal, thereby realizing personalized applications for users and increasing user stickiness. Combining video graphs and behavior sequences, the specific attribute feature distribution that meets the user's interest intentions can be accurately determined, and the accuracy of recommending videos to user terminals can be improved through preference feature information. In addition, the introduction of video graphs can be visualized, thereby enhancing the interpretability of video recommendations and providing data support for the optimization of later video recommendation methods. In addition, video graphs are data unique to video websites, which can form a differentiated data barrier with other operators.
[0112] Reference Figure 6 , an embodiment of the present invention provides another video recommendation method, the method may include:
[0113] S601: labeling attribute features of short videos according to a preset label generation model.
[0114] S602: Use the video identification corresponding to each short video as an identification node, and use the corresponding marked specific attribute features as attribute nodes to create a video graph corresponding to the short video.
[0115] In an embodiment of the present invention, a video graph corresponding to a UGC short video can be created in advance. For a UGC short video, the short video can be detected by a preset label generation model, so that the annotated label is used as a specific attribute feature, wherein the associated attributes corresponding to the connecting edge may include but are not limited to video type, content, characters, etc. A video graph corresponding to the UGC short video is constructed based on the logic of the above video graph.
[0116] S603: Obtain behavior logs of several user terminals clicking on videos within a preset time interval.
[0117] S604: Determine a corresponding target sequence according to each behavior log.
[0118] S605: Filter out behavior sequences corresponding to the short videos from each target sequence.
[0119] In an embodiment of the present invention, a behavior log of several user terminals clicking on videos within a preset time interval can be obtained. For example, the behavior log can be determined based on a click operation on a displayed video in a waterfall flow on the home page of the user terminal. Thus, in the behavior log of each user terminal, the time distribution of user clicks on videos and the video ID (i.e., video identifier) corresponding to the clicked video can be obtained, so that the video IDs can be arranged in chronological order, and the target sequence corresponding to each behavior log can be determined, wherein the target sequence after the operation is performed can be determined as the behavior sequence corresponding to the short video based on the difference information on the video ID of the long video and the short video, for example, the video ID corresponding to the long video contained in the target sequence can be cleared based on the video ID.
[0120] S606: Input the video graph and several groups of behavior sequences into a video recommendation model to obtain several pieces of target feature information.
[0121] S607: Determine the target video preferred by the corresponding user terminal according to each target feature information.
[0122] S608: Send the video data corresponding to the target video to the corresponding user terminal for making video recommendations in each user terminal.
[0123] In the embodiment of the present invention, the description of steps S606-S608 refers to the description of steps S205-S210.
[0124] The present invention separately models long and short videos according to the differences in users' interests in long and short videos, thereby capturing users' interest preferences in videos in a more fine-grained manner, which is conducive to increasing user stickiness and experience.
[0125] The video recommendation method may further include a training step of training the video recommendation network, and the training step may include:
[0126] Obtain sample video graphs and several groups of sample behavior sequences.
[0127] The sample video graph and each group of sample behavior sequences are combined respectively and input into a video recommendation model to obtain target feature information, wherein the target feature information includes preference feature information corresponding to the sample behavior sequence and video feature information of each video in the sample behavior sequence.
[0128] According to the predicted similarities between the video feature information and the preference feature information, and the difference between the corresponding labeled similarities, the model parameters of the video recommendation model are adjusted to determine a trained video recommendation model.
[0129] The annotation similarity is calculated in advance. Among them, since the video types in the video website usually include two types of videos, long videos and short videos, and since the user's intention to prefer these two types of videos is quite different. Therefore, in the model training, the sample training graphs and sample behavior sequences corresponding to the two video types are separated, that is, the model is trained separately for the two video types. Correspondingly, the training step may include a first training step for long videos and a second training step for short videos, the sample training graph includes a first training graph and a second training graph, and the sample behavior sequence includes a first behavior sequence and a second behavior sequence.
[0130] In one embodiment, the first training step may include the following sub-steps:
[0131] A first video graph and several groups of first behavior sequences are obtained, where the first video graph is a video graph corresponding to a long video, and the first behavior sequence is a behavior sequence corresponding to the long video.
[0132] The first video graph and each group of first behavior sequences are respectively combined and input into a video recommendation model to obtain first feature information, wherein the first feature information includes preference feature information corresponding to the first behavior sequence and video feature information of each video in the first behavior sequence;
[0133] According to the predicted similarity between the video feature information and the preference feature information, and the difference between the corresponding labeled similarities, the model parameters of the video recommendation model are adjusted to obtain the video recommendation model trained in the first stage.
[0134] In one embodiment, the second training step may include the following sub-steps:
[0135] A second video graph and several groups of second behavior sequences are obtained, where the second video graph is a video graph corresponding to the short video, and the second behavior sequence is a behavior sequence corresponding to the short video.
[0136] The second video graph and each group of second behavior sequences are combined respectively, and input into the video recommendation model trained in the first stage to obtain second feature information, wherein the second feature information includes preference feature information corresponding to the second behavior and video feature information of each video in the first behavior sequence;
[0137] According to the predicted similarity between the video feature information and the preference feature information, and the difference between the corresponding labeled similarities, the model parameters of the video recommendation model trained in the first stage are adjusted to obtain the video recommendation model trained in the second stage, and this model is determined as the final trained video recommendation model.
[0138] In another embodiment, the second training step may be performed first, and then the first training step. That is, the model trained in the first stage is used as the final trained video recommendation model, and the training sequence is not limited too much.
[0139] When the video recommendation model may include a first aggregation network, a second aggregation network, and a third aggregation network, correspondingly, adjusting the model parameters may include adjusting network parameters of the first aggregation network, the second aggregation network, and the third aggregation network.
[0140] In the above model training process, it is possible to determine whether the model training is complete based on the BPR (Bayesian Personalized Ranking) loss function. For example, when the corresponding loss function value changes very little, such as when the change in the preset number of training times is within 1‰, it is determined that the video recommendation model training is complete. Afterwards, an inverted index file of the video is constructed based on the video feature information and preference feature information, thereby completing the recall inverted ranking of the video, and finally performing a database filling operation for use in various application scenarios of recommending videos to user terminals.
[0141] In order to provide intuitive interpretability for the video recommendation results later, the sample video graph used to train the model can be saved, for example, in a neo4j graph database, and the graph database service can be directly accessed through a web page to return the visualization results. Figure 7 As shown, the description of the sample video atlas refers to the description of the video atlas in the above embodiment.
[0142] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0143] Reference Figure 8 , an embodiment of the present invention provides a video recommendation device, which may include:
[0144] The graph acquisition module 801 is used to obtain a video graph, wherein the video graph includes a plurality of nodes and a plurality of connecting edges connecting two nodes, wherein the connecting edges represent the associated attributes between two nodes that establish edge connections, and wherein the nodes include identification nodes that identify different videos and attribute nodes that represent specific attribute features.
[0145] The log acquisition module 802 is used to obtain the behavior logs of several user terminals clicking on videos within a preset time interval, and determine the corresponding behavior sequence based on each behavior log, wherein the behavior sequence is determined based on the video identifiers clicked in time sequence in the behavior log.
[0146] The target feature determination module 803 is used to input the video graph and several groups of behavior sequences into the video recommendation model to obtain several pieces of target feature information, wherein the target feature information includes preference feature information corresponding to each user terminal and video feature information corresponding to each video.
[0147] The target video determination module 804 is used to determine the target video preferred by the corresponding user terminal according to each target feature information.
[0148] The data sending module 805 is used to send the video data corresponding to the target video to the corresponding user terminal, so as to make video recommendations in each user terminal.
[0149] In an optional embodiment of the invention, the video recommendation model includes a first aggregation network, a second aggregation network, and a third aggregation network, and the target feature determination module 803 may include:
[0150] The first aggregation submodule is used to input the video graph into the first aggregation network to perform first feature aggregation and determine video feature information corresponding to each video.
[0151] The second aggregation submodule is used to input the video graph and several groups of behavior sequences into the second aggregation network to perform second feature aggregation, and determine several intention feature information corresponding to each user terminal.
[0152] The third aggregation submodule is used to input each video feature information and each intention feature information into a third aggregation network to perform third feature aggregation and determine the preference feature information corresponding to each user terminal.
[0153] In an optional embodiment of the invention, the first aggregation submodule is further used for:
[0154] Based on the video graph, an attribute association tree corresponding to each video is determined, wherein the identification node in the video graph is used as the attribute root node in the attribute association tree, and the attribute node in the video graph is used as the attribute child node in the attribute association tree.
[0155] According to the association path formed by the attribute root node and the attribute child nodes adjacent to the attribute root node at L levels, node feature information of the video matching the attribute root node at each level is aggregated and generated respectively, where L is an integer greater than 0.
[0156] Aggregate the feature information of nodes at each order to obtain the video feature information corresponding to each video.
[0157] In an optional embodiment of the invention, the second aggregation submodule is further used for:
[0158] Based on the attribute association tree and several groups of behavior sequences, the intention association tree corresponding to each user terminal is determined, wherein the behavior intention is constructed as the intention root node in the intention association tree, the video identifier corresponding to the behavior sequence is used as the video sub-node of the intention root node in the intention association tree, and the attribute sub-node related to the video identifier corresponding to the behavior sequence in the attribute association tree is used as the attribute sub-node of the video sub-node in the intention association tree.
[0159] Determine a first intention weight of a behavior intention corresponding to each intention root node in the intention association tree.
[0160] Based on the first intention weight, a number of intention feature information corresponding to each user terminal is aggregated and generated.
[0161] In an optional embodiment of the invention, the target video determination module 804 may include:
[0162] The information similarity between the preference feature information corresponding to each user terminal and the video feature information corresponding to each video is calculated respectively.
[0163] Based on a number of information similarities, multiple target videos preferred by each user terminal are determined, and corresponding inverted index files are generated based on the multiple target videos, wherein the recommendation priorities of the multiple target videos are specified in the inverted index file.
[0164] In an optional embodiment of the invention, the data sending module 805 may also be used for:
[0165] The video data and inverted index files corresponding to the multiple target videos are sent to the corresponding user terminals, so that the user terminals can make video recommendations according to the inverted index files.
[0166] In an optional embodiment of the invention, the atlas acquisition module 801 may include:
[0167] The first graph determination submodule is used to obtain a website graph, clean the website graph, and obtain a video graph corresponding to the long video.
[0168] or,
[0169] The feature annotation submodule is used to annotate the attribute features of short videos according to a preset label generation model.
[0170] The second graph determination submodule is used to use the video identification corresponding to each short video as an identification node, and the corresponding marked specific attribute features as attribute nodes to create a video graph corresponding to the short video.
[0171] In an optional embodiment of the invention, the log acquisition module 802 may include:
[0172] The target sequence determination submodule is used to determine the corresponding target sequence based on each behavior log.
[0173] The behavior sequence determination submodule is used to filter out the behavior sequence corresponding to the long video / short video from each target sequence.
[0174] The embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0175] Memory 903, used for storing computer programs;
[0176] The processor 901 is used to execute the program stored in the memory 903 to implement the following steps:
[0177] Obtain a video graph, wherein the video graph includes a plurality of nodes and a plurality of connection edges connecting two nodes, wherein the connection edges represent the associated attributes between two nodes that establish edge connection, and the nodes include identification nodes that identify different videos and attribute nodes that represent specific attribute features;
[0178] Obtaining behavior logs of a plurality of user terminals clicking on videos within a preset time interval, and determining a corresponding behavior sequence according to each behavior log, wherein the behavior sequence is determined according to video identifiers clicked in time sequence in the behavior log;
[0179] Inputting the video graph and several groups of behavior sequences into a video recommendation model to obtain several pieces of target feature information, wherein the target feature information includes preference feature information corresponding to each user terminal and video feature information corresponding to each video;
[0180] Determine the target video preferred by the corresponding user terminal according to each target feature information;
[0181] The video data corresponding to the target video is sent to the corresponding user terminal for making video recommendations in each user terminal.
[0182] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0183] The communication interface is used for communication between the above terminal and other devices.
[0184] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0185] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (LP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0186] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the video recommendation method described in any one of the above embodiments.
[0187] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the video recommendation method described in any one of the above embodiments.
[0188] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0189] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0190] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0191] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A video recommendation method, characterized in that: The method comprises: Obtain a video graph, wherein the video graph includes a plurality of nodes and a plurality of connection edges connecting two nodes, wherein the connection edges represent the associated attributes between two nodes that establish edge connection, and the nodes include identification nodes that identify different videos and attribute nodes that represent specific attribute features; Obtaining behavior logs of a plurality of user terminals clicking on videos within a preset time interval, and determining a corresponding behavior sequence according to each behavior log, wherein the behavior sequence is determined according to video identifiers clicked in time sequence in the behavior log; Inputting the video graph and several groups of behavior sequences into a video recommendation model to obtain several pieces of target feature information, wherein the target feature information includes preference feature information corresponding to each user terminal and video feature information corresponding to each video; Determine the target video preferred by the corresponding user terminal according to each target feature information; Sending the video data corresponding to the target video to the corresponding user terminal for recommending the video in each user terminal; The video recommendation model includes a first aggregation network, a second aggregation network, and a third aggregation network. The video graph and a plurality of groups of behavior sequences are input into the video recommendation model to obtain a plurality of target feature information, including: Inputting the video graph into the first aggregation network to perform first feature aggregation to determine video feature information corresponding to each video; Inputting the video graph and several groups of behavior sequences into the second aggregation network to perform second feature aggregation, and determining several pieces of intention feature information corresponding to each user terminal; Each video feature information and each intention feature information is input into a third aggregation network to perform third feature aggregation, and determine the preference feature information corresponding to each user terminal.
2. The video recommendation method according to claim 1, characterized in that: The step of inputting the video graph into the first aggregation network to perform first feature aggregation and determine video feature information corresponding to each video includes: Determine the attribute association tree corresponding to each video according to the video graph, wherein the identification node in the video graph is used as the attribute root node in the attribute association tree, and the attribute node in the video graph is used as the attribute child node in the attribute association tree; According to the association path formed by the attribute root node and the attribute child nodes adjacent to the attribute root node at L levels, node feature information of the video matching the attribute root node at each level is aggregated and generated respectively, where L is an integer greater than 0; Aggregate the feature information of nodes at each order to obtain the video feature information corresponding to each video.
3. The video recommendation method according to claim 2, characterized in that: The step of inputting the video graph and the plurality of groups of behavior sequences into the second aggregation network for second feature aggregation to determine a plurality of intention feature information corresponding to each user terminal includes: According to the attribute association tree and several groups of behavior sequences, an intention association tree corresponding to each user terminal is determined, wherein the behavior intention is constructed as an intention root node in the intention association tree, the video identifier corresponding to the behavior sequence is used as a video subnode of the intention root node in the intention association tree, and the attribute subnode related to the video identifier corresponding to the behavior sequence in the attribute association tree is used as an attribute subnode of the video subnode in the intention association tree; Determine a first intention weight of a behavior intention corresponding to each intention root node in the intention association tree; Based on the first intention weight, a number of intention feature information corresponding to each user terminal is aggregated and generated.
4. The video recommendation method according to claim 3, characterized in that: The step of determining the target video preferred by the corresponding user terminal according to each target feature information includes: Calculating information similarity between preference feature information corresponding to each user terminal and video feature information corresponding to each video; Based on a number of information similarities, multiple target videos preferred by each user terminal are determined, and corresponding inverted index files are generated based on the multiple target videos, wherein the recommendation priorities of the multiple target videos are specified in the inverted index file.
5. The video recommendation method according to claim 4, characterized in that: The sending of the video data corresponding to the target video to the corresponding user terminal for recommending the video in each user terminal includes: The video data and inverted index files corresponding to the multiple target videos are sent to the corresponding user terminals, so that the user terminals can make video recommendations according to the inverted index files.
6. The video recommendation method according to claim 1, characterized in that: The obtaining of the video atlas comprises: Obtain a website map, clean the website map, and obtain a video map corresponding to the long video; or, Label the attribute features of short videos according to the preset label generation model; The video identifier corresponding to each short video is used as the identification node, and the corresponding marked specific attribute features are used as attribute nodes to create a video graph corresponding to the short video.
7. The video recommendation method according to claim 6, characterized in that: Determining the corresponding behavior sequence according to each behavior log includes: Determine the corresponding target sequence based on each behavior log; Filter out the behavior sequences corresponding to the long videos / short videos from each target sequence.
8. The video recommendation method according to claim 1, characterized in that: The method further comprises a step of training the video recommendation model, wherein the training step comprises: Obtain sample video graphs and several groups of sample behavior sequences; The sample video graph and each group of sample behavior sequences are combined respectively, and input into a video recommendation model to obtain target feature information, wherein the target feature information includes preference feature information corresponding to the sample behavior sequence and video feature information of each video in the sample behavior sequence; According to the predicted similarities between the video feature information and the preference feature information, and the difference between the corresponding labeled similarities, the model parameters of the video recommendation model are adjusted to determine a trained video recommendation model.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 8 when executing a program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Video recommendation method and device, electronic equipment and storage medium
CN113742561A