Graph network model training method, video recommendation method, device and electronic equipment

By generating a connected graph and training a graph network model, related videos are recommended based on users' historical behavior data, solving the problem of single video recommendation in existing technologies and realizing diverse video recommendation.

CN114218432BActive Publication Date: 2025-11-11BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010988799.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-18
Publication Date
2025-11-11
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

Current technologies recommend only a limited range of videos to users, which fails to meet their video viewing needs.

Method used

By acquiring users' historical video viewing behavior data, a connected graph is generated. Using graph network model training methods, the correlation between video identifiers is determined. Then, using positive and negative sample data, the graph network model is trained to extract video vectors and recommend related videos.

Benefits of technology

It enables the recommendation of diverse videos to users, meeting their video viewing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218432B_ABST
    Figure CN114218432B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a graph network model training method, a video recommendation method, an apparatus and an electronic device. The method comprises: obtaining historical behavior data of a user watching a video; generating a connected graph based on the historical behavior data; determining video identifiers associated with each video identifier according to the correlation between the video identifiers in the connected graph and the correlation size; for each video identifier, determining the video identifiers associated with the video identifier as positive sample data, and determining the video identifiers not associated with the video identifier as negative sample data; training a graph network model using the positive sample data and the negative sample data to obtain a trained graph network model, so as to extract a video vector corresponding to the video identifier through the trained graph network model. It can be seen that the connected graph can be generated based on the historical behavior data, and the graph network model is trained according to the generated connected graph to obtain the trained graph network model, which is beneficial to recommending videos of interest to the user to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video recommendation technology, and in particular to graph network model training methods, video recommendation methods, devices, and electronic devices. Background Technology

[0002] With the continuous development of technology, mobile phones and other mobile devices are becoming increasingly popular, and more and more users are watching short videos on them. To meet users' video viewing needs, videos that users may be interested in are typically recommended.

[0003] In related technologies, personalized video recommendations are typically made by analyzing users' historical viewing behavior data. Specifically, user profiles can be created by analyzing users' historical viewing behavior data, and short videos that match these user profiles can be recommended.

[0004] However, in practical applications, users' interests may change, resulting in the technology recommending only a limited range of videos, which fails to meet users' video viewing needs. Summary of the Invention

[0005] To address the technical problem that related technologies often recommend only a limited variety of videos to users, thus failing to meet their video viewing needs, this disclosure provides a graph network model training method, a video recommendation method, a device, and electronic equipment. The technical solution of this disclosure is as follows:

[0006] According to a first aspect of the present disclosure, a graph network model training method is provided, comprising:

[0007] Obtain historical video viewing behavior data from users;

[0008] A connected graph is generated based on the historical behavior data, wherein the node identifier of the node in the connected graph is a video identifier, the edge in the connected graph is used to connect the nodes corresponding to the video identifiers that are directly related in the historical behavior data, and the edge weight of each edge in the connected graph is used to characterize the degree of correlation between the videos corresponding to the video identifiers of the two nodes connected by the edge.

[0009] Based on the correlation and correlation magnitude between video identifiers in the connected graph, determine the video identifiers associated with each video identifier;

[0010] For each video identifier, video identifiers associated with that video identifier are identified as positive sample data, and video identifiers not associated with that video identifier are identified as negative sample data;

[0011] The graph network model is trained using the positive and negative sample data to obtain a trained graph network model, which is then used to extract video vectors corresponding to video identifiers.

[0012] Optionally, the correlation between the video identifiers includes: direct correlation and indirect correlation between the video identifiers, wherein the indirect correlation between the video identifiers is used to indicate that the video identifiers are indirectly connected through multiple edges in the connected graph;

[0013] The step of determining the video identifier associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph includes:

[0014] For any video identifier in the connected graph, the random walk sequence corresponding to the video identifier is determined by using a random walk method based on the direct correlation between the video identifier and other video identifiers, the magnitude of the direct correlation, the indirect correlation, and the magnitude of the indirect correlation.

[0015] For any video identifier in the connected graph, each video identifier in the random walk sequence corresponding to that video identifier is determined as a video identifier associated with that video identifier.

[0016] Optionally, the connected graph is a directed connected graph, and the edges in the connected graph are directed edges. The direction of the directed edges is determined based on the order of user video interactions in historical behavior data.

[0017] Determining the edge weight of each edge in the connected graph includes:

[0018] For any directed edge in a directed connected graph, the edge weight is determined according to the following formula:

[0019] edge_weight=edge_number / math.log10(dst_node_popularity+A);

[0020] Where edge_weight is the edge weight of the directed edge, edge_number is the sum of the number of connected edges corresponding to the starting point and the ending point of the directed edge, dst_node_popularity is the popularity of the video corresponding to the video identifier at the ending point of the directed edge, and A is a constant.

[0021] Optionally, when the graph network model meets the preset conditions, the trained graph network model is obtained, wherein the preset conditions are used to characterize that the graph network model's recognition accuracy for the positive sample data and the negative sample data is greater than a preset accuracy.

[0022] The preset conditions include at least one of the following conditions:

[0023] The loss value of the loss function of the graph network model is less than a preset loss value; the semantic similarity between the video description information corresponding to the associated video identifiers determined by the graph network model is greater than a first preset similarity; and after the video vectors corresponding to the associated video identifiers determined by the graph network model are dimensionality reduced, the similarity of the dimensionality-reduced video vectors is greater than a second preset similarity.

[0024] According to a second aspect of the present disclosure, a video recommendation method is provided, comprising:

[0025] Input the video identifier of each video into the trained graph network model described in the first aspect to obtain the video vector corresponding to the video identifier of each video.

[0026] Based on the video vector corresponding to the video identifier of the video that the target user has interacted with in the past, determine the target user vector;

[0027] Calculate the similarity between the target user vector and the video vectors corresponding to the video identifiers of each video;

[0028] Recommend videos to the target user that have a similarity score greater than a predetermined similarity score.

[0029] Optionally, determining the target user vector based on the video vector corresponding to the video identifier of the videos the target user has historically interacted with includes:

[0030] The weighted video vector is obtained by summing the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past.

[0031] The weighted video vector is determined as the target user vector corresponding to the target user.

[0032] Optionally, calculating the similarity between the target user vector and the video vectors corresponding to the video identifiers of each video includes:

[0033] The similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated using the approximate nearest neighbor method.

[0034] According to a third aspect of the present disclosure, a graph network model training apparatus is provided, comprising:

[0035] The historical behavior data acquisition module is configured to acquire historical behavior data of users watching videos;

[0036] The connected graph generation module is configured to generate a connected graph based on the historical behavior data, wherein the node identifier of the node in the connected graph is a video identifier, the edge in the connected graph is used to connect the nodes corresponding to the video identifiers that are directly related in the historical behavior data, and the edge weight of each edge in the connected graph is used to characterize the degree of correlation between the videos corresponding to the video identifiers of the two nodes connected by the edge.

[0037] The video identifier determination module is configured to determine the video identifier associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph.

[0038] The sample data determination module is configured to, for each video identifier, determine the video identifiers associated with that video identifier as positive sample data and determine the video identifiers not associated with that video identifier as negative sample data;

[0039] The graph network model training module is configured to train the graph network model using the positive sample data and the negative sample data to obtain the trained graph network model, and to extract the video vector corresponding to the video identifier through the trained graph network model.

[0040] Optionally, the correlation between the video identifiers includes: direct correlation and indirect correlation between the video identifiers, wherein the indirect correlation between the video identifiers is used to indicate that the video identifiers are indirectly connected through multiple edges in the connected graph;

[0041] The video identifier determination module is specifically configured to execute:

[0042] For any video identifier in the connected graph, the random walk sequence corresponding to the video identifier is determined by using a random walk method based on the direct correlation between the video identifier and other video identifiers, the magnitude of the direct correlation, the indirect correlation, and the magnitude of the indirect correlation.

[0043] For any video identifier in the connected graph, each video identifier in the random walk sequence corresponding to that video identifier is determined as a video identifier associated with that video identifier.

[0044] Optionally, the connected graph is a directed connected graph, and the edges in the connected graph are directed edges. The direction of the directed edges is determined based on the order of user video interactions in historical behavior data.

[0045] The connected graph generation module is specifically configured to execute:

[0046] For any directed edge in a directed connected graph, the edge weight is determined according to the following formula:

[0047] edge_weight=edge_number / math.log10(dst_node_popularity+A);

[0048] Where edge_weight is the edge weight of the directed edge, edge_number is the sum of the number of connected edges corresponding to the starting point and the ending point of the directed edge, dst_node_popularity is the popularity of the video corresponding to the video identifier at the ending point of the directed edge, and A is a constant.

[0049] Optionally, when the graph network model meets the preset conditions, the trained graph network model is obtained, wherein the preset conditions are used to characterize that the graph network model's recognition accuracy for the positive sample data and the negative sample data is greater than a preset accuracy.

[0050] The preset conditions include at least one of the following conditions:

[0051] The loss value of the loss function of the graph network model is less than a preset loss value; the semantic similarity between the video description information corresponding to the associated video identifiers determined by the graph network model is greater than a first preset similarity; and after the video vectors corresponding to the associated video identifiers determined by the graph network model are dimensionality reduced, the similarity of the dimensionality-reduced video vectors is greater than a second preset similarity.

[0052] According to a fourth aspect of the present disclosure, a video recommendation device is provided, comprising:

[0053] The video vector acquisition module is configured to input the video identifiers of each video into the trained graph network model described in the third aspect, and obtain the video vectors corresponding to the video identifiers of each video.

[0054] The user vector determination module is configured to determine the target user vector corresponding to the target user by executing the video vector corresponding to the video identifier of the video that the target user has historically interacted with.

[0055] The similarity calculation module is configured to calculate the similarity between the target user vector and the video vector corresponding to the video identifier of each video.

[0056] The video recommendation module is configured to recommend videos to the target user that have a similarity greater than a predetermined similarity.

[0057] Optionally, the user vector determination module is specifically configured to execute:

[0058] The weighted video vector is obtained by summing the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past.

[0059] The weighted video vector is determined as the target user vector corresponding to the target user.

[0060] Optionally, the similarity calculation module is specifically configured to perform:

[0061] The similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated using an approximate nearest neighbor device.

[0062] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:

[0063] processor;

[0064] Memory used to store the processor's executable instructions;

[0065] The processor is configured to execute the instructions to implement the graph network model training method described in the first aspect, or the video recommendation method described in the second aspect.

[0066] According to a sixth aspect of the present disclosure, a storage medium is provided such that, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is able to perform the graph network model training method as described in the first aspect, or the video recommendation method as described in the second aspect.

[0067] According to a seventh aspect of the present disclosure, a computer program product including instructions is provided, which, when run on a computer, causes the computer to implement the graph network model training method of the first aspect, or the video recommendation method of the second aspect.

[0068] The technical solution provided in this disclosure involves acquiring historical video viewing behavior data of users; generating a connected graph based on the historical behavior data; determining video identifiers associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph; for each video identifier, determining video identifiers associated with that video identifier as positive sample data and video identifiers not associated with that video identifier as negative sample data; training a graph network model using the positive and negative sample data to obtain a trained graph network model, and extracting video vectors corresponding to video identifiers through the trained graph network model.

[0069] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs. Attached Figure Description

[0070] Figure 1 This is a flowchart illustrating a graph network model training method according to an exemplary embodiment;

[0071] Figure 2 This is a flowchart illustrating a video recommendation method according to an exemplary embodiment;

[0072] Figure 3 This is a block diagram illustrating a graph network model training apparatus according to an exemplary embodiment;

[0073] Figure 4 This is a block diagram illustrating a video recommendation device according to an exemplary embodiment;

[0074] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment;

[0075] Figure 6 This is a block diagram illustrating an apparatus for training a graph network model or recommending videos according to an exemplary embodiment;

[0076] Figure 7 This is a block diagram illustrating another apparatus for training a graph network model or recommending videos, according to an exemplary embodiment. Detailed Implementation

[0077] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0078] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0079] To address the technical problem that related technologies often recommend only a limited variety of videos to users, thus failing to meet their video viewing needs, this disclosure provides a graph network model training method, a video recommendation method, an apparatus, and an electronic device.

[0080] Firstly, a graph network model training method provided by the embodiments of this disclosure will be described in detail.

[0081] like Figure 1 As shown in the embodiments of this disclosure, a graph network model training method may include the following steps:

[0082] In step S11, the user's historical video viewing behavior data is obtained.

[0083] Specifically, a large amount of historical user behavior data regarding video viewing can be obtained. This historical video viewing behavior data may include: the video ID of the video viewed by the user, the time the user watched the video, the duration the user watched the video, the number of times the user clicked on the video, the number of times the user watched the video, and the number of times the user forwarded the video, etc. This disclosure does not specifically limit the historical user behavior data regarding video viewing.

[0084] In step S12, a connected graph is generated based on historical behavior data.

[0085] In this connected graph, the node identifier of each node is a video identifier. The edges in the connected graph are used to connect nodes corresponding to video identifiers that are directly related in the historical behavior data. The edge weight of each edge in the connected graph is used to represent the degree of relevance between the video identifiers of the two nodes connected by the edge.

[0086] Specifically, after obtaining historical video viewing behavior data of users, the video identifiers can be used as node identifiers in the connected graph. Based on the video IDs of videos interacted by the same user in the historical video viewing behavior data, the nodes in the connected graph are connected. For example, if the video identifiers of videos interacted by the same user are Video 1 and Video 2, then Video 1 and Video 2 are directly related. Therefore, the node corresponding to Video 1 and the node corresponding to Video 2 can be connected as an edge in the connected graph. As another example, if the same user likes both Video 3 and Video 4, then Video 3 and Video 4 are directly related. The node corresponding to Video 3 and the node corresponding to Video 4 can be connected as an edge in the connected graph. Of course, this embodiment does not specifically limit how the edges of the connected graph are generated.

[0087] Furthermore, each edge in the connected graph can have an edge weight, which represents the relevance between the videos corresponding to the video identifiers of the two nodes connected by that edge. Understandably, a larger edge weight indicates a greater relevance between the videos corresponding to the video identifiers of the two nodes connected by that edge, and vice versa.

[0088] For example, users who watch videos with video identifier 1 often also watch videos with video identifier 2, indicating a high correlation between videos with video identifier 1 and videos with video identifier 2. Therefore, the edge connecting the node with video identifier 1 and the node with video identifier 2 can be assigned a higher edge weight. Of course, this is just one example of how to determine edge weights, and this disclosure does not specifically limit the specific implementation method for determining edge weights. Furthermore, for clarity, the specific implementation method for determining the edge weight of each edge in the connected graph will be described in the following embodiments.

[0089] In step S13, the video identifier associated with each video identifier is determined based on the correlation and correlation magnitude between video identifiers in the connected graph.

[0090] Specifically, the correlation between video identifiers can include both direct and indirect correlations. Indirect correlations between video identifiers are used to indicate that video identifiers are indirectly connected through multiple edges in a connected graph.

[0091] Specifically, if two nodes in a connected graph are directly connected by an edge, it means that the video identifiers corresponding to these two nodes are directly related; if two nodes in a connected graph are indirectly connected by an edge, it means that the video identifiers corresponding to these two nodes are indirectly related.

[0092] For example, the node corresponding to video identifier 1 is directly connected to the node corresponding to video identifier 2 via an edge, and the node corresponding to video identifier 2 is also directly connected to the node corresponding to video identifier 3 via an edge. Therefore, video identifier 1 and video identifier 2 are directly related, video identifier 2 and video identifier 3 are also directly related, and video identifier 1 and video identifier 3 are indirectly related. Both video identifier 2 and video identifier 3 are video identifiers associated with video identifier 1.

[0093] In one implementation, determining the video identifier associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph may include the following steps, namely steps a1 and a2:

[0094] Step a1: For any video identifier in the connected graph, determine the random walk sequence corresponding to the video identifier using a random walk method based on the direct correlation, the magnitude of the direct correlation, the indirect correlation, and the magnitude of the indirect correlation between the video identifier and other video identifiers.

[0095] Specifically, after generating the connected graph, for any video identifier in the connected graph, the random walk sequence corresponding to the video identifier can be determined by using a random walk method based on the edges connecting the node corresponding to the video identifier to the nodes corresponding to other video identifiers in the connected graph and the edge weights.

[0096] It should be noted that those skilled in the art will understand the specific implementation of obtaining the random walk sequence corresponding to each video identifier through random walk, and will not be elaborated here.

[0097] Step a2: For any video identifier in the connected graph, determine each video identifier in the random walk sequence corresponding to that video identifier as the video identifier associated with that video identifier.

[0098] Specifically, after obtaining the random walk sequence corresponding to any video identifier in the connected graph, each video identifier in the random walk sequence can be identified as a video identifier associated with that video identifier, and video identifiers not in the random walk sequence can be identified as video identifiers not associated with that video identifier.

[0099] In step S14, for each video identifier, video identifiers associated with that video identifier are determined as positive sample data, and video identifiers not associated with that video identifier are determined as negative sample data.

[0100] Understandably, training a graph network model requires collecting a large amount of sample data. For each video identifier, video identifiers associated with a video identifier can be identified as positive sample data, that is, they can be labeled with 1; and video identifiers not associated with a video identifier can be identified as negative sample data, that is, they can be labeled with 0.

[0101] In step S15, the graph network model is trained using positive and negative sample data to obtain the trained graph network model, and the video vector corresponding to the video identifier is extracted through the trained graph network model.

[0102] Specifically, after collecting a large amount of positive and negative sample data, this data can be input into a graph network model, and the graph neural network (GNN) algorithm can be used for supervised training. Understandably, when positive sample data is input into the graph network model, the output label is 1; when negative sample data is input, the output label is 0. This indicates that the trained graph network model has been obtained. In other words, when the graph network model's accuracy in recognizing positive and negative sample data exceeds a preset accuracy, it is considered to have achieved a trained graph network model. This trained model can then be used to extract video vectors corresponding to video identifiers when recommending videos to users.

[0103] Furthermore, to improve the accuracy of the trained graph network model, it can be evaluated. The trained graph network model is obtained when it meets preset conditions. These preset conditions characterize the graph network model's accuracy in recognizing positive and negative samples as exceeding a preset accuracy.

[0104] In one implementation, the preset condition can be that the loss value of the graph network model's loss function is less than a preset loss value. That is, when the loss value of the graph network model's loss function is less than the preset loss value, the graph network model is determined to be the trained graph network model.

[0105] Specifically, a loss function can be set for the graph network model. If the loss value of the graph network model is less than the preset loss value, it means that the loss value of the graph network model is small, and the recognition accuracy of the graph network model is high. In this case, the graph network model can be identified as the trained graph network model. If the loss value of the graph network model is greater than the preset loss value, it means that the loss value of the graph network model is large, and the recognition accuracy of the graph network model is low. In this case, it is necessary to continue training the graph network model, that is, to adjust the model parameters of the graph network model until the loss value of the graph network model is less than the preset loss value.

[0106] It should be noted that the present invention does not specifically limit the size of the preset loss value.

[0107] In another implementation, the preset condition can be that the semantic similarity between the video descriptions corresponding to the associated video identifiers determined by the graph network model is greater than a first preset similarity. That is, when the semantic similarity between the video descriptions corresponding to the associated video identifiers determined by the graph network model is greater than the first preset similarity, the graph network model is determined to be the trained graph network model.

[0108] In this implementation, when the graph network model determines that two video identifiers are associated video identifiers, it can calculate whether the semantic similarity between the video description information of the videos corresponding to these two video identifiers is greater than a first preset similarity. If the semantic similarity is greater than the first preset similarity, it indicates that the accuracy of the associated video identifiers determined by the graph network model is high. In this case, the graph network model can be determined as the trained graph network model. For example, if both videos are beauty-related videos, then the semantic similarity between the video description information of these two videos is high, that is, greater than the first preset similarity. If the semantic similarity is less than the first preset similarity, it indicates that the accuracy of the associated video identifiers determined by the graph network model is low. In this case, it is necessary to continue training the graph network model, that is, to adjust the model parameters of the graph network model until the semantic similarity between the video description information corresponding to the associated video identifiers determined by the graph network model is greater than the first preset similarity.

[0109] It should be noted that the embodiments disclosed herein do not specifically limit the magnitude of the first preset similarity. In another implementation, the preset condition can be that after reducing the dimensionality of the video vectors corresponding to the associated video identifiers determined by the graph network model, the similarity of the dimensionality-reduced video vectors is greater than the second preset similarity. That is, when the similarity of the dimensionality-reduced video vectors corresponding to the associated video identifiers determined by the graph network model is greater than the second preset similarity, the graph network model is determined to be the trained graph network model.

[0110] Specifically, after inputting positive and negative sample data into the graph network model, the model can extract the vectors corresponding to the positive and negative sample data, i.e., extract the video vectors corresponding to the video identifiers. In practical applications, the extracted video vectors corresponding to the video identifiers can have a dimension of 128. The 128-dimensional video vectors can be reduced to two-dimensional video vectors. If the similarity between the reduced-dimensional video vectors of two related video identifiers is greater than a second preset similarity, it indicates that the accuracy of the video vectors extracted by the graph network model is high. In this case, the graph network model can be considered the trained model. If the similarity between the reduced-dimensional video vectors of two related video identifiers is less than the second preset similarity, it indicates that the accuracy of the extracted video vectors is low. In this case, the graph network model needs to be further trained, i.e., the model parameters need to be adjusted, until the similarity of the reduced-dimensional video vectors is greater than the second preset similarity.

[0111] It should be noted that the embodiments disclosed herein do not specifically limit the magnitude of the second preset similarity.

[0112] It is understandable that any of the above implementation methods can be used to evaluate the graph network model. Of course, to improve the accuracy of the graph network model, it is reasonable to use all three implementation methods simultaneously to evaluate the graph network model.

[0113] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs.

[0114] To ensure clarity, the specific implementation of determining the edge weight of each edge in the connected graph will be described in the following embodiments.

[0115] In one implementation, the connected graph is a directed connected graph, and the edges in the connected graph are directed edges. The direction of the directed edges is determined based on the order of user video interactions in historical behavior data.

[0116] At this point, determining the edge weight of each edge in the connected graph can include the following steps:

[0117] For any directed edge in a directed connected graph, the edge weight is determined according to the following formula:

[0118] edge_weight=edge_number / math.log10(dst_node_popularity+A);

[0119] Where edge_weight is the edge weight of the directed edge, edge_number is the sum of the number of connected edges corresponding to the starting point and the ending point of the directed edge, dst_node_popularity is the popularity of the video corresponding to the video identifier at the ending point of the directed edge, and A is a constant.

[0120] In this implementation, the connected graph is a directed connected graph. The direction of the directed edges in the directed connected graph is determined based on the order of the user's video interactions in the historical behavior data. For example, if the user's historical behavior data shows that the user first watched the video corresponding to video identifier 1 and then watched the video corresponding to video identifier 2, then the direction of the directed edge connecting the node corresponding to video identifier 1 and the node corresponding to video identifier 2 can be: the node corresponding to video identifier 1 points to the node corresponding to video identifier 2.

[0121] To address the impact of edge weights on graph network models, popular nodes in the connected graph can be weighted less when calculating edge weights. The formula edge_weight = edge_number / math.log10(dst_node_popularity + A) can be used to calculate the edge weight of each edge. As can be seen from this formula, by setting dst_node_popularity + A as the denominator in the calculation of edge weights, the popular nodes in the connected graph can be weighted less, resulting in more accurate edge weights.

[0122] As can be seen, the edge weights of directed edges in the directed connected graph calculated through this implementation method are more accurate, thereby reducing the impact of edge weights on the accuracy of the graph network model.

[0123] Secondly, a video recommendation method provided by the embodiments of this disclosure will be described in detail.

[0124] like Figure 2 As shown in the embodiments of this disclosure, a video recommendation method may include the following steps:

[0125] In step S21, the video identifiers of each video are input into the trained graph network model described in the first aspect to obtain the video vectors corresponding to the video identifiers of each video.

[0126] Specifically, as described in the first aspect, the trained graph network model can accurately extract the video vectors corresponding to the video identifiers. Therefore, when recommending videos to target users, the video identifiers of each video can be input into the trained graph network model. After receiving the video identifiers of each video, the graph network model can extract the video vectors corresponding to the video identifiers of each video, and thus obtain the video vectors corresponding to the video identifiers of each video.

[0127] In step S22, the target user vector is determined based on the video vector corresponding to the video identifier of the video that the target user has interacted with in the past.

[0128] Specifically, the target user can be any user watching the video. After obtaining the video vector corresponding to the video identifier of each video, the video vector corresponding to the video identifier of the videos that the target user has interacted with in the past can be obtained. In order to accurately obtain the target user vector corresponding to the target user, a pooling operation can be performed on the video vectors corresponding to the videos that the target user has interacted with in the past to obtain the target user vector corresponding to the target user.

[0129] In one implementation, determining the target user vector based on the video vector corresponding to the video identifier of the videos the target user has historically interacted with may include the following steps:

[0130] The weighted video vector is obtained by summing the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past.

[0131] The weighted video vector is determined as the target user vector corresponding to the target user.

[0132] In this implementation, when determining the target user vector corresponding to the target user, the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past can be weighted and summed to obtain a weighted video vector, and the weighted video vector can be determined as the target user vector corresponding to the target user.

[0133] In the weighted summation, the weighting coefficient of the video vector corresponding to a video identifier can be determined based on the degree of interaction between the target user and the video with that identifier. For example, if the target user watches, likes, or comments on a video multiple times, the weighting coefficient of that video's identifier can be determined to be relatively large; if the target user only watches a video once and does not like or comment on it, the weighting coefficient of that video's identifier can be determined to be relatively small.

[0134] Of course, the above is just an example to illustrate how to determine the weighting coefficient of the video vector corresponding to the video identifier. In practical applications, the weighting coefficient of the video vector corresponding to each video identifier can also be determined according to the actual situation. This disclosure does not make specific limitations on this.

[0135] In step S23, the similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated.

[0136] After obtaining the video vectors corresponding to the video identifiers of each video and the target user vectors corresponding to the target users, the similarity between the target user vectors and the video vectors corresponding to the video identifiers of each video can be calculated. It can be understood that the higher the similarity between the target user vector and the video vector corresponding to a video identifier, the greater the probability that the target user likes to watch that video; conversely, the lower the similarity between the target user vector and the video vector corresponding to a video identifier, the lower the probability that the target user likes to watch that video.

[0137] In practical applications, due to the large number of target users and the large number of target user vectors corresponding to each target user, as well as the large number of video vectors corresponding to the video identifiers of each video, in order to reduce the computational cost of calculating similarity, one implementation method for calculating the similarity between the target user vectors and the video vectors corresponding to the video identifiers of each video may include the following steps:

[0138] The similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated using the approximate nearest neighbor method.

[0139] In this implementation, the similarity between the target user vector and the video vector can be calculated using the Approximate Nearest Neighbor (ANN) method. This approach reduces computational complexity while ensuring the accuracy of similarity calculation and increases the speed of similarity calculation.

[0140] In step S24, videos with a similarity greater than a predetermined similarity are recommended to the target user.

[0141] As described above, the higher the similarity between the target user vector and the video vector corresponding to the video identifier of a video, the greater the probability that the target user likes to watch that video. Therefore, videos corresponding to video identifiers with a similarity greater than a predetermined similarity can be recommended to the target user. In this way, the videos recommended to the target user are more likely to be videos that the target user is interested in, and the recommended videos are diverse, which can meet the user's video viewing needs.

[0142] The technical solution provided in this disclosure involves inputting the video identifiers of each video into a trained graph network model to obtain video vectors corresponding to the video identifiers of each video; determining the target user vector based on the video vectors corresponding to the video identifiers of videos that the target user has historically interacted with; calculating the similarity between the target user vector and the video vectors corresponding to the video identifiers of each video; and recommending videos to the target user whose similarity is greater than a predetermined similarity. Therefore, the technical solution provided in this disclosure has a high probability of recommending videos that are of interest to the target user, and the recommended videos are diverse, thus meeting the target user's video viewing needs.

[0143] According to a third aspect of the embodiments of this disclosure, a graph network model training apparatus is provided, such as... Figure 3 As shown, it includes:

[0144] The historical behavior data acquisition module 310 is configured to acquire historical behavior data of users watching videos.

[0145] The connected graph generation module 320 is configured to generate a connected graph based on the historical behavior data, wherein the node identifier of the node in the connected graph is a video identifier, the edge in the connected graph is used to connect the nodes corresponding to the video identifiers that are directly related in the historical behavior data, and the edge weight of each edge in the connected graph is used to characterize the degree of correlation between the videos corresponding to the video identifiers of the two nodes connected by the edge.

[0146] The video identifier determination module 330 is configured to determine the video identifier associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph.

[0147] The sample data determination module 340 is configured to, for each video identifier, determine the video identifier associated with that video identifier as positive sample data and determine the video identifier not associated with that video identifier as negative sample data;

[0148] The graph network model training module 350 is configured to train the graph network model using the positive sample data and the negative sample data to obtain the trained graph network model, so as to extract the video vector corresponding to the video identifier through the trained graph network model.

[0149] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs.

[0150] Optionally, the correlation between the video identifiers includes: direct correlation and indirect correlation between the video identifiers, wherein the indirect correlation between the video identifiers is used to indicate that the video identifiers are indirectly connected through multiple edges in the connected graph;

[0151] The video identifier determination module is specifically configured to execute:

[0152] For any video identifier in the connected graph, the random walk sequence corresponding to the video identifier is determined by using a random walk method based on the direct correlation between the video identifier and other video identifiers, the magnitude of the direct correlation, the indirect correlation, and the magnitude of the indirect correlation.

[0153] For any video identifier in the connected graph, each video identifier in the random walk sequence corresponding to that video identifier is determined as a video identifier associated with that video identifier.

[0154] Optionally, the connected graph is a directed connected graph, and the edges in the connected graph are directed edges. The direction of the directed edges is determined based on the order of user video interactions in historical behavior data.

[0155] The connected graph generation module is specifically configured to execute:

[0156] For any directed edge in a directed connected graph, the edge weight is determined according to the following formula:

[0157] edge_weight=edge_number / math.log10(dst_node_popularity+A);

[0158] Where edge_weight is the edge weight of the directed edge, edge_number is the sum of the number of connected edges corresponding to the starting point and the ending point of the directed edge, dst_node_popularity is the popularity of the video corresponding to the video identifier at the ending point of the directed edge, and A is a constant.

[0159] Optionally, when the graph network model meets the preset conditions, the trained graph network model is obtained, wherein the preset conditions are used to characterize that the graph network model's recognition accuracy for the positive sample data and the negative sample data is greater than a preset accuracy.

[0160] The preset conditions include at least one of the following conditions:

[0161] The loss value of the loss function of the graph network model is less than a preset loss value; the semantic similarity between the video description information corresponding to the associated video identifiers determined by the graph network model is greater than a first preset similarity; and after the video vectors corresponding to the associated video identifiers determined by the graph network model are dimensionality reduced, the similarity of the dimensionality-reduced video vectors is greater than a second preset similarity.

[0162] According to a fourth aspect of the embodiments of this disclosure, a video recommendation device is provided, such as... Figure 4 As shown, it includes:

[0163] The video vector acquisition module 410 is configured to input the video identifiers of each video into the trained graph network model described in the third aspect to obtain the video vectors corresponding to the video identifiers of each video.

[0164] User vector determination module 420 is configured to determine the target user vector corresponding to the target user by executing the video vector corresponding to the video identifier of the video that the target user has historically interacted with.

[0165] The similarity calculation module 430 is configured to calculate the similarity between the target user vector and the video vector corresponding to the video identifier of each video.

[0166] The video recommendation module 440 is configured to recommend videos corresponding to video identifiers with a similarity greater than a predetermined similarity to the target user.

[0167] The technical solution provided in this disclosure involves inputting the video identifiers of each video into a trained graph network model to obtain video vectors corresponding to the video identifiers of each video; determining the target user vector based on the video vectors corresponding to the video identifiers of videos that the target user has historically interacted with; calculating the similarity between the target user vector and the video vectors corresponding to the video identifiers of each video; and recommending videos to the target user whose similarity is greater than a predetermined similarity. Therefore, the technical solution provided in this disclosure has a high probability of recommending videos that are of interest to the target user, and the recommended videos are diverse, thus meeting the target user's video viewing needs.

[0168] Optionally, the user vector determination module is specifically configured to execute:

[0169] The weighted video vector is obtained by summing the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past.

[0170] The weighted video vector is determined as the target user vector corresponding to the target user.

[0171] Optionally, the similarity calculation module is specifically configured to perform:

[0172] The similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated using an approximate nearest neighbor device.

[0173] According to a fifth aspect of the embodiments of this disclosure, an electronic device is provided, such as... Figure 5 As shown, it includes:

[0174] Processor 510;

[0175] Memory 520 for storing processor-executable instructions;

[0176] The processor is configured to execute the instructions to implement the graph network model training method described in the first aspect, or the video recommendation method described in the second aspect.

[0177] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs.

[0178] Figure 6This is a block diagram illustrating an apparatus 600 for training a graph network model or recommending videos, according to an exemplary embodiment. For example, apparatus 600 may be provided as a server. (See also...) Figure 6 The device 600 includes a processing component 622, which further includes one or more processors, and memory resources represented by memory 632 for storing instructions, such as application programs, that can be executed by the processing component 622. The application programs stored in memory 632 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 622 is configured to execute instructions to perform the graph network model training method described in the first aspect, or the video recommendation method described in the second aspect.

[0179] Device 600 may also include a power supply component 626 configured to perform power management of device 600, a wired or wireless network interface 650 configured to connect device 600 to a network, and an input / output (I / O) interface 658. Device 600 may operate on an operating system stored in memory 632, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0180] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs.

[0181] Figure 7 This is a block diagram illustrating an apparatus 700 for training a graph network model or recommending videos, according to an exemplary embodiment. For example, apparatus 700 may be a mobile phone, computer, digital broadcasting electronic device, messaging transceiver, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0182] Reference Figure 7 The device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0183] Processing component 702 typically controls the overall operation of device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0184] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0185] Power supply assembly 707 provides power to the various components of device 700. Power supply assembly 707 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 700.

[0186] Multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0187] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0188] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0189] Sensor assembly 714 includes one or more sensors for providing status assessments of various aspects of device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of device 700, changes in the position of device 700 or a component of device 700, the presence or absence of user contact with device 700, the orientation or acceleration / deceleration of device 700, and temperature changes of device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0190] Communication component 716 is configured to facilitate wired or wireless communication between device 700 and other devices. Device 700 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0191] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the graph network model training method described in the first aspect, or the video recommendation method described in the second aspect.

[0192] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of the device 700 to perform the above-described method. Optionally, for example, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0193] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs.

[0194] According to an eighth aspect of the present disclosure, a computer program product including instructions is provided, which, when run on a computer, causes the computer to implement the graph network model training method of the first aspect, or the video recommendation method of the second aspect.

[0195] As can be seen, the technical solution provided by the embodiments of this disclosure can generate a connected graph based on the user's historical video viewing behavior data, and train a graph network model based on the generated connected graph to obtain a trained graph network model. This is beneficial for recommending videos that users are interested in to users in subsequent steps, thereby providing users with diverse video recommendations that can meet their video viewing needs.

[0196] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0197] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for training a graph network model, characterized in that, include: Obtain historical video viewing behavior data from users; A connected graph is generated based on the historical behavior data, wherein the node identifier of the node in the connected graph is a video identifier, the edge in the connected graph is used to connect the nodes corresponding to the video identifiers that are directly related in the historical behavior data, and the edge weight of each edge in the connected graph is used to characterize the degree of correlation between the videos corresponding to the video identifiers of the two nodes connected by the edge. Based on the correlation and correlation magnitude between video identifiers in the connected graph, determine the video identifiers associated with each video identifier; For each video identifier, video identifiers associated with that video identifier are identified as positive sample data, and video identifiers not associated with that video identifier are identified as negative sample data; The graph network model is trained using the positive and negative sample data to obtain the trained graph network model, and the video vector corresponding to the video identifier is extracted through the trained graph network model.

2. The method according to claim 1, characterized in that, The correlation between video identifiers includes: direct correlation and indirect correlation between video identifiers. The indirect correlation between video identifiers is used to indicate that video identifiers are indirectly connected through multiple edges in the connected graph. The step of determining the video identifier associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph includes: For any video identifier in the connected graph, the random walk sequence corresponding to the video identifier is determined by using a random walk method based on the direct correlation between the video identifier and other video identifiers, the magnitude of the direct correlation, the indirect correlation, and the magnitude of the indirect correlation. For any video identifier in the connected graph, each video identifier in the random walk sequence corresponding to that video identifier is determined as a video identifier associated with that video identifier.

3. The method according to claim 1, characterized in that, The connected graph is a directed connected graph, and the edges in the connected graph are directed edges. The direction of the directed edges is determined based on the order of user video interactions in historical behavior data. Determining the edge weight of each edge in the connected graph includes: For any directed edge in a directed connected graph, the edge weight is determined according to the following formula: edge_weight=edge_number / math.log10(dst_node_popularity+A); Where edge_weight is the edge weight of the directed edge, edge_number is the sum of the number of connected edges corresponding to the starting point and the ending point of the directed edge, dst_node_popularity is the popularity of the video corresponding to the video identifier at the ending point of the directed edge, and A is a constant.

4. The method according to any one of claims 1 to 3, characterized in that, When the graph network model satisfies the preset conditions, the trained graph network model is obtained, wherein the preset conditions are used to characterize that the graph network model's recognition accuracy for the positive sample data and the negative sample data is greater than the preset accuracy. The preset conditions include at least one of the following conditions: The loss value of the loss function of the graph network model is less than a preset loss value; the semantic similarity between the video description information corresponding to the associated video identifiers determined by the graph network model is greater than a first preset similarity; and after the video vectors corresponding to the associated video identifiers determined by the graph network model are dimensionality reduced, the similarity of the dimensionality-reduced video vectors is greater than a second preset similarity.

5. A video recommendation method, characterized in that, include: Input the video identifier of each video into the trained graph network model according to any one of claims 1 to 4 to obtain the video vector corresponding to the video identifier of each video. Based on the video vector corresponding to the video identifier of the video that the target user has interacted with in the past, determine the target user vector; Calculate the similarity between the target user vector and the video vectors corresponding to the video identifiers of each video; Recommend videos to the target user that have a similarity score greater than a predetermined similarity score.

6. The method according to claim 5, characterized in that, The determination of the target user vector based on the video vector corresponding to the video identifier of the video that the target user has historically interacted with includes: The weighted video vector is obtained by summing the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past. The weighted video vector is determined as the target user vector corresponding to the target user.

7. The method according to claim 5 or 6, characterized in that, The calculation of the similarity between the target user vector and the video vectors corresponding to the video identifiers of each video includes: The similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated using the approximate nearest neighbor method.

8. A graph network model training device, characterized in that, include: The historical behavior data acquisition module is configured to acquire historical behavior data of users watching videos; The connected graph generation module is configured to generate a connected graph based on the historical behavior data, wherein the node identifier of the node in the connected graph is a video identifier, the edge in the connected graph is used to connect the nodes corresponding to the video identifiers that are directly related in the historical behavior data, and the edge weight of each edge in the connected graph is used to characterize the degree of correlation between the videos corresponding to the video identifiers of the two nodes connected by the edge. The video identifier determination module is configured to determine the video identifier associated with each video identifier based on the correlation and correlation magnitude between video identifiers in the connected graph. The sample data determination module is configured to, for each video identifier, determine the video identifiers associated with that video identifier as positive sample data and determine the video identifiers not associated with that video identifier as negative sample data; The graph network model training module is configured to train the graph network model using the positive sample data and the negative sample data to obtain the trained graph network model, and to extract the video vector corresponding to the video identifier through the trained graph network model.

9. The apparatus according to claim 8, characterized in that, The correlation between video identifiers includes: direct correlation and indirect correlation between video identifiers. The indirect correlation between video identifiers is used to indicate that video identifiers are indirectly connected through multiple edges in the connected graph. The video identifier determination module is specifically configured to execute: For any video identifier in the connected graph, the random walk sequence corresponding to the video identifier is determined by using a random walk method based on the direct correlation between the video identifier and other video identifiers, the magnitude of the direct correlation, the indirect correlation, and the magnitude of the indirect correlation. For any video identifier in the connected graph, each video identifier in the random walk sequence corresponding to that video identifier is determined as a video identifier associated with that video identifier.

10. The apparatus according to claim 8, characterized in that, The connected graph is a directed connected graph, and the edges in the connected graph are directed edges. The direction of the directed edges is determined based on the order of user video interactions in historical behavior data. The connected graph generation module is specifically configured to execute: For any directed edge in a directed connected graph, the edge weight is determined according to the following formula: edge_weight=edge_number / math.log10(dst_node_popularity+A); Where edge_weight is the edge weight of the directed edge, edge_number is the sum of the number of connected edges corresponding to the starting point and the ending point of the directed edge, dst_node_popularity is the popularity of the video corresponding to the video identifier at the ending point of the directed edge, and A is a constant.

11. The apparatus according to any one of claims 8 to 10, characterized in that, When the graph network model satisfies the preset conditions, the trained graph network model is obtained, wherein the preset conditions are used to characterize that the graph network model's recognition accuracy for the positive sample data and the negative sample data is greater than the preset accuracy. The preset conditions include at least one of the following conditions: The loss value of the loss function of the graph network model is less than a preset loss value; the semantic similarity between the video description information corresponding to the associated video identifiers determined by the graph network model is greater than a first preset similarity; and after the video vectors corresponding to the associated video identifiers determined by the graph network model are dimensionality reduced, the similarity of the dimensionality-reduced video vectors is greater than a second preset similarity.

12. A video recommendation device, characterized in that, include: The video vector acquisition module is configured to input the video identifiers of each video into the trained graph network model as described in claim 6, and obtain the video vectors corresponding to the video identifiers of each video. The user vector determination module is configured to determine the target user vector corresponding to the target user by executing the video vector corresponding to the video identifier of the video that the target user has historically interacted with. The similarity calculation module is configured to calculate the similarity between the target user vector and the video vector corresponding to the video identifier of each video. The video recommendation module is configured to recommend videos to the target user that have a similarity greater than a predetermined similarity.

13. The apparatus according to claim 12, characterized in that, The user vector determination module is specifically configured to execute: The weighted video vector is obtained by summing the video vectors corresponding to the video identifiers of the videos that the target user has interacted with in the past. The weighted video vector is determined as the target user vector corresponding to the target user.

14. The apparatus according to claim 12 or 13, characterized in that, The similarity calculation module is specifically configured to execute: The similarity between the target user vector and the video vector corresponding to the video identifier of each video is calculated using an approximate nearest neighbor device.

15. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the graph network model training method as described in any one of claims 1 to 4, or the video recommendation method as described in any one of claims 5 to 7.

16. A storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the graph network model training method as described in any one of claims 1 to 4, or the video recommendation method as described in any one of claims 5 to 7.

17. A computer program product containing instructions, characterized in that, When run on a computer, it enables the computer to implement the graph network model training method as described in any one of claims 1 to 4, or the video recommendation method as described in any one of claims 5 to 7.

Citation Information

Patent Citations

  • Video recommendation method and device, information processing equipment and storage medium

    CN109558514A

  • Knowledge point recommendation method and device based on graph structure

    CN111460085A